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.
Answer by SethDu · Oct 22, 2020 at 07:37 AM
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.
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)?
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.
GrantItemsToUser with Unity and Azure Functions can't make it work 1 Answer
Finding out what item a coupon code is generated for, 1 Answer
Json related query 3 Answers
Store Transform Data 0 Answers