Seasons
This documentation provides an overview of how to configure a season for the game system using the JSON format provided. Users can edit or modify the JSON file to set up seasonal settings.
Overview
Each season has an index, starting from 1. So the first season config file will be season_1.jsonc. When the season ends, the plugin load the next config with it's own configurations, which would be season_2.jsonc. Don't forget to create them before the season ends.
The JSON configuration defines the following:
season_name
: The display name of the season.duration_days
: The number of days the season will last.rewards
: A mapping of levels to rewards.
Each reward specifies commands to execute, permissions to assign, and whether it is exclusive to Battle Pass owners.
Reward Configuration
Each level in the rewards
section defines a reward, and its structure supports additional properties beyond simple commands. Here’s an overview of all fields available in a LevelReward object.
The default config depends on K4-Cases. You can do your own levels and rewards by following this configuration.
Fields in LevelReward
name
Description: The name or description of the reward.
Type:
string
Example:
commands
Description: A list of commands to execute when the reward is granted.
Type:
array of strings
Default Value:
[]
(empty list)Placeholders:
#{steamid}
: Player's SteamID64.#{userid}
: Player's UserID.#{name}
: Player's username.
Example:
permissions
Description: A list of permissions granted to the player upon being above that level.
Type:
array of strings
(nullable)Default Value:
null
Example:
groups
Description: A list of groups the player is added to upon being above that level.
Type:
array of strings
(nullable)Default Value:
null
Example:
command-access
Description: A list of commands the player is allowed to access after reaching the level.
Type:
array of strings
(nullable)Default Value:
null
Example:
battle_pass_only
Description: Indicates whether the reward is exclusive to Battle Pass owners.
Type:
boolean
Default Value:
false
Example:
Example JSON Configuration
Here’s an updated example that includes all possible reward types:
Usage Notes
Mix and Match Rewards: You can combine
commands
,permissions
,groups
, andcommand-access
fields for a single reward.Battle Pass Restrictions: Use
"battle_pass_only": true
to make rewards exclusive to Battle Pass holders.Commands with Placeholders: Replace placeholders (
#{steamid}
,#{userid}
,#{name}
) dynamically when commands are executed.The groups, permissions and command acceses are collected and always given to the player as long as the season goes on and they have the level for them.
Last updated
Was this helpful?