Hi,
We are currently looking at moving our game over from Gamesparks to PlayFab and wanted to check on best practices for our players inventory.
In our game, a player unlocks chests which earn players cards. Once a player has enough cards they can Unlock an item by using thier cards and spending coins or gems.
We store the 'meta' data of items in the Title Data. An example of an item:
"Item_3": { "DisplayName": "NAME", "UnlockLevel": 0, "CardsCost": 10, "CoinsCost": 500, "Rarity": 0, "SkillsData": {
"SomeSkillData":123 }, "Stats": { "SomeStats":123 }, "Levels": [ { "CardsToUnlock": 4, "CoinsToUnlock": 600 }, { "CardsToUnlock": 4, "CoinsToUnlock": 700 }, { "CardsToUnlock": 4, "CoinsToUnlock": 800 } ] }
We can use the above to show our inventory screen, and how many coins/cards players need to unlock items for example.
We are also currently storing the Player inventory in each players Player Data like so:
key = itemInventory
"Item_3": { "Level": 0, "NumberOfCards": 40, "SkillCharge": 3, "bUnlocked": false },
We can then grab both of those when users attempt to unlock/upgrade in the cloudscript to check they have enough currency and cards for example.
We also update the Player Data if the user unlocks chests and earns cards for specific items in the Cloud scripts.
However, we also want to do a similar process for when a user makes an IAP. Our IAPs could contain some cards for an item, the whole item itself, currency, chests amoung other things. But I can't find the best way to have the IAP award things like cards to the Item_3 in Player Data for example. When the purchase is validated, is there any kind of response that is hit in the API for a player that we can then award them our specific goods for. Or will we need to somehow use the Catalog system in PlayFab?
If we have to use the catalog system, would our use case be viable or will it require a lot of reworking?
Thanks,
Brad