game_data.py#

class sc2.game_data.GameData(data) None[source]#
class sc2.game_data.AbilityData(game_data, proto) None[source]#
property button_name: str#

For Stimpack this returns ‘Stimpack’

property exact_id: AbilityId#

Returns the exact ID of the ability

property friendly_name: str#

For Stimpack this returns ‘Research Stimpack’

property id: AbilityId#

Returns the generic remap ID. See sc2/dicts/generic_redirect_abilities.py

For Stimpack this returns ‘BarracksTechLabResearch’

class sc2.game_data.UnitTypeData(game_data: GameData, proto) None[source]#
Parameters:

game_data (GameData)

property cargo_size: int#

How much cargo this unit uses up in cargo_space

property cost_zerg_corrected: Cost#

This returns 25 for extractor and 200 for spawning pool instead of 75 and 250 respectively

property footprint_radius: float | None#

See unit.py footprint_radius

property morph_cost: Cost | None#

This returns 150 minerals for OrbitalCommand instead of 550

property tech_alias: list[UnitTypeId] | None#

Building tech equality, e.g. OrbitalCommand is the same as CommandCenter Building tech equality, e.g. Hive is the same as Lair and Hatchery For Hive, this returns [UnitTypeId.Hatchery, UnitTypeId.Lair] For SCV, this returns None

property tech_requirement: UnitTypeId | None#

Tech-building requirement of buildings - may work for units but unreliably

property unit_alias: UnitTypeId | None#

Building type equality, e.g. FlyingOrbitalCommand is the same as OrbitalCommand

class sc2.game_data.UpgradeData(game_data: GameData, proto) None[source]#
Parameters:

game_data (GameData)

class sc2.game_data.Cost(minerals: int, vespene: int, time: float | None = None) None[source]#

The cost of an action, a structure, a unit or a research upgrade. The time is given in frames (22.4 frames per game second).

Parameters:
  • minerals (int)

  • vespene (int)

  • time (float | None)