question

Manuel Rauber avatar image
Manuel Rauber asked

Automatic Leaderboard aggregation type,Default Leaderboard Aggregation type

Hi!

I'm currently evaluating PlayFab for all my analytics and statistics stuff.

In my game, we have a world with several levels. Each level has three difficulties.

A world typically has 15 levels, each with 3 difficulties.

Per level and difficulty I want to have a leaderboard, so for one world, that would be 45 leaderboards.

Good thing, that a leaderboard is automatically created when you use "UpdatePlayerStatistics".

However, it has the wrong aggregation method. Per default it's set to "Last", but in my case I'd need "Minimum" (as in the minimum time to beat a level).

Is there any possibility to do this in PlayFab? I don't want to go to each created leaderboard and change the method manually :)

,

Hi!

I'm currently evaluating PlayFab for all my analytics and statistics stuff.

In my game, we have a world with several levels. Each level has three difficulties.

A world typically has 15 levels, each with 3 difficulties.

Per level and difficulty I want to have a leaderboard, so for one world, that would be 45 leaderboards.

Good thing, that a leaderboard is automatically created when you use "UpdatePlayerStatistics".

However, it has the wrong aggregation method. Per default it's set to "Last", but in my case I'd need "Minimum" (as in the minimum time to beat a level).

Is there any possibility to do this in PlayFab? I don't want to go to each created leaderboard and change the method manually :)

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

·
Sarah Zhang avatar image
Sarah Zhang answered

We support using the minimum statistic value as the aggregation method. Updating a new statistic will create a leaderboard that use the “Last” as the default aggregation method, and you can’t configure the aggregation method for the leaderboard using the API UpdatePlayerStatistics.

To modify the existed leaderboards’ aggregation methods, you can navigate to your title’s [Game Manager]->[Leaderboards], click the leaderboard you want to modify, then click the [Edit leaderboard] to navigate to the [Edit Leaderboard] page. On this page, you can choose the “Minimum” as the aggregation method for your leaderboard. According to your description, I guess you have known the above method, and you want a programmatic method, is it right? If so, you can call the Admin API UpdatePlayerStatisticDefinition in the administrative tool to edit the aggregation methods of leaderboards programmatically. As similar as editing leaderboards, except creating leaderboard in the [Game Manager], you can also call the Admin API CreatePlayerStatisticDefinition to set up the new leaderboards programmatically.

Besides, please note that the Admin API methods can’t be called on CloudScript, they should be called in your custom administrative tools. If you didn’t developer an administrative tool, you can call the Admin APIs from the external API testing tool, such as Postman, directly. You can navigate to the documentation – Quickstart PlayFab REST API collection for Postman - PlayFab | Microsoft Docs to learn more about how to use PlayFab REST API collection in the Postman.

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.

Manuel Rauber avatar image Manuel Rauber commented ·

Thanks for your answer, Sarah!

I have not build an Admin Tool yet, but I guess I'm going to need to. :)

Alternatively, since I keep track of a local highscore as well, I can only send new data to playfab, if a new local highscore has been reached. That way, the default "Last" would also work. At least for a start.

The idea with a Admin Tool is great, have not thought about this yet. Just started playing around with PlayFab.

Thanks! :)

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.