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

  1. name

    • Description: The name or description of the reward.

    • Type: string

    • Example:

      "name": "Operation Bravo Case"
  2. 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:

      "commands": [
        "css_givecase #{userid} 4003 1"
      ]
  3. permissions

    • Description: A list of permissions granted to the player upon being above that level.

    • Type: array of strings (nullable)

    • Default Value: null

    • Example:

      "permissions": [
        "@example/flag",
        "@example/admin"
      ]
  4. 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:

      "groups": [
        "#example/vip",
        "#example/premium"
      ]
  5. 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:

      "command-access": [
        "example_flag",
        "admin_access"
      ]
  6. battle_pass_only

    • Description: Indicates whether the reward is exclusive to Battle Pass owners.

    • Type: boolean

    • Default Value: false

    • Example:

      "battle_pass_only": true

Example JSON Configuration

Here’s an updated example that includes all possible reward types:

{
  "season_name": "The Nine Tailed Fox",
  "duration_days": 90,
  "rewards": {
    "1": {
      "name": "Operation Bravo Case",
      "commands": [
        "css_givecase #{userid} 4003 1"
      ],
      "permissions": [
        "@example/flag"
      ],
      "groups": [
        "#example/vip"
      ],
      "command-access": [
        "example_flag"
      ],
      "battle_pass_only": false
    },
    "2": {
      "name": "eSports 2013 Case",
      "commands": [
        "css_givecase #{userid} 4002 1"
      ],
      "battle_pass_only": false
    },
    "3": {
      "name": "CS:GO Weapon Case + Key",
      "commands": [
        "css_givecase #{userid} 4001 1",
        "css_givekey #{userid} 0 1"
      ],
      "permissions": [
        "@example/admin"
      ],
      "groups": [
        "#example/premium"
      ],
      "command-access": [
        "admin_access"
      ],
      "battle_pass_only": true
    },
    "4": {
      "name": "Winter Offensive Case",
      "commands": [
        "css_givecase #{userid} 4009 1"
      ],
      "groups": [
        "#example/regular"
      ],
      "battle_pass_only": false
    },
    "5": {
      "name": "Winter Offensive Case + Key",
      "commands": [
        "css_givecase #{userid} 4009 1",
        "css_givekey #{userid} 1214 1"
      ],
      "permissions": [
        "@example/special"
      ],
      "command-access": [
        "special_flag"
      ],
      "battle_pass_only": true
    }
  }
}

Usage Notes

  1. Mix and Match Rewards: You can combine commands, permissions, groups, and command-access fields for a single reward.

  2. Battle Pass Restrictions: Use "battle_pass_only": true to make rewards exclusive to Battle Pass holders.

  3. Commands with Placeholders: Replace placeholders (#{steamid}, #{userid}, #{name}) dynamically when commands are executed.

  4. 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?