Home › Lua API › WorldBuilderCityManager

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

WorldBuilderCityManager

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

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
Create WorldBuilderCityManager:Create(arg1?: any[HksObject]) → number, number (or nothing) gameplay — 0x5ee340 0x5eee90
CreateBuilding WorldBuilderCityManager:CreateBuilding(arg1?: any, eBuilding: number/string[BuildingTypes], arg3?: number) → boolean, RequirementsResults ⚠
args: eBuilding — Index of a row of the Buildings table (the value of GameInfo.Buildings[...].Index).
gameplay — 0x5ee450 0x5eefa0
CreateDistrict WorldBuilderCityManager:CreateDistrict(arg1?: any, eDistrict: number/string[DistrictTypes], arg3?: number) → boolean, RequirementsResults ⚠
args: eDistrict — Index of a row of the Districts table (the value of GameInfo.Districts[...].Index).
gameplay — 0x5ee610 0x5ef160
GetCity WorldBuilderCityManager.GetCity(arg1?: any, arg2?: any[HksObject], arg3?: number) → City (or nothing) ⚠ gameplay — 0x5ee7d0 0x5ef320
GetCityValue WorldBuilderCityManager:GetCityValue(kCity?: any, uiType: number/string, pszName: string) → 1 values (or nothing) ⚠
args: kCity — A City object (the scripts pass a variable named pCity).; uiType — A string.
gameplay — 0x5ee8a0 0x5ef3f0
GetDistrictValue WorldBuilderCityManager:GetDistrictValue(kDistrict?: any, uiType: number/string, pszName: string) → 1 values (or nothing) ⚠
args: kDistrict — A District object (the scripts pass a variable named pDistrict). (inferred)
gameplay — 0x5ee9c0 0x5ef510
GetPlotOwner WorldBuilderCityManager.GetPlotOwner() → table/nil gameplay — 0x5eeae0 0x5ef630
Remove WorldBuilderCityManager:Remove() (or nothing) gameplay — 0x5eec60 0x5ef7b0
RemoveAll WorldBuilderCityManager:RemoveAll(ePlayer?: any[HksObject]) (or nothing) gameplay — 0x5eecd0 0x5ef820
RemoveAt WorldBuilderCityManager.RemoveAt() (or nothing) gameplay — 0x5eed40 0x5ef890
RemoveBuilding WorldBuilderCityManager:RemoveBuilding(kCity?: any, eBuilding: number/string[BuildingTypes]) → boolean ⚠
args: eBuilding — Index of a row of the Buildings table (the value of GameInfo.Buildings[...].Index).
gameplay — 0x5eede0 0x5ef930
RemoveDistrict WorldBuilderCityManager:RemoveDistrict(kCity: District, eDistrict: number/string[DistrictTypes]) → boolean
args: eDistrict — Index of a row of the Districts table (the value of GameInfo.Districts[...].Index).
gameplay — 0x5eee90 0x5ef9e0
SetCityValue WorldBuilderCityManager:SetCityValue(arg1?: any, uiType: number/string, arg3?: number) (or nothing) ⚠
args: uiType — A string.
gameplay — 0x5ef010 0x5efb60
SetDistrictValue WorldBuilderCityManager:SetDistrictValue(arg1?: any, uiType: number/string, arg3?: number[HksObject]) (or nothing) ⚠
args: arg1 — A District object (the scripts pass a variable named pDistrict).
gameplay — 0x5ef180 0x5efcd0
SetPlotOwner ★ WorldBuilderCityManager:SetPlotOwner(x: integer/Plot, y?: integer, arg3?: integer/City) (or nothing) ⚠
args: x — Plot x coordinate (plot:GetX()).; y — Plot y coordinate (plot:GetY()).; arg3 — A boolean flag (true/false).
gameplay — 0x5ef340 0x5efe90

Notes (★)

SetPlotOwner

Sets or clears the owner of a plot through the WorldBuilder city manager.

See also: Plot.SetOwner