question

Renan Fernandes de Castro avatar image
Renan Fernandes de Castro asked

User permissions to modify custom data only.

I have items assigned to my players' inventory, each item has custom data like slotID and ContainerName. Users can organize their inventory by changing these fields. I would like to give users permission to modify only the personalized data for these items. Is this possible?Thanks.

Player DataPlayer InventoryCharacter Data
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

·
Sarah Zhang avatar image
Sarah Zhang answered

PlayFab only provides the permission to the server to modify the inventory item custom data. In your case, you can call Server API UpdateUserInventoryItemCustomData on the CloudScript, then let players call the API ExecuteCloudScript to invoke the CloudScript function. Please check the tutorial -- Writing custom CloudScript - PlayFab | Microsoft Docs for the details of how to write the CloudScript and how to call the API ExecuteCloudScript on the client. If you have any trouble using the CloudScript, please feel free to let us know.

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.

Renan Fernandes de Castro avatar image Renan Fernandes de Castro commented ·

Perfect, it worked like a charm!I did not know this feature and I must say that it is great.Thanks!

0 Likes 0 ·

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.