question

Dominic Hamelin-Blais avatar image
Dominic Hamelin-Blais asked

Alternative for Prize Tables by hardcoded rank ranges

I'm currently looking at how the leaderboards and prizes tables work. Right now it seems that we can only define hardcoded range rank/position. But I would like to distribute rewards based on "rank group". Exemple: Top 1% of players would receive top tier reward, Top 2% to Top 10% of players would have the second best reward and so on. I was thinking about doing a custom CloudScript to parse all the leaderboard entries on reset time, but it seems that I would hit some limit (in execution time or API calls.)

Is there a workaround to make prizes distribution by rank %?

Thanks!

Leaderboards and Statistics
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

Here is my workaround solution.

  • Create a segment, setting Statistic value is larger than a specific value
  • Create a Scheduled task, setting running a Queued Azure Function for each player in a segment. (This task may exceed 1s limit, hence Queued Azure Function should be required)
  • You can get the total number of players in a leaderboard via GetPlayersInSegment API from property “ProfilesInSegment” in the callback result and estimate the percentage range of this player. Remember to reduce the MaxBatchSize property in the request to reduce the response time.
  • Do the statistics value changes and grant rewards.
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.