Skip to content

Configuration

samyyc edited this page Dec 8, 2024 · 3 revisions

Full example

{
  "Skybox": {
    "cs_italy_s2_skybox_2": {
      "name": "cs_italy_s2_skybox_2",
      "material": "materials/skybox/cs_italy_s2_skybox_2.vmat",
      "brightness": 2.5, // OPTIONAL
      "color": "255 255 0 255", // OPTIONAL     
      "permissions": ["@skybox/and1", "@skybox/and2"], // OPTIONAL  
      "permissionsOr": ["skybox/or1", "skybox/or2"] // OPTIONAL  
    },
  },
  "Database": {
    "Host": "localhost",
    "Port": 3306,
    "User": "root",
    "Password": "passwd",
    "Database": "cs2",
    "TablePrefix": "cs2_skyboxchanger_"
  },
  "MapDefault": {
    "*": "sky_de_nuke",
    "de_dust2": "cs_italy_s2_skybox_2"
  },
  "MenuPermission": "@skybox/change",
  "ConfigVersion": 2
}

Skybox

  • key and name: Skybox section is a dictionary, the key is the unique identifier (index) of the skybox which stored in database. Don't set weird value for the key, you can use name field to rename the skybox in menu instead.

  • material: Path to the skybox material in the vpk, various default skyboxes should already be generated. Can also be a workshop material.

  • brightness and color: OPTIONAL. Set the default brightness and color for the skybox. Notice that player can change them later.

  • permissions and permissionsOr: Permissions required to set this skybox. The first one use AND condition, and the other use OR.

Database

Your MySQL database credentials.

MapDefault

OPTIONAL. Set default skyboxes for maps.

Dictionary structure, map name to skybox string index (the key of the skybox config).

If you set map name to "*", it represents all maps. Notice that other map configs can override this config.

If you set skybox string index to "", it represents use the default skybox of that map.

MenuPermission

The permission required for player to open the change menu, set it to "" to allow everyone.

Clone this wiki locally