Skip to content

Daily Bonus

In many video games, a daily bonus is a reward that a player can receive for logging in to the game on a daily basis. The daily bonus can take many forms, such as an in-game currency, items, or special perks. The purpose of the daily bonus is to encourage players to log in to the game regularly and keep playing. Some games may offer a different daily bonus each day to keep things interesting for players.

  1. Open the Daily Bonus section.
  2. Add at least one Daily Bonus document. You can have multiple Daily Bonuses for different segments of your players, for testing or you can change it during the players progress in your game.

Screenshot

Daily Bonus parameters

Name Description
Name The name of the bonus, it's used for your own convenience only.
Condition You can set up specific conditions for Daily Bonus to activate. For example you can launch Daily Bonus only after the tutorial is complete.
Type Determines how Daily Bonus resets. CollectAllToReset - resets when you collect all the rewards, SkipToReset - resets when you collect all the rewards or skip a day, CalendarReset - resets only when the new month starts.
Rewards The list of all the daily rewards. Each daily reward can contain multiple items.
Bonus Reward It's mostly used with CalendarReset type of bonuses. When all the rewards were collected, players will get the Bonus Reward every day until the new month starts.

Section for programmers

  1. Use the following methods to work with Daily Bonus

    //Returns the list of all the rewards with statuses
    Balancy.LiveOps.DailyBonus.GetAllRewards();
    
    //Returns the next Reward
    Balancy.LiveOps.DailyBonus.GetNextReward();
    
    //Returns the next Reward number, starting from 1
    Balancy.LiveOps.DailyBonus.GetNextRewardNumber();
    
    //Returns true if you can claim the next reward
    Balancy.LiveOps.DailyBonus.CanClaimNextReward();
    
    //Returns the amount of seconds till the next reward. 0 - the reward is already available, -1 - something went wrong with dates. 
    Balancy.LiveOps.DailyBonus.GetSecondsTillTheNextReward();
    
    //Claims the next available reward and returns its value
    Balancy.LiveOps.DailyBonus.ClaimNextReward();
    
    //Returns true if the next reward is the Bonus Reward
    Balancy.LiveOps.DailyBonus.IsNextRewardBonus();
    
  2. You can also subscribe the listener for LiveOps DailyBonus to receive events when the next Daily Bonus is available. It'll be triggered when you start the game or if the day will change during the session.

    //Don't forget to create your own implementation of LiveOpsEventsExample
    ExternalEvents.RegisterLiveOpsListener(new LiveOpsEventsExample());