Level Rewards Config
File:mods/Zuxaw_RPGLeveling/LevelRewardsConfig.json
Defines rewards that players can claim when they reach specific levels. Each reward can grant items (into the player’s inventory) and/or reset points (used with the RESET ALL button on the Stats page to refund allocated stat points). Rewards are claimed in the Rewards tab of the Stats GUI (/lvl gui).
Configuration Structure
The file uses PascalCase keys (same convention as Zone Level Config).| Option | Type | Description |
|---|---|---|
Version | String | Plugin version (auto-updated on load). |
Rewards | Array | List of reward entries, one per level threshold. If empty, no level rewards exist — players cannot earn or claim any rewards from the Rewards tab. |
Reward Entry
Each element ofRewards has:
| Option | Type | Default | Description |
|---|---|---|---|
Level | Integer | — | Level at which this reward is unlocked. Must be > 0. |
Items | Array | [] | List of items to give when the reward is claimed. |
ResetPoints | Integer | 0 | Number of reset points to grant when claimed. Reset points are used with the RESET ALL button on the Stats page. |
Command | String | "" | Optional command to run when the reward is claimed (e.g. lvl setlevel {player} 10). See Running a command when a reward is claimed below. |
CommandTitle | String | "" | Optional label shown in the Rewards tab for this reward (e.g. “Set level”). If empty, the command string is shown when present. |
Running a command when a reward is claimed
You can run one command per reward when a player claims it. UseCommand for the command string and, optionally, CommandTitle for the text shown in the Additional rewards column of the Rewards tab.
Placeholder: {player}
- In
Command, the placeholder{player}is replaced with the username of the player who claimed the reward. - Example:
Command": "lvl setlevel {player} 10"runs aslvl setlevel TheirName 10when that player claims the reward.
Built-in: lvl setlevel
The plugin runs lvl setlevel {player} <level> itself when it appears in a reward. You do not need the game’s command system for this:
- Use it to set the claiming player’s level when they claim (e.g. level 10 reward:
"Command": "lvl setlevel {player} 10"). - Works even when the server’s CommandManager is unavailable.
- Level is applied immediately (no restart). Leaderboard is updated if enabled.
Other commands (any mod)
Any other command (e.g.gamemode adventure {player}, give money, or commands from other mods) is executed via the game’s CommandManager. The plugin tries several strategies so that mod commands work when possible: running the command as the claiming player, then as the server console, and retrying once on the world thread. If CommandManager is not available in your environment, only the built-in lvl setlevel reward command will run; other commands will be skipped and a warning will be logged.
Example with command
- When the player claims this reward: items are granted, and the command
lvl setlevel TheirName 10is run (setting that player to level 10). - In the Rewards tab, the Additional column shows “Set level” (from
CommandTitle). IfCommandTitlewere empty, it would show the command string instead.
"Command": "" and "CommandTitle": "" (or omit them) when a reward has no command.
Item Entry
Each element ofItems has:
| Option | Type | Description |
|---|---|---|
ItemId | String | Hytale item asset ID (e.g. Ore_Copper, Rock_Gem_Emerald). |
Quantity | Integer | Number of items to add to the player’s inventory (storage). |
ItemId values are skipped and logged.
Example
- Level 10 — Player receives 15 Copper Ore and 4 Emerald when they claim; no reset points; command
lvl setlevel {player} 10runs (sets that player to level 10). Additional column shows “Set level”. - Level 15 — No items; 1 reset point when claimed; no command.
- Level 20 — 10 Iron Ore when claimed; no reset points; no command.
How Rewards Work
If theRewards array is empty, no rewards are defined and players cannot earn or claim any level rewards.
- Unlock — When the player’s level is greater than or equal to a reward’s
Level, that reward is available to claim. - Claim — In the Stats GUI, open the Rewards tab. Each row shows level, items, reset points (if any), and a status: Unclaim (click to claim) or Claimed.
- Claim All — If there is at least one unclaimed reward the player has reached the level for, a Claim All button appears. Clicking it claims every such reward at once (items added to storage, reset points added).
- One-time — Each reward level can only be claimed once per character. Claimed levels are stored in player data and persist across sessions (and in the external database if Database Sync is enabled).
Reset Points
- Earned — By claiming rewards that have
ResetPoints> 0. - Display — Shown on the Stats tab as xN next to the RESET ALL button (e.g. x5).
- Use — The RESET ALL button consumes 1 reset point and refunds all allocated stat points to available, then reapplies stats so Health/Stamina etc. return to base values. The button is disabled when the player has 0 reset points.
- Admin — Use
/lvl setreset <player> <amount>to set a player’s reset points (see Commands).
File Location and Reload
- Path:
mods/Zuxaw_RPGLeveling/LevelRewardsConfig.json - The plugin creates a default file on first run if it does not exist.
- Config is loaded at startup. To apply changes without restarting the server, use
/lvl reload(admin/OP). This reloads all config files, including RPGLevelingConfig, StatsLevelConfig, and DatabaseConfig (DatabaseConfig: in-memory only; DB connection changes require restart).
Related
- Configuration Overview — List of all config files.
- Commands —
/lvl reload,/lvl setreset,/lvl setlevel(claimed rewards above new level are removed),/lvl resetall. - Reset points and RESET ALL — Described in the changelog under Unreleased / Added.
