Home › Lua API › Player

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

Player

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

Community reference for this object: Player (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
AttachModifierByID Player.AttachModifierByID(arg1?: any, arg2?: string) → number ⚠
args: arg1 — A string.
gameplay yes ↗ 0x6ece10 0x6ed550
CanUnreadyTurn Player:CanUnreadyTurn() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a8ec0 0x6a9440
ChangeScoringScenario1 Player.ChangeScoringScenario1(arg1?: any, arg2?: integer) → 1 values ⚠
args: arg1 — A number.
gameplay yes ↗ 0x6ed090 0x6ed7d0
ChangeScoringScenario2 Player.ChangeScoringScenario2(arg1?: any, arg2?: integer) → 1 values ⚠
args: arg1 — A number.
gameplay yes ↗ 0x6ed0f0 0x6ed830
ChangeScoringScenario3 Player.ChangeScoringScenario3(arg1?: any, arg2?: integer) → 1 values ⚠ gameplay yes ↗ 0x6ed150 0x6ed890
GetAgendaTypes Player:GetAgendaTypes() → number[]
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a8f50 0x6a94d0
GetAgendasAndVisibilities Player.GetAgendasAndVisibilities()
✓ exists at runtime (not called)
ui-cache yes ↗ 0x740f40 0x741880
GetAi_Diplomacy Player.GetAi_Diplomacy() → AiDiplomacy (or nothing) gameplay yes ↗ 0x6ed1b0 0x6ed8f0
GetAi_Military Player.GetAi_Military() → AiMilitary (or nothing) gameplay yes ↗ 0x6ed1f0 0x6ed930
GetAi_Religion Player.GetAi_Religion() → AiReligious (or nothing) gameplay yes ↗ 0x6ed230 0x6ed970
GetCategoryScore Player:GetCategoryScore(eCategory?: number) → number
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6a9100 0x6a9680
GetCities UI state: Player:GetCities() → PlayerCities (or nothing)
gameplay state: Player.GetCities() → PlayerCities (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a91c0 0x6a9740
GetCivilianLoyalty Player.GetCivilianLoyalty() → number (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x712110 0x712980
GetComponentID UI state: Player:GetComponentID() → 1 values ⚠
gameplay state: Player.GetComponentID() → 1 values ⚠
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9240 0x6a97c0
GetCulture UI state: Player:GetCulture() → PlayerCulture (or nothing)
gameplay state: Player.GetCulture() → PlayerCulture (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a92d0 0x6a9850
GetDiplomacy UI state: Player:GetDiplomacy() → PlayerDiplomacy (or nothing)
gameplay state: Player.GetDiplomacy() → PlayerDiplomacy (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9350 0x6a98d0
GetDiplomaticAI Player:GetDiplomaticAI() → AiDiplomacy (or nothing)
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a93d0 0x6a9950
GetDistricts UI state: Player:GetDistricts() → PlayerDistricts (or nothing)
gameplay state: Player.GetDistricts() → PlayerDistricts (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9450 0x6a99d0
GetEra UI state: Player:GetEra() → number
gameplay state: Player.GetEra() → number
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a94d0 0x6a9a50
GetEras Player.GetEras() → PlayerEras (or nothing) gameplay yes ↗ 0x6ed410 0x6edb50
GetFavor Player.GetFavor() → number (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x7411c0 0x741b00
GetFavorEnteringCongress Player.GetFavorEnteringCongress() → number (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x741210 0x741b50
GetFavorPerTurn Player.GetFavorPerTurn() → number (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x741260 0x741ba0
GetFavorPerTurnToolTip Player.GetFavorPerTurnToolTip() → string (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x7412c0 0x741c00
GetGovernors Player.GetGovernors() → PlayerGovernors (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x712180 0x7129f0
GetGrandStrategicAI Player:GetGrandStrategicAI() → AiGrandStrategic (or nothing)
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a9560 0x6a9ae0
GetGreatPeoplePoints UI state: Player:GetGreatPeoplePoints() → PlayerGreatPeoplePoints (or nothing)
gameplay state: Player.GetGreatPeoplePoints() → PlayerGreatPeoplePoints (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a95e0 0x6a9b60
GetID UI state: Player:GetID() → number
gameplay state: Player.GetID() → number
✓ exists at runtime (not called)
returns: Id of a player: the scripts use the result as Players[result].
ui-cache, gameplay yes ↗ 0x6a9660 0x6a9be0
GetImprovements Player:GetImprovements() → PlayerImprovements (or nothing)
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a96f0 0x6a9c70
GetInfluence UI state: Player:GetInfluence() → PlayerInfluence (or nothing)
gameplay state: Player.GetInfluence() → PlayerInfluence (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9770 0x6a9cf0
GetInfluenceMap Player:GetInfluenceMap() → InfluenceMap (or nothing)
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a97f0 0x6a9d70
GetProperties Player:GetProperties() → 1 values ⚠
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6a9870 0x6a9df0
GetProperty UI state: Player:GetProperty()
gameplay state: Player.GetProperty()
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a98f0 0x6a9e70
GetReligion UI state: Player:GetReligion() → PlayerReligion (or nothing)
gameplay state: Player.GetReligion() → PlayerReligion (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9960 0x6a9ee0
GetResources UI state: Player:GetResources() → PlayerResources (or nothing)
gameplay state: Player.GetResources() → PlayerResources (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a99e0 0x6a9f60
GetScore UI state: Player:GetScore() → number
gameplay state: Player.GetScore() → number
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9a60 0x6a9fe0
GetScoringScenario1 Player.GetScoringScenario1() → number gameplay yes ↗ 0x6ed620 0x6edd60
GetScoringScenario2 Player.GetScoringScenario2() → number gameplay yes ↗ 0x6ed670 0x6eddb0
GetScoringScenario3 Player.GetScoringScenario3() → number gameplay yes ↗ 0x6ed6c0 0x6ede00
GetStartingPlot Player.GetStartingPlot() → MapPlot (or nothing) gameplay yes ↗ 0x6ed710 0x6ede50
GetStats UI state: Player:GetStats() → PlayerStats (or nothing)
gameplay state: Player.GetStats() → PlayerStats (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9af0 0x6aa070
GetTeam UI state: Player:GetTeam() → number
gameplay state: Player.GetTeam() → number
✓ exists at runtime (not called)
returns: The scripts pass the result to TeamDiplomacy.HasMet (parameter ePlayer). (inferred)
ui-cache, gameplay yes ↗ 0x6a9b70 0x6aa0f0
GetTechs UI state: Player:GetTechs() → PlayerTechs (or nothing)
gameplay state: Player.GetTechs() → PlayerTechs (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9c00 0x6aa180
GetTrade UI state: Player:GetTrade() → PlayerTrade (or nothing)
gameplay state: Player.GetTrade() → PlayerTrade (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9c80 0x6aa200
GetTreasury UI state: Player:GetTreasury() → PlayerTreasury (or nothing)
gameplay state: Player.GetTreasury() → PlayerTreasury (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9d00 0x6aa280
GetUnits UI state: Player:GetUnits() → PlayerUnits (or nothing)
gameplay state: Player.GetUnits() → PlayerUnits (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9d80 0x6aa300
GetWMDs UI state: Player:GetWMDs() → PlayerWMDs (or nothing)
gameplay state: Player.GetWMDs() → PlayerWMDs (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9e00 0x6aa380
GrantWMDs Player.GrantWMDs(arg1?: any, arg2?: number, arg3?: number) (or nothing) ⚠ gameplay yes ↗ 0x6ed940 0x6ee080
GrantYield Player.GrantYield(arg1?: any, arg2?: number, arg3?: number) (or nothing) ⚠
args: arg1 — Index of a row of the Yields table (the scripts pass GameInfo.Yields[...].Index).
gameplay yes ↗ 0x6ed9e0 0x6ee120
IsAI Player:IsAI() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a9e80 0x6aa400
IsAlive UI state: Player:IsAlive() → boolean
gameplay state: Player.IsAlive() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9f10 0x6aa490
IsBarbarian UI state: Player:IsBarbarian() → boolean
gameplay state: Player.IsBarbarian() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a9fa0 0x6aa520
IsFreeCities Player.IsFreeCities() → boolean
✓ exists at runtime (not called)
ui-cache yes ↗ 0x7121c0 0x712a30
IsHuman UI state: Player:IsHuman() → boolean
gameplay state: Player.IsHuman() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aa030 0x6aa5b0
IsInitialized Player.IsInitialized() → boolean gameplay yes ↗ 0x6edb70 0x6ee2b0
IsMajor UI state: Player:IsMajor() → boolean
gameplay state: Player.IsMajor() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aa0c0 0x6aa640
IsMinor Player:IsMinor() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6aa150 0x6aa6d0
IsTurnActive UI state: Player:IsTurnActive() → boolean
gameplay state: Player.IsTurnActive() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aa1e0 0x6aa760
IsTurnActiveComplete UI state: Player:IsTurnActiveComplete() → boolean
gameplay state: Player.IsTurnActiveComplete() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aa270 0x6aa7f0
SetProperty Player.SetProperty() (or nothing) gameplay yes ↗ 0x6edcb0 0x6ee3f0
SetScoringScenario1 Player.SetScoringScenario1(arg1?: any, arg2?: integer) → 1 values ⚠ gameplay yes ↗ 0x6edd60 0x6ee4a0
SetScoringScenario2 Player.SetScoringScenario2(arg1?: any, arg2?: integer) → 1 values ⚠ gameplay yes ↗ 0x6eddc0 0x6ee500
SetScoringScenario3 Player.SetScoringScenario3(arg1?: any, arg2?: integer) → 1 values ⚠ gameplay yes ↗ 0x6ede20 0x6ee560
SetStartingPlot Player.SetStartingPlot(arg1?: any, arg2: MapPlot) (or nothing) ⚠
args: arg1 — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x6ede80 0x6ee5c0
WasEverAlive UI state: Player:WasEverAlive() → boolean
gameplay state: Player.WasEverAlive() → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aa300 0x6aa880