question

Romain Maurel avatar image
Romain Maurel asked

Collectible card game - Cards should not be obtained multiple time

Hello Playfab!

I have been lurking around for a while, finding answers on this forum and, from 0 knowledge in networking, I could set up a dedicated multiplayer server for my game. So congrats, your system is pretty efficient and easy to use.

So, my game is a kind of hexagon-based board game with collectible cards to build your army. I am now setting up the shop so players can buy new cards. I think I have a neat idea on how to use Playerfab's features and I would like to confirm them with you, plus I have a question.

  • 1) Cards can be directly bought using VC, this is straightforward, I will use the PurchaseItem Client API. At the moment, I plan on making them as "Durable" NOT "Stackable" Items.
  • 2) Cards will also be obtained in bundles with only one card inside using a rarity drop rate calculation. To do that, I will have a bundle containing 1 Drop table of multiple Drop tables (1 per rarity), so the chosen Drop table will then deliver its card.
  • 3) As far as I understood, there is no mean to avoid players from getting multiple time the same item, and this does not bother me. However, I would like to "dismantle" automatically for VC a card if it is obtained again. What would be the best practice for that ? Should I use a Client call to a CloudScript that would revoke the Item and add related VC ? Should I make cards consumables per count, so that Players can "use" them, but it that case I do not know what mechanics can grant them VC.
  • 4) Regarding the above, how should my cards item be Set up ? As "Durable" and NOT "Stackable" ?
  • 5) Just to confirm that Bundles are to be set on Consumable by time (5sec) to disappear from Player's inventory as they deliver their content as soon as they are obtained (more or less 1-2 sec after)

Thanks in advance for your answers !

Calixte

In-Game Economy
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

·
Ivan Cai avatar image
Ivan Cai answered

You can set your cards item to be consumable by count and "Stackable". When a player obtains a new item, you can check whether the quantity of the item is greater than 1 in the player's inventory. If it is greater than 1, directly consume it until the count is 1, and finally grant VC to the player according to the consumed quantity.

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.

Romain Maurel avatar image Romain Maurel commented ·

Thanks ! It fits perfectly what I required and I already implemented it.

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.