question

Z. avatar image
Z. asked

Constraint types of items returned from a droptable

Hi,

Would like to know if there is any way I can constraint the number of different items returned from a drop-table.

Example :

- I have 20 distinct shards in the common category.

- Common chest opens (Quantity of 20), but i only want it to return A,B,C **OR** C,D,E **OR** A,C,E in any quantity combinations.

This varying amount of distinct shards will increase in numbers as the game progresses, so creating multiple permutations of drop tables is not feasible.

I have attempted to set quantity to 3, so i only always get a maximum of 3 different results, and then multiplying it via a value in item custom data and granting players items, but I soon realized that was not a possible solution as granting only gives a player 1x of a specific object.

Appreciate any suggestions on this.

Thanks.

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

Drop Table cannot directly support your requirement. Here are 2 workaround solutions:

  1. Find all the combinations and create bundles/containers for each of them. Contain all the combinations in a drop table.
  2. Dynamically generating the result in Cloud Script/Azure function.

If you have any suggestions on Drop Table functions, please feel free to send a thread on the Feature Request forum, votes from developers in the community may help with the priority.

3 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.

Z. avatar image Z. commented ·

Hi Seth,

Thanks for the response.

1 - Not really an option for me, that would end up with me having over a thousand bundles. Quantity of 20 as well as number of distinct shards is only the value of a lower tier container, would have containers with 40, 60 etc.

2 - If I'm guessing correctly, you mean to CloudScript the resulting values after opening a container. Is there a way to alter the quantity of OpenContainerResult via CloudScript, because I know granting a item only gives an additional use of 1.

Thanks.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Z. commented ·

There is a server API ModifyItemUses, which can be used for modifying remaining uses of an item instance, however, please note that this may only work for stackable items or those can be consumed by count.

0 Likes 0 ·
Z. avatar image Z. Seth Du ♦ commented ·

Great! Indeed something that I can put to use, that would just leave the problem of getting random quantity for each awarded item. Thanks!

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.