Home › Lua API › TeamDiplomacy

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

TeamDiplomacy

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

Community reference for this object: TeamDiplomacy (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
CalcFavorPerTurnFromAlliances UI state: TeamDiplomacy:CalcFavorPerTurnFromAlliances() → number
gameplay state: TeamDiplomacy:CalcFavorPerTurnFromAlliances() → number
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x7418e0 0x742220
CanDeclareWarOn UI state: TeamDiplomacy:CanDeclareWarOn(eRecipient: integer[PlayerTypes]) → boolean
gameplay state: TeamDiplomacy:CanDeclareWarOn(arg1?: number, arg2?: number, arg3?: any, arg4: number) → boolean ⚠
args: eRecipient — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6ae9f0 0x6aef40
CanLiberateCityTo TeamDiplomacy:CanLiberateCityTo(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aea50 0x6aefa0
CanMakePeaceWith UI state: TeamDiplomacy:CanMakePeaceWith(eRecipient: integer[PlayerTypes]) → boolean
gameplay state: TeamDiplomacy:CanMakePeaceWith(arg1?: number, arg2?: boolean) → boolean
args: eRecipient — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aeab0 0x6af000
ChangeFavor TeamDiplomacy:ChangeFavor(iChange?: integer) (or nothing) gameplay — 0x745780 0x746020
ComputeCityWarmongerPoints TeamDiplomacy:ComputeCityWarmongerPoints(kCityID: City, ePreviousOwner?: number, bRazeCity?: boolean) → number
args: bRazeCity — A boolean flag (true/false).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aeb10 0x6af060
ComputeDOWWarmongerPoints TeamDiplomacy:ComputeDOWWarmongerPoints(eWarRecipient?: number, warType: number/string[WarTypes]) → number
args: eWarRecipient — Id of a player (the scripts name the argument playerID / owner). (inferred); warType — Value of the WarTypes enum (a type index).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aec20 0x6af170
ComputeResearchAgreementTurns TeamDiplomacy:ComputeResearchAgreementTurns(ePlayer: integer[PlayerTypes], eTech: integer[TechTypes]) → number
args: ePlayer — Id of a player (as in Players[id]).; eTech — Index of a row of the Technologies table (the value of GameInfo.Technologies[...].Index).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aecc0 0x6af210
DeclareWarOn TeamDiplomacy:DeclareWarOn(eRecipient?: integer[PlayerTypes], warType?: integer[WarTypes], overrideChecks?: boolean, assumeDenouncement?: boolean, bIsJointWar?: boolean)
args: eRecipient — Id of a player (as in Players[id]).; warType — Value of the WarTypes enum (a type index).; overrideChecks — A boolean flag (true/false).
gameplay — 0x6f19e0 —
GetAllianceLevel TeamDiplomacy:GetAllianceLevel(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x712560 0x712dd0
GetAlliancePointsPerTurn TeamDiplomacy:GetAlliancePointsPerTurn(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x7125d0 0x712e40
GetAlliancePointsTooltip TeamDiplomacy:GetAlliancePointsTooltip(ePlayer?: number) → string
args: ePlayer — Id of a player (the scripts name the argument playerID / owner). (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x712640 0x712eb0
GetAllianceTurnsThisLevel TeamDiplomacy:GetAllianceTurnsThisLevel(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x7126f0 0x712f60
GetAllianceTurnsToNextLevel TeamDiplomacy:GetAllianceTurnsToNextLevel(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x712760 0x712fd0
GetAllianceTurnsUntilExpiration TeamDiplomacy:GetAllianceTurnsUntilExpiration(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x7127d0 0x713040
GetAllianceType TeamDiplomacy:GetAllianceType(ePlayer: integer[PlayerTypes]) → number (AllianceTypes)
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
returns: Index of a row of the Alliances table (the value of GameInfo.Alliances[...].Index).
ui-cache yes ↗ 0x712840 0x7130b0
GetAtWarChangeTurn TeamDiplomacy:GetAtWarChangeTurn(ePlayer: integer[PlayerTypes]) → number
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aed40 0x6af290
GetDeclaredFriendshipTurn TeamDiplomacy:GetDeclaredFriendshipTurn(ePlayer: integer[PlayerTypes]) → number
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
returns: A turn number (the scripts name the result turn). (inferred)
ui-cache yes ↗ 0x6aedb0 0x6af300
GetDenounceTurn TeamDiplomacy:GetDenounceTurn(arg1: integer[PlayerTypes]) → number
args: arg1 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
returns: A turn number (the scripts name the result turn). (inferred)
ui-cache yes ↗ 0x6aee20 0x6af370
GetDiplomaticActionCost TeamDiplomacy:GetDiplomaticActionCost(actionHash: number/string) → number
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aee90 0x6af3e0
GetFavor TeamDiplomacy:GetFavor() → number gameplay — 0x7457e0 0x746080
GetFavorPerTurn TeamDiplomacy:GetFavorPerTurn() → number gameplay — 0x745850 0x7460f0
GetGrievancesAgainst TeamDiplomacy:GetGrievancesAgainst(arg1?: number) → number
args: arg1 — Id of a player (the scripts name the argument playerID / owner). (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x741930 0x742270
GetMetTurn TeamDiplomacy:GetMetTurn(ePlayer: integer[PlayerTypes]) → number
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6aef00 0x6af450
GetMission TeamDiplomacy:GetMission(arg1?: number, arg2?: number) → MissionToLua (or nothing)
args: arg1 — Id of a player (the scripts name the argument playerID / owner). (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aef70 0x6af4c0
GetNextEscapingSpyID ★ TeamDiplomacy:GetNextEscapingSpyID() → number
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6af020 0x6af570
GetNextPursuedSpyID ★ TeamDiplomacy:GetNextPursuedSpyID() → number
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6af070 0x6af5c0
GetNthCapturedSpy TeamDiplomacy:GetNthCapturedSpy(arg1?: number, arg2?: number) → number (or nothing)
args: arg1 — Id of a player.
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6af0c0 0x6af610
GetNthOffMapSpy TeamDiplomacy:GetNthOffMapSpy(arg1?: number, arg2?: number) → number
args: arg1 — Id of a player. (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6af270 0x6af7c0
GetNumPlayersMet TeamDiplomacy:GetNumPlayersMet() → number
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6af480 0x6af9d0
GetNumSpiesCaptured TeamDiplomacy:GetNumSpiesCaptured() → number
✓ called in the game: 1 value(s) as documented
returns: A count or amount (the scripts name the result count / num / amount). (inferred)
ui-cache yes ↗ 0x6af4d0 0x6afa20
GetNumSpiesOffMap TeamDiplomacy:GetNumSpiesOffMap() → number
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6af520 0x6afa70
GetPlayersMet TeamDiplomacy:GetPlayersMet() → Player[]
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6af570 0x6afac0
GetPlayersMetIDs TeamDiplomacy:GetPlayersMetIDs() → number[]
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6af660 0x6afbb0
GetRecentMissions TeamDiplomacy:GetRecentMissions(arg1?: number, arg2?: number, arg3?: number)
args: arg1 — Id of a player. (inferred); arg2 — A number. (inferred); arg3 — A number. (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6af760 0x6afcb0
GetResearchAgreementTech TeamDiplomacy:GetResearchAgreementTech(ePlayer: integer[PlayerTypes]) → number (TechTypes)
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
returns: Index of a row of the Technologies table (the value of GameInfo.Technologies[...].Index).
ui-cache yes ↗ 0x6af8a0 0x6afdf0
GetSourceTurnsRemaining TeamDiplomacy:GetSourceTurnsRemaining(pkCity: City) → number
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6af910 0x6afe60
GetSpyCapacity TeamDiplomacy:GetSpyCapacity() → number
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6af9b0 0x6aff00
GetVisibilityOn UI state: TeamDiplomacy:GetVisibilityOn(player: integer[PlayerTypes]) → number (DiplomaticVisibilityTypes)
gameplay state: TeamDiplomacy:GetVisibilityOn(arg1: integer) → number
args: player — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
returns: Value of the DiplomaticVisibilityTypes enum (a type index).
ui-cache, gameplay yes ↗ 0x6afa00 0x6aff50
GetWarmongerLevel TeamDiplomacy:GetWarmongerLevel(iWarmongerPoints?: number) → string
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6afa70 0x6affc0
HasAllied TeamDiplomacy:HasAllied(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
gameplay — 0x6f1ad0 0x6f2210
HasDeclaredFriendship TeamDiplomacy:HasDeclaredFriendship(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
gameplay — 0x6f1b30 0x6f2270
HasDefensivePact TeamDiplomacy:HasDefensivePact(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6afb40 0x6b0090
HasDelegationAt TeamDiplomacy:HasDelegationAt(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6afba0 0x6b00f0
HasEmbassyAt TeamDiplomacy:HasEmbassyAt(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6afc00 0x6b0150
HasMet TeamDiplomacy:HasMet(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6afc60 0x6b01b0
HasOpenBordersFrom TeamDiplomacy:HasOpenBordersFrom(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6afcc0 0x6b0210
IsAtWarWith TeamDiplomacy:IsAtWarWith(ePlayer: integer[PlayerTypes]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6afd20 0x6b0270
IsAtWarWithHumans UI state: TeamDiplomacy:IsAtWarWithHumans() → boolean
gameplay state: TeamDiplomacy:IsAtWarWithHumans() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6afd80 0x6b02d0
IsDiplomaticActionValid TeamDiplomacy:IsDiplomaticActionValid(action: number/string[DiplomaticActions], arg2?: number, arg3?: boolean)
args: arg2 — Id of a player (the scripts name the argument playerID / owner). (inferred); arg3 — A boolean flag (true/false). (inferred)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6afdd0 0x6b0320
IsFightingAnyJointWarWith TeamDiplomacy:IsFightingAnyJointWarWith(partner: integer[PlayerTypes]) → boolean
args: partner — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6aff40 0x6b0490
IsFightingJointWarAgainst TeamDiplomacy:IsFightingJointWarAgainst(target: integer[PlayerTypes], arg2: integer[PlayerTypes]) → boolean (PlayerTypes)
args: target — Id of a player (as in Players[id]).; arg2 — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6affa0 0x6b04f0
IsPromiseMade TeamDiplomacy:IsPromiseMade(arg1?: number, ePromiseType: number/string[PromiseTypes]) → boolean
args: arg1 — Id of a player.; ePromiseType — Value of the PromiseTypes enum (a type index).
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6b0020 0x6b0570
IsVisibilitySourceActive TeamDiplomacy:IsVisibilitySourceActive(ePlayer: integer[PlayerTypes], eSource: integer[DiplomaticVisibilitySources]) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6b00c0 0x6b0610
MakePeaceWith TeamDiplomacy:MakePeaceWith(eRecipient: integer[PlayerTypes], overrideChecks: boolean) (or nothing)
args: eRecipient — Id of a player (as in Players[id]).
gameplay — 0x6f1de0 0x6f2520
NeverMakePeaceWith TeamDiplomacy:NeverMakePeaceWith(eRecipient: integer[PlayerTypes]) (or nothing)
args: eRecipient — Id of a player (as in Players[id]).
gameplay — 0x6f1e40 0x6f2580
RecheckVisibilityOn TeamDiplomacy:RecheckVisibilityOn(ePlayer: integer[PlayerTypes]) (or nothing)
args: ePlayer — Id of a player (as in Players[id]).
gameplay — 0x6f1e90 0x6f25d0
RecheckVisibilityOnAll TeamDiplomacy:RecheckVisibilityOnAll() (or nothing) gameplay — 0x6f1ee0 0x6f2620
SendKudoTo TeamDiplomacy:SendKudoTo(player: integer[PlayerTypes], kudoHash: integer, bIsHiddenAgenda: boolean) (or nothing)
args: player — Id of a player (as in Players[id]).
gameplay — 0x6f1f00 0x6f2640
SendWarningTo TeamDiplomacy:SendWarningTo(player: integer[PlayerTypes], warningHash: integer, bIsHiddenAgenda: boolean) (or nothing)
args: player — Id of a player (as in Players[id]).
gameplay — 0x6f1f80 0x6f26c0
SetHasAllied TeamDiplomacy:SetHasAllied(ePlayer: integer[PlayerTypes], eNewValue: integer[AllianceTypes]) (or nothing)
args: ePlayer — Id of a player (as in Players[id]).; eNewValue — Index of a row of the Alliances table (the value of GameInfo.Alliances[...].Index).
gameplay — 0x6f2000 0x6f2740
SetHasDeclaredFriendship TeamDiplomacy:SetHasDeclaredFriendship(ePlayer: integer[PlayerTypes], bNewValue: boolean) (or nothing)
args: ePlayer — Id of a player (as in Players[id]).
gameplay — 0x6f2060 0x6f27a0
SetHasDelegationAt TeamDiplomacy:SetHasDelegationAt(ePlayer: integer[PlayerTypes], bNewValue: boolean) (or nothing)
args: ePlayer — Id of a player (as in Players[id]).; bNewValue — A boolean flag (true/false).
gameplay — 0x6f20c0 0x6f2800
SetHasEmbassyAt TeamDiplomacy:SetHasEmbassyAt(ePlayer: integer[PlayerTypes], bNewValue: boolean) (or nothing)
args: ePlayer — Id of a player (as in Players[id]).
gameplay — 0x6f2120 0x6f2860
SetHasMet TeamDiplomacy:SetHasMet(ePlayer?: number) → 1 values ⚠
args: ePlayer — Id of a player (the scripts name the argument playerID / owner). (inferred)
gameplay — 0x6f2180 0x6f28c0
SetPermanentAlliance TeamDiplomacy:SetPermanentAlliance(ePlayer: integer[PlayerTypes]) (or nothing)
args: ePlayer — Id of a player (as in Players[id]).
gameplay — 0x6f2240 0x6f2980
SetVisibilityOn TeamDiplomacy:SetVisibilityOn(player: integer[PlayerTypes], newVis: integer[DiplomaticVisibilityTypes]) (or nothing)
args: player — Id of a player (as in Players[id]).; newVis — Value of the DiplomaticVisibilityTypes enum (a type index).
gameplay — 0x6f2290 0x6f29d0

Notes (★)

GetNextEscapingSpyID

Crashes the game (access violation, not catchable with pcall) in the tester's game.

See also: TeamDiplomacy.GetNextPursuedSpyID

GetNextPursuedSpyID

Crashes the game (access violation, not catchable with pcall) in the tester's game.

See also: TeamDiplomacy.GetNextEscapingSpyID