I haven't found a technical definition of ItemInstanceId. Is there one?
Calls to purchase/grant return one, and calls to consumption require one to be sent.
This seems technical and good to understand deeply!
I haven't found a technical definition of ItemInstanceId. Is there one?
Calls to purchase/grant return one, and calls to consumption require one to be sent.
This seems technical and good to understand deeply!
An "ItemInstanceID" is referring to Unique instance identifier of the item to be modified.
https://api.playfab.com/documentation/server/method/ModifyItemUses
also discussions on the forums:
https://community.playfab.com/questions/3758/character-inventory-item-added-instanceid-vs-itemi.html
Thanks! I've got a few technical concerns when working with stackable/consumable items.
For instance, if I keep purchasing a stackable/consumable item, will the ItemInstanceId that returns always be the same for each purchase of that item? It *seems* to. What if the player consumes all of that item she has, thus removing the entry from inventory, and then purchases more. Will the ItemInstanceId be the same one from before?
Finally, what if she purchases from a new catalog but the item is the same item id. Does that get the same ItemInstanceId?
While the Item Instance ID will usually be the same, you should not rely upon that, as it is not guaranteed.
For catalogs, there isn't really the concept of a "different" catalog in PlayFab. You have Catalog Versions, not Catalog IDs. Swapping to a new version simply means that you're replacing the live catalog with another version of it - all the Item IDs still refer to the same Item IDs.
Thanks. I'll give you a specific scenario that worries me a bit (in the same catalog version).
When I call to GetUserInventory, the return is a list of ItemInstance. Each ItemInstance has two important fields for my concern: ItemInstanceId and RemainingUses.
A player may have an "itemX" with 3 remaining uses and a shared ItemInstanceId of "A". This implies that "A" is consistent for all 3 uses.
If the player purchases or is granted more itemX, the returned ItemInstanceId may not be "A" this time, but "B". This is my experience.
So now I have 3 that loaded with an instance id of "A" and 1 that has a new id "B". I'm hoping I can just use "B" during this play session for all of them. Eh?
3 People are following this question.