Home › Dev CE (experimental) › Map
Experimental: needs Dev CE (
fork of the Community Extension, release zip and source). A GameCore that adds these Lua methods by calling engine functions directly. Not part of the upstream Community Extension, single-player testing only. Descriptions on these pages were written by an AI assistant from decompiled code and are marked inferred unless a test result confirms them.
Map
39 methods (Dev CE test build). this is found with the game's own IMap instance resolver (plain).
| Method |
Signature |
Purpose (AI-written, inferred) |
Tested |
Engine function |
Current |
| AddOutgoingVisibilityBlocker |
Map:AddOutgoingVisibilityBlocker(eFromPlayer: integer, eToPlayer: integer) → boolean |
Makes eFromPlayer stop sharing visibility with eToPlayer: registers the blocker on the from-player's visibility instance and, if it was added and outgoing visibility existed, subtracts the from-player's counts from the to-player's per plot and propagates reveal changes for the local observer. The shown code always returns false. |
— |
— |
0x35a4b0 |
| AddPlotYield |
Map:AddPlotYield(iPlotIndex: integer, eYield: integer, iAmount: integer) |
Adds a positive yield bonus to a plot's stored yield map; if the plot is visible to the local observer it also sends a floating-text style event naming the yield and amount. |
— |
Map::Feature::Manager::AddPlotYield |
0x720ee0 |
| AddVolcano |
Map:AddVolcano(iPlotIndex: integer) |
Builds a default Volcano record for the plot, appends it to the volcano vector (offset 0x110), records plot index to vector index in a map at 0x208, then calls StoreVolcanoData. |
— |
— |
0x721170 |
| CalculateSusceptibleTiles |
Map:CalculateSusceptibleTiles() |
Rebuilds the list (offset 0x238, count 0x248) of plot indices susceptible to eruption by collecting plots from every active volcano and every active natural wonder volcano (via GetAffectedNaturalWonderPlots). Decompilation is truncated before the end. |
— |
— |
0x721300 |
| CanSufferEruption |
Map:CanSufferEruption(iPlotIndex: integer) → boolean |
Checks whether a plot can suffer an eruption: plot exists, is not flagged (byte 0x3a bit 8), cannot be flooded by a river, and at least one of the 6 adjacent plots passes the manager's virtual slot-0 predicate. |
— |
— |
0x7216e0 |
| ChangeLandPlotCount |
Map:ChangeLandPlotCount(iChange: integer) |
Adds iChange to the tracked land plot count at offset 0x100 via a variable assignment helper. |
— |
— |
0x51f80 |
| ChangeNaturalWonderCount |
Map:ChangeNaturalWonderCount(iChange: integer) |
Adds a delta to the map's natural wonder count stored in an auto-variable. |
ran ±1, reversible ✓, no visible effect |
Map::Instance::ChangeNaturalWonderCount |
0x52000 |
| ComputePlotYieldDrop |
Map:ComputePlotYieldDrop(iPlotIndex: integer, eYield: integer, iPercentChance: integer) → number |
Computes how much of a plot's stored feature yield is removed: scales the stored yield by the percent chance and rolls the random generator ('Remove Fertility Chance') to round the fractional part up. |
— |
— |
0x721ab0 |
| DoTurn |
Map:DoTurn() |
Per-turn update: calls UpdateVolcanoes then CalculateSusceptibleTiles. |
— |
— |
0x722790 |
| GetIceLossEvent |
Map:GetIceLossEvent(iPlotIndex: integer) → number |
Looks up a plot index in a list of (plotIndex, eventType) pairs at offset 0x1e0 and returns the random event type, or -1 if not found. |
— |
— |
0x7239c0 |
| GetLayerIndexID |
Map:GetLayerIndexID(uiIndex: integer) → number |
Returns the layer id at the given index of the layer table (stride 0x18) of the instance at +0x50, or -1 if out of range. |
— |
— |
0x35b380 |
| GetNumActiveVolcanoes |
Map:GetNumActiveVolcanoes() → number |
Counts normal volcanoes whose virtual slot 0x10 (active check) returns true. |
— |
— |
0x723a90 |
| GetNumEruptions |
Map:GetNumEruptions() → number |
Sums the eruption history entries (12-byte records) over all normal volcanoes and natural wonder volcanoes. |
— |
— |
0x723b00 |
| GetNumNaturalWonderVolcanoes |
Map:GetNumNaturalWonderVolcanoes() → number |
Returns the number of natural wonder volcano entries (vector at 0x138, 0x50 bytes each). |
— |
— |
0x723b90 |
| GetNumNaturalWondersEruptions |
Map:GetNumNaturalWondersEruptions() → number |
Sums eruption history entries over the vector at offset 0x150 (0x50-byte entries). |
— |
— |
0x723bc0 |
| GetNumNormalVolcanoes |
Map:GetNumNormalVolcanoes(bMustBeNamed: boolean) → number |
Counts entries in the normal volcano vector, optionally only those whose name field (offset 8) is not -1. |
— |
— |
0x723c10 |
| GetNumVolcanoes |
Map:GetNumVolcanoes() → number |
Returns number of normal volcano records (vector size / 0xa0). |
— |
— |
0x723c40 |
| GetPercentVolcanoesActive |
Map:GetPercentVolcanoesActive() → number |
Percent of all volcanoes (normal plus natural wonder) that are active; returns 100 if there are none. |
— |
— |
0x723c70 |
| GetPlotYield |
Map:GetPlotYield(iPlotIndex: integer, eYield: integer) → number |
Returns the stored feature yield adjustment for a plot and yield type, using a default entry when the plot has none or an index is out of range. |
— |
— |
0x723d20 |
| GetRevealedImprovementType |
Map:GetRevealedImprovementType(ePlayer: integer, iPlotIndex: integer) → number |
Returns the improvement type the given player last saw on a plot, read from the revealed-improvement layer; 0 if plot index out of range, -1 if layer missing. |
— |
— |
0x35b4a0 |
| GetRevealedRouteType |
Map:GetRevealedRouteType(ePlayer: integer, iPlotIndex: integer) → number |
Returns the route type the given player last saw on a plot from the revealed-route layer; 0 if index out of range, -1 if layer missing. |
— |
— |
0x35b5a0 |
| GetTotalVolcanoes |
Map:GetTotalVolcanoes() → number |
Returns the sum of two virtual calls: slot 0x68 with argument 0 (likely normal volcano count) plus slot 0x10 (likely natural wonder volcano count). |
— |
— |
0x723d90 |
| GetVolcanicPeriod |
Map:GetVolcanicPeriod(plotIndex: integer, minSeverity: integer) → number |
Computes an averaged eruption period: gets a list of volcano ids via a virtual call, sums 100/x over each volcano's history entries from minSeverity onward, and returns 100/sum as FixedPoint (-1 when sum is zero). Decompile is partly vectorised. |
— |
— |
0x723dc0 |
| GetVolcanoType |
Map:GetVolcanoType(iPlotIndex: integer) → number |
Gets the volcano record for a plot via virtual slot 0x48 and returns its named volcano type if the record passes a check (slot 0x8 false), else -1. |
— |
— |
0x724240 |
| GetVolcanoTypeAtIndex |
Map:GetVolcanoTypeAtIndex(uiIndex: integer) → number |
Returns the named type of the volcano at the given vector index, -1 if out of range. |
— |
— |
0x724280 |
| IsActive |
Map:IsActive(iPlotIndex: integer) → boolean |
Returns whether the volcano record found by virtual slot 0x48 for the plot is active (virtual slot 0x10), false if none. |
— |
— |
0x724380 |
| IsTileEruptionSusceptible |
Map:IsTileEruptionSusceptible(iPlotIndex: integer) → boolean |
Checks the plot and its 6 hex neighbours: true if any such plot has an entry in the sub-object at +0x18 that is active; false if the plot is flagged (byte 0x3a bit 8). |
— |
— |
0x724620 |
| IsVisibleToAnyHuman |
Map:IsVisibleToAnyHuman(iPlotIndex: integer) → boolean |
True if any human player currently has a positive visibility count on the plot. |
— |
— |
0x35bcf0 |
| IsVisibleToAnyPlayer |
Map:IsVisibleToAnyPlayer(iPlotIndex: integer) → boolean |
True if any player in the manager's list (offset 0x4a0) has positive visibility on the plot. |
— |
— |
0x35bdc0 |
| IsVisibleToPlayerOfCivLevel |
Map:IsVisibleToPlayerOfCivLevel(iPlotIndex: integer, eLevel: integer) → boolean |
True if a player in the manager's list (offset 0x50) matching the civilization-level filter sees the plot; filter hash 0xc2577075 excludes players at level 0xd959ec24, 0x253718b0 excludes both 0xd959ec24 and 0xc2577075, others accept all. |
— |
— |
0x35bf10 |
| RecalculateOutgoingVisibility |
Map:RecalculateOutgoingVisibility() |
Rebuilds outgoing (shared) visibility: clears layer 1 for each player, then for each player's recipients without a blocker adds the player's visibility counts into the recipient. |
— |
— |
0x35d1f0 |
| RemoveOutgoingVisibilityBlocker |
Map:RemoveOutgoingVisibilityBlocker(eFromPlayer: integer, eToPlayer: integer) → boolean |
Re-enables visibility sharing from eFromPlayer to eToPlayer: removes the blocker, adds counts back per plot, marks newly seen plots, updates resource reveal state and propagates visibility changes for the local observer. Decompile is truncated. |
— |
— |
0x35d8c0 |
| RemovePlotYield |
Map:RemovePlotYield(iPlotIndex: integer, eYield: integer, iReductionAmount: integer) |
If the plot is valid, amount>0 and visible to the local observer, builds a localized yield-loss message and sends a reporting event; then in all cases subtracts the amount from the stored plot yield (creating a per-plot entry if needed). The yield switch is stubbed in the decompile. |
— |
— |
0x725860 |
| SetRevealedImprovementType |
Map:SetRevealedImprovementType(ePlayer: integer, iPlotIndex: integer, eNewValue: integer) → boolean |
Sets the improvement type a given player has seen on a plot (revealed knowledge, which may differ from the real plot) and reports whether it changed. |
— |
Map::Player::Visibility::Manager::SetRevealedImprovementType |
0x35de10 |
| SetRevealedResourceType |
Map:SetRevealedResourceType(ePlayer: integer, iPlotIndex: integer, eNewValue: integer) → boolean |
Sets the resource type a given player has seen on a plot and reports whether it changed. |
— |
Map::Player::Visibility::Manager::SetRevealedResourceType |
0x35deb0 |
| SetRevealedRouteType |
Map:SetRevealedRouteType(ePlayer: integer, iPlotIndex: integer, eNewType: integer) → boolean |
Records which route type (road/rail level) a player has seen on a given plot, in that player's revealed-plot data. Returns true only if the stored value actually changed. |
— |
Map::Player::Visibility::Manager::SetRevealedRouteType |
0x35df50 |
| SetVolcanoActive |
Map:SetVolcanoActive(bMustBeNamed: boolean) |
Randomly picks one inactive volcano feature and makes it active, then reports a reporting event and sends a notification to players who can see it. |
— |
Map::Feature::Manager::SetVolcanoActive |
0x7271e0 |
| SetVolcanoInactive |
Map:SetVolcanoInactive(bMustBeNamed: boolean) |
Randomly picks one currently active volcano and makes it dormant, then reports an event and notifies players who can see it. |
— |
Map::Feature::Manager::SetVolcanoInactive |
0x727540 |
| UpdateVolcanoes |
Map:UpdateVolcanoes() |
Runs DoTurn on every normal volcano (vector at 0x110) and every natural wonder volcano (0x140), passing a value read from the parent game cache at offset 0xc0 (likely the current turn). |
— |
— |
0x728360 |
Details
AddOutgoingVisibilityBlocker
Arguments: eFromPlayer — player whose outgoing visibility is blocked; eToPlayer — player who stops receiving the visibility
Writes
- Visibility counts of eToPlayer per plot (decrement)
- blocker set on eFromPlayer instance
Side effects
- PropagateVisibilityChanges for local observer
Input checks: Both players must be <0x40 and mapped, otherwise nothing happens; counts clamped at 0.
Multiplayer: may-desync, changes player visibility. Risk: high (Alters fog state; return value looks unreliable). Confidence of the reading: medium.
AddPlotYield
Arguments: iPlotIndex — plot index; eYield — yield type; iAmount — amount to add; event only for >0
Writes
- per-plot yield entry in variant map at this+0xb0 (creates entry if absent, adds amount to the yield slot)
Side effects
- Reporting::Event::Send hash 0x45b517d6 with plot, city and localized text, only when amount>0 and plot visible
Input checks: Invalid plot or amount<1 skips the event but still performs the stored add (amount added even if negative); out-of-range plot index goes to a scratch entry; out-of-range yield adds to a fallback field.
Preconditions
- game thread
- valid plot index recommended
Multiplayer: may-desync: event depends on local observer visibility but state change is deterministic. Risk: medium (stored yield change plus local-only UI event). Confidence of the reading: medium.
Verified from the code
- uses virtual map GetPlot at vtable+0x60
- message only when amount >= 1 and local visibility value > 0
- bounds checks for index and yield; fallback writes elsewhere
- switch on yield 0-5 selects text, all cases fall to same code in decompile
Inferred
- the +0xb0 map is plot index to yield list
- the sent event is the plot yield popup
Open questions
- what the fallback fields at +0x18/+0x30 of the scratch entry represent
AddVolcano
Arguments: iPlotIndex — plot where the volcano is created
Writes
- Volcano vector at +0x110
- plot-to-volcano index map at +0x208
Side effects
- Volcano::StoreVolcanoData called on new entry
Input checks: No check that the plot index is valid or already has a volcano; inserts map entry only if key missing.
Multiplayer: may-desync, adds map feature state. Risk: high (Adds volcano objects; duplicate or invalid plot indices unchecked). Confidence of the reading: medium.
CalculateSusceptibleTiles
Writes
- Susceptible tile array at +0x238 (count reset to 0 then refilled)
Input checks: None visible.
Multiplayer: may-desync, rewrites feature manager state. Risk: medium (Rewrites derived list; decompile truncated). Confidence of the reading: low.
CanSufferEruption
Arguments: iPlotIndex — plot to test
Input checks: Null plot returns false; neighbour null checked.
Multiplayer: read-only, pure check. Risk: low (Getter). Confidence of the reading: medium.
ChangeLandPlotCount
Arguments: iChange — delta added to land plot count
Writes
- Land plot count at +0x100
Input checks: None; no clamp.
Multiplayer: may-desync, changes tracked map count. Risk: medium (Writes tracked counter without validation). Confidence of the reading: medium.
ChangeNaturalWonderCount
Arguments: iChange — amount to add
Writes
- natural wonder count at this+0x130 (via move-assign into variable at this+0x120)
Side effects
- auto-variable assignment (replication hook)
Input checks: None; no clamp, negative results allowed.
Preconditions
- map instance exists
Multiplayer: may-desync: map state counter; apply on all clients. Risk: low (simple counter). Confidence of the reading: medium.
Verified from the code
- computes current plus delta and stores through a move-assign helper
Inferred
- helper template name mentions AI ControlPriority but is probably a mis-resolved generic assignment
Open questions
- protected member, so Lua exposure may not exist
ComputePlotYieldDrop
Arguments: iPlotIndex — plot to evaluate; eYield — yield type; iPercentChance — percentage (capped at 100) of the yield to remove
Writes
- Random state via Random::Get
Side effects
- Consumes a random number from the game random generator
Input checks: Returns 0 for missing plot or percent<=0; percent capped to 100; yield index bounds checked.
Multiplayer: may-desync, consumes shared random stream. Risk: medium (Random call changes sync state). Confidence of the reading: medium.
DoTurn
Writes
- Volcano state and susceptible tile list (via callees)
Input checks: None.
Multiplayer: may-desync, advances volcano state. Risk: medium (Runs full feature turn processing). Confidence of the reading: high.
GetIceLossEvent
Arguments: iPlotIndex — plot to look up
Input checks: Linear search; no range check needed.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
GetLayerIndexID
Arguments: uiIndex — layer index
Input checks: Range checked.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
GetNumActiveVolcanoes
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetNumEruptions
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetNumNaturalWonderVolcanoes
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
GetNumNaturalWondersEruptions
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetNumNormalVolcanoes
Arguments: bMustBeNamed — count only volcanoes with a named type
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
GetNumVolcanoes
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
GetPercentVolcanoesActive
Input checks: Division guarded when count is zero.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetPlotYield
Arguments: iPlotIndex — plot index; eYield — yield type
Input checks: Both plot index and yield type are bounds-checked and fall back to defaults.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetRevealedImprovementType
Arguments: ePlayer — observer player (1000 is the special observer; invalid maps to default instance); iPlotIndex — plot index
Input checks: Player and plot index bounds-checked with fallback.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetRevealedRouteType
Arguments: ePlayer — observer player; iPlotIndex — plot index
Input checks: Player and plot index bounds-checked.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetTotalVolcanoes
Input checks: None.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetVolcanicPeriod
Arguments: plotIndex — plot used to get related volcanoes (inferred); minSeverity — start index into each volcano's eruption list (inferred)
Input checks: Division by zero not checked per entry; handles empty list.
Multiplayer: read-only, computed getter. Risk: low (Getter but divides by stored values). Confidence of the reading: low.
GetVolcanoType
Arguments: iPlotIndex — plot index
Input checks: Null record returns -1.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
GetVolcanoTypeAtIndex
Arguments: uiIndex — index into the volcano vector
Input checks: Range checked.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
IsActive
Arguments: iPlotIndex — plot index
Input checks: Null record returns false.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
IsTileEruptionSusceptible
Arguments: iPlotIndex — plot to test
Input checks: Null plot gives false; neighbour null checked.
Multiplayer: read-only, pure check. Risk: low (Getter). Confidence of the reading: medium.
IsVisibleToAnyHuman
Arguments: iPlotIndex — plot index
Input checks: Plot index range checked; invalid players use default instance.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
IsVisibleToAnyPlayer
Arguments: iPlotIndex — plot index
Input checks: Plot index range checked.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: high.
IsVisibleToPlayerOfCivLevel
Arguments: iPlotIndex — plot index; eLevel — civilization level filter hash (inferred)
Input checks: Plot index range checked.
Multiplayer: read-only, pure getter. Risk: low (Getter). Confidence of the reading: medium.
RecalculateOutgoingVisibility
Writes
- Layer 1 counts for every player
- recipients' group visibility counts
Input checks: Skips unmapped players (>=0x40).
Multiplayer: may-desync, rewrites visibility state. Risk: high (Touches all players' fog data). Confidence of the reading: medium.
RemoveOutgoingVisibilityBlocker
Arguments: eFromPlayer — player whose blocker is removed; eToPlayer — player who regains the visibility
Writes
- Visibility counts and revealed flags of eToPlayer
- blocker set on eFromPlayer
Side effects
- Resource builder UpdateRevealedAt
- PropagateVisibilityChanges and ViewPlotContents for local observer
Input checks: Both players must be <0x40 and mapped; otherwise no change.
Multiplayer: may-desync, changes player visibility. Risk: high (Alters fog and reveal state; truncated). Confidence of the reading: low.
RemovePlotYield
Arguments: iPlotIndex — plot index; eYield — yield type reduced; iReductionAmount — amount subtracted
Writes
- Per-plot yield table at +0xb0 (decrements entry, may allocate a new entry)
Side effects
- Reporting::Event::Send with localized message when plot is visible to local observer
Input checks: Event only if plot exists, amount>0 and visible; the subtraction is not guarded by those checks, bad yield index falls back to default slot.
Multiplayer: may-desync, writes map yield state; reporting depends on local visibility. Risk: high (Subtraction can go negative; no clamp). Confidence of the reading: medium.
SetRevealedImprovementType
Arguments: ePlayer — player whose knowledge is changed; 1000 selects the global/default visibility record; iPlotIndex — plot index; eNewValue — improvement type to record
Writes
- 16-bit revealed improvement entry for the plot in the player's visibility data (via auto variable at visibility+0x150)
Input checks: Plot index and player id are not range checked (unchecked array indexing, crash risk). Returns false when the layer index is out of range, the layer is null, or the value is unchanged.
Preconditions
- valid player id or 1000
- valid plot index
- game thread
Multiplayer: may-desync: per-player visibility state; keep it consistent on all clients. Risk: medium (Unchecked indexes; changes what a player sees for a plot.). Confidence of the reading: medium.
Verified from the code
- Player id 1000 uses the record at this+0x50, otherwise looks up via the mapping tables
- Layer index from this+0x18 is bounds-checked against count at record+0x240
- Writes a short only if different, returning true
- Returns false otherwise
Inferred
- Field at this+0x18 is the improvement layer slot; this+0x1c is the resource layer slot in the sibling function
- 1000 is the 'observer/all' pseudo player
Open questions
- Whether callers must also refresh the UI
SetRevealedResourceType
Arguments: ePlayer — player whose knowledge is changed; 1000 selects the global/default record; iPlotIndex — plot index; eNewValue — resource type to record
Writes
- 16-bit revealed resource entry for the plot in the player's visibility data (auto variable at visibility+0x150)
Input checks: Plot index and player id unchecked (crash risk). Returns false when layer out of range, layer null, or value unchanged.
Preconditions
- valid player id or 1000
- valid plot index
- game thread
Multiplayer: may-desync: per-player visibility state. Risk: medium (Unchecked indexes; alters player-visible plot knowledge.). Confidence of the reading: medium.
Verified from the code
- Identical structure to SetRevealedImprovementType but layer index from this+0x1c
- Writes a short and returns true only if the value differs
Inferred
- this+0x1c is the resource layer slot
Open questions
- Whether callers refresh UI
SetRevealedRouteType
Arguments: ePlayer — player whose visibility record is edited; 1000 selects a special alternate record (observer/global); iPlotIndex — plot index into the per-layer revealed route array; eNewType — route type to store as the revealed route
Writes
- revealed route type (16-bit) for the plot in the player's visibility data, inside a VariantMap edited via edit()
Side effects
- marks the player's visibility variant map as edited (change tracking via edit())
Input checks: Player id 1000 uses a fallback record; any other id indexes the player table without a visible range check (crash risk on bad id). Layer index is checked against a count; the plot index is NOT bounds checked (crash risk). Failed layer check returns false silently.
Preconditions
- valid player id (or 1000)
- valid plot index
- visibility manager initialized
Multiplayer: may-desync: visibility state mutation; only safe if run identically on all clients. Risk: medium (unchecked plot index and player index; visibility data only, so wrong values are cosmetic but bad indices can crash). Confidence of the reading: medium.
Verified from the code
- returns false when the layer index is not below the record's count
- stores the value as a 16-bit short only if different from the current one
- player 1000 takes a different record path
Inferred
- player 1000 is the 'no player/observer' slot
- this+0x20 is the current visibility layer or team index
Open questions
- exact meaning of this+0x20
- whether edit() affects replication or only dirty-flagging
SetVolcanoActive
Arguments: bMustBeNamed — only consider volcanoes that have a name
Writes
- chosen volcano record's 'active since turn' field (+0x14) set to current turn
- uses and advances the game random state (Choose Active Volcano Roll)
Side effects
- Random::Get roll consuming random state
- Reporting::Event::Send with plot, flag and visibility
- Reporting::Notification::Send to each player that can see the plot with localized text
- Only runs when more volcanoes are inactive than active
Input checks: Silent return when no inactive volcano candidate exists (count difference must be positive). Notification only for players with the plot visible.
Preconditions
- gameplay state
- map with volcano features
- game thread
Multiplayer: may-desync: uses the shared random generator and emits UI notifications; must run identically on all clients. Risk: high (Consumes random state and sends notifications; call order matters for sync.). Confidence of the reading: medium.
Verified from the code
- Rolls Random::Get with label 'Choose Active Volcano Roll'
- Iterates volcano list and skips those already active, and unnamed ones when bMustBeNamed is true
- Sets a turn field on the selected entry and sends a reporting event and per-player notification
- Notification only if the player's visibility array has the plot revealed
Inferred
- Entry field +0x14 is the activation turn; -1 means inactive
- Vtable calls give total/active volcano counts
Open questions
- Meaning of virtual calls at +0x58/+0x68
- Notification type hash identification
SetVolcanoInactive
Arguments: bMustBeNamed — only consider volcanoes that have a name
Writes
- chosen volcano record's field at +0x14 set to -1
- uses game random state (Choose Inactive Volcano Roll)
Side effects
- Random::Get roll
- Reporting::Event::Send
- Reporting::Notification::Send to players who see the plot, different notification type than the active variant
Input checks: Silent return when no active volcano exists. Skips unnamed volcanoes if bMustBeNamed.
Preconditions
- gameplay state
- game thread
Multiplayer: may-desync: consumes shared random state and sends notifications. Risk: high (Random roll plus notifications; ordering matters.). Confidence of the reading: medium.
Verified from the code
- Rolls Random::Get with label 'Choose Inactive Volcano Roll'
- Picks among active entries and writes -1 into the entry at +0x14
- Sends reporting event and notification to each player with visibility
Inferred
- Mirror of SetVolcanoActive
Open questions
- Same unknown virtual calls as the active variant
UpdateVolcanoes
Writes
- Each volcano's state via DoTurn
Side effects
- Whatever Volcano::DoTurn triggers (eruptions)
Input checks: None.
Multiplayer: may-desync, advances volcano state. Risk: high (Can cause eruptions). Confidence of the reading: medium.