Home › Lua API › PlayerReligion

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

PlayerReligion

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

Community reference for this object: PlayerReligion (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
CanAfford PlayerReligion:CanAfford(arg1?: number, arg2: string/number, arg3?: number) → boolean
args: arg1 — Id of a city (city:GetID()). (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6b2ed0 0x6b3420
CanCreatePantheon UI state: PlayerReligion:CanCreatePantheon() → boolean
gameplay state: PlayerReligion:CanCreatePantheon(bCheckFaithTotal: boolean) → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6b2fc0 0x6b3510
ChangeFaithBalance PlayerReligion:ChangeFaithBalance(iDelta: number) (or nothing) gameplay yes ↗ 0x6f5260 0x6f59a0
ChangeNumBeliefsEarned PlayerReligion:ChangeNumBeliefsEarned(iNewValue?: number) (or nothing)
args: iNewValue — A number.
gameplay yes ↗ 0x6f52e0 0x6f5a20
GetFaithBalance PlayerReligion:GetFaithBalance() → number
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6b3010 0x6b3560
GetFaithYield UI state: PlayerReligion:GetFaithYield() → number
gameplay state: PlayerReligion:GetFaithYield() → number (FixedPoint)
✓ called in the game: 1 value(s) as documented
returns: The scripts pass the result to Player.SetScoringScenario3. (inferred)
ui-cache, gameplay yes ↗ 0x6b3080 0x6b35d0
GetFaithYieldToolTip PlayerReligion:GetFaithYieldToolTip(arg1?: any, arg2?: any) → string
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6b30f0 —
GetHolyCityID PlayerReligion:GetHolyCityID() → 1 values ⚠
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6b3100 0x6b3650
GetNumBeliefsEarned PlayerReligion:GetNumBeliefsEarned() → number
✓ called in the game: 1 value(s) as documented
returns: A count or amount (the scripts name the result count / num / amount). (inferred)
ui-cache yes ↗ 0x6b3140 0x6b3690
GetPantheon UI state: PlayerReligion:GetPantheon() → number
gameplay state: PlayerReligion:GetPantheon() → number (BeliefTypes)
✓ 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 ↗ 0x6b3190 —
GetReligionInMajorityOfCities UI state: PlayerReligion:GetReligionInMajorityOfCities() → number
gameplay state: PlayerReligion:GetReligionInMajorityOfCities() → number (ReligionTypes)
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6b31e0 —
GetReligionTypeCreated UI state: PlayerReligion:GetReligionTypeCreated() → number
gameplay state: PlayerReligion:GetReligionTypeCreated() → number (ReligionTypes)
✓ called in the game: 1 value(s) as documented
returns: The scripts pass the result to CityReligion.SetAllCityToReligion (parameter eReligion). (inferred)
ui-cache, gameplay yes ↗ 0x6b3230 —
HasLaunchedInquisition UI state: PlayerReligion:HasLaunchedInquisition() → boolean
gameplay state: PlayerReligion:HasLaunchedInquisition() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6b3280 —
HasReligiousFoundingUnit PlayerReligion:HasReligiousFoundingUnit() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6b32d0 —
SetFaithBalance PlayerReligion:SetFaithBalance(xNewValue: number) (or nothing)
args: xNewValue — A number.
gameplay yes ↗ 0x6f5560 0x6f5ca0
SetHolyCity PlayerReligion:SetHolyCity(pkCity: City[City::Instance]) (or nothing) gameplay yes ↗ 0x6f55e0 0x6f5d20