Testing the Battlepass #
In this section we’ll test out the battlepass by checking a player’s on-login grants, simulating the player progressing on their battlepass, and granting 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 player progressing through the battlepass #
- Open Postman.
- Log in as a player.
- Send the
PragmaDev ➨ Scenario Logins ➨ login with test01
request.
- Send the
- Verify the player’s inventory is empty.
- Send the
PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ GetInventoryV2
request. - Look at the body of the response to make sure there are no instanced or stackable items.
- Send the
- Grant the player the battlepass.
- Send the
PragmaDev ➨ Game ➨ RPC - Player ➨ GameData ➨ GetLoginDataV3
request. - Any limited grants issued can be seen in the body of the response under
issuedLimitedGrantTrackerIds
. You should see the list containsbattlepass_tracker
.
- Send the
- Access the battlepass
instanceId
and save it for later.- Send the
PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ GetInventoryV2
request. - Look for the battlepass in the body of the response and copy the
instanceId
.
- Send the
- Simulate the player progressing on the battlepass.
- Open the
PragmaDev ➨ Game ➨ RPC - Partner ➨ Inventory ➨ UpdateItemsPartnerV2
request. - Copy and paste the following JSON into the body of the request.
- Swap the
“[INPUT ID HERE]”
with the battlepassinstanceId
from step 5. - Send the request that simulates the player gaining 100 XP towards their battlepass.
- Open the
{
"requestId": 1,
"type": "InventoryRpc.UpdateItemsPartnerV2Request",
"payload": {
"playerId": "{{test01PlayerId}}",
"updates": [
{
"instanced": {
"instanceId": "[INPUT ID HERE]",
"updateEntryId": "battlepass-update",
"requestExt": {
"xpUpdate": {
"amount": 100
}
}
}
}
]
}
}
- Verify the player’s inventory shows they reached level 1 on their battlepass.
- Send the
PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ GetInventoryV2
request. - Look at the body of the response to 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 game instance where the player earns experience towards their battlepass. As shown in the last column, rewards are granted upon achieving a new battlepass level.
- Send the
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 |