question

Name avatar image
Name asked

Bundles with random currencies

For items that are used to upgrade an item, I use currencies, 4 types.

I need to create bundles for pack(inapp). There might be a bundle in pack like this: 50, 100, 160 (and possibly more) - randomly selected upgrade scrolls(currency)

At the moment I am doing this:

1. 4 Bundle, which contains 1 type of currency

2. Bundle for each x50, x100, x160 with drop table(x50 drop table and so on) inside

3. In the pack I use bundle for step 2

The problem is that this generates a large number of bundles, and on the client I receive a huge message with the number of used bundles. I think this is also very inefficient for the server.

Is it possible to do it somehow differently? And preferably without a cloud script, since I would not want to lose the opportunity for designers to create packs themselves.

unity3dCloudScriptPlayer 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 believe currently, using Cloud Script/Azure function to generate the result and directly call AddUserVirtualCurrency will be a feasible solution.

I am not sure what do you mean by "lose the opportunity for designers to create packs themselves.", but Cloud Script can be flexible, if you define and store the "loot table" in the title internal data, the functions can read the drop list and generate random result every time.

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.

Name avatar image Name commented ·

About designers:

It's ease to create bundle(pack) and add items, currencies and drop table to it. Someone can add this pack without change client or sever code.

Thanks for info about title data, i'll think about it.

I also have a question about if there is any cost for adding a lot of items from bundle?

if I translate the logic into a cloud script, then I will use the limits of the cloud script. And what limits do I use when I add several hundred items (loot tables) in one bundle(with ValidateGooglePlayPurchase)?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Name commented ·

I believe Container will be the only choice when numerous items are contained. When granting a bundle in the Cloud Script, the function will only return when all items have been granted to a player's inventory, which is possible to cause limit exceeding error.

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.