sc2_datasets.replay_parser.tracker_events.events.unit_born

Classes

UnitBorn

UnitBorn contains some "details" information about unit

Module Contents

class UnitBorn

Bases: sc2_datasets.replay_parser.tracker_events.tracker_event.TrackerEvent

UnitBorn contains some “details” information about unit at the moment of it has appeared in the game.

Parameters:
  • controlPlayerId (int) – Specifies the information about player id who made the unit in the game.

  • id (int) – Specifies the ID of an event which corresponds to its name.

  • loop (int) – Specifies the game loop number (game-engine tick) at which the event occurred.

  • unitTagIndex (int) – Specifies a pointer for a specific unit which was creating in the game.

  • unitTagRecycle (int) – There is no specific information about this parameter.

  • unitTypeName (str) – Specifies the in game unit name that was created in the game.

  • upkeepPlayerId (int) – Specifies an id number of player who was having the control of the unit in the game.

  • x (int) – Specifies x coordinate of map in pixels where the object was created.

  • y (int) – Specifies y coordinate of map in pixels where the object was created.

controlPlayerId: int
id: int
loop: int
unitTagIndex: int
unitTagRecycle: int
unitTypeName: str
upkeepPlayerId: int
x: int
y: int
static from_dict(d: dict) UnitBorn

Static method returning initialized UnitBorn class from a dictionary. This helps with the original JSON parsing.

Parameters:

d (dict) – Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file.

Returns:

Returns an initialized UnitBorn class.

Return type:

UnitBorn