Dynamic Stat Skill Matchmaking
flowchart LR
subgraph AccelByte Gaming Services
CL[gRPC Client]
end
subgraph Extend Override App
SV["gRPC Server"]
end
CL --- SV
Statistic-based matchmaking for AccelByte Gaming Services (AGS), delivered as an Extend Override gRPC plugin server in Go. Players choose a stat (character MMR, mode rank, etc.), the server validates it, enriches the ticket, and lets AGS run its default matching logic.
- Flexible stat selection: ticket attributes map
playerID -> stat code(e.g.,playerA: mmr-ryu) - Dynamic stat codes:
GetStatCodesreturns only the stats configured in rules - Per-player enrichment:
EnrichTicketsets each player's selected stat as a standard attribute and cleans up - Post-enrichment validation:
ValidateTicketchecks each player has the enriched attribute - Secure and observable: built-in auth, metrics, traces, and logs
- AGS default matching: Do NOT enable
MakeMatchesandBackfillMatches, it will returnUNIMPLEMENTEDby design.
- Player queues with a stat code in ticket attributes keyed by player ID (e.g.,
"playerA": "mmr-ryu") GetStatCodestells AGS which stats to fetchEnrichTicketextracts each player's selected stat value intoPlayer.Attributes[enrichedKey]and removes configured statsValidateTicketchecks each player has the enriched attribute- AGS matches on the enriched attribute (e.g.,
mmr)
In the AGS Admin Portal, enable only these override functions:
- Stat Codes - for
GetStatCodes - Enrichment - for
EnrichTicket - Validation - for
ValidateTicket
Do NOT enable Make Matches or Backfill Matches - this plugin delegates matching to AGS default logic.
{
"alliance": {
"max_number": 2,
"min_number": 2,
"player_max_number": 1,
"player_min_number": 1
},
"statistics_config": {
"statistics": ["mmr-ryu", "mmr-ken"],
"enriched_key": "mmr"
},
"matching_rule": [
{
"attribute": "mmr",
"criteria": "distance",
"reference": 200,
"max": 3000
}
]
}| Field | Description | Default |
|---|---|---|
statistics |
List of valid stat codes (full names) | Required |
enriched_key |
Player attribute key for the enriched stat value | mmr |
Attach the selected stat key for each player in the party before starting matchmaking:
FNamedOnlineSession* PartySession = GetSessionInt()->GetNamedSession(NAME_PartySession);
if (PartySession)
{
for (const auto& PlayerId : PartySession->RegisteredPlayers)
{
FUniqueNetIdAccelByteUserRef AbUserRef = FUniqueNetIdAccelByteUser::Cast(*PlayerId);
MatchmakingSearchHandle->QuerySettings.Set(
FName(AbUserRef->GetAccelByteId()),
TEXT("mmr-ryu"), // todo: fill with selected stat key for each player.
EOnlineComparisonOp::Equals
);
}
}cp .env.template .env
docker compose up --buildFor a full setup guide (prereqs, env vars, and build details), see docs/setup.md.
- Setup and prerequisites:
docs/setup.md - Local + AGS testing (including observability):
docs/testing.md - Deployment and customization tips:
docs/deploying.md - Devcontainer:
docs/devcontainer.md - AI generation guide:
docs/generate-match-function-with-ai.md
