question

Cricket_FeVR avatar image
Cricket_FeVR asked

Granting items to user with custom data - item instance data

I am developing a cricket game for mobile in which player can buy cricketers from the market place for virtual money. Each cricketer has 6 set of attributes like shot power, accuracy, timing etc. I have added the values for each of them in the item in catalog like shot power - 90 etc (key value pairs).

But when I grant them to user the custom data part is not showing the item instance. I came to know that these two are different from this post

https://community.playfab.com/questions/3752/read-custom-data-from-iteminstance.html

It has also been mentioned that item instance custom data cannot have more than 5 key-value pairs.

My question is can catalog item can have more than 5 key- value pairs data. Will that data be available to the user when that item is granted to him. How do I access the data after granting it to the player?

@SethDu

@Brendan

Player Dataunity3dCloudScriptPlayer Inventory
screenshot-120.png (67.5 KiB)
10 |1200

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

1 Answer

·
Hernando avatar image
Hernando answered

Have to be aware of is the Inventory item data can have more than five key-value pairs, and it will hit limits if you update more than five pairs in a single request in the free tier.Then for catalog item, it has nothing limits about the number of key-value pairs of a catalog item custom data, however it got a limit about the total size of the custom data value of a catalog item, and for the free tier that is 1000bytes. (For more information about Limits, please navigate to [Game Manager] ->[Settings]->[Limits]. )

For the last part of your question, as Brendan's reply form this case, CustomData from catalog items does not automatically propagate to granted inventory items, so the recommendation is copying CustomData of the catalog item to the granted inventory item when you grant items to users via the execution in the CloudScipt.

If each instance of the cricketer has the same attributes in your game, you should use the CustomData of Catalog items instead and retrieval it by calling GetCatalogItems.

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.