Skip to main content

Unreal Engine Module - Add a weekly high score leaderboard - Set up weekly periodic leaderboards

Last updated on January 13, 2024

Configure Weekly Statistics Cycle in Admin Portal

In this tutorial section, we will guide you to configure a statistics cycle in Admin Portal. A statistics cycle is essentially a periodic time to store your statistics (e.g. weekly, monthly). You will need it to display your weekly periodic leaderboard. In this section, we are using Admin Portal in AccelByte's Demo Environment, but you may use your own Admin Portal's domain.

  1. Open AccelByte's Demo Admin Portal dashboard and select your game namespace, in this case Byte Wars namespace. From the side menu panel of the dashboard, select Game Management > Statistics > Cycles > Add Cycle to create a new statistics cycle.

    Create new statistics cycle

  2. Next, a pop-up window will appear to configure your statistics cycle. Here, we show you how to configure a weekly statistics cycle. Once done, click the Add button.

    • Cycle Name: the name of your statistics cycle.
    • Cycle Description: the description of your statistics cycle.
    • Start Date: the date when this cycle starts. Set it to the current date.
    • End Date: the date when this cycle ends. Leave it empty, this will make the cycle valid forever.
    • Cycle Type: the type of the statistics cycle. Set it to Weekly.
    • Reset Day: the day when the cycle should be reset. Set it to Monday, so it will reset every Monday.
    • Reset Time: the time when the cycle should be reset. Set it to 12:00 AM, so it will reset at the beginning of the day.

    New statistics cycle configuration

  3. Now, you should be able to see your new statistics cycle in the list. Next, you need to add your statistics to be managed by your statistics cycle. Click on the View button to open the statistics cycle details.

    Statistics cycle list

  4. Scroll down until you see the Statcode List table. This table is the list of the statistics managed by the statistics cycle. Now, click on the Stat Code button to add your statistics to the list.

    Statistics cycle's statistics list view

  5. Next, a pop-up window will appear to add statistics to your statistics cycle. Add all the statistics you have created from the Module: Track and display a player's high score one by one.

    Add statistics to the statistics cycle

  6. Once done, your statistics cycle configuration should look like this.

    Statistics cycle's statistics list

  7. Next, keep the Cycle ID of your statistics cycle. You will need this on later section.

    Statistics cycle's Cycle ID

  8. Congratulations! You have created a weekly statistics cycle. Move on to the next section to bind it with your leaderboards, so you can get periodic leaderboards based on your statistics cycle.

Configure Weekly Periodic Leaderboard in Admin Portal

In this tutorial section, we will guide you to create a weekly periodic leaderboard. We are using Admin Portal in AccelByte's Demo Environment, but you may use your own Admin Portal's domain.

  1. Open AccelByte's Demo Admin Portal dashboard and select your game namespace, in this case Byte Wars namespace. From the side menu panel of the dashboard, navigate to Game Management > Leaderboard (New Version). There, you will see all the leaderboards you have created in Module: Add an all time high score leaderboard.

  2. In this tutorial section, we will show you how to modify the board-unreal-highestscore-singleplayer leaderboard as a weekly periodic leaderboard, the other leaderboards will follow the same configuration. Click on the View button to open the leaderboard details.

    Open leaderboard details

  3. To make a weekly periodic leaderboard, you need to bind the statistics cycle you have created to the leaderboard. To do this, click on the Pencil icon beside the Cycle(s) attributes.

    Modifying leaderboard cycle

  4. Next, a new pop-up window will appear. Add your statistics cycle and hit the Update button.

    Adding leaderboard cycle

  5. Once done, your leaderboard configuration should look like this. You should also be able to preview the leaderboard based on the newly added cycle.

    Weekly leaderboard preview

  6. Now, do steps 2-4 again to bind for all other leaderboards.

  7. Congratulations! You have set up your leaderboards as weekly leaderboards.

Reset Periodic Leaderboard in Admin Portal

Your periodic leaderboard will reset based on the cycle configuration defined on your statistics cycle. If you want to reset the periodic leaderboard manually, you can follow these steps.

  1. Open AccelByte's Demo Admin Portal dashboard and select your game namespace, in this case Byte Wars namespace. From the side menu panel of the dashboard, navigate to Game Management > Leaderboard (New Version). Open the leaderboard details by clicking on the View button.

    Open leaderboard details

  2. Next, modify the leaderboard cycle by clicking on the Pencil icon beside the Cycle(s) attributes.

    Modifying leaderboard cycle

  3. Delete the desired statistics cycle from the leaderboard by clicking on the X icon. Then, click on the Update button.

    Modifying leaderboard cycle

  4. Once done, your periodic leaderboard data is reset. Now, re-add the cycle you just removed again.

  5. At this point, when you preview the leaderboard based on the cycle you just reset, you should see an empty rank list.

    Reset-ed leaderboard rankings

  6. Congratulations! You have successfully reset your periodic leaderboard.

References