Objectives Extractor¶
Tower kills, barracks destructions, Roshan kills, and Tormentor kills.
Tormentor Kills¶
Tracks destruction of Tormentor minibosses. Killer player attribution is resolved by combining combat log death data with the corresponding miniboss kill chat event.
gem.extractors.objectives
¶
Objective event extractor for Dota 2 replays.
Listens to combat log DEATH events and emits structured records for tower kills, Roshan kills, and barracks destructions.
Reference: refs/parser/src/main/java/opendota/Parse.java
TowerKill
dataclass
¶
One tower destruction event.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick when the tower was destroyed. |
team |
int
|
Team that owned the tower (2=Radiant, 3=Dire). |
killer |
str
|
NPC name of the unit that landed the killing blow. |
tower_name |
str
|
Internal NPC name of the destroyed tower. |
Source code in src/gem/extractors/objectives.py
RoshanKill
dataclass
¶
One confirmed Roshan death.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick of the kill. |
killer |
str
|
NPC name of the unit that landed the killing blow. |
kill_number |
int
|
Sequential kill number (1-indexed) for this game. |
Source code in src/gem/extractors/objectives.py
BarracksKill
dataclass
¶
One barracks destruction event.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick when the barracks was destroyed. |
team |
int
|
Team that owned the barracks (2=Radiant, 3=Dire). |
killer |
str
|
NPC name of the unit that landed the killing blow. |
barracks_name |
str
|
Internal NPC name of the destroyed barracks. |
Source code in src/gem/extractors/objectives.py
TormentorKill
dataclass
¶
One Tormentor (miniboss) kill event.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick of the kill. |
killer |
str
|
NPC name of the unit that landed the killing blow, or empty string if unknown. |
killer_player_id |
int
|
Player slot (0–9) of the killing player from the
|
kill_number |
int
|
Sequential kill number (1-indexed) for this game. |
Source code in src/gem/extractors/objectives.py
ShrineKill
dataclass
¶
One Shrine of Wisdom destruction event.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick of the event. |
team |
int
|
Team that owned the destroyed shrine (2=Radiant, 3=Dire). |
Source code in src/gem/extractors/objectives.py
AegisEvent
dataclass
¶
An Aegis of the Immortal pickup, steal, or denial event.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Game tick of the event. |
player_id |
int
|
Player slot (0–9) who picked up / stole / denied the Aegis. -1 if the event had no player attribution. |
event_type |
str
|
|
Source code in src/gem/extractors/objectives.py
ObjectivesExtractor
¶
Extracts tower kills, Roshan kills, barracks kills, tormentor kills, and shrine kills from a replay.
Attach to a ReplayParser before calling parse():
Example
extractor = ObjectivesExtractor() extractor.attach(parser) parser.parse() print(extractor.roshan_kills)
Attributes:
| Name | Type | Description |
|---|---|---|
tower_kills |
list[TowerKill]
|
All tower kill events in chronological order. |
roshan_kills |
list[RoshanKill]
|
All Roshan kill events in chronological order. |
barracks_kills |
list[BarracksKill]
|
All barracks kill events in chronological order. |
aegis_events |
list[AegisEvent]
|
All Aegis pickup / steal / denial events. |
tormentor_kills |
list[TormentorKill]
|
All Tormentor (miniboss) kill events in chronological order. |
shrine_kills |
list[ShrineKill]
|
All Shrine of Wisdom destruction events in chronological order. |
Source code in src/gem/extractors/objectives.py
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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
attach(parser: ReplayParser) -> None
¶
Register this extractor's callbacks with a parser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parser
|
ReplayParser
|
The |
required |