In many games today you will find player trading to some extent. It could be trading of functional items or cosmetic items; in some cases upgrades or skins carry over, and other times not. Duplication needs to be countered, and with trading also comes the need for tracking and moderation. Having transaction history available is a great tool.
To track items we need to be able to uniquely identify them, but where is the line of data redundance?
Each transaction should probably also have a unique ID, and needs to be tied to the players executing it.
What do you store in the playerData directly, and what do you store in a separate database(/store)?
Is it enough to track only their current items and transactions, or should all their previous items be tracked too?
If you want item upgrades to carry over, just storing the item ID and item type is probably not enough, but having a global datastore of items will quickly exhaust your data budget.
So the question, more defined:
How to design an item system which:
- Supports item upgrades (carries over)
- Supports trading
- Supports moderation actions (viewing transaction history for recovering lost items, revoking scams etc.)
- Supports multiple items of same type (but uniquely identified)
- Minimizes risk of item duplication (such as during trading)
- Optimalized for limited datastore budget
I am curious of how other people would go about this, and I am looking for some ideas and discussion on the topic. If you know of any great resources, articles or similar on the topic, I’d appreciate being pointed in the right direction.