Home › Lua API › CityPower

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

CityPower

12 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
GetFreePower CityPower:GetFreePower() → number
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9db90 0x9e730
GetFreePowerSources CityPower:GetFreePowerSources() → nil
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9dbf0 0x9e790
GetGeneratedPowerSources CityPower:GetGeneratedPowerSources() → any[]
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9e700 0x9f2a0
GetMissingPower CityPower:GetMissingPower() → number
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9ea50 0x9f5f0
GetPlotsCoveredByRegionalPower CityPower:GetPlotsCoveredByRegionalPower() → table
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9eac0 0x9f660
GetPlotsProvidingPower CityPower:GetPlotsProvidingPower() → any[]
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9eca0 0x9f840
GetRequiredPower CityPower:GetRequiredPower() → number
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9f190 0x9fd30
GetRequiredPowerSources CityPower:GetRequiredPowerSources() → table
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9f1f0 0x9fd90
GetTemporaryPower CityPower:GetTemporaryPower() → number
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9f550 0xa00f0
GetTemporaryPowerSources CityPower:GetTemporaryPowerSources() → any[]
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9f5b0 0xa0150
IsFullyPowered CityPower:IsFullyPowered() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9f8f0 0xa0490
IsFullyPoweredByActiveProject CityPower:IsFullyPoweredByActiveProject() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache — 0x9f930 0xa04d0