Home › Dev CE (experimental) › CityReligion

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.

CityReligion

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

Method Signature Purpose (AI-written, inferred) Tested Engine function Current
CanConvert CityReligion:CanConvert() → boolean Checks whether the city's owner may be converted: false if the owner's suzerain has created a religion while the owner has the relevant flag. plumbing ✓ — 0x149470
GetPressureFromCity CityReligion:GetPressureFromCity() → number Computes the religious pressure the city exerts, applying holy site, suzerain religion, spread modifiers, production project bonus and game speed. plumbing ✓ — 0x149e50
GetTotalPressureOnCity CityReligion:GetTotalPressureOnCity(eReligion: integer) → number Sums pressure on this city from other cities across all players for a religion. plumbing ✓ — 0x14a370
HasBeenInitiated CityReligion:HasBeenInitiated(eReligion: integer) → boolean Checks whether the city's per-religion record for the given religion has its initiated flag set. plumbing ✓ — 0x14a4b0
RecomputeNextReligion CityReligion:RecomputeNextReligion() Recomputes which religion will next take over the city; decompilation is truncated, only the initial reset of fields 0xcc/0xd0 and copying of religion definition data is visible. plumbing ✓ — 0x14ad20

Details

CanConvert

Input checks: Handles no suzerain.

Multiplayer: read-only, reads city/district state only. Risk: low (pure getter). Confidence of the reading: medium.

GetPressureFromCity

Input checks: Returns 0 if city has no religion or religion data is missing.

Multiplayer: read-only, reads city/district state only. Risk: low (pure getter). Confidence of the reading: medium.

GetTotalPressureOnCity

Arguments: eReligion — religion type whose pressure is measured (inferred)

Input checks: None.

Multiplayer: read-only, reads city/district state only. Risk: low (pure getter). Confidence of the reading: medium.

HasBeenInitiated

Arguments: eReligion — religion type to look up

Input checks: Returns false if no record.

Multiplayer: read-only, reads city/district state only. Risk: low (pure getter). Confidence of the reading: high.

RecomputeNextReligion

Writes - Religion fields at 0xcc and 0xd0 (reset)

Side effects - Allocates temporary vectors

Input checks: Unknown (truncated).

Multiplayer: may-desync, changes city religion state. Risk: high (incomplete decompilation). Confidence of the reading: low.