How to create a party on the server side?

There is currently a scenario that requires matching to create a team. I was going to create a party in RegisterMatchmakerMatched, but I found
func (p *Pipeline) partyCreate(logger *zap.Logger, session Session, envelope *rtapi.Envelope) (bool, *rtapi.Envelope) {
It cannot be called externally through nk. Is there any recommended method to easily create a party on the server side? Thanks @sesposito

or in the RegisterMatchmakerMatched callback binding, tell the matched player to let another player automatically create a party, and then automatically tell other players to join the party automatically. I think this is too much trouble. .

Hey hexun80149128, I’m not sure that the parties API is suitable for your game design in this case. Typically, parties are used to create groups of players that matchmake together and persist between matches. It seems like what you want to do is create a team just for a particular match after matchmaking has already happened.

In that case, I’d handle the creation of teams in your authoritative match handler instead. There are a few different ways of doing this, but in short you’ll want to assign the users to a team in the MatchJoin function and then filter any team-specific match messages according to the assigned team.

The game design has a requirement for matches. For example, in a PvPvE game with 12 players, divided into 4 teams of 3 players each. The requirement is for individual players to first matchmake into a team, then, once confirmed, matchmake as a team to form a 12-player game, resulting in 4 teams in total.
So I want to first matchmake into teams using the party feature, as parties inherently support group matchmaking.
Therefore, is the pattern you recommend to first create a match for the pre-matched 3 players, then use MatchJoin to join the match, and then manually create a party through custom MatchData, join the party, and then dissolve the match? @lugehorsam

Hey @hexun80149128 my suggestion is to matchmake however you want (using parties or individually). You should not create parties in the middle of the match. Instead, you should create match-specific teams based on whether users entered as the match as a party, or as individuals. These “teams” are tracked by the match handler, the party system shouldn’t drive this gameplay.