Home › Lua API › District

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

District

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

Community reference for this object: District (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
CanAttack District:CanAttack() → boolean ui-cache yes ↗ 0x695700 0x695ce0
ChangeDamage District:ChangeDamage(eDefenseType: integer[DefenseTypes], iChange: integer, eAttackingPlayer: integer[PlayerTypes]) (or nothing)
args: eDefenseType — Value of the DefenseTypes enum (a type index).; eAttackingPlayer — Id of a player (as in Players[id]).
gameplay yes ↗ 0x6d1c10 0x6d22b0
GetAdjacencyYield District:GetAdjacencyYield(eYield?: any, bIncludeMultipliers?: integer[YieldTypes])
args: bIncludeMultipliers — Index of a row of the Yields table (the value of GameInfo.Yields[...].Index).
ui-cache yes ↗ 0x695750 —
GetAirSlots District:GetAirSlots() → number ui-cache yes ↗ 0x695760 0x695d40
GetAirUnitCount District:GetAirUnitCount() → number ui-cache yes ↗ 0x6957b0 0x695d90
GetAirUnits District:GetAirUnits() → boolean, Unit[] ui-cache yes ↗ 0x695800 0x695de0
GetAttackStrength District:GetAttackStrength() → number ui-cache yes ↗ 0x695ad0 0x6960b0
GetBaseDefenseStrength District:GetBaseDefenseStrength() → number ui-cache yes ↗ 0x695b40 0x696120
GetCity UI state: District:GetCity() → City (or nothing)
gameplay state: District:GetCity() → City (or nothing)
ui-cache, gameplay yes ↗ 0x695bb0 0x696190
GetComponentID District:GetComponentID() → 1 values ⚠ ui-cache yes ↗ 0x695c10 0x6961f0
GetDamage District:GetDamage(eDefenseType: integer[DefenseTypes]) → number
args: eDefenseType — Value of the DefenseTypes enum (a type index).
ui-cache, gameplay yes ↗ 0x695c60 0x696240
GetDefenseStrength UI state: District:GetDefenseStrength() → number
gameplay state: District:GetDefenseStrength() → number (FixedPoint)
ui-cache, gameplay yes ↗ 0x695cd0 0x6962b0
GetExtraRegionalEntertainment District:GetExtraRegionalEntertainment() → number ui-cache yes ↗ 0x695d40 0x696320
GetExtraRegionalRange District:GetExtraRegionalRange() → number ui-cache yes ↗ 0x695d90 0x696370
GetID District:GetID() → number ui-cache, gameplay yes ↗ 0x695de0 0x6963c0
GetLocation UI state: District:GetLocation() → 1 values ⚠
gameplay state: District:GetLocation() → number, number
ui-cache, gameplay yes ↗ 0x695e20 0x696400
GetMaxDamage District:GetMaxDamage(eDefenseType: integer[DefenseTypes]) → number
args: eDefenseType — Value of the DefenseTypes enum (a type index).
ui-cache, gameplay yes ↗ 0x695e60 0x696440
GetOwner UI state: District:GetOwner() → number
gameplay state: District:GetOwner() → number (PlayerTypes)
returns: Id of a player: the scripts use the result as Players[result]. (inferred)
ui-cache, gameplay yes ↗ 0x695ed0 0x6964b0
GetProperty District:GetProperty() gameplay yes ↗ 0x6d1f30 0x6d25d0
GetReligionHealRate District:GetReligionHealRate() → number ui-cache yes ↗ 0x695f20 0x696500
GetType District:GetType() → number ui-cache, gameplay yes ↗ 0x695f70 0x696550
GetX District:GetX() → number
returns: The scripts pass the result to PlayerVisibility.IsVisible (parameter x). (inferred)
ui-cache, gameplay yes ↗ 0x695fc0 0x6965a0
GetY District:GetY() → number
returns: The scripts pass the result to PlayerVisibility.IsVisible (parameter y). (inferred)
ui-cache, gameplay yes ↗ 0x696010 0x6965f0
GetYield UI state: District:GetYield(eYield?: integer[YieldTypes]) → FixedPointT<8>
gameplay state: District:GetYield(eYield: integer[YieldTypes]) → number
args: eYield — Index of a row of the Yields table (the value of GameInfo.Yields[...].Index).
ui-cache, gameplay yes ↗ 0x696060 —
IsComplete District:IsComplete() → boolean ui-cache, gameplay yes ↗ 0x696070 0x696650
IsPillaged UI state: District:IsPillaged() → boolean
gameplay state: District:IsPillaged() → boolean
ui-cache, gameplay yes ↗ 0x6960b0 0x696690
IsUnderSiege District:IsUnderSiege() → boolean ui-cache yes ↗ 0x6960f0 0x6966d0
SetDamage District:SetDamage(eDefenseType: integer[DefenseTypes], iNewValue: integer) (or nothing)
args: eDefenseType — Value of the DefenseTypes enum (a type index).
gameplay yes ↗ 0x6d2160 0x6d2800
SetPillaged District:SetPillaged(arg1?: boolean) (or nothing) gameplay yes ↗ 0x6d21c0 0x6d2860
SetProperty District:SetProperty() (or nothing) gameplay yes ↗ 0x6d2260 0x6d2900