question

Michael Lefebvre avatar image
Michael Lefebvre asked

Suggestion: Copying Custom Data to new Item Created from Catalog

I have a suggestion. When granting a player an item from the catalog, there should be a bool of some sort that can be checked off to automatically copy over all the custom data from the catalog version to the new instanced version. We currently use Custom data on the catalog side for the "BaseStats" of an item so when an item is given to a player we copy it over manually creating another api call on our end. If this was built in this would allow the function to be cleaned up for us.

Regards

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

·
Joshua Strunk avatar image
Joshua Strunk answered

There is actually already a feature request for this which you can comment/vote on [renamed] Copy Catalog item properties to instances.

I will point out that item instance custom data by design has to be significantly smaller, only a max of 500 bytes, than that of catalog items and storing the base values in item instances, could be a balancing nightmare. You can also grant and set an item instances custom data in a single server API call server.GrantItemsToUsers.

2 comments
10 |1200

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

Michael Lefebvre avatar image Michael Lefebvre commented ·

Ok, i understand, although it would still require a second api call to get the custom data from somewhere unless you want to hard code it into your cloudscript.

0 Likes 0 ·
Joshua Strunk avatar image Joshua Strunk Michael Lefebvre commented ·

Fair point, I forgot the need to pull catalog data and you would actually need to pull quite a bit more than just catalog data. When granting items through CloudScript you usually need to pull and set quite a bit of data (catalog/title/player) to authenticate that the player is, in fact, eligible for the item grant.

1 Like 1 ·

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.