Home › Lua API › CityGold

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

CityGold

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

Community reference for this object: CityGold (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
CanPlaceUnit CityGold:CanPlaceUnit(eUnit: string/number[UnitTypes]) → boolean
args: eUnit — Index of a row of the Units table (the value of GameInfo.Units[...].Index).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x68ed50 0x68f330
GetPlotPurchaseCost CityGold:GetPlotPurchaseCost(x: integer/Plot, y?: integer) → number (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x68edc0 0x68f3a0
GetPurchaseCost CityGold:GetPurchaseCost(arg1?: number, arg2: string/number, arg3?: number) → number
args: arg3 — A constant from the Lua table MilitaryFormationTypes.
✓ exists at runtime (not called)
ui-cache yes ↗ 0x68ee70 0x68f450
IsBuildingFaithPurchaseEnabled CityGold:IsBuildingFaithPurchaseEnabled(itemHash: string/number[HashID]) → boolean
✓ exists at runtime (not called)
ui-cache yes ↗ 0x68ef70 0x68f550
IsUnitFaithPurchaseEnabled CityGold:IsUnitFaithPurchaseEnabled(itemHash: string/number[HashID]) → boolean
✓ exists at runtime (not called)
ui-cache yes ↗ 0x68efe0 0x68f5c0