opengsq.responses.supcom package
Submodules
opengsq.responses.supcom.status module
- class opengsq.responses.supcom.status.Status(game_name: str, hosted_by: str, product_code: str, scenario_file: str, num_players: int, max_players: int = 8, map_width: int = 0, map_height: int = 0, map_name_lookup: str = '', game_speed: str = 'normal', victory_condition: str = 'demoralization', fog_of_war: str = 'explored', unit_cap: str = '500', cheats_enabled: bool = False, team_lock: str = 'unlocked', team_spawn: str = 'random', allow_observers: bool = True, no_rush_option: str = 'Off', prebuilt_units: str = 'Off', civilian_alliance: str = 'enemy', timeouts: str = '3', options: ~typing.Dict[str, ~typing.Any] = <factory>, raw: ~typing.Dict[str, ~typing.Any] = <factory>)
Bases:
objectRepresents the status of a Supreme Commander game server.
- Attributes:
game_name: Name of the game lobby hosted_by: Name of the host player product_code: Product code (SC1 = Supreme Commander, SCFA = Forged Alliance) scenario_file: Path to the map/scenario file num_players: Current number of players max_players: Maximum number of players (from map lookup table) map_width: Map width in game units (from lookup table, 0 if unknown) map_height: Map height in game units (from lookup table, 0 if unknown) map_name_lookup: Map name from lookup table (empty if unknown) game_speed: Game speed setting (slow/normal/fast) victory_condition: Victory condition type fog_of_war: Fog of war setting unit_cap: Unit cap setting cheats_enabled: Whether cheats are enabled team_lock: Team lock setting team_spawn: Team spawn setting allow_observers: Whether observers are allowed no_rush_option: No rush timer setting prebuilt_units: Prebuilt units setting civilian_alliance: Civilian alliance setting timeouts: Number of allowed timeouts options: Full options dictionary raw: Raw response data for debugging
- game_name: str
- hosted_by: str
- product_code: str
- scenario_file: str
- num_players: int
- max_players: int = 8
- map_width: int = 0
- map_height: int = 0
- map_name_lookup: str = ''
- game_speed: str = 'normal'
- victory_condition: str = 'demoralization'
- fog_of_war: str = 'explored'
- unit_cap: str = '500'
- cheats_enabled: bool = False
- team_lock: str = 'unlocked'
- team_spawn: str = 'random'
- allow_observers: bool = True
- no_rush_option: str = 'Off'
- prebuilt_units: str = 'Off'
- civilian_alliance: str = 'enemy'
- timeouts: str = '3'
- options: Dict[str, Any]
- raw: Dict[str, Any]
- property map_name: str
Get the map name.
Prefers the lookup table name (map_name_lookup) if available, otherwise falls back to extracting from scenario file path.
- property map_id: str
Extract map ID from scenario file path (e.g., ‘scmp_039’)
- property players_display: str
Get formatted player count string (handles unknown max_players)
- property max_players_known: bool
Check if max_players is known (from lookup table)
- property map_size: tuple | None
Get the map size as (width, height) tuple in game units.
Returns None if map is not in lookup table. Size units: 256=5km, 512=10km, 1024=20km, 2048=40km, 4096=80km
- property map_size_km: tuple | None
Get the map size in kilometers as (width_km, height_km) tuple.
Returns None if map is not in lookup table.
- property map_size_display: str
Get a human-readable map size string.
Returns format like “20x20 km” or “?” for unknown maps.
- property map_size_category: str
Get the map size category name.
Categories: - 5x5 km: Tiny - 10x10 km: Small - 20x20 km: Medium - 40x40 km: Large - 80x80 km: Huge
- property game_title: str
Get human-readable game title from product code
Module contents
- class opengsq.responses.supcom.Status(game_name: str, hosted_by: str, product_code: str, scenario_file: str, num_players: int, max_players: int = 8, map_width: int = 0, map_height: int = 0, map_name_lookup: str = '', game_speed: str = 'normal', victory_condition: str = 'demoralization', fog_of_war: str = 'explored', unit_cap: str = '500', cheats_enabled: bool = False, team_lock: str = 'unlocked', team_spawn: str = 'random', allow_observers: bool = True, no_rush_option: str = 'Off', prebuilt_units: str = 'Off', civilian_alliance: str = 'enemy', timeouts: str = '3', options: ~typing.Dict[str, ~typing.Any] = <factory>, raw: ~typing.Dict[str, ~typing.Any] = <factory>)
Bases:
objectRepresents the status of a Supreme Commander game server.
- Attributes:
game_name: Name of the game lobby hosted_by: Name of the host player product_code: Product code (SC1 = Supreme Commander, SCFA = Forged Alliance) scenario_file: Path to the map/scenario file num_players: Current number of players max_players: Maximum number of players (from map lookup table) map_width: Map width in game units (from lookup table, 0 if unknown) map_height: Map height in game units (from lookup table, 0 if unknown) map_name_lookup: Map name from lookup table (empty if unknown) game_speed: Game speed setting (slow/normal/fast) victory_condition: Victory condition type fog_of_war: Fog of war setting unit_cap: Unit cap setting cheats_enabled: Whether cheats are enabled team_lock: Team lock setting team_spawn: Team spawn setting allow_observers: Whether observers are allowed no_rush_option: No rush timer setting prebuilt_units: Prebuilt units setting civilian_alliance: Civilian alliance setting timeouts: Number of allowed timeouts options: Full options dictionary raw: Raw response data for debugging
- allow_observers: bool = True
- cheats_enabled: bool = False
- civilian_alliance: str = 'enemy'
- fog_of_war: str = 'explored'
- game_speed: str = 'normal'
- property game_title: str
Get human-readable game title from product code
- map_height: int = 0
- property map_id: str
Extract map ID from scenario file path (e.g., ‘scmp_039’)
- property map_name: str
Get the map name.
Prefers the lookup table name (map_name_lookup) if available, otherwise falls back to extracting from scenario file path.
- map_name_lookup: str = ''
- property map_size: tuple | None
Get the map size as (width, height) tuple in game units.
Returns None if map is not in lookup table. Size units: 256=5km, 512=10km, 1024=20km, 2048=40km, 4096=80km
- property map_size_category: str
Get the map size category name.
Categories: - 5x5 km: Tiny - 10x10 km: Small - 20x20 km: Medium - 40x40 km: Large - 80x80 km: Huge
- property map_size_display: str
Get a human-readable map size string.
Returns format like “20x20 km” or “?” for unknown maps.
- property map_size_km: tuple | None
Get the map size in kilometers as (width_km, height_km) tuple.
Returns None if map is not in lookup table.
- map_width: int = 0
- max_players: int = 8
- property max_players_known: bool
Check if max_players is known (from lookup table)
- no_rush_option: str = 'Off'
- property players_display: str
Get formatted player count string (handles unknown max_players)
- prebuilt_units: str = 'Off'
- team_lock: str = 'unlocked'
- team_spawn: str = 'random'
- timeouts: str = '3'
- unit_cap: str = '500'
- victory_condition: str = 'demoralization'
- game_name: str
- hosted_by: str
- product_code: str
- scenario_file: str
- num_players: int
- options: Dict[str, Any]
- raw: Dict[str, Any]