question

Muhammad Roshaan Tariq avatar image
Muhammad Roshaan Tariq asked

How to keep track of Player's inventory

Hi,

I have two characters in my game and each character can equip multiple items i.e. shield, sword, helmets, shoes etc

I am already using playfab's inventory for storing their stuff they win from my game or purchase from store. But I also want to keep track of things they have equipped on their characters and how can I do that using Playfab API?

Is there any way to do that? OR Do I have to make something to store in player's data in strings or integer format?

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

>> But I also want to keep track of things they have equipped on their characters and how can I do that using Playfab API? Is there any way to do that? OR Do I have to make something to store in player's data in strings or integer format?

Firstly, PlayFab doesn’t natively provide features of equipment system. So game developers can’t do that tracking the characters’ equipment state using PlayFab API. The possible workaround is using client API UpdateCharacterData and GetCharacterData to update and get the character’s data manually to implement the equipment system by yourself, and using client API WriteCharacterEvent to write character-based events for tracking.

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.

Muhammad Roshaan Tariq avatar image Muhammad Roshaan Tariq commented ·

@Sarah Zhang Would they solve my problem for storing the item IDs or names as to what users have equipped on their game characters?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Muhammad Roshaan Tariq commented ·

API UpdateCharacterData, GetCharacterData can help you store the character data on PlayFab, and WriteCharacterEvent can help you track any player behaviors, they help you integrate your equipment system with PlayFab, but you need to organize the logic of the equipment system by yourself.

0 Likes 0 ·