Tracker Events

Tracker events are new in Starcraft patch 2.0.8. These events are generated by the game engine when important non-player events occur in the game. Some of them are also periodically recorded to snapshot aspects of the current game state.

class sc2reader.events.tracker.PlayerSetupEvent(frames, data, build)

Sent during game setup to help us organize players better

class sc2reader.events.tracker.PlayerStatsEvent(frames, data, build)

Player Stats events are generated for all players that were in the game even if they’ve since left every 10 seconds. An additional set of stats events are generated at the end of the game.

When a player leaves the game, a single PlayerStatsEvent is generated for that player and no one else. That player continues to generate PlayerStatsEvents at 10 second intervals until the end of the game.

In 1v1 games, the above behavior can cause the losing player to have 2 events generated at the end of the game. One for leaving and one for the end of the game.

class sc2reader.events.tracker.TrackerEvent(frames)

Parent class for all tracker events.

class sc2reader.events.tracker.UnitBornEvent(frames, data, build)

Generated when a unit is created in a finished state in the game. Examples include the Marine, Zergling, and Zealot (when trained from a gateway). Units that enter the game unfinished (all buildings, warped in units) generate a UnitInitEvent instead.

Unfortunately, units that are born do not have events marking their beginnings like UnitInitEvent and UnitDoneEvent do. The closest thing to it are the CommandEvent game events where the command is a train unit command.

class sc2reader.events.tracker.UnitDiedEvent(frames, data, build)

Generated when a unit dies or is removed from the game for any reason. Reasons include morphing, merging, and getting killed.

class sc2reader.events.tracker.UnitDoneEvent(frames, data, build)

The counter part to the UnitInitEvent, generated by the game engine when an initiated unit is completed. E.g. warp-in finished, building finished, morph complete.

class sc2reader.events.tracker.UnitInitEvent(frames, data, build)

The counter part to UnitDoneEvent, generated by the game engine when a unit is initiated. This applies only to units which are started in game before they are finished. Primary examples being buildings and warp-in units.

class sc2reader.events.tracker.UnitOwnerChangeEvent(frames, data, build)

Generated when either ownership or control of a unit is changed. Neural Parasite is an example of an action that would generate this event.

class sc2reader.events.tracker.UnitPositionsEvent(frames, data, build)

Generated every 15 seconds. Marks the positions of the first 255 units that were damaged in the last interval. If more than 255 units were damaged, then the first 255 are reported and the remaining units are carried into the next interval.

class sc2reader.events.tracker.UnitTypeChangeEvent(frames, data, build)

Generated when the unit’s type changes. This generally tracks upgrades to buildings (Hatch, Lair, Hive) and mode switches (Sieging Tanks, Phasing prisms, Burrowing roaches). There may be some other situations where a unit transformation is a type change and not a new unit.

class sc2reader.events.tracker.UpgradeCompleteEvent(frames, data, build)

Generated when a player completes an upgrade.