question

brendan avatar image
brendan asked

Character creation

inesmoital
started a topic on Tue, 07 April 2015 at 3:32 PM

Hello,

I what to create a customizable character in my game.

What I taught on doing was buying an item on the inventory multiple times and, depending on the quantity of that item that the player has, that would correspond on an asset in the game (for example, for the color of the eyes, if a player as 3 items names eye_color, than that would correspond on the color green on the game, if he was 2 eye_color items then the eyes would be blue for example.

The only problem is that when I buy multiple times the same item it doesn't increase the usages of that item but creates multiple items.

Is there a way to increase and/or decrease the usages of an item or know how many items the player was of the same type?

Thanks

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

·
brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Wed, 08 April 2015 at 5:17 PM

Because each purchase is a distinct operation (for which you need to be able to take action in customer support scenarios), they're listed individually. So even for consumable items, if you have an item with one use remaining and the player purchases a fresh instance with five uses remaining, the inventory for the player shows this as one item with one use left, and one with five - you'll note that they have different Purchase Dates and Instance IDs.

One way to do what you're describing would be by using Cloud Script to "accumulate" uses onto a single instance, using the ModifyItemUses API call. Using it, you could subtract the total uses from one item, and add them to another.

We're also aware of the need for a "simplified inventory" system, for games which could have player inventories with very large numbers of the same item, all purchased (or granted) at different times, such as card games. If you have a need for that, please let us know your key integration dates by emailing us at devrel@playfab.com.

Brendan


1 Comment
Brendan Vanous said on Wed, 08 April 2015 at 5:17 PM

Because each purchase is a distinct operation (for which you need to be able to take action in customer support scenarios), they're listed individually. So even for consumable items, if you have an item with one use remaining and the player purchases a fresh instance with five uses remaining, the inventory for the player shows this as one item with one use left, and one with five - you'll note that they have different Purchase Dates and Instance IDs.

One way to do what you're describing would be by using Cloud Script to "accumulate" uses onto a single instance, using the ModifyItemUses API call. Using it, you could subtract the total uses from one item, and add them to another.

We're also aware of the need for a "simplified inventory" system, for games which could have player inventories with very large numbers of the same item, all purchased (or granted) at different times, such as card games. If you have a need for that, please let us know your key integration dates by emailing us at devrel@playfab.com.

Brendan

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.