question

dsmith avatar image
dsmith asked

How to EvaluateRandomResultTable many times at once?

I have a cloudscript function that rolls lots of loot drops for an encounter. For missions with lots of loot drops, this yields many calls to EvaluateRandomResultTable, which fails with an error, "PlayFab API request aborted, because API call count limit exceeded". How can I limit the number of API calls when rolling lots of tables? Is there any way to pass a list of table IDs to roll all at once? Do I need to author my own drop table evaluation just to sidestep the API call limit? Thanks!

CloudScript
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

·
Hernando avatar image
Hernando answered

In PlayFab, the ExecuteCloudScript request will be aborted when calling overmuch PlayFab APIs. You should avoid calling EvaluateRandomResultTable frequently in your CloudScript.

Based on your scenario, I'd like to recommend you to create a bundle and add multiple different drop tables inside as content. When loots are dropped, you can grant the player this bundle in CloudScript and items that are evaluated by table will be automatically added to the player's inventory.

1 comment
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 commented ·

If the issue is that you need tighter control over the items added, the thing to understand is that the intended use case of EvaluateRandomResultTable is to just get one random result. If you need many, you should go with one call to Server/GetRandomResultTables followed by one call to Server/GrantItemsToUser once you've worked out all the items you want to give the player.

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.