question

Moontaehyeon avatar image
Moontaehyeon asked

Implementing a Gacha System with Drop Tables and Bundles

I'm currently working on creating a gacha system using drop tables and bundles in PlayFab. However, I'm encountering several issues, particularly with rapid request bugs and errors where items are still dispensed even when errors occur. This has made it difficult to develop the system as I intend.

Here’s what I’ve done so far:

I have 20 unique "unit card" items which are permanent and can be stacked. I’ve created 60 bundles containing 1, 3, and 9 cards respectively. I've established drop tables for these bundles and devised a 10-pull gacha bundle, which includes 10 drop tables. This setup is meant to operate a feature where 10 gachas are pulled at once. Although it functionally awards items randomly as desired, it requires significant response time and frequently encounters errors, particularly when multiple rapid requests are made. When using Azure Cloud Script to grant items through the "grant" command, it sometimes responds with an error but still dispenses some items. Furthermore, even when client-side code triggers a bundle purchase and errors occur, no currency is deducted, no transaction history is logged, yet items are still awarded—these are critical issues that shouldn't happen with in-game transactions.

I am considering simply using the drop table to directly award items in Cloud Script, but this approach also lacks the capability to handle 10 requests at once without significant delays and performance issues.

Could you advise on a more stable method to randomly award multiple items in a gacha system? Any insights or suggestions would be greatly appreciated!

Thank you!

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

·
Xiao Zha avatar image
Xiao Zha answered

Could you share the detailed bundle and drop table setup (e.g. number of bundles in drop table, etc.) so we can do some more accurate testing based on it. Does “particularly when multiple rapid requests are made” means you make request again before previous API result returned? Also, what error messages you received in Azure Function and client side? --

Since the bundle you purchased comes with drop tables containing bundles, to add items in bundles to the player's inventory, playfab needs to first determine which bundle in the drop table is granted, and then add different items from that bundle to player’s inventory. This process takes longer than granting individual items directly to the player, which is why the response times are long.

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.

Moontaehyeon avatar image Moontaehyeon commented ·

My final bundle contains 10 instances of a drop table named 'A', which in turn includes three sub-drop tables labeled 1 to 3. Specifically, drop table 1 consists of 20 types of bundles, each providing 3 identical unit cards; drop table 2 includes 20 types of bundles, each giving 9 identical specific unit cards; and drop table 3 comprises 20 types of bundles, each granting 81 cards. I am looking to manage gacha outcomes with different grades of results (normal, rare, unique), where each gacha provides a specific type of unit card in quantities of 3, 9, or 81, and users can perform 10 gacha pulls at once.

From the responses, I understand that the current structure with multiple bundles and nested drop tables might be performance-intensive, particularly when issuing a large number of items. I would have thought fewer types of items might not significantly impact performance, but clearly, the speed at which items fill the inventory, especially when granting 81 cards at a time, suggests otherwise. Is it because the system is processing each of the 81 cards individually rather than simply adjusting the quantity of an existing item?

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Moontaehyeon commented ·

Under your settings, sometimes a large number of cards will be granted to players (for example, 10 drop tables with label 3 will have 810 cards). When granting a large number of duplicate items to the player, conflicts may occur and lead to the purchase or grant operation failed or timed out, and some items were given to the player without deducting the player's currency and without transaction records. We recommend fixing the number of cards in the bundle and maintaining an appropriate number of cards (such as 5 or 10). In this way, the number of cards granted to players can be relatively stable and avoid API timeouts or operation failures caused by granting a large number of items at once.

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.