question

smithcharlon avatar image
smithcharlon asked

Refunding duplicate items automatically

My game will have gacha in it but the items gained won't have any value as duplicates so I want to make an automatic refund system that gives players currency when they receive a duplicate. Right now I use the drop table saved as a bundle to emulate the random chance but I know no way to refund the duplicate. What would be the best approach to implement this system. Items with my own gacha logic or is there an already built in way to do this

Player DataIn-Game EconomyPlayer 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

·
Made Wang avatar image
Made Wang answered

PlayFab doesn't have a built-in method for this, you need to check the player's repository before granting the item. Then a bundle might not be appropriate, as this would grant the item directly to the player. You can call EvaluateRandomResultTable on the server or Azure Function to get a single item, and then check the player's repository to determine whether to grant this item to the player.

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.