Home › Dev CE (experimental) › CityCitizens
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.
CityCitizens
2 methods (Dev CE test build). this is found with the game's own ICityCitizens instance resolver (plain).
| Method |
Signature |
Purpose (AI-written, inferred) |
Tested |
Engine function |
Current |
| DoFoundCity |
CityCitizens:DoFoundCity() |
Called when a city is founded: puts one citizen worker on the city center plot and then reallocates citizens. |
plumbing ✓ |
— |
0x10fa60 |
| RemoveAllCitizenWorkers |
CityCitizens:RemoveAllCitizenWorkers(sendEvents: boolean) |
Trims citizen worker assignments that exceed plot capacity, rebalances the unassigned count, and resets entries, optionally sending change events; despite the name the code shown does not simply clear all workers. |
plumbing ✓ |
— |
0x110760 |
Details
DoFoundCity
Writes
- Citizens worker-count array entry for the center plot index (+1)
- Citizens counter at 0x6c incremented if plot index is not 0
Side effects
- SendPlotIndexWorkerChange for the plot
- ReallocateCitizens runs
Input checks: Checks plot exists and index is within the radius-2 plot range; no other checks.
Multiplayer: may-desync, changes citizen assignment. Risk: medium (reallocates citizens; calling on an established city adds an extra worker). Confidence of the reading: medium.
RemoveAllCitizenWorkers
Arguments: sendEvents — if true, SendPlotIndexWorkerChange is raised for each modified plot
Writes
- Citizens per-plot worker arrays (0x8, 0x20)
- Citizens unassigned count (0x68) and specialist/other count (0x6c)
Side effects
- SendPlotIndexWorkerChange per changed plot when sendEvents is true
Input checks: Walks arrays within their stored sizes; no argument checks.
Multiplayer: may-desync, rewrites citizen assignment. Risk: high (large rewrite of citizen state; behaviour differs from name). Confidence of the reading: medium.