Home › Lua API › Governor

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

Governor

14 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
CanAssignToMajorCiv Governor:CanAssignToMajorCiv() → boolean
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x2e
ui-cache — 0x740d60 0x7416a0
GetAssignedCity Governor:GetAssignedCity() → City
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x18, Cache::Governor::Instance::m_kVariants+0x1c
ui-cache — 0x70e9d0 0x70f240
GetComponentID Governor:GetComponentID() → 1 values ⚠
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x20, Cache::Governor::Instance::m_kVariants+0x8
ui-cache — 0x70ea10 0x70f280
GetID Governor:GetID() → number
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x8
ui-cache — 0x70ea60 0x70f2d0
GetIdentityPressure Governor:GetIdentityPressure() → number
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x28
ui-cache — 0x70eab0 0x70f320
GetName Governor:GetName() → nil/string
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x10
ui-cache — 0x70eb00 0x70f370
GetNeutralizedTurns Governor:GetNeutralizedTurns() → number
returns: A turn number (the scripts name the result turn). (inferred)
ui-cache — 0x70eb60 0x70f3d0
GetOwner Governor:GetOwner() → number
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x20
returns: Id of a player: the scripts use the result as Players[result].
ui-cache — 0x70ebb0 0x70f420
GetTurnsOnSite Governor:GetTurnsOnSite() → number
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x24
returns: A turn number (the scripts name the result turn). (inferred)
ui-cache — 0x70ec00 0x70f470
GetTurnsToEstablish Governor:GetTurnsToEstablish() → number
returns: A turn number (the scripts name the result turn). (inferred)
ui-cache — 0x70ec50 0x70f4c0
GetType Governor:GetType() → number
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0xc
ui-cache — 0x70eca0 0x70f510
HasPromotion Governor:HasPromotion(ePromotion: string/number[GovernorPromotionTypes]) → boolean (const bool)
args: ePromotion — Index of a row of the GovernorPromotions table (the value of GameInfo.GovernorPromotions[...].Index).
touches (inferred from the code): reads Cache::Governor::Instance::m_abHasPromotion
ui-cache — 0x70ecf0 0x70f560
IsEstablished Governor:IsEstablished() → boolean
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x2c
ui-cache — 0x70ed50 0x70f5c0
IsGovernCityState Governor:IsGovernCityState() → boolean
touches (inferred from the code): reads Cache::Governor::Instance::m_kVariants+0x2d
ui-cache — 0x70ed90 0x70f600