Support Structures¶
These dumb data structures help to give meaningful organization and structure to the information in their respective parent resources.
Entity¶
-
class
sc2reader.objects.Entity(sid, slot_data)¶ Parameters: - sid (integer) – The entity’s unique slot id.
- slot_data (dict) – The slot data associated with this entity
Player¶
-
class
sc2reader.objects.Player(pid, detail_data, attribute_data)¶ Parameters: - pid (integer) – The player’s unique player id.
- detail_data (dict) – The detail data associated with this player
- attribute_data (dict) – The attribute data associated with this player
User¶
Observer¶
-
class
sc2reader.objects.Observer(sid, slot_data, uid, init_data, pid)¶ -
Parameters: - sid (integer) – The entity’s unique slot id.
- slot_data (dict) – The slot data associated with this entity
- uid (integer) – The user’s unique user id
- init_data (dict) – The init data associated with this user
- pid (integer) – The player’s unique player id.
Computer¶
-
class
sc2reader.objects.Computer(sid, slot_data, pid, detail_data, attribute_data)¶ -
Parameters: - sid (integer) – The entity’s unique slot id.
- slot_data (dict) – The slot data associated with this entity
- pid (integer) – The player’s unique player id.
- detail_data (dict) – The detail data associated with this player
- attribute_data (dict) – The attribute data associated with this player
Participant¶
-
class
sc2reader.objects.Participant(sid, slot_data, uid, init_data, pid, detail_data, attribute_data)¶ Extends
Entity,User, andPlayerParameters: - sid (integer) – The entity’s unique slot id.
- slot_data (dict) – The slot data associated with this entity
- uid (integer) – The user’s unique user id
- init_data (dict) – The init data associated with this user
- pid (integer) – The player’s unique player id.
- detail_data (dict) – The detail data associated with this player
- attribute_data (dict) – The attribute data associated with this player
Team¶
-
class
sc2reader.objects.Team(number)¶ The team object primarily a container object for organizing
Playerobjects with some metadata. As such, it implements iterable and can be looped over like a list.Parameters: number (interger) – The team number as recorded in the replay -
lineup¶ A string representation of the team play races like PP or TPZZ. Random pick races are not reflected in this string
-
PlayerSummary¶
-
class
sc2reader.objects.PlayerSummary(pid)¶ Resents a player as loaded from a
GameSummaryfile.
Graph¶
-
class
sc2reader.objects.Graph(x, y, xy_list=None)¶ A class to represent a graph on the score screen. Derived from data in the
GameSummaryfile.-
as_points()¶ Get the graph as a list of (x, y) tuples
-