Party SDK Reference #

This section provides references for Party methods, classes, and events in the Pragma SDK. For information on Pragma Engine backend classes and plugins, see Party Backend Reference.

Party API #

Developers can use the PartyAPI SDK for Unreal and Unity to implement Party service capabilities, such as assigning a party leader and leaving a party.

The table below contains a list of the SDK methods relevant to the Party service. These methods are available via the Party API for Unreal or Unity.

Calldescription
InitializeInitializes the client’s party API state and synchronizes party state with the platform. Must be called prior to using other functionality on the API.
ForceSyncForcibly synchronizes the player client party cache with the party information in the Pragma Engine backend. This includes refreshing received party invite data.
CreatePartyCreates a new party
SendPartyInviteSends a party invite to a specific player
CancelPartyInviteCancels a sent party invite
AcceptPartyInviteAccepts another player’s invite to a party
DeclinePartyInviteDeclines another player’s invite to a party
JoinPartyWithInviteCodeJoins a party using an invite code
JoinPartyWithIdJoins a party using a party ID
LeavePartyLeaves a party voluntarily
AssignPartyLeaderAssigns a party leader
KickPlayerFromPartyForcibly removes a player from a party
UpdatePartyPlayerUpdates custom party player information when in a party
UpdatePartyUpdates custom party information
SetPartyPlayerReadySets the player’s Ready value
SetPartyPreferredGameServerZonesUpdates the GameServerZones value for the party
SetPartyPlayerGameServerZoneToPingUpdates the GameServerZoneToPing value for the party
EnterMatchmakingEnters the party into matchmaking once all players are ready. Only a party leader can enter a party into matchmaking.
LeaveMatchmakingRemoves a party from matchmaking
GetMatchmakingInfoGets matchmaking queue information
GetPartyCacheGets the player’s party cache
GetReceivedPartyInvitesGets a list of received party invites for the player
GetReceivedPartyInviteByInviteIdGets party invite object by party invite ID
GetReceivedPartyInviteByInviterIdGets party invite object for invite sent by a specified player to the current player

The Party Tasks explains how to use these calls to invoke Party Plugin methods and customize party functionality.

Unreal classes #

The SDK for Unreal makes use of Pragma-defined Unreal classes. The following sections list methods available on each class:

FPragmaParty #

methodreturns
GetId()party ID
GetInviteCode()party invite code
GetPreferredGameServerZones()Array of preferred game server zones
GetPlayers()List of FPragmaPartyPlayers
GetInvites()List of FPragmaPartyInvites
GetExt()FPragma_Party_ExtBroadcastParty
GetExtPrivatePlayer()FPragma_Party_ExtPrivatePlayer
GetPlayerFPragmaPartyPlayer
GetLeader()FPragmaPartyPlayer for party leader
GetAllLeaders()FPragmaPartyPlayer for each party leader
IsLeader(const FString& PlayerId)true/false
GetNumPlayers()number of players in the party
AreAllPlayersReady()true/false

IPragmaPartyCache #

methodreturns
IsInParty()true/false
PartyFPragmaParty
LocalPartyPlayerFPragmaPartyPlayer

FPragmaPartyInvite #

methodreturns
GetInviteId()invite ID
GetInviterId()inviter ID
GetInviteeId()invitee ID

FPragmaPartyPlayer #

methodreturns
GetPlayerId()player ID
GetSocialId()social ID
GetDisplayName()Pragma account display name
IsReady()true/false
IsLeader()true/false
GetExt()FPragma_Party_ExtBroadcastPlayer

Events #

There are several party-related events that player clients can listen to. The following table contains bindable events relevant to the Party service, along with associated descriptions of when the event is triggered.

The following events are defined in the Party API for Unreal and Unity.

EventTriggerData returned
OnJoinedPartyA player joins a partyFPragmaParty
OnPartyUpdatedParty information changes, including creation and destruction

Note: All other applicable On* events fire in addition to this one, so developers will need to account for handling multiple events at once.
FPragmaParty
OnPartyInviteCodeChangedA new invite code is made for the partyinvite code
OnExtBroadcastPartyChangedThe public ext party selections changeExtBroadcastParty
OnPartyPreferredGameServerZonesChangedA party’s preferred game server zones changeArray of preferred game server zones
OnLeftPartyYour player leaves the party voluntarilyN/A
OnRemovedFromPartyYour player leaves a party for reasons outside of your controlRemoval reason (REMOVAL_REASON_UNSPECIFIED, KICKED, LEFT, DISCONNECTED, or EXPIRED)
OnPartyPlayersChangedOne or more players join or leave the partyList of FPragmaPartyPlayers
OnPlayerJoinedPartyA new player joins the party. All players in the party can handle this eventFPragmaPartyPlayer for the player that joined the party
OnPlayerLeftPartyA player leaves the partyFPragmaPartyPlayer for the player that left the party
OnPartyPlayerDataChangedAny player information changesFPragmaPartyPlayer for the player whose data changed
OnExtPrivatePlayerChangedA player’s private selections changesExtPrivatePlayer
OnReceivedPartyInvitesChangedA received party invite changesList of FPragmaPartyInvites
OnPartyInviteReceivedA party invite is received from another playerFPragmaPartyInvite
OnReceivedPartyInvitesCancelledA received party invite is canceled by the inviterFPragmaPartyInvite
OnPartyInviteRevokedA received party invite is removes because a new invite from the same player is receivedinvite ID
OnPartyInviteSentAny player in the party sends an invite. Fires for all players in the party.FPragmaPartyInvite
OnPartyInviteAcceptedAn invitee joins the party. Fires for all players in the party.FPragmaPartyInvite
OnPartyInviteDeclinedAn invitee declines the invite. Fires for all players in the party.FPragmaPartyInvite
OnPartyInviteCancelledAn inviter or party leader cancels a sent party invite. Fires for all players in the party.FPragmaPartyInvite
OnGameClientVersionUpdateRequiredThe player client needs to update their GameClientVersionN/A
OnPartyClientVersionMismatchCannot find a game server version that is compatible with every player in the partyN/A
OnEnteredMatchmakingParty enters matchmakingN/A
OnLeftMatchmakingParty leaves matchmakingN/A
OnMatchmakingFailedThere is a failure in matchmakingFailure reason (UNSPECIFIED or GAME_SERVER_VERSION_NO_LONGER_COMPATIBLE)