Skip to content

Template variable types ​

Variables are declared in a template as a list of up to 40 definitions.

json
{
  "key": "MAX_PLAYERS",
  "label": "Slots",
  "description": "How many players can join.",
  "type": "number",
  "min": 1,
  "max": 50,
  "userEditable": true,
  "required": true
}

Common fields ​

FieldMeaning
keyEnvironment variable name: capital letters, digits and underscores, starting with a letter or _, up to 64 characters. Unique per template
labelShown in forms (up to 80 characters); defaults to the key
descriptionHelp text (up to 300 characters)
typestring, number, boolean or select
userEditableWhether owners may change it in the startup panel
requiredA value must be present
secretHidden from everyone but administrators

Types ​

TypeExtra fieldsValidation
stringpattern (regular expression, up to 200 characters, matched with a time limit)Must match pattern when given
numbermin, maxMust be a number within the range
booleantrue or false, shown as a switch
selectoptions: 1 to 60 of { "value", "label" }Must be one of the values

Values are validated on the server every time they are saved; the form only helps. Names beginning with RCON_ or holding passwords are commonly marked secret. The legacy editableVariables list of names is still accepted and treated as plain editable text.

Released under the AGPL-3.0-only license.