Skip to content

XsGetDiplomacy

Read diplomacy from native game state.

XsGetDiplomacy(sourcePlayerId, targetPlayerId)

Inputs: sourcePlayerId is an integer source player ID; targetPlayerId is an integer target player ID.

Output: value, available: raw native diplomacy integer when available is true; nil, false when unavailable.

Errors and unavailable states: Wrong numeric argument types raise a Lua argument error. Invalid IDs or an unavailable native query return nil, false; use the availability flag before reading the value.

See Low-level queries for related calls and usage notes.