question

registry avatar image
registry asked

Randomization of quantity on drop tables?

Hello!

I am curious if the randomization of quantity on loot tables is well, on the table?

We asked the same question about half a year ago since it would be a very helpful feature to reduce complexity for the loot system in our game ProtoStrike. Looking at some related topics ("Change quantity from table bundles through code") it seems you are definitely considering it too so that makes me hopeful.

Is it something you are working on or is it in the backburner for an indefinite time?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Being able to specify a randomized quantity of an item (or a virtual currency) in a drop table is indeed in our backlog. It's something we would like to add in when we can prioritize this, though we don't have a date for it right now (we prioritize in part based upon the needs of the community, so we track on how many people have asked for each item on the backlog).

What you can do right now would be to use Cloud Script - have a handler which you call to grant the items/VCs you want, and do the randomization in the script directly (storing the information on the range in Title Data or Catalog Item Custom Data).

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.

Jonathon Mckay avatar image Jonathon Mckay commented ·

Hello Brendan,

I just want to add that even for us it could be a very interesting feature. Btw your workaround seems solving the problem, it's just a little less elegant than the rest of Playfab's APIs.

Looking forward to have this feature added to the rest of the service.

Thank!

0 Likes 0 ·
registry avatar image registry commented ·

Thanks for the quick reply, we'll go with our other solution then.

While a great tip about TitleData, I'm not much of a programmer and just want to control the drop tables without the risk of accidentally messing something up since that area seems to be a bit crowded in general for many functions in our game already. ^^;

0 Likes 0 ·
Jeremy Wilkinson avatar image
Jeremy Wilkinson answered

@Brendan Hi there, I am reviewing this because I am interested in generating random quantities of single items to the stack, as well as random amounts of gold (vc) as chest rewards. I don't understand your final comment here - " and do the randomization in the script directly (storing the information on the range in Title Data or Catalog Item Custom Data)." - I am able to use Math.rand() to generate a random integer, but I don't understand how to set quantity in the grantuseritems call. I spent quite a bit of time trying to find this, if you could help me that would be great.

Also, can Int be converted to String in cloud script? I failed there.

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.