question

danielsoto avatar image
danielsoto asked

How unique are inventory item instance IDs?

Hi,

Are inventory instance IDs unique between different players? Or can be repeated? For example:

Are inventory instance IDs unique between different players? Or can be repeated? For example:

If I have an inventory Item with a certain Instance ID, does it exist the possibility of reading the inventory from another player and founding an item which also has the same Instance ID than mine?

Thanks for all.

Player Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

danielsoto avatar image
danielsoto answered

Hi Gao, thanks for your reply.

I'm loading Item instances IDs from different players on client, so I need to know if they are truly unique to choose the correct data structure:

  • Dictionary<PlayFabID + ItemInstanceID, ItemData> in case of not being unique
  • Dictionary<ItemInstanceID, ItemData> in other case.

I would love to do the second proposal, but first I need to know clearly that IDs are unique regardless the players.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gosen Gao avatar image Gosen Gao commented ·

We would recommend using first proposal, as the ItemInstanceId is not guaranteed to be unique in the title.

1 Like 1 ·
Gosen Gao avatar image
Gosen Gao answered

The uniqueness of the ItemInstanceId only needs to meet the requirements. No matter it is unique in title or in player inventory, the situation you mentioned will not happen. Because when you want to modify or get the Item Instances, you also need to specify the PlayFabId, which will specify the player inventory to access.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.