question

marcobethke avatar image
marcobethke asked

Get CharactersData

Hi,

At the moment we are making a game in which you may have several characters and each with their own stats. We are trying to use characterData to set the stats and everything is working nice until we cannot "GetUserCharactersData" or just do one call like: "GetUserCharacter (getCharacterData = true)".

This appears to be a common situation described here: https://community.playfab.com/questions/13429/returning-character-data-with-getalluserscharacter.html

Would it be possible to have a call like that one?

Problem: GetCharacterData only works for one character and each player will have several instances of a character.

Character 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

·
Neils Shi avatar image
Neils Shi answered

The API GetAllUsersCharacters does not have a parameter which used to retrieve the character's data. And as you mentioned, the API GetCharacterData can only retrieve data for one specified character per call. If your users have multiple characters, and you don't want to call a lot of APIs to retrieve each character’s data, you may consider use inventory item to represent these characters. For example, in Economy v2, you can use item’s Display Properties (https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/?tabs=inventory-game-manager#display-properties) to represent character's data (the Display Properties field has a 10000 byte limit), then you can use API GetInventoryItems to retrieve item’s Display Properties.

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.