The dataset viewer is not available for this split.
Error code: FeaturesError Exception: ValueError Message: Bad split: 1222. Available splits: ['train'] Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 219, in compute_first_rows_from_streaming_response iterable_dataset = load_dataset( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1409, in load_dataset return builder_instance.as_streaming_dataset(split=split) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1232, in as_streaming_dataset raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}") ValueError: Bad split: 1222. Available splits: ['train']
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Disclaimer
This work isn’t endorsed by Riot Games and doesn’t reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc.
League of Legends Replays Dataset
This dataset contains over 1TB+ (100k+ replays) of League of Legends game replay data for research in gaming analytics, behavioral modeling, and reinforcement learning applications. The dataset is organized by game patch versions (12_22, 12_23, etc.) with parsed packet-level game events. You can find older unorganized replays here.
Data Format
Each match JSONL file contains multiple maches of chronologically ordered list of packets representing all game events:
{
"events": [
{
"WaypointGroup": {
"time": 1.2,
"waypoints": {
"1001": [{"x": 100.5, "z": 200.3}]
}
}
},
{
"CastSpellAns": {
"time": 10.23234,
"champion_caster_id": 1073741859,
"spell_name": "AkaliE",
"level": 1,
"source_position": {
"x": 14045.15,
"z": 13559.334
},
"target_ids": [],
"windup_time": 0.25,
"cooldown": 14.5,
"mana_cost": 30.0,
"slot": 2
}
},
{
"BasicAttackPos": {
"time": 122.12,
"source_id": 1073741859,
"target_id": 1073741858,
"source_position": {
"x": 9222.389,
"z": 2501.3594
},
"target_position": {
"x": 9266.0,
"z": 2522.0
},
}
},
{
"ReplicationData": {
"time": 721.11426,
"1073741859": {
[
{
"name": "health",
"data": 1516.6107
},
]
}
}
},
]
}
Usage
Loading the Dataset
There's two ways to use this dataset:
Option 1: Using the Gym Environment (Recommended)
pip install league-of-legends-decoded-replay-packets-gym
import league_of_legends_decoded_replay_packets_gym as lol_gym
dataset = lol_gym.ReplayDataset([
"12_22/batch_001.jsonl.gz",
], repo_id="maknee/league-of-legends-decoded-replay-packets")
dataset.load(max_games=1)
print(f"Match has {len(dataset[0])} packets")
Option 2: Manual Download and Processing
from huggingface_hub import hf_hub_download
import json
import gzip
# Download and process directly
local_file = hf_hub_download(
repo_id="maknee/league-of-legends-decoded-replay-packets",
filename="12_22/batch_001.jsonl.gz",
repo_type="dataset"
)
# Process compressed file directly
with gzip.open(local_file, 'rt', encoding='utf-8') as f:
for line_num, line in enumerate(f):
match_data = json.loads(line)
packets = match_data["events"]
print(f"Match {line_num+1} has {len(packets)} packets")
Packet Schema
The dataset contains 20 packet types capturing all game events:
Packet Type | Description |
---|---|
CreateHero |
Champion spawn and initialization |
HeroDie |
Champion death events |
WaypointGroup |
Movement commands and pathfinding |
WaypointGroupWithSpeed |
Movement commands with speed data |
EnterFog |
Entity entering fog of war |
LeaveFog |
Entity leaving fog of war |
UnitApplyDamage |
Damage dealt between units |
DoSetCooldown |
Ability cooldown updates |
BasicAttackPos |
Basic attack with positional data |
CastSpellAns |
Spell/ability casting events |
BarrackSpawnUnit |
Minion spawning from barracks |
SpawnMinion |
General minion spawn events |
CreateNeutral |
Neutral monster creation |
CreateTurret |
Turret/tower initialization |
NPCDieMapView |
NPC death (map view) |
NPCDieMapViewBroadcast |
NPC death broadcast |
BuyItem |
Item purchase events |
RemoveItem |
Item removal/selling |
SwapItem |
Item slot swapping |
UseItem |
Item activation/usage |
Replication |
Game state synchronization |
For complete packet definitions and Python dataclasses, see packets.py
.
Applications
This dataset enables research in several domains:
- Reinforcement Learning
- Game Analytics
- Behavioral Research
Examples from gym
🎯 Prediction Results:
==============================
Action: Use W Ability
Confidence: 0.354
State Value: -0.681
Target Position: (7266, 3750) world coords
Coordinate Confidence: X=0.158, Y=0.080
Unit Target: 0
Unit Confidence: 1.000
✅ Prediction completed successfully!
Citation
If you use this dataset in your research, please cite:
@dataset{league_of_legends_decoded_replay_packets_2025,
title={League of Legends Decoded Replay Packets Dataset},
author={maknee},
year={2025},
url={https://huggingface.co/datasets/maknee/league-of-legends-decoded-replay-packets}
}
License
This dataset is released under the Apache 2.0 License.
- Downloads last month
- 2,434