game / / PartyService / createV1 /

createV1 #

suspend fun createV1(session: PlayerSession, request: PartyRpc.CreateV1Request, sessionAction: SessionAction.Builder): PartyRpc.CreateV1Response

Creates a new party.

Party creation:

A new party is created and PartyPlugin.initializeParty is invoked to allow for initial customization of the party state. The player’s inventory is retrieved and cached for the service to use. If inventory retrieval fails, party creation will error with PragmaError.InventoryService_GetError. If the player is currently in matchmaking or game, fails with PragmaError.PartyService_InvalidSession. If the player is already in another party, it will fail with PragmaError.PartyService_AlreadyInParty.

Player added to party:

The player is then added to the party object and PartyPlugin.onAddPlayer is invoked to allow for initial customization of the player object.

GameServerVersion calculation:

Then GameServerCompatibility.calculateGameServerVersion is invoked to determine the overall GameServerVersion for the party. If no GameServerVersion is support, a warning is logged. If the player does not have a supported game server version they will receive a PartyRpc.GameClientNotSupportedV1Notification and a PartyRpc.PartyClientVersionMismatchV1Notification.