eduardo-lauer-1 avatar image
eduardo-lauer-1 asked

Leaderboard is overriding scores with lower values and not refreshing timed leaderboards

Hello, I have daily, weekly, monthly, and all-time leaderboards, and I only use characters for tracking statistics. When updating a statistic with a lower value the value on the leaderboard is overwritten even though the aggregation method is set to maximum.

Even though I can see that the leaderboard has new iterations when I call `GetLeaderboardAroundCharacter` it returns old scores, similar to how an all-time leaderboard would work.

Some observations that I'm not sure are related.

  • When inspecting the leaderboard in PlayFab's website I see a "No results found" message even though I do have and they are returned by `GetLeaderboardAroundCharacter`.
  • I can't download the archive log of leaderboard iterations, an empty page opens and nothing happens.
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

Sarah Zhang avatar image
Sarah Zhang answered

In the PlayFab, the player leaderboard and character leaderboard are separate. You should call the different API series to update and retrieve them separately. For clarification, the character leaderboards are not displayed on the [Game Manager]->[Leaderboards] page. You need to call the Server/Client API GetCharacterLeaderboard to retrieves a leaderboard according to the given character type and statistic name, start position, and max result count. Please check the API reference - Characters - Get Character Leaderboard - REST API (PlayFab Client) | Microsoft Docs for more information.

Character leaderboards will be generated when the character has the corresponding statistic values, and as this thread - Character Leaderboard - Aggregation Method - Playfab Community clarified, the we don’t provide a built-in feature to set up the aggregation method of character leaderboards.

Besides, we also don’t support to reset the character leaderboards, it means the character leaderboards can only have one version. About this point, you can check this thread - How to implement a resetable Characters Leaderboard ? - Playfab Community for more information.

Could you please check the Characters APIs in the following overview documentation and confirm you use the correct API to update and retrieve the characters’ leaderboards and statistics?

Characters - REST API (PlayFab Client) | Microsoft Docs

Characters - REST API (PlayFab Server) | Microsoft Docs

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.

eduardo-lauer-1 avatar image eduardo-lauer-1 commented ·

Hi Sarah, thank you for your answer.

Yes, I'm using the correct APIs. It'd be nice to make it more clear in the official docs that Character leaderboards have these limitations.

I've thought of some solutions based on what you shared.

Call a CloudScript Function from the client that reads the character's statistic value and only updates it if it's higher.
Could this endpoint be exploited? Eg: Someone being able to alter statistics from other characters? I see that some player context data is submitted, but I don't know if there is some sort of authentication, some clarification would be nice.

Players cheating their own values is not much of a problem, the cloud function can have some anti-cheating checks.

Schedule a CloudScript Function to run at intervals and reset all the character statistics.
Are there API methods that allow me to reset specific statistics from all characters?

Our game uses "Save Slots", the idea was to use Characters to allow for individual Leaderboards and Achievements (using statistics) progress for each save slot. Could this concept be somehow tied with Players only instead of Characters?

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.