Home › Lua API › TerrainManager

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

TerrainManager

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

Community reference for this object: TerrainManager (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
ClearCoastalFlooding TerrainManager.ClearCoastalFlooding() (or nothing) gameplay yes ↗ 0x5bc7c0 0x5bd700
FloodCoast TerrainManager.FloodCoast(eLowlandType: number/string[CoastalLowlandTypes], eEvent: number/string[RandomEventTypes]) (or nothing)
args: eLowlandType — Value of the CoastalLowlandTypes enum (a type index).; eEvent — Value of the RandomEventTypes enum (a type index).
gameplay yes ↗ 0x5bc860 0x5bd7a0
GetCoastalLowlandType TerrainManager.GetCoastalLowlandType(x: integer/Plot, y?: integer) → number
args: x — Plot index (named plotIndex / plotID in the scripts). (inferred)
returns: Key of a row of the CoastalLowlands table: the scripts look it up with GameInfo.CoastalLowlands[result]. (inferred)
gameplay yes ↗ 0x5bc8b0 0x5bd7f0
IsFlooded TerrainManager.IsFlooded(x: integer/Plot, y?: integer) → boolean
args: x — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x5bc950 0x5bd890
IsProtected TerrainManager.IsProtected(x: integer/Plot, y?: integer) → boolean
args: x — Plot index (named plotIndex / plotID in the scripts). (inferred)
gameplay yes ↗ 0x5bc9f0 0x5bd930
IsSubmerged TerrainManager.IsSubmerged(x: integer/Plot, y?: integer) → boolean
args: x — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x5bca90 0x5bd9d0
SubmergeCoast TerrainManager.SubmergeCoast(eLowlandType: number/string[CoastalLowlandTypes], eEvent: number/string[RandomEventTypes]) (or nothing)
args: eLowlandType — Value of the CoastalLowlandTypes enum (a type index).; eEvent — Value of the RandomEventTypes enum (a type index).
gameplay yes ↗ 0x5bcb30 0x5bda70