Home › Lua API › CityReligion

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

CityReligion

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

Community reference for this object: CityReligion (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
AddOneFollower CityReligion:AddOneFollower(eReligion?: number) (or nothing)
touches (inferred from the code): reads City::Instance::m_eOwner
gameplay yes ↗ 0x6ccc70 0x6cd330
AddReligiousPressure CityReligion:AddReligiousPressure(eReason?: number, eReligion?: number, arg3?: number, eResponsibleParty?: number) (or nothing)
args: eReason — A number.
touches (inferred from the code): reads City::Instance::m_eOwner
gameplay yes ↗ 0x6cccd0 0x6cd390
GetActivePantheon UI state: CityReligion:GetActivePantheon() → number
gameplay state: CityReligion:GetActivePantheon() → number (BeliefTypes)
touches (inferred from the code): reads Cache::City::Religion::m_kValues+0xc
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Beliefs table: the scripts look it up with GameInfo.Beliefs[result].
ui-cache, gameplay yes ↗ 0x691bc0 0x6921a0
GetCity CityReligion:GetCity() → City
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x691c10 0x6921f0
GetMajorityReligion CityReligion:GetMajorityReligion() → number
touches (inferred from the code): reads Cache::City::Religion::m_kValues+0x8
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Religions table: the scripts look it up with GameInfo.Religions[result].
ui-cache, gameplay yes ↗ 0x691c50 0x692230
GetNextReligion CityReligion:GetNextReligion() → number
touches (inferred from the code): reads Cache::City::Religion::m_kValues+0x14
✓ exists at runtime (not called)
returns: Key of a row of the Religions table: the scripts look it up with GameInfo.Religions[result].
ui-cache yes ↗ 0x691ca0 0x692280
GetNumFollowers CityReligion:GetNumFollowers(eReligion?: number) → number gameplay yes ↗ 0x6cce70 0x6cd530
GetPressureFromCity CityReligion:GetPressureFromCity() → number
touches (inferred from the code): reads Cache::City::Religion::m_kValues+0x10
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x691cf0 0x6922d0
GetReligionsInCity CityReligion:GetReligionsInCity() → table{Religion: number, Followers: number, Pressure: number}[]
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x691d60 0x692340
GetReligiousPressureSources CityReligion:GetReligiousPressureSources() → table{CityOwner: number, CityID: number, ReligionType: number, ReligiousPressureTotal: number, ReligiousPressureFromCity: number, ReligiousPressureFromTrade: number}[]
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x692050 0x692630
GetTotalPressureOnCity CityReligion:GetTotalPressureOnCity(eReligion?: integer[ReligionTypes]) → FixedPointT<8>
args: eReligion — Index of a row of the Religions table (the value of GameInfo.Religions[...].Index).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x692490 —
GetTurnsToNextReligion CityReligion:GetTurnsToNextReligion() → number
touches (inferred from the code): reads Cache::City::Religion::m_kValues+0x18
✓ called in the game: 1 value(s) as documented
returns: A turn number (the scripts name the result turn). (inferred)
ui-cache yes ↗ 0x6924a0 0x692a80
RemoveOtherReligions CityReligion:RemoveOtherReligions(eReligion?: number, iRemovalPercent?: number, eResponsiblePlayer?: number) (or nothing)
touches (inferred from the code): writes City::Religion::m_ReligionStatus; reads City::Religion::m_ReligionStatus
gameplay yes ↗ 0x6ccef0 0x6cd5b0
RemovePressureOneReligion CityReligion:RemovePressureOneReligion(eReligion?: number, xPressureRemoved?: number, eResponsiblePlayer?: number) (or nothing)
touches (inferred from the code): reads City::Instance::m_eOwner
gameplay yes ↗ 0x6ccfc0 0x6cd680
SetAllCityToReligion CityReligion:SetAllCityToReligion(eReligion?: number) (or nothing)
touches (inferred from the code): reads City::Instance::m_eOwner
gameplay yes ↗ 0x6cd080 0x6cd740