Browse docs
Daily Rewards V3
Installation
The database storage and automatic legacy-file migration described here are available from 3.3.3.
Install the current sky_base and configure oxmysql as its SQL adapter. Start the database,
framework and configured integrations before these resources:
ensure sky_base
ensure sky_dailyrewards
Daily Rewards automatically creates missing tables and adds missing columns through Sky.DB.Migrate.
The included import.sql describes the same schema for reference or manual preparation; no manual
SQL import is needed. Existing player records are retained. The database user needs permission to
create and alter tables and to read and write their data.
This database-based version does not require add_filesystem_permission sky_base write sky_dailyrewards.
Other installed Sky scripts may still need their filesystem permissions.
Updating an existing installation
- Stop
sky_dailyrewardsand back up its database tables and any existingdatafolder. - Replace the resource files, including
fxmanifest.luaand the completesourcefolder. Put your existingdata/season.jsonanddata/rewards.jsonback in the same resource folder before the first start. - Start the resource. It transfers any available old files into the database in one transaction. Check for
[sky_dailyrewards] Legacy data migration completein the server console. - Keep the old files in your backup. After a successful import, the resource uses the database; subsequent restarts do not import the files again.
When the old files are present, the import preserves the season number, its original start time and generated rewards.
Player streaks and playtime stay in dailyrewards_users. Normal season expiry and the configured missed-day rule still apply.
From 3.3.4, missing files or a missing data folder do not prevent startup. Missing state is
initialized directly in the database; no JSON files are created. If season metadata is unavailable,
season 1 starts at initialization. Existing claim dates, streak progress and playtime are retained. The configured missed-day rule and future season resets still apply.
Missing randomized rewards are generated from the current configuration and saved in SQL.
If an existing file is invalid or a transaction fails, startup reports the problem. Correct the reported problem or restore the matching backup, then restart. Do not delete migration markers or import old SQL to retry a completed migration. Transactional tables must use InnoDB.
Configuration
Configure Everything Online
All settings are managed through our config tool
Login streaks
Enable Reset Progress After a Missed Day in the configurator to reset a player's reward progress to day 1 when they go a full calendar day without claiming a reward. Leave it disabled to let players continue from their last claimed reward after an absence.
Commands
Generates new rewards (only if randomized rewards are enabled)
/generate_daily_rewards
Exports
Open the DailyRewards UI for the player.
exports.sky_dailyrewards:open()
Custom Rewards
Daily Rewards supports custom daily, streak, and randomized rewards through the shared sky_base/config/sv_functions.lua reward hook.
See Custom Rewards for the full setup guide and examples.
Support
Need help? Our support team is always ready to assist
Join Discord