Mod API Reference:GameStanding: Difference between revisions

From War.app Wiki
Jump to navigation Jump to search
Krinid (talk | contribs)
No edit summary
No edit summary
 
Line 5: Line 5:
* '''Resources''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],Table<[[Mod API Reference:ResourceType|ResourceType]] (enum),integer>>'': The resources owned by each player
* '''Resources''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],Table<[[Mod API Reference:ResourceType|ResourceType]] (enum),integer>>'': The resources owned by each player
* '''IncomeMods''' ''Array<[[Mod API Reference:IncomeMod|IncomeMod]]>'': Mods can assign income mods here from the Server_StartGame hook in order to modify player's incomes on the first turn of the game.  Modifying on later turns requires using GameOrderEvent
* '''IncomeMods''' ''Array<[[Mod API Reference:IncomeMod|IncomeMod]]>'': Mods can assign income mods here from the Server_StartGame hook in order to modify player's incomes on the first turn of the game.  Modifying on later turns requires using GameOrderEvent
* '''FogModsOpt''' ''Array<[[Mod API Reference:FogMod]]>'': FogMods current applied. Associates properties ID, FogLevel, Priority, Territories impacted, Player affected and the message the mod provided when creating the FogMod
* '''FogModsOpt''' ''Array<[[Mod API Reference:FogMod]]>'': FogMods currenty applied. Associates properties ID, FogLevel, Priority, Territories impacted, Player affected and the message the mod provided when creating the FogMod
* '''TeamOverridesOpt''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],[[Mod API Reference:TeamID|TeamID]]>'': Overridden teams, by GameOrderEvent (Added in version 6.05.0)
 
 
== Functions ==
== Functions ==


* '''NumResources'''('''playerID''' ''[[Mod API Reference:PlayerID|PlayerID]]'', '''type''' ''[[Mod API Reference:ResourceType|ResourceType]] (enum)'') returns integer:  Determines how many resources, such as gold in a commerce game, the passed player has (or had at this point in time if this standing is from history)
* '''NumResources'''('''playerID''' ''[[Mod API Reference:PlayerID|PlayerID]]'', '''type''' ''[[Mod API Reference:ResourceType|ResourceType]] (enum)'') returns integer:  Determines how many resources, such as gold in a commerce game, the passed player has (or had at this point in time if this standing is from history)
[[Category:Mod API Reference]]
[[Category:Mod API Reference]]

Latest revision as of 15:07, 28 August 2026

GameStanding: Represents the state of a game's map at a single point in time. This describes who owns each territory, how many armies/special units are on it, what cards each player has, and what cards are in effect

  • ActiveCards Array<ActiveCard>: Cards in effect
  • Cards Table<PlayerID,PlayerCards>: Cards each player has
  • Territories Table<TerritoryID,TerritoryStanding>: Who owns each territory and how many armies are on it
  • Resources Table<PlayerID,Table<ResourceType (enum),integer>>: The resources owned by each player
  • IncomeMods Array<IncomeMod>: Mods can assign income mods here from the Server_StartGame hook in order to modify player's incomes on the first turn of the game. Modifying on later turns requires using GameOrderEvent
  • FogModsOpt Array<Mod API Reference:FogMod>: FogMods currenty applied. Associates properties ID, FogLevel, Priority, Territories impacted, Player affected and the message the mod provided when creating the FogMod
  • TeamOverridesOpt Table<PlayerID,TeamID>: Overridden teams, by GameOrderEvent (Added in version 6.05.0)


Functions

  • NumResources(playerID PlayerID, type ResourceType (enum)) returns integer: Determines how many resources, such as gold in a commerce game, the passed player has (or had at this point in time if this standing is from history)