question

Cameron Hozouri avatar image
Cameron Hozouri asked

Best way to handle CCG game inventory items

Hey everyone,

I am starting to get into the implementation of the in-game items and store creation. How would i go about using custom data and having the items be stackable to show the current XP and level of the card. I have been searching about this and saw an old post about handling thousands of cards, https://community.playfab.com/questions/23083/what-is-the-best-approach-to-handle-thousands-of-i.html. This seems the same thing I am dealing with and trying to know whats the best implementation. For example If I create a store item that will give me x250 which is 250 more of a certain card, I would want my XP amount to increase by 250 in my inventory should I approach this with custom data and calling a server function if i buy an item to update the data or use stackable quantity to know how much XP I have. Any suggestion would be very appreciated

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

·
Seth Du avatar image
Seth Du answered

I think you may keep the cards stackable, and store the required information in custom data.

When the player purchase a bundle in the store, like you said x250 of a certain card, you may simply modify the remaining uses of this item instances. In addition, let the player decide whether he should consume the additional cards to gain XP or Levels. Consumption action will call a Cloud Script function and first it will do a verification, then update remaining uses and custom data.

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.

Cameron Hozouri avatar image Cameron Hozouri commented ·

Ok thank you for the answer, I will give it a shot.

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.