question

Deekshith avatar image
Deekshith asked

Edit leaderboard 'Reset frequency' and 'aggregation method" from code

I am working on a game where there are around 200 statistics/leader boards.

These statistics can be created at any part of game when certain activity happens and when those statistics are created I want to change their 'Reset frequency' and 'aggregation method" from code.

The reason I want to change Reset frequency is to set up monthly and weekly leader boards.

So is there any way to do it?

Also what would be a better approach for this scenario having around 200 statistics.

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

·
Citrus Yan avatar image
Citrus Yan answered

You could use the Admin/UpdatePlayerStatisticDefinition API to modify those statistics’ Reset frequency and Aggregation method. And, please note this is a Admin API, you may use it from the server-side, for instance, a custom game server hosted by yourself.

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.

Deekshith avatar image Deekshith commented ·

Can I use the API "Admin/UpdatePlayerStatisticDefinition" in cloudscript? I don't have any custom game server . I am just using playfab service

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Deekshith commented ·

No, you cannot use that in CloudScript because Admin APIs are not included in CloudScript, and, directly issuing https requests to that endpoint to make calls is not recommended either. The Admin API is not designed to be used from Cloud Script, instead, it's meant to be used for tools and general game configuration. Since you are not using a custom game server, you may consider using Azure Functions for this.

1 Like 1 ·

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.