LootLocker
The BasicsGame SystemsContent ManagementPlayer Management
LootLocker
  • 📌The Basics
    • Getting Started
    • What is LootLocker?
    • Core Concepts
      • Players
      • Assets
      • Character Classes
      • API Types
      • Web Console
      • Stage & Live Environments
      • Glossary
    • Unity Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • Unreal Quick Start
      • Install & Configure the SDK
        • Older versions
      • Authenticate Your First Player
    • Godot Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • SDKs
    • Samples
      • Authentication Samples
      • Leaderboard Samples
      • Progression Samples
      • Player Samples
    • Launching Your Game
    • Support
      • Error Codes
      • Unreal Marketplace Plugin Support
  • 🎭Players
    • Overview
    • Authentication
      • How To
        • Guest Login
        • Steam
        • Apple
        • Apple Game Center
        • Google
        • Epic Games
        • PlayStation
        • Meta / Oculus
        • Xbox
        • Nintendo Switch
    • Files
      • How To
        • Manage Files in Web Console
        • Work with Files In-Game
    • Inventory
      • How To
        • Work with Player Inventory
    • Messages
      • How To
        • Configure Messages in Web Console
    • Names
      • How To
        • Work with Player Names
    • Player Manager
      • How To
        • Manage Players through Web Console
        • Manage Players In-Game
        • Use Player Operations
    • Unified Player Accounts
      • How To
        • Configure UPA in Web Console
        • Use Remote Login In-Game
        • Connect Identiy Provider to Player
        • External Provider Linking
        • Transition from Guest Login to Other Provider
        • Disconnect Identity Provider from Player
    • White Label Login
      • How To
        • Configure White Label Login
        • Create a New White Label User
        • Request User Verification
        • Handle Returning Users
        • Start a White Label Session
  • 🪙Commerce
    • Overview
    • Catalogs
      • How To
        • Configure Catalogs in LootLocker Console
        • List all Catalogs
        • Use Catalogs In-Game
        • Setup In-Game Store
    • Currencies
      • How To
        • Configure a Currency in Web Console
        • Use Currencies In-Game
    • DLC Management
      • How To
        • Configure DLC in Web Console
        • Use DLC In-Game
    • Entitlements
      • How To
        • Work with Entitlements In-Game
    • Real Money Purchases
      • How To
        • Configure In-App Purchase in Web Console
        • Make Purchases through Google Play Store
        • Make Purchases through Apple Store
        • Make Purchases through Steam Store
    • Virtual Purchases
    • Wallets
      • How To
        • Manage a Wallet in Web Console
        • Use Wallets In-Game
  • ⚔️Content
    • Overview
    • Assets
      • How To
        • Create & Configure an Asset
        • Organize & Search for Assets
        • Retrieve Assets In-Game
        • Set up Asset Storage Template
        • Check Grant Notifications
        • Set up a Game Config Asset
        • Create a Loot Box
        • Work with Loot Boxes In-Game
        • Create a Drop Table
        • Work with Drop Tables In-Game
        • Create a Rental Asset
        • Work with Rental Assets In-Game
    • User Generated Content (UGC)
      • How To
        • Create UGC In-Game
    • Twitch Drops
  • 🕹️Game Systems
    • Overview
    • Classes & Heroes
      • How To
        • Base Classes
        • Hero Classes
        • Implement Classes In-Game
        • Implement Heroes In-Game
    • Leaderboards
      • How To
        • Configure Leaderboard in Web Console
        • Use Player Leaderboards
        • Use Generic Leaderboards
        • Use Metadata to Store Additional Information
        • Use Scheduled Reset with Rewards
        • Use Leaderboards for Time Based Rankings
      • Leaderboard FAQ
      • GameMaker References
    • Feedback
      • How To
        • Manage Feedback Categories
        • Create Player Feedback
        • Create UGC Feedback
        • Create Game Feedback
        • View and Manage Feedback
    • Progressions
      • How To
        • Create a Progression
        • Game Progressions
        • Player Progressions
        • Class Progressions
        • Asset Instance Progressions
    • Triggers
      • How To
        • Setup a trigger in the Web Console
        • Invoke trigger from game
  • ⛓️Shared Systems
    • Overview
    • Metadata
      • How To
        • Add Metadata in Console
        • Fetch a Single Metadata In-Game
        • Fetch Metadata In-Game by Tags
        • Fetch Metadata In-Game from Multiple Sources
    • Notifications
      • How To
        • List Notifications and Mark as Read In-Game
  • 🗝️Admin
    • Settings
    • User Settings
    • Organization Settings
    • CORS Allowlist
  • ⭕️ Legacy
    • Deprecations
      • Unity SDK Deprecation Log
        • Version 2.1.5 - Migration to Open UPM
        • Version 2.0.0
      • Unreal SDK Deprecation Log
        • Version 4.0.0
        • Version 3.0.0
    • Legacy Storage
    • Legacy Triggers
      • Activate a trigger
      • Create a trigger
    • Legacy Progressions
      • Create a Progression System
      • Use a Progression System In-Game
Powered by GitBook
On this page
  • Prerequisites
  • Configure scheduling in Web Console
  • Configure rewards in Web Console
  • Get Rewards in Game
  • Conclusion
  1. Game Systems
  2. Leaderboards
  3. How To

