Loot System With Guard Items
Introduction
This is a description on how to implement the premium loot system without a game server. The game server was deem necessary to act as an anti-cheat mechanism such that the player can unlock only a limited amount of premium currencies. However, the workaround described below also enables the same anti-cheat mechanism necessary without a game server.
Requirement
- 20 instances where players can pick up premium currencies as loot
- The quantity in each loot are configurable
- Each instance can only give premium currencies once per account
- Multiple replay of the campaign will not give more premium currencies
- Players can pick it multiple times but it won’t be redeemable
High Level Design
Configuration
- We would need to create 20 guard items and 20 associated offers. This is because we have 20 instances of pickup. If there are more, we will need to add more guard items and associated offers.
- The guard item would have the following characteristics
- Maximum Quantity: 1
- This ensure that the item acts as a guard item
- Any offers with this guard item can only be applied once
- Maximum Quantity: 1
- The associated offer would have the following characteristics
- Items
- The guard item
- The currency
- This way, when we try to apply the offer twice, since the guard item is already given, the application of the offer would fail
- Items
- The guard item would have the following characteristics
Workflow
Use Case
- Player picks up premium currency as loot
- Player can continue playing normally
- Game search for offers
- The search is based on the guard item information id and the premium currency id
- This should return only a single offer
- Game applies the offer
- This should either return successful or not
- If successful, the currency is automatically added to the player’s inventory
- If it is not successful, this means that this particular instance has already be processed previously
Leave a Comment
Your email address will not be published. Required fields are marked *