Home › Dev CE (experimental) › Plot

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.

Plot

5 methods (Dev CE test build). this is found with the game's own IMapPlot instance resolver (plain).

Method Signature Purpose (AI-written, inferred) Tested Engine function Current
ClearCityAttributes Plot:ClearCityAttributes() Frees the plot's city attribute slot (index at offset 0x4e) via CityPlots::DeallocateAttributes and zeroes the index. plumbing ✓ — 0x5eca0
IsForcedWorkedState Plot:IsForcedWorkedState() → boolean Returns true if the plot has an improvement whose properties contain a specific key (hash 0xd4c291d2) of an accepted value type with nonzero data; false if no improvement. plumbing ✓ — 0x5ffa0
IsGoodyHut Plot:IsGoodyHut() → boolean True if the plot's improvement definition has flag bit 4 at offset 0x109 (goody hut flag). plumbing ✓ — 0x60180
IsGoodyNotify Plot:IsGoodyNotify() → boolean Returns true if the plot's improvement definition has both flag bits 0xc set at +0x109 (a goody-hut style notify flag). plumbing ✓ — 0x601d0
SetImprovementOwner Plot:SetImprovementOwner(eOwner: integer) Changes the player owning the plot's improvement: removes visibility and improvement bookkeeping for the old owner, validates and stores the new owner, then adds visibility for the new owner (decompilation truncated after the new-owner visibility loop). plumbing ✓ — 0x61280

Details

ClearCityAttributes

Writes - Plot city attribute index at +0x4e - city plot attribute pool

Input checks: None.

Multiplayer: may-desync, writes plot state. Risk: medium (Frees attributes in shared pool). Confidence of the reading: medium.

IsForcedWorkedState

Input checks: No improvement returns false; property type and flag checked.

Multiplayer: read-only, pure check. Risk: low (Getter). Confidence of the reading: low.

IsGoodyHut

Input checks: Improvement index bounds-checked; no improvement returns false.

Multiplayer: read-only, pure check. Risk: low (Getter). Confidence of the reading: high.

IsGoodyNotify

Input checks: Checks improvement index for -1, range and null definition.

Multiplayer: read-only, only reads plot and definitions. Risk: low (getter). Confidence of the reading: medium.

SetImprovementOwner

Arguments: eOwner — new improvement owner player id, -1 for none

Writes - plot improvement owner byte (+0x46) - old and new owner visibility counts for the plot and its 6 neighbours - old owner's Player::Improvements list

Side effects - sends a Reporting event for the old owner when ownership is removed

Input checks: No-op if owner unchanged; invalid owner (>0x40 or absent player slot) is coerced to -1.

Multiplayer: may-desync, writes plot/player visibility and improvement state. Risk: high (alters visibility counts and improvement lists). Confidence of the reading: medium.