Home › Lua API › GameClimate

Available out of the box. Usable from Lua in the unmodified game.

GameClimate

50 methods. Symbol/current columns are function addresses (RVA) of the native wrapper.

Community reference for this object: GameClimate (Sukrit Tan, external).

Signatures are recovered from the game code. ⚠ = partly understood (arguments may be missing or approximate). ? after a name = optional argument. Types: integer/number are Lua numbers, enum-typed arguments show the C++ type in brackets. Two signatures mean the method is registered separately for the UI and the gameplay state and each wrapper was decoded on its own. "same code as" in the Symbol column means the compiler merged identical functions: those methods share one wrapper and cannot be told apart by address.

Method Signature Where Reference Symbol Current
GetActiveDroughtAtPlot GameClimate.GetActiveDroughtAtPlot(x: integer/Plot, y?: integer) → Drought (or nothing) gameplay yes ↗ 0x5b5da0 0x5b6bd0
GetActiveDroughtByIndex GameClimate.GetActiveDroughtByIndex(iDroughtIndex?: number) → Drought (or nothing) gameplay yes ↗ 0x5b5e50 0x5b6c80
GetActiveDroughtIDAtPlot GameClimate.GetActiveDroughtIDAtPlot(x: integer/Plot, y?: integer) → number/nil
args: x — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred); y — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred)
returns: The scripts pass the result to GameClimate.GetDroughtPlotsByID. (inferred)
gameplay yes ↗ 0x5b5ef0 0x5b6d20
GetActiveDroughtPlotsByIndex GameClimate.GetActiveDroughtPlotsByIndex(arg1?: number) → number[] (or nothing) gameplay yes ↗ 0x5b5fc0 0x5b6df0
GetActiveDroughtTypeAtPlot GameClimate.GetActiveDroughtTypeAtPlot(x: integer/Plot, y?: integer) → number
args: x — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x5b6170 0x5b6fa0
GetActiveStormAtPlot GameClimate.GetActiveStormAtPlot(x: integer/Plot, y?: integer) → Storm (or nothing) gameplay yes ↗ 0x5b6250 0x5b7080
GetActiveStormByIndex GameClimate.GetActiveStormByIndex(iStormIndex?: number) → Storm (or nothing) gameplay yes ↗ 0x5b6300 0x5b7130
GetActiveStormIDAtPlot GameClimate.GetActiveStormIDAtPlot(x: integer/Plot, y?: integer) → number/nil
args: x — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred); y — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred)
returns: The scripts pass the result to GameClimate.GetStormPlotsByID. (inferred)
gameplay yes ↗ 0x5b63a0 0x5b71d0
GetActiveStormPlotsByIndex GameClimate.GetActiveStormPlotsByIndex(arg1?: number) → number[] (or nothing) gameplay yes ↗ 0x5b6470 0x5b72a0
GetActiveStormTypeAtPlot GameClimate.GetActiveStormTypeAtPlot(x: integer/Plot, y?: integer) → number
args: x — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x5b6610 0x5b7440
GetCO2FootprintModifier GameClimate.GetCO2FootprintModifier() → number gameplay yes ↗ 0x5b66f0 0x5b7520
GetClimateChangeForLastSeaLevelEvent GameClimate.GetClimateChangeForLastSeaLevelEvent() → number gameplay yes ↗ 0x5b6770 0x5b75a0
GetClimateChangeFromRealism GameClimate.GetClimateChangeFromRealism() → number gameplay yes ↗ 0x5b67f0 0x5b7620
GetClimateChangeFromTemperature GameClimate.GetClimateChangeFromTemperature() → number gameplay yes ↗ 0x5b6860 0x5b7690
GetClimateChangeLevel GameClimate.GetClimateChangeLevel() → number gameplay yes ↗ 0x5b68d0 0x5b7700
GetCurrentAverageTemperature GameClimate.GetCurrentAverageTemperature() → number gameplay yes ↗ 0x5b6940 0x5b7770
GetDeforestationType GameClimate.GetDeforestationType() → number
returns: Key of a row of the DeforestationLevels table: the scripts look it up with GameInfo.DeforestationLevels[result]. (inferred)
gameplay yes ↗ 0x5b69e0 0x5b7810
GetDroughtByID GameClimate.GetDroughtByID(arg1?: number) → Drought (or nothing) gameplay yes ↗ 0x5b6a60 0x5b7890
GetDroughtClimateIncreasedChance GameClimate.GetDroughtClimateIncreasedChance() → number gameplay yes ↗ 0x5b6b20 0x5b7950
GetDroughtPercentChance GameClimate.GetDroughtPercentChance() → number gameplay yes ↗ 0x5b6b70 0x5b79a0
GetDroughtPlotsByID GameClimate.GetDroughtPlotsByID(arg1?: number) → number[] (or nothing) gameplay yes ↗ 0x5b6bc0 0x5b79f0
GetDroughtTurnsAtPlot GameClimate.GetDroughtTurnsAtPlot(x: integer/Plot, y?: integer) → number (or nothing)
args: x — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x5b6d80 0x5b7bb0
GetEruptionClimateIncreasedChance GameClimate.GetEruptionClimateIncreasedChance() → number gameplay yes ↗ 0x5b6e50 0x5b7c80
GetEruptionPercentChance GameClimate.GetEruptionPercentChance() → number gameplay yes ↗ 0x5b6ea0 0x5b7cd0
GetFireClimateIncreasedChance GameClimate.GetFireClimateIncreasedChance() → number gameplay yes ↗ 0x5b6ef0 0x5b7d20
GetFirePercentChance GameClimate.GetFirePercentChance() → number gameplay yes ↗ 0x5b6f40 0x5b7d70
GetFloodClimateIncreasedChance GameClimate.GetFloodClimateIncreasedChance() → number gameplay yes ↗ 0x5b6f90 0x5b7dc0
GetFloodPercentChance GameClimate.GetFloodPercentChance() → number gameplay yes ↗ 0x5b6fe0 0x5b7e10
GetLocationsForPossibleTriggerableEvents GameClimate.GetLocationsForPossibleTriggerableEvents(arg1?: number) → number[]
args: arg1 — Id of a player (the scripts name the argument playerID / owner). (inferred)
gameplay yes ↗ 0x5b7030 0x5b7e60
GetNextIceLossTurns GameClimate.GetNextIceLossTurns() → number gameplay yes ↗ 0x5b7120 0x5b7f50
GetNextSeaLevelRiseTurns GameClimate.GetNextSeaLevelRiseTurns() → number gameplay yes ↗ 0x5b71a0 0x5b7fd0
GetNumActiveDroughts GameClimate.GetNumActiveDroughts() → number gameplay yes ↗ 0x5b7220 0x5b8050
GetNumActiveStorms GameClimate.GetNumActiveStorms() → number gameplay yes ↗ 0x5b72a0 0x5b80d0
GetNumStorms GameClimate.GetNumStorms() → number gameplay yes ↗ 0x5b7320 0x5b8150
GetOneOffByID GameClimate.GetOneOffByID(arg1?: number) → OneOff (or nothing) gameplay yes ↗ 0x5b73a0 0x5b81d0
GetOneOffPlotsByID GameClimate.GetOneOffPlotsByID(arg1?: number) → number[] (or nothing) gameplay yes ↗ 0x5b7460 0x5b8290
GetPlayerCO2Footprint GameClimate.GetPlayerCO2Footprint(ePlayer: integer/Player[PlayerTypes], arg2?: any, arg3?: boolean) → number ⚠
args: ePlayer — Id of a player (as in Players[id]).; arg2 — A boolean flag (true/false).
returns: Id of a player (the scripts name the result playerID / owner). (inferred)
gameplay yes ↗ 0x5b7620 0x5b8450
GetPlayerRawResourceConsumption GameClimate.GetPlayerRawResourceConsumption(ePlayer: integer/Player[PlayerTypes], eResource: number/string[ResourceTypes], bLastTurn?: boolean) → number
args: ePlayer — Id of a player (as in Players[id]).; eResource — Index of a row of the Resources table (the value of GameInfo.Resources[...].Index).; bLastTurn — A boolean flag (true/false).
gameplay yes ↗ 0x5b7700 0x5b8530
GetPlayerResourceCO2Footprint GameClimate.GetPlayerResourceCO2Footprint(ePlayer: integer/Player[PlayerTypes], eResource: number/string[ResourceTypes], bLastTurn?: boolean) → number
args: ePlayer — Id of a player (as in Players[id]).; eResource — Index of a row of the Resources table (the value of GameInfo.Resources[...].Index).; bLastTurn — A boolean flag (true/false).
gameplay yes ↗ 0x5b77f0 0x5b8620
GetPlayerResourceConsumption GameClimate.GetPlayerResourceConsumption(ePlayer: integer/Player[PlayerTypes], eResource: number/string[ResourceTypes], bLastTurn?: boolean) → number
args: ePlayer — Id of a player (as in Players[id]).; eResource — Index of a row of the Resources table (the value of GameInfo.Resources[...].Index).
gameplay yes ↗ 0x5b78e0 0x5b8710
GetSeverityForLastSeaLevelEvent GameClimate.GetSeverityForLastSeaLevelEvent() → number gameplay yes ↗ 0x5b79d0 0x5b8800
GetStormByID GameClimate.GetStormByID(arg1?: number) → Storm (or nothing) gameplay yes ↗ 0x5b7a50 0x5b8880
GetStormClimateIncreasedChance GameClimate.GetStormClimateIncreasedChance() → number gameplay yes ↗ 0x5b7b10 0x5b8940
GetStormPercentChance GameClimate.GetStormPercentChance() → number gameplay yes ↗ 0x5b7b60 0x5b8990
GetStormPlotsByID GameClimate.GetStormPlotsByID(arg1?: number) → number[] (or nothing) gameplay yes ↗ 0x5b7bb0 0x5b89e0
GetTemperatureChange GameClimate.GetTemperatureChange() → number gameplay yes ↗ 0x5b7d70 0x5b8ba0
GetTilesFlooded GameClimate.GetTilesFlooded() → number gameplay yes ↗ 0x5b7df0 0x5b8c20
GetTilesSubmerged GameClimate.GetTilesSubmerged() → number gameplay yes ↗ 0x5b7e70 0x5b8ca0
GetTotalCO2Footprint GameClimate.GetTotalCO2Footprint() → number
returns: A count or amount (the scripts name the result count / num / amount). (inferred)
gameplay yes ↗ 0x5b7ef0 0x5b8d20
IsStormRevealed GameClimate.IsStormRevealed(arg1?: number, arg2?: number) → boolean (or nothing)
args: arg2 — Id of a player (the scripts name the argument playerID / owner). (inferred)
gameplay yes ↗ 0x5b7f70 0x5b8da0