Models¶
Output dataclasses produced by gem.parse().
See also: Full Match Data, Quickstart
Notable recent fields¶
ParsedMatch.tormentors:list[TormentorKill]— chronological Tormentor kill events.ParsedMatch.shrines:list[ShrineKill]— chronological Shrine of Wisdom destruction events.ParsedPlayer.damage_by_type:dict[str, int]— total damage dealt by damage type (physical,magical,pure).ParsedPlayer.damage_taken_by_type:dict[str, int]— total damage taken by damage type.ParsedPlayer.buyback_log:list[CombatLogEntry]— buyback events attributed to the player.ParsedPlayer.lane_efficiency_pct:int— lane efficiency percentage derived from lane gold.
TormentorKill¶
tick: game tick of the kill.killer: NPC name of the killing unit.killer_player_id: player slot (0-9) of the killer when resolved, else-1.kill_number: sequential Tormentor kill number in the match.
gem.models
¶
Output data models for gem replay parsing.
Defines ParsedPlayer and ParsedMatch dataclasses that aggregate all
extracted information into a structured, ML-friendly output.
Reference: refs/parser/src/main/java/opendota/CreateParsedDataBlob.java
SmokeEvent
dataclass
¶
One Smoke of Deceit activation.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick when the smoke item was consumed. |
activator |
str
|
NPC hero name of the player who used the smoke. |
team |
int
|
Team number (2=Radiant, 3=Dire), or 0 if unknown. |
smoked |
list[str]
|
NPC hero names of all heroes that received the buff. |
x |
float | None
|
World x coordinate of the activating hero at activation tick,
or |
y |
float | None
|
World y coordinate of the activating hero at activation tick,
or |
Source code in src/gem/models.py
ChatEntry
dataclass
¶
A single chat message from the match.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick when the message was sent. |
player_slot |
int
|
Source player slot (0–9). |
channel |
str
|
|
text |
str
|
Message text. |
Source code in src/gem/models.py
ParsedPlayer
dataclass
¶
Aggregated statistics for one player over a full match.
Attributes:
| Name | Type | Description |
|---|---|---|
player_id |
int
|
Player slot (0–9; 0–4 Radiant, 5–9 Dire). |
hero_name |
str
|
NPC hero name, e.g. |
player_name |
str
|
Steam persona name (nickname), e.g. |
team |
int
|
Team number (2=Radiant, 3=Dire). |
times |
list[int]
|
Sample tick values (parallel to gold_t / lh_t / …). Default sampling is every 30 ticks (1 game-second). |
gold_t |
list[int]
|
Reliable (spendable) gold at each sample tick. |
net_worth_t |
list[int]
|
Net worth (gold + item value) at each sample tick. |
lh_t |
list[int]
|
Last-hit count at each sample tick. |
dn_t |
list[int]
|
Deny count at each sample tick. |
xp_t |
list[int]
|
Cumulative XP at each sample tick. |
times_min |
list[int]
|
Tick values at each game-minute boundary (OpenDota-aligned). |
gold_t_min |
list[int]
|
Spendable gold at each game-minute boundary. |
total_earned_gold_t_min |
list[int]
|
Cumulative total earned gold at each game-minute boundary
( |
total_earned_xp_t_min |
list[int]
|
Cumulative total earned XP at each game-minute boundary
( |
net_worth_t_min |
list[int]
|
Net worth at each game-minute boundary. |
lh_t_min |
list[int]
|
Last-hit count at each game-minute boundary. |
dn_t_min |
list[int]
|
Deny count at each game-minute boundary. |
xp_t_min |
list[int]
|
Cumulative XP at each game-minute boundary. |
obs_log |
list[WardEvent]
|
Observer ward placement events for this player. |
sen_log |
list[WardEvent]
|
Sentry ward placement events for this player. |
damage |
dict[str, int]
|
Total damage dealt, keyed by target NPC name. |
damage_taken |
dict[str, int]
|
Total damage received, keyed by attacker NPC name. |
damage_by_type |
dict[str, int]
|
Total damage dealt, keyed by damage type label
( |
damage_taken_by_type |
dict[str, int]
|
Total damage received, keyed by damage type label
( |
healing |
dict[str, int]
|
Total healing dealt, keyed by target NPC name. |
ability_uses |
dict[str, int]
|
Ability usage counts, keyed by ability name. |
item_uses |
dict[str, int]
|
Item usage counts, keyed by item name. |
gold_reasons |
dict[str, int]
|
Gold received per reason code. |
xp_reasons |
dict[str, int]
|
XP received per reason code. |
kills_log |
list[CombatLogEntry]
|
Combat log DEATH entries where this player was the attacker. |
purchase_log |
list[CombatLogEntry]
|
PURCHASE combat log entries for this player. |
runes_log |
list[CombatLogEntry]
|
ITEM combat log entries for rune pickups. |
buyback_log |
list[CombatLogEntry]
|
BUYBACK combat log entries for this player. |
lane_pos |
defaultdict[str, int]
|
Dwell-tick counts keyed by |
position_log |
list[tuple[int, float, float]]
|
Time-ordered |
stuns_dealt |
float
|
Total stun duration dealt (seconds) accumulated from combat log. |
kills |
int
|
Kill count from server scoreboard ( |
deaths |
int
|
Death count from server scoreboard ( |
assists |
int
|
Assist count from server scoreboard ( |
lane_role |
int
|
Lane role inferred from the first-10-minute position heatmap. 1=safe lane, 2=mid, 3=off lane, 4=jungle, 5=roaming, 0=unknown. |
lane_last_hits |
int
|
Last-hit count at the 10-minute mark ( |
lane_denies |
int
|
Deny count at the 10-minute mark ( |
lane_total_gold |
int
|
Cumulative total earned gold at the 10-minute mark
( |
lane_total_xp |
int
|
Cumulative total earned XP at the 10-minute mark
( |
lane_efficiency_pct |
int
|
Tier-1 laning metric (OpenDota formula).
|
lane_gold_adv |
int | None
|
Tier-2 laning metric. Gold advantage at 10 minutes versus
lane opponents on the opposing team ( |
lane_xp_adv |
int | None
|
Tier-2 laning metric. XP advantage at 10 minutes versus
lane opponents on the opposing team. Same pairing logic as
|
Source code in src/gem/models.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
ParsedMatch
dataclass
¶
Top-level parsed output for a single Dota 2 replay.
Attributes:
| Name | Type | Description |
|---|---|---|
match_id |
int
|
Dota 2 match ID, or 0 if unavailable. |
game_mode |
int
|
Game mode integer (e.g. 22 = All Pick Ranked). |
leagueid |
int
|
League ID, or 0 for non-league matches. |
radiant_win |
bool | None
|
True if Radiant won, False if Dire won, None if unknown. |
players |
list[ParsedPlayer]
|
One |
towers |
list[TowerKill]
|
All tower kill events in chronological order. |
barracks |
list[BarracksKill]
|
All barracks kill events in chronological order. |
roshans |
list[RoshanKill]
|
All Roshan kill events in chronological order. |
aegis_events |
list[AegisEvent]
|
All Aegis pickup / steal / denial events. |
tormentors |
list[TormentorKill]
|
All Tormentor (miniboss) kill events in chronological order. |
shrines |
list[ShrineKill]
|
All Shrine of Wisdom destruction events in chronological order. |
wards |
list[WardEvent]
|
All ward placement events with coordinates. |
radiant_gold_adv |
list[int]
|
Radiant gold advantage at each minute boundary. |
radiant_xp_adv |
list[int]
|
Radiant XP advantage at each minute boundary. |
combat_log |
list[CombatLogEntry]
|
All raw combat log entries (unfiltered). |
chat |
list[ChatEntry]
|
All chat messages in chronological order. |
courier_snapshots |
list[CourierSnapshot]
|
Courier state snapshots at each sample interval. |
smoke_events |
list[SmokeEvent]
|
All Smoke of Deceit activations with grouped heroes and approximate activating-hero position. |
draft |
list[DraftEvent]
|
Hero pick and ban events from the draft phase. |
teamfights |
list[Teamfight]
|
All detected teamfight windows with per-player breakdowns. |
game_start_tick |
int | None
|
Absolute tick when the game clock started (creeps spawn).
|
game_end_tick |
int
|
Absolute tick of the final parser tick. |