Home › Lua API › AiDiplomacy

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

AiDiplomacy

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

Community reference for this object: AiDiplomacy (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
AdjustBaseDiplomacy AiDiplomacy:AdjustBaseDiplomacy(arg1: integer, arg2: integer) (or nothing) gameplay yes ↗ 0x6c4fc0 0x6c5690
GetDiplomaticModifiers AiDiplomacy:GetDiplomaticModifiers(player: integer) → string (or nothing)
args: player — Id of a player (the scripts name the argument playerID / owner). (inferred)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x684b70 0x685150
GetDiplomaticScore UI state: AiDiplomacy:GetDiplomaticScore(player: integer[PlayerTypes]) → number
gameplay state: AiDiplomacy:GetDiplomaticScore(arg1: integer) → number
args: player — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x684dc0 0x6853a0
GetDiplomaticState AiDiplomacy:GetDiplomaticState(arg1: integer) → nil/string gameplay yes ↗ 0x6c52e0 0x6c59b0
GetDiplomaticStateIndex AiDiplomacy:GetDiplomaticStateIndex(player: integer[PlayerTypes]) → number
args: player — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
returns: Key of a row of the DiplomaticStates table: the scripts look it up with GameInfo.DiplomaticStates[result].
ui-cache yes ↗ 0x684e30 0x685410
GetThreatFrom AiDiplomacy:GetThreatFrom(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x684ea0 0x685480
GetThreatString AiDiplomacy:GetThreatString(arg1: integer[PlayerTypes]) → nil/string
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x684f10 0x6854f0
GetTradeWithHuman AiDiplomacy:GetTradeWithHuman() → boolean gameplay yes ↗ 0x6c5370 0x6c5a40
GetTrustFrom AiDiplomacy:GetTrustFrom(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x684fa0 0x685580
GetTrustString AiDiplomacy:GetTrustString(arg1: integer[PlayerTypes]) → nil/string
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x685010 0x6855f0
SetTradeWithHuman AiDiplomacy:SetTradeWithHuman(trade: boolean) (or nothing) gameplay yes ↗ 0x6c53c0 0x6c5a90