Giving the Limited Grant #

There are several circumstances where players might be granted a one-time reward:

  • new player bonus
  • returning player incentives
  • seasonal or event reward (such as logging in at least once during an event)

For demonstration purposes, we’ll be manually simulating service calls with Postman. This guide currently covers a basic reward scenario where the player is granted items shortly after logging in.


Start Pragma Engine #

Run Pragma Engine via one of the following methods.

Running via Make
Run make run to start the platform. Run this in a terminal with platform as the working directory.
Running in IntelliJ

From the IntelliJ toolbar in the upper right, ensure MainKt - LocalConfigured is selected, then click the play button.

If MainKt - LocalConfigured isn’t available, you will need to configure it. In the IntelliJ toolbar, click the dropdown next to the run button, then click Edit Configurations…. In the Run/Debug Configurations window that appears, expand Kotlin in the left hand side, then select MainKt - LocalConfigured. Click OK. Click the play button in the IntelliJ toolbar to start Pragma Engine.

Once the engine has started successfully, it prints the message [main] INFO main - Pragma server startup complete.

Grant the reward #

  1. Log in using Postman by sending PragmaDev ➨ Public ➨ Player - AuthenticateOrCreateV2.
  2. Verify the player’s inventory is empty with PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ getInventoryV2.
  3. Send PragmaDev ➨ Game ➨ RPC - Player ➨ GameData ➨ getLoginDataV3 which will process limited grants. Any limited grants issued can be seen in the body of the response under response.payload.loginData.issuedLimitedGrantTrackingIds. You should see the list contains StarterPack, but does not contain NewYear2023Grant as the window for this grant has already passed. This endpoint will also fetch the player’s full inventory. You should see 50 coins under response.payload.loginData.inventory.
  4. Resend PragmaDev ➨ Game ➨ RPC - Player ➨ GameData ➨ getLoginDataV3. Confirm that loginData.issuedLimitedGrantTrackingIds is empty which indicates no limited grants were issued on this login. You can also confirm the user still has 50 coins under response.payload.loginData.inventory.