Player Data #
Pragma Engine’s Inventory service manages player data with a sound transactional model that accounts for real-world scenarios like service outages and database instabilities. The Inventory service offers a rich content management system to address live migration so player data can be evolved throughout the lifecycle of a live service game.
Items are the building blocks of the Inventory service. They store data for anything from the traditional in-game items (gear, currency) to metadata items (player’s stats, loadouts). Pragma Engine has two main data types: instanced items and stackable items. The contents of instanced and stackable items are created within Pragma Engine’s predefined protobuf files. Custom protobuf definitions can be added to
Pragma Engine supports hidden inventory items with service calls that return filtered inventory information based on the tags in the configuration. Sensitive information such as matchmaking rating can be stored as an instanced item and hidden from players.
In this section, we’ll briefly go over several features within the Inventory service:
The Store system handles the creation of store catalogs. This includes managing the exchange of instanced and stackable items. Stores can be individually managed, enabling special events such as limited-time content sales.
The Inventory service verifies if a player meets the cost requirements of a purchase. Additional custom logic for the requests can be defined in the optional Store Plugin.
Consider a game where you want the cost of an arrow to be equivalent to 1 gold coin. Below are what various bundle options could look like in a store:
- 1 arrow for 1 coin
- 10 arrows for 10 coins
- 25 arrows for 25 coins
Pragma Engine’s Crafting system is feature-rich and extensible to fit any game’s needs. The Crafting system supports anything from a simple exchange of instanced and stackable items to granting randomized rewards.
The logic to verify the requests and the items granted to players is defined within the Crafting Plugin. This allows studios to set dynamic exchange rates of items for players based on their requests and set item limitations.
Consider a game where the cost of an arrow is equivalent to 1 gold coin with a max of 100 arrows that a player can hold in their inventory at once. Below are the request results for two players purchasing arrows with their remaining account balance:
- Player 1 currently has 85 arrows in their inventory and 20 coins. They are only able to spend 15 coins to cap at a total of 100 arrows.
- Player 2 currently has 60 arrows in their inventory and 35 coins. They are able to spend their entire account balance and now have a total of 95 arrows in their inventory.
For in-depth guides, see both the Crafting and the Crafting: Time-Based tutorials.
The Rewards system powers weighted random rolls of rewards content. Pragma Engine has reward tables which provide a lot of flexibility for defining rewards content without the need of additional plugin code.
Limited Grants #
Limited grants are one-time grants given to players on login. They can contain any combination of instanced or stackable items. Below are several scenarios for when players might be granted a limited grant:
- starter pack for new players
- an incentive for returning players
- seasonal events for the entire player base
A start and end time can be set on limited grants, enabling items to only be granted to players during a specified time window.
Network Authority #
The following are the features within the Inventory service catagorized by their network authority:
- client authoritative:
- server authoritative:
- Limited Grants
Client Authoritative Notifications #
When updates are requested to the inventory database through client authoritative endpoints, the response contains information which the SDK Inventory service will use to update the client-side cache.
Server Authoritative Notifications #
When updates are requested to the inventory database through server authoritative endpoints, the Inventory service will first send out a notification to the game-client SDK. The Inventory service SDK will then update the client-side cache accordingly.
Pragma Engine Inventory Service Plugins #
|enables creation and update of an instanced item|
|enables the customization of requirements for purchase requests|
|enables the customization of requirements of craft requests and houses the logic for what items to grant players from successful craft requests|
|determines the reward selected|
|enables granting, updating, and destroying items during match end processing|
Topics in This Section #
|Items||Use instanced items and stackable items to build out your inventory system.|
|Store||Create store catalogs to manage exchanging stackable and instanced items.|
|Crafting||From simple exchanges of materials for gear, to complex, nested, pseudo-random rolled item grant and upgrade systems.|
|Rewards||Powers weighted random rolls of rewards content.|
|Limited Grants||Use limited grants to send players items.|