question

entelicon avatar image
entelicon asked

GetRandomResultTables Question

It says GetRandomResultTables returns an "array of random result tables currently available".

Does this mean it returns every item in all the Tables you gave it, and from that data you do your own logic?

Or does it return a specific count(ex. 1) of random items and from there you do your own logic?

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

·
brendan avatar image
brendan answered

GetRandomResultTables is used to get the details of your configured random result tables. To use random result tables, you would either grant the player a bundle or container which includes an instance of a random result table or else use EvaluateRandomResultTable to get an item from the table (the former actually grants an item to the player, while the latter just gives you an Item ID, and you can then decide whether or not to add it to the player). Have a look at the tutorial on drop tables (https://api.playfab.com/docs/tutorials/landing-commerce/droptable) for more info on using random result tables in containers/bundles.

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.

entelicon avatar image entelicon commented ·

Okay, thanks.

Would it be expected/acceptable if I needed to get three random items to just call EvaluateRandomResultTable 3 times?

Or would I need to get all the information with GetRandomResultTables and from there do my own logic?

Just trying to get a feel for when you use each function.

0 Likes 0 ·
brendan avatar image brendan entelicon commented ·

The simplest thing would be to set the count to 3 when you add the drop table to the container or bundle. Please see the tutorial linked above for an example of that.

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.