Testing the Battlepass #
In this section, we’ll test out the battlepass by checking a player’s on-login grants, and run through a basic match end scenario where the XP gained from a match advances a battlepass and grants the player their rewards.
Start Pragma Engine #
Run Pragma Engine via one of the following methods.
Once the engine has started successfully, it prints the message [main] INFO main - Pragma server startup complete
.
Simulate a standard match end battlepass update #
- Open Postman.
- Log in by sending
PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ getInventoryV2
. - Verify the player’s inventory doesn’t contain this battlepass yet with
PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ getInventoryV2
. - Send
PragmaDev ➨ Game ➨ RPC - Player ➨ GameData ➨ getLoginDataV3
to process limited grants.- Any limited grants issued can be seen in the body of the response under
issuedLimitedGrantTrackerIds
. You should see the list containsbattlepass_tracker
. This endpoint also fetches the player’s full inventory, which should include the battlepass.
- Any limited grants issued can be seen in the body of the response under
- Copy the
instanceId
for the battlepass and save it. - Open
PragmaDev
➨Game
➨RPC - Partner
➨MatchManagement
➨MatchEndV4
and edit the body with the following payload. Swap the“[INPUT ID HERE]”
field with the battlepassinstanceId
from step 5.- This step sends a completed match where the player gets a server item update from the plugin to complete an XP update of 100.
{
"requestId": 1,
"type": "MatchLifecycleRpc.MatchEndV4Request",
"payload": {
"matchId" : "51a7f830-e84c-46a8-ad14-d83d99d045c3",
"matchEnd": {
"matchId" : "51a7f830-e84c-46a8-ad14-d83d99d045c3",
"playerMatchEnds": [
{
"playerId": "{{test01PlayerId}}",
"serverItemUpdates": [
{"instanced": {
"instanceId": "[INPUT ID HERE]",
"updateEntryId": "battlepass-update",
"requestExt": {
"xpUpdate":{
"amount": 100
}
}
}
}
]
}
]
}
}
}
- Send
PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ getInventoryV2
to get the player’s inventory and confirm the player has now reached level 1 on their battlepass.- The following table depicts a type of progression you might see in a game. Each row is a completed match where the player earns experience towards their battlepass. As shown in the last column, rewards are granted upon achieving a new battlepass level. For this specific example, changing the amount in
XP_Update
would result in the corresponding matchends.XP_UPDATE Total XP earned Battlepass.level Battlepass.xp Rewards 0 0 0 0 N 50 50 0 50 N 50 100 1 0 Y 1 101 1 1 N 99 200 1 100 N 24 224 1 124 N 1 225 2 0 Y 9878965 225 2 0 N
- The following table depicts a type of progression you might see in a game. Each row is a completed match where the player earns experience towards their battlepass. As shown in the last column, rewards are granted upon achieving a new battlepass level. For this specific example, changing the amount in