question

Dylan Hunt avatar image
Dylan Hunt asked

Where is the description of an inventory item?

Seems common enough to show without cloud code - am I crazy? If not, can someone help guide me through this? It would be my first playfab cloud code, hmm ... in the meantime I'll experiment around

EDIT: Looking here https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.ItemInstance

In-Game EconomyPlayer 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.

1 Answer

·
Joshua Strunk avatar image
Joshua Strunk answered

GetCatalogItems

CatalogItem.Description

Or if you mean in the Game Manager Economy -> {The wanted Catalog} -> {The wanted Item}

5 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.

Dylan Hunt avatar image Dylan Hunt commented ·

https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.ItemInstance

How come it isn't in the item instance? I'm very surprised to see some not-so-common props here, but yet no description :P

0 Likes 0 ·
Joshua Strunk avatar image Joshua Strunk Dylan Hunt commented ·

A core thing to understand when working with data in PlayFab (any property in the data returned from an API call) is that it normally ties directly with what is stored in the non relational database behind your game's data. There is no mechanism to "share" information between CatalogItem and ItemInstance, without updating all of the entries in elsewhere.This would incur massive performance costs when writing to a shared field. So you handle it by doing the mapping at runtime. This post goes more in depth in how to perform this kind of runtime mapping in Cloud Script.

1 Like 1 ·
Dylan Hunt avatar image Dylan Hunt Joshua Strunk commented ·

Awesome - thanks :) Will look into this

0 Likes 0 ·
Joshua Strunk avatar image Joshua Strunk Dylan Hunt commented ·

You could argue PlayFab should just include functions to handle these mappings in their SDKs.

1 Like 1 ·
Dylan Hunt avatar image Dylan Hunt Joshua Strunk commented ·

Haha you ALMOST can with InfoRequestParameters - perhaps they'll throw it in there as a further option one day (of course I'd already have it coded with cloud scripting, by then, surely)

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.