Use Scheduled Reset with Rewards

PreviousUse Metadata to Store Additional InformationNextUse Leaderboards for Time Based Rankings

Last updated 8 months ago

Prerequisites

In order to use schedules and rewards for your leaderboard, there are a few steps you must complete and ensure you have:

  • A game created in the LootLocker web console

Configure scheduling in Web Console

Leaderboard scheduling uses the CRON format for deciding when to reset. You can read more about it

As you create a Leaderboard, you can set a cron value (Or simply select a quick cron value), which determines the schedule.

If you want to edit, or haven't set a schedule before creating the Leaderboard. The Schedule settings will be found inside the Leaderboard, under Settings.

Configure rewards in Web Console

The rewards settings can be found underneath Rewards. Once you have selected the reward type (Asset, Currency, Progression Point, Progression Reset, Group), you must configure the selection.

Here we have configured the selection to use the players ranking, in between a range of min 1 and max 10, this will result in the top 10 players recieving the reward.

You can customize this further, by selecting different types, directions and position.

Get Rewards in Game


private void GetRewards()
{
    string leaderboard_key = "";
    LootLockerSDKManager.GetLeaderboardData(leaderboard_key, (response) =>
    {
        if (!response.success)
        {
            return;
        }
        foreach (var reward in response.rewards)
        {
            switch (reward.reward_kind)
            {
                case LootLockerLeaderboardRewardEntityKind.group:
                    ConfigureGroup(reward.group);
                    break;
                case LootLockerLeaderboardRewardEntityKind.asset:
                    ConfigureAsset(reward.asset);
                    break;
                case LootLockerLeaderboardRewardEntityKind.currency:
                    ConfigureCurrency(reward.currency);
                    break;
                case LootLockerLeaderboardRewardEntityKind.progression_points:
                    ConfigureProgressionPoints(reward.progression_points);
                    break;
                case LootLockerLeaderboardRewardEntityKind.progression_reset:
                    ConfigureProgressionReset(reward.progression_reset);
                    break;
                default: break;
            }
        }
    });
}

private void ConfigureAsset(LootLockerLeaderboardRewardAsset asset)
{
    Debug.Log(asset.asset_ulid);
    Debug.Log(asset.details.name);
    Debug.Log(asset.details.thumbnail);
}

private void ConfigureCurrency(LootLockerLeaderboardRewardCurrency currency)
{
    Debug.Log(currency.amount);
    Debug.Log(currency.details.name);
    Debug.Log(currency.details.id);
    Debug.Log(currency.details.code);
}

private void ConfigureProgressionPoints(LootLockerLeaderboardRewardProgression progression)
{
    Debug.Log(progression.amount);
    Debug.Log(progression.progression_id);
    Debug.Log(progression.details.name);
    Debug.Log(progression.details.id);
    Debug.Log(progression.details.key);
}

private void ConfigureProgressionReset(LootLockerLeaderboardRewardProgressionReset progression)
{
    Debug.Log(progression.progression_id);
    Debug.Log(progression.details.name);
    Debug.Log(progression.details.id);
    Debug.Log(progression.details.key);
}

private void ConfigureGroup(LootLockerLeaderboardRewardGroup group)
{
    foreach (var reward in group.associations)
    {
        switch (reward.kind)
        {
            case LootLockerLeaderboardRewardEntityKind.asset:
                Debug.Log(reward.asset.asset_ulid);
                Debug.Log(reward.asset.details.name);
                Debug.Log(reward.asset.details.thumbnail);
                break;
            case LootLockerLeaderboardRewardEntityKind.currency:
                Debug.Log(reward.currency.currency_id);
                Debug.Log(reward.currency.amount);
                Debug.Log(reward.currency.details.name);
                Debug.Log(reward.currency.details.code);
                Debug.Log(reward.currency.details.id);
                break;
            case LootLockerLeaderboardRewardEntityKind.progression_points:
                Debug.Log(reward.progression_points.progression_id);
                Debug.Log(reward.progression_points.amount);
                Debug.Log(reward.progression_points.details.name);
                Debug.Log(reward.progression_points.details.key);
                Debug.Log(reward.progression_points.details.id);
                break;
            case LootLockerLeaderboardRewardEntityKind.progression_reset:
                Debug.Log(reward.progression_reset.progression_id);
                Debug.Log(reward.progression_reset.details.name);
                Debug.Log(reward.progression_reset.details.key);
                Debug.Log(reward.progression_reset.details.id);
                break;
        }
    }
}

We start by getting the leaderboard data and iterating through each reward.

Then we switch through the `Reward Kind`, and branch out into different logic based on the result.

Finally we get the information and from now you can generate your ui or further game logic.

Conclusion

In this how to, we have added additional functionality to our leaderboards. Rewards will be given automatically to players who fulfill the requirements once the leaderboard resets.

If you want to learn more on how to use leaderboards, check out our , or maybe .

🕹️
how to use leaderboards for time based ranking
how to use metadata to store additional information on a player
A player with an active LootLocker game session
here.
In the example we set 0 15 * * * for the Leaderboard to reset everyday at 3 pm
Blueprint example of listing grouped rewards
Blueprint example of listing grouped rewards
Blueprint example of listing grouped rewards
Blueprint example of listing grouped rewards