sc2_datasets.replay_parser.tracker_events.events.unit_owner_change

Classes

UnitOwnerChange

UnitOwnerChange holds some detail information about how the unit position

Module Contents

class UnitOwnerChange

Bases: sc2_datasets.replay_parser.tracker_events.tracker_event.TrackerEvent

UnitOwnerChange holds some detail information about how the unit position was changing during 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) when at which the event occurred.

  • unitTagIndex (int) – Specifies a pointer for a specific unit which was doing some changes.

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

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

controlPlayerId: int
id: int
loop: int
unitTagIndex: int
unitTagRecycle: int
upkeepPlayerId: int
static from_dict(d: dict[str, int]) UnitOwnerChange

Static method returning initialized UnitOwnerChange 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 UnitOwnerChange class.

Return type:

UnitOwnerChange