How a game file is used
Each game has one XML file in modules/config_games/server_configs/, named after its game_key. The root element is game_config. Every tag is written as an opening tag and a closing tag, for example game_name is written between its own opening and closing tags. Indentation is for reading only and is not required.
The panel checks each file against schema_server_config.xml when it reads the file. The schema is the authority for the order of tags and for which values are allowed. A file that fails the check is not loaded.
The panel reads a game file in four steps:
- The file is checked against the schema. Tags must appear in the order the schema defines, and the root tags are listed in that order below.
- If the game has an
osblock, the panel picks thewindowsorlinuxchild that matches the host. The children of that block are copied onto the root. Anexechild becomes the server program name. Any other child replaces the root tag with the same name. - The panel builds the start command from
cli_template. Each%ID%placeholder is replaced by the value of thecli_paramorserver_paramsentry with that id. - The panel shows the options from
server_paramsandcustom_fields, and runs the install, start and player steps the file defines.
Scripts. pre_install and post_install are written in bash on both platforms. On Windows they run under Cygwin, so Linux commands work, and simple Windows commands such as wmic also work. pre_start is bash on Linux and a batch file on Windows. Multi-line scripts are wrapped in <![CDATA[ … ]]> so characters such as < and & are not read as XML. The scripts section has the details.
Structure of a game file
This is the full set of root tags in the order the schema requires. Child tags are shown indented under their parent. The values are placeholders. A tag that is not used can be left out, but any tag that is present must follow this order.
<game_config>
<game_key>…</game_key>
<protocol>…</protocol>
<lgsl_query_name>…</lgsl_query_name>
<gameq_query_name>…</gameq_query_name>
<installer>…</installer>
<game_name>…</game_name>
<workshop_support>
<enabled>…</enabled>
<provider>…</provider>
<steam_app_id>…</steam_app_id>
<workshop_app_id>…</workshop_app_id>
<download_method>…</download_method>
<install_strategy>…</install_strategy>
<install_path>…</install_path>
<startup_param_format>…</startup_param_format>
<mod_separator>…</mod_separator>
<mod_prefix>…</mod_prefix>
<mod_folder_format>…</mod_folder_format>
<copy_keys enabled="…">
<source_pattern>…</source_pattern>
<target_path>…</target_path>
</copy_keys>
<post_install_action>…</post_install_action>
</workshop_support>
<server_exec_name>…</server_exec_name>
<os>
<windows arch="x64">
<exe>…</exe>
…any of the platform tags, see the os section…
</windows>
<linux arch="x64">
<exe>…</exe>
…
</linux>
</os>
<query_port type="add">…</query_port>
<cli_template>…</cli_template>
<cli_params>
<cli_param id="PORT" cli_string="-port" options="s"/>
</cli_params>
<reserve_ports>
<port type="add" id="QUERY_PORT" cli_string="-queryport" options="s">1</port>
</reserve_ports>
<cli_allow_chars>…</cli_allow_chars>
<maps_location>…</maps_location>
<map_list>…</map_list>
<console_log>…</console_log>
<exe_location>…</exe_location>
<max_user_amount>…</max_user_amount>
<control_protocol>…</control_protocol>
<control_protocol_type>…</control_protocol_type>
<mods>
<mod key="…">
<name>…</name>
<installer_name>…</installer_name>
<installer_login>…</installer_login>
<betaname>…</betaname>
<betapwd>…</betapwd>
<steam_bitness>…</steam_bitness>
</mod>
</mods>
<replace_texts>
<alltext key="…">
<text key="…">
<default>…</default>
<var>…</var>
<filepath>…</filepath>
<options>…</options>
<occurrence>…</occurrence>
</text>
</alltext>
<text key="…">
<default>…</default>
<var>…</var>
<filepath>…</filepath>
<options>…</options>
</text>
</replace_texts>
<server_params>
<group key="…" name="…">
<param id="…" key="…" type="…">
<option value="…">…</option>
<default>…</default>
<caption>…</caption>
<desc>…</desc>
<options>…</options>
<access>…</access>
</param>
</group>
<param id="…" key="…" type="…">
<caption>…</caption>
<desc>…</desc>
<options>…</options>
</param>
</server_params>
<custom_fields>
<field id="…" key="…" type="…">
<option value="…">…</option>
<default>…</default>
<default_value>…</default_value>
<var>…</var>
<filepath>…</filepath>
<options>…</options>
<occurrence>…</occurrence>
<access>…</access>
<desc>…</desc>
</field>
</custom_fields>
<list_players_command>…</list_players_command>
<player_info_regex>…</player_info_regex>
<player_info>
<index key="1">userid</index>
</player_info>
<player_commands>
<command key="…" type="…">
<option value="…">…</option>
<default>…</default>
<string>…</string>
</command>
</player_commands>
<pre_install>…</pre_install>
<post_install>…</post_install>
<pre_start>…</pre_start>
<post_start>…</post_start>
<environment_variables>…</environment_variables>
<lock_files>…</lock_files>
<configuration_files>
<file description="…">…</file>
</configuration_files>
</game_config>
Inside os, the windows child must come before the linux child. Both children take the same tags, and the tags can appear in any order inside each one.
Root tags (game_config)
These tags sit directly under game_config, in the order the schema requires. Required means the schema rejects the file without the tag. Files using it counts the files out of 236 in the repo that use the tag at the root or inside an os block; for values, the number is how many times the value appears. Many of those files are old, but together they show which options exist.
| Order | Tag | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|---|
| 1 | game_key | Yes | Text, not empty | Unique key of the game. It is also the file name without .xml, and all 236 files follow that. Keys use letters, digits and underscores, plus a hyphen in two keys and a dot in one. None of the files uses the older _win32 or _linux64 suffixes; the os block covers the platform instead. | 236 |
| 2 | protocol | No | Text, not empty | Query library used by the panel status views. The panel compares it with gameq, lgsl and teamspeak3. The files that set it all use lgsl. | 24 |
| 3 | lgsl_query_name | No | Text, not empty | Game name in the LGSL query library. When it is set, the panel also works out the query port through LGSL. | 24 |
| 4 | gameq_query_name | No | Text, not empty | Game name in the GameQ query library. When it is set, the panel works out the query port from query_port. | 11 |
| 5 | installer | No | Text, not empty | How the server files are installed and updated. steamcmd installs and updates through SteamCMD, using the mod installer_name as the Steam app ID. Any other value skips SteamCMD, and an update runs the pre_install and post_install scripts instead. The repo uses steamcmd (161), rsync (3) and smokinguns (1). The panel only tests for the exact word steamcmd. | 165 |
| 6 | game_name | Yes | Text, not empty | Name of the game as shown in the panel. | 236 |
| 7 | workshop_support | No | Block | Steam Workshop settings. See the workshop section. The schema accepts the block, but no panel or agent code reads it yet. | 1 |
| 8 | server_exec_name | No | Text, not empty | File name of the server program. The exe tag inside an os block sets the same value for that platform, so no file in the repo sets it at the root. | 0 |
| 9 | os | No | Block | Settings for each operating system. See the os section. | 236 |
| 10 | query_port | No | Number. Attribute type: add or subtract | Offset from the game port to the query port. add makes the query port the game port plus the number, and subtract makes it the game port minus the number. Without a type, the query port is the game port. | 22 (add 23, subtract 1) |
| 11 | cli_template | No | Text, not empty | Start-command arguments, written after the server program. Each %ID% is replaced by the entry with that id from cli_params, reserve_ports or server_params. A %ID% that belongs to a server_params entry the user left empty is removed. See the placeholders section. | 212 |
| 12 | cli_params | No | Block | Fixed values the panel fills in, such as IP, port and player count. See the cli_params section. | 188 |
| 13 | reserve_ports | No | Block | Extra ports worked out from the game port and written into the start command. See the reserve_ports section. | 99 |
| 14 | cli_allow_chars | No | Text, not empty | Characters the panel leaves unescaped in the start-command values users type. By default these are escaped with a backslash: \ " ' | & ; > < ` $ ( ) [ ]. List a character here to allow it, for example ;. Characters that are not in that list need no entry. | 11 |
| 15 | maps_location | No | Path, relative to the game folder | Folder the panel lists to fill the map drop-down. It is used when map_list gives no maps. Each file or folder name is shown as the part before its first dot, so de_dust.bsp shows as de_dust. Every occurrence of the three letters mod in the path is replaced by the key of the selected mod. | 64 |
| 16 | map_list | No | Path to a text file, relative to the game folder | Text file with one map per line. It is read first, and the map drop-down is filled from it. If the file is missing or empty, the panel falls back to maps_location. Every occurrence of mod in the path is replaced by the key of the selected mod, so avoid folder names that contain those three letters, such as models. | 46 |
| 17 | console_log | No | Path, relative to the game folder | Log file shown on the panel log page. Real files also use a wildcard pattern such as profile/*.RPT. | 66 |
| 18 | exe_location | No | Path, relative to the game folder | Folder inside the game folder that holds the server program. The panel looks for the program at exe_location plus server_exec_name and reports a missing install if it is not there. | 59 |
| 19 | max_user_amount | No | Positive whole number | Largest player count the panel offers. The slot drop-downs list 0 up to this number. Common values are 32 (60 uses), 64 (31 uses) and 16 (18 uses). | 181 |
| 20 | control_protocol | No | rcon, rcon2, lcon, armabe | Remote console protocol used for the console, the player list and player commands. rcon is for Half-Life and Quake 1 to 3. rcon2 is for Source engine games. lcon is the legacy console. armabe is Arma 2 BattlEye. | 65 (rcon2 28, rcon 27, armabe 7, lcon 4) |
| 21 | control_protocol_type | No | new, old | Variant of rcon. new is for Half-Life 1.1.0.6 or newer. old is for Quake 1 to 3 and older Half-Life. Every file that sets it uses old. | 15 |
| 22 | mods | No | Block | Variants of the game, such as the base game, a mod or a beta branch. Each server needs at least one. See the mods section. | 236 |
| 23 | replace_texts | No | Block | Lines the panel changes inside config files each time the server starts. See the replace_texts section. | 82 |
| 24 | server_params | No | Block | Options users set in the panel. Each becomes part of the start command. See the server_params section. | 121 |
| 25 | custom_fields | No | Block | Extra settings users fill in, written into config files like replace_texts. See the custom_fields section. | 44 |
| 26 | list_players_command | No | Text, not empty | Command sent through the control protocol to print the player list. Real files use status. | 22 |
| 27 | player_info_regex | No | Regular expression with delimiters | Complete PHP regular expression, delimiters included, run with preg_match_all over the whole output of list_players_command. Real files use # as the delimiter. | 22 |
| 28 | player_info | No | Block | Names the parts the regex captures. See the player section. | 22 |
| 29 | player_commands | No | Block | Actions an administrator can run on a player, such as kick or ban. See the player section. | 22 |
| 30 | pre_install | No | Script text, not empty | Script run before the files are installed or updated. It is the default for the mod install commands, which users with access can override per mod and per server. See the scripts section. | 2 |
| 31 | post_install | No | Script text, not empty | Script run after the files are installed or updated. Same override rules as pre_install. See the scripts section. | 127 |
| 32 | pre_start | No | Script text, not empty | Script run before the server starts, on every start and restart. See the scripts section. | 17 |
| 33 | post_start | No | Script text, not empty | Accepted by the schema, but no panel or agent code runs it. | 1 |
| 34 | environment_variables | No | Script text, not empty | One line per variable, such as export LD_LIBRARY_PATH=., applied before the server starts. See the scripts section. | 23 |
| 35 | lock_files | No | Text, not empty, one path per line | Files protected from changes: users cannot edit, upload or overwrite them through the panel. Paths are relative to the game folder. See the scripts section. | 21 |
| 36 | configuration_files | No | Block | Config files users can open in the panel editor, which comes from the Edit Config Files module. See the config files section. | 127 |
os (windows and linux)
The os block holds the settings that differ per operating system. The panel picks the child that matches the host, and copies its tags onto the root. A tag in the platform block replaces the root tag with the same name as a whole; the two are not merged. A game that sets mods inside linux therefore needs the full list of mods there.
Inside a platform child, the tags can appear in any order. The schema requires exe. Both blocks accept the same tags. The only difference between them is the values, so a file can fill the windows and linux blocks with the same tags and different commands.
The tags allowed inside a platform child are: exe, protocol, lgsl_query_name, gameq_query_name, installer, workshop_support, query_port, cli_template, cli_params, reserve_ports, cli_allow_chars, maps_location, map_list, console_log, exe_location, max_user_amount, control_protocol, control_protocol_type, mods, replace_texts, server_params, custom_fields, list_players_command, player_info_regex, player_info, player_commands, pre_install, post_install, pre_start, post_start, environment_variables, lock_files and configuration_files. game_key, game_name and server_exec_name are not allowed there.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
os | No | Block | Holds one block per operating system. The windows block must come before the linux block when both are present. | 236 |
↳ windows | No | Block | Settings used on a Windows host. | 153 blocks |
↳ linux | No | Block | Settings used on a Linux host. | 194 blocks |
↳ arch | No | x86, x64. Default x64 | Attribute of windows and linux. It records whether the build is 32-bit or 64-bit. The XML creator form writes it. The panel does not use it to choose between blocks. | 179 files (x64 187, x86 73) |
↳ exe | Yes | Text, not empty | File name of the server program. It becomes server_exec_name for that platform. | 236 |
cli_params and cli_param
Each cli_param writes one value into the start command. Its id picks the value, and the matching %ID% placeholder in cli_template is replaced by cli_string, then the optional space, then the value. Every cli_param is an empty element: all its settings are attributes.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
cli_params | No | Block | Container for the cli_param children. | 188 |
↳ cli_param | Yes, one or more | Empty element with attributes | One value the panel writes into the start command at %ID%. | 188 files, 858 entries |
↳ id | No | GAME_TYPE, HOSTNAME, IP, MAP, PID_FILE, PLAYERS, PORT, QUERY_PORT, BASE_PATH, HOME_PATH, SAVE_PATH, OUTPUT_PATH, USER_PATH, CONTROL_PASSWORD | Which value the panel supplies. PORT is the game port, IP the server address, PLAYERS the player limit, MAP the chosen map, HOSTNAME the server name, GAME_TYPE the mod key, PID_FILE the name of the pid file (game_startup.pid), CONTROL_PASSWORD the remote console password, QUERY_PORT the query port. BASE_PATH, HOME_PATH, SAVE_PATH, OUTPUT_PATH and USER_PATH are all the game folder path. The id is also the name of the %ID% placeholder in cli_template. | PORT 213, IP 179, PLAYERS 156, MAP 93, GAME_TYPE 50, HOSTNAME 46, PID_FILE 42, HOME_PATH 34, CONTROL_PASSWORD 26 |
↳ cli_string | No | Text | Text written before the value, such as -port or +map. A trailing space in the attribute is kept. | empty (value only) 305, +map 41, +ip 41, -game 41, -pidfile 35, -port 33 |
↳ options | No | Letters s and q, or empty | Letter codes. s puts one space between cli_string and the value. q puts double quotes around the value. Use sq for both. See the option codes section. | s 412, sq 26, q 7, qs 1 |
reserve_ports and port
Use reserve_ports for extra ports the game needs, such as a query, RCON or web admin port. Each port works like a cli_param, except that its value is the game port plus or minus the number inside the tag. The result replaces the %ID% placeholder in cli_template.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
reserve_ports | No | Block | Container for the port children. | 99 |
↳ port | Yes, one or more | Whole number, with attributes | One extra port. The number inside the tag is the offset from the game port, so <port type="add" id="QUERY_PORT">1</port> is game port plus 1. | 99 files, 190 entries |
↳ type | No | add, subtract | add gives the game port plus the number. subtract gives the game port minus the number. Without a type, the value is the game port. | add 125, subtract 65 |
↳ id | No | Text | Name of the %ID% placeholder in cli_template that receives the port. | CLIENTPORT 61, QUERY_PORT 30, SOURCETVPORT 23, QUERYPORT 22, TVPORT 16, RCON_PORT 7 |
↳ cli_string | No | Text | Text written before the port, such as -QueryPort= or +rcon.port. | empty 93, +clientport 28, +tv_port 16, -QueryPort= 6, ?QueryPort= 5 |
↳ options | No | Letters s and q, or empty | Same letter codes as cli_param: s adds a space, q adds quotes. | s 54, sq 1 |
mods and mod
Each mod is one variant of the game that a server can run. Its children must appear in the order shown: name, installer_name, installer_login, betaname, betapwd, steam_bitness.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
mods | No | Block | Container for the mod children. | 236 |
↳ mod | Yes, one or more | Block with a key attribute | One variant of the game. The key is also the GAME_TYPE value, and it replaces the letters mod in map_list and maps_location paths. | 236 files, 292 entries |
↳ key | No | Text | Identifier of the variant. Most files use default for the base game, some use the game folder name such as cstrike. | default 126, cstrike 9, insurgency 3, nexuiz 3 |
↳ name | Yes | Text | Name shown in the panel. | 236 |
↳ installer_name | No | Text | Steam app ID that SteamCMD downloads for this variant. When it is empty, the update skips SteamCMD and runs the install scripts. The value 90 is the Half-Life dedicated server: only then is the mod key passed to SteamCMD as the mod name. | 157 |
↳ installer_login | No | Text | Steam login for the download. anonymous is used when no account is needed. When it is empty, the panel uses the Steam account set in the panel settings. | 124 |
↳ betaname | No | Text | Steam beta branch name. | 6 |
↳ betapwd | No | Text | Password for the beta branch, if it needs one. | 0 |
↳ steam_bitness | No | Positive whole number | Architecture bits passed to SteamCMD, such as 32 or 64. | 0 |
replace_texts
Use replace_texts to change a line inside a config file. The panel runs every rule each time the server starts, so the file always holds the value stored in the panel. Rules apply in the order they are written. Inside a text, the children can be in any order. Required means the schema rejects the file without it. Needed means the schema accepts the file, but the setting does nothing without it.
If the pattern is not found, the panel adds a new line at the end of the file made of var and the value. The exceptions are tags, tagValueByName, sc and sqc, which only replace a line that exists. If var is empty and the value is already at the start of a line, the rule changes nothing.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
replace_texts | No | Block | Container for the rules. Its children can come in any order. | 82 |
↳ alltext | No | Block with a key attribute | Groups several text rules. The schema accepts it, but the panel only runs text rules placed directly under replace_texts, so rules inside alltext are not applied. No file in the repo uses it. | 0 |
↳ text | No | Block with a key attribute | One rule. A rule changes one line in one file. | 82 files, 354 rules |
↳ key | Needed | Text | Which value the panel writes. It can be any field of the server record, for example home_name (server name), control_password, max_players, port, ip, ip_port (address and port), query_port, home_path (game folder), map, webhost_ip (panel web server address) or incremental (a counter). The key true writes an empty value. | home_name 83, control_password 76, max_players 63, port 49, ip 32, true 20, query_port 17, home_path 7 |
↳ default | No | Text, usually a regular expression | What to find in the file. It is a regular expression without delimiters. The panel wraps it as /…/m, so ^ and $ match at each line, and a / inside it must be written \/. For tags it is the tag name. For tagValueByName it is the text before name=. See the option codes section. | 82 |
↳ var | Needed | Text | Text written in front of the value, such as ServerName or maxPlayers = . For tags it is a pattern for the rest of the opening tag. For tagValueByName it is the value of the name attribute. For key-regex it is the whole replacement text. | 74 |
↳ filepath | Needed | Path, relative to the game folder | The config file to change. The panel creates an empty file first when it does not exist. | 82 |
↳ options | Needed | See the option codes section | How the value is written. sq and key-regex are the most common. | 70 files (sq 91, key-regex 61, s 54, empty 40, tags 27, tagValueByName 9) |
↳ occurrence | No | Whole number, 1 or more | Which match to change when the pattern matches more than once. Without it, the first match is changed. | 1 file (value 2, twice) |
server_params, group and param
The server_params block lists the options users set in the panel before they start the server. Each option writes a piece of the start command: its value goes into the %ID% placeholder named by id. A param the user leaves empty is skipped. Values are escaped as described under cli_allow_chars. Users can change a param only when the server access rights allow parameter edits. Required means the schema rejects the file without it. Needed means the schema accepts the file, but the setting does nothing without it.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
server_params | No | Block | Container for the groups and parameters. group and param children can come in any order. | 121 |
↳ group | No | Block with key and name attributes | Shows its param children together under the heading given by name. Groups are drawn after the params that sit directly under server_params. The panel supports groups, but no file in the repo uses one. | 0 |
↳ param | No (one or more inside a group) | Block with attributes | One option the user can set. Its children can come in any order. | 120 files, 664 params |
↳ id | No | Text | Name of the %ID% placeholder in cli_template that receives this option. A param without an id is added to the end of the start command, after a space. | 72 files |
↳ key | Needed | Text | The switch written before the value, such as -nomaster or +exec. The panel also shows it as the label and stores the user value under it, so it must be unique in the game. | -insecure 53, -nohltv 53, -nomaster 52, -norestart 38, +sv_setsteamaccount 20, +exec 11 |
↳ type | No | text (default), select, checkbox_key_value, checkbox, other_game_server_path, other_game_server_path_additional, or any HTML input type | text is a text box. select is a drop-down built from option children. checkbox_key_value is a tick box that writes the key alone when ticked. checkbox is a plain tick box that submits its saved or default text; the 6 uses in the repo have no default, so they submit an empty value, which the panel ignores, and checkbox_key_value is the one to use for on/off switches. other_game_server_path is a drop-down of the folders of the servers the user can access, and the chosen folder is the value. other_game_server_path_additional adds a text box after that drop-down for a sub-folder, and default gives its starting text. Any other value is used as the HTML input type. | checkbox_key_value 323, text 235, select 99, checkbox 6, other_game_server_path_additional 1 |
↳ option | Needed for select | Element with a value attribute | One choice in the drop-down. The text inside the tag is shown to the user, and value is what is written. | 55 files, 432 choices |
↳ attribute | No | Element with a key attribute | Adds an HTML attribute to the input. <attribute key="maxlength">10</attribute> adds maxlength='10'. No file in the repo uses it. | 0 |
↳ default | No | Text | Starting value. For a select it is the value of the chosen option. For a tick box, any non-empty text such as checked starts it ticked. The schema also allows a key attribute on this tag, but the panel ignores it. | 72 files |
↳ caption | No | Text | Label text shown next to the input. | 95 files |
↳ desc | No | Text | Help text shown with the input. | 108 files |
↳ options | No | ns, q, s, or anything else | How the key and value are joined. The whole value is compared, not its letters. ns: key and value together. q: key and quoted value. s: key, space, value. Anything else, including empty, sq and sQ: key, space, quoted value. See the option codes section. | ns 99, s 62, sq 7, sQ 1 |
↳ access | No | admin | With admin, only administrators can change the value. Other users see the input greyed out, and their saved value is kept. | 11 params |
custom_fields and field
Each field is an extra setting that users fill in on the server custom fields page. Every time the server starts, the panel writes each value into a config file, using the same rules and option codes as replace_texts. The difference is where the value comes from: it is the value the user stored under the field key, or default_value when none is stored. Required means the schema rejects the file without it. Needed means the schema accepts the file, but the setting does nothing without it.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
custom_fields | No | Block | Container for the field children. | 44 |
↳ field | No | Block with attributes | One setting. Its children can come in any order. | 44 files, 191 fields |
↳ id | No | Text | Optional identifier. The schema accepts it, and the field works without it. No file in the repo sets it. | 0 |
↳ key | Needed | Text | Label shown in the panel. It is also the name the panel stores the user value under, so it must be unique in the game. | 44 files |
↳ type | No | text (default), select, checkbox_key_value, checkbox, or any HTML input type | Kind of input, as in server_params. A select is built from option children. | text 164, select 27 |
↳ option | Needed for select | Element with a value attribute | One choice in the drop-down. | 9 files |
↳ default | No | Text | What to find in the config file, with the same meaning as default in replace_texts: a regular expression, or the tag name for tags. | 44 files |
↳ default_value | No | Text | Value shown until the user saves one. | 44 files |
↳ var | Needed | Text | Text written in front of the value, with the same meaning as var in replace_texts. | 40 files |
↳ filepath | Needed | Path, relative to the game folder | The config file to change. | 44 files |
↳ options | Needed | See the option codes section | How the value is written, with the same codes as replace_texts. | s 120, tags 27, tagValueByName 10, key-regex 10, sqc 5, sq 3 |
↳ occurrence | No | Whole number, 1 or more | Which match to change when the pattern matches more than once. | 0 |
↳ access | No | admin | With admin, only administrators can change the value. | 24 fields |
↳ desc | No | Text | Help text shown with the field. | 44 files |
list_players_command, player_info and player_commands
list_players_command is sent through the control protocol and prints the player list. player_info_regex is run over its output with preg_match_all; it must be a complete PHP regular expression with delimiters, and the repo uses #. player_info names each captured part, and player_commands lists the actions an administrator can run on a player. These tags need a working control_protocol and the remote console password.
The field names in player_info become placeholders in command strings: a name userid is written %userid%. The value typed or chosen by the administrator is %input%.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
player_info | No | Block | Container for the index children. | 22 |
↳ index | Yes, one or more | Text, with a key attribute | Names one part captured by player_info_regex. The key is the number of the capture group, starting at 1, and the text is the field name. Names in the repo: Name, userid, and once each id and IP. | 22 files, 45 entries |
player_commands | No | Block | Container for the command children. | 22 |
↳ command | Yes, one or more | Block with key and type attributes | One action on a player. The key is the name shown on the button, such as Kick, Ban or Change Nick. Its children can come in any order. | 22 files, 59 commands |
↳ type | No | text (default), select, hidden | hidden runs the command with no input. select asks the administrator to pick from the option children. text asks for typed input. | hidden 23, select 21, text 15 |
↳ option | Needed for select | Element with a value attribute | One choice. For a ban the value is a length of time. Most files count minutes (15, 30, 60, 1440, 10080, 43200) and a few count seconds (900 up to 2592000), so check the unit the game expects. | 21 files |
↳ default | No | Text | Starting text for a text input. | 15 files |
↳ string | Needed | Text | The command sent to the game. A command can have more than one string. Placeholders are listed in the placeholders section. | 22 files |
configuration_files and file
The files listed here appear in the server config editor, which comes from the Edit Config Files module. Only the path and the description are used.
| Tag or attribute | Required | Type or allowed values | What it does | Files using it |
|---|---|---|---|---|
configuration_files | No | Block | Container for the file children. | 127 |
↳ file | Yes, one or more | Path text, with a description attribute | One config file. The text of the tag is the path, relative to the game folder. Many files write Windows paths with backslashes, such as cfg\server.cfg. An empty tag is skipped. | 127 files, 237 entries |
↳ description | No | Text | Label shown for the file in the editor list. | 127 files |
↳ options | No | Text, not empty | The schema accepts it. The panel reads nothing from it, and no file in the repo sets it. | 0 |
workshop_support
Status: the schema accepts and checks this block, and one game file (Arma 3) fills it in, but no panel or agent code reads it yet. It has no effect at run time. The values in the last column show how the block is meant to be written. The placeholder names come from that file.
| Tag or attribute | Required | Type or allowed values | What it does | In arma3.xml |
|---|---|---|---|---|
workshop_support | No | Block | Steam Workshop settings. Children must appear in the order below. | Present |
↳ enabled | No | 0, 1, false, true, no, yes, off, on | Turns Workshop support on or off. | 1 |
↳ provider | No | steam | Where the mods come from. Steam is the only allowed value. | steam |
↳ steam_app_id | No | Positive whole number | Steam app ID of the game. | 107410 |
↳ workshop_app_id | No | Positive whole number | Steam app ID the Workshop items belong to. | 107410 |
↳ download_method | No | steamcmd, game_managed_workshop, manual | How the mods are downloaded. See the note below. | steamcmd |
↳ install_strategy | No | game_managed_workshop, steamcmd_download_only, copy_to_game_root, copy_to_mod_folder, dayz_mod_folder, arma_mod_folder, config_only, custom_scripted_install | Where and how downloaded mods are placed. | arma_mod_folder |
↳ install_path | No | Text with placeholders | Folder the mods are installed into. | {SERVER_ROOT}/{MOD_FOLDER} |
↳ startup_param_format | No | Text with placeholders | Launch parameter that loads the mods. | -mod={MOD_LIST} |
↳ mod_separator | No | Text | Character between mod names in the launch parameter. | ; |
↳ mod_prefix | No | Text | Text placed before a mod folder name. | @ |
↳ mod_folder_format | No | Text with placeholders | Format of each mod folder name. | Not set |
↳ copy_keys | No | Block with an optional enabled attribute (0, 1, false, true, no, yes, off, on) | Copies key files that some games need after a Workshop download. | enabled="1" |
↳ source_pattern | No | Path pattern | Where to find the key files. | {MOD_PATH}/keys/*.bikey |
↳ target_path | No | Path | Folder the key files are copied to. | {SERVER_ROOT}/keys |
↳ post_install_action | No | Text | Action run after the Workshop install finishes. | Not set |
Note on download methods. The game XML schema accepts steamcmd, game_managed_workshop and manual. The separate Steam Workshop module uses steamcmd and steamapi. These are different settings, and the module values are not checked against this schema.
Scripts: pre_install, post_install, pre_start, post_start, environment_variables, lock_files
These tags hold script text. Wrap multi-line scripts in <![CDATA[ and ]]> so characters such as <, > and & are not read as XML. Without CDATA, write them as <, > and &, or the file stops matching the schema or breaks the script.
Install scripts are written in bash on both platforms. On Windows they run under Cygwin, so Linux commands work, and simple Windows commands such as wmic also work. Placeholders such as {GAME_HOME_DIR} are listed in the placeholders section.
| Tag | Written in | When it runs | Notes |
|---|---|---|---|
pre_install | bash on Linux. bash under Cygwin on Windows | Before the files are installed or updated. For a steamcmd game it runs before the SteamCMD download. | The default for the mod install commands. Users with access can override it per mod and per server on the install commands page. |
post_install | bash on Linux. bash under Cygwin on Windows | After the files are installed or updated. | Same override rules as pre_install. For a game that does not use steamcmd, an update runs pre_install and post_install directly. |
pre_start | bash on Linux. A batch file on Windows | Before every start and restart. | On Windows the agent writes the lines to a batch file, runs it from the game folder and deletes it, so Windows commands such as start and cmd /c belong here. Placeholders are replaced on every line. |
post_start | Not run | Never. | The schema accepts the tag, but no panel or agent code runs it. |
environment_variables | One line per variable, such as export NAME=value | Before the server starts. | The agent replaces placeholders on every line and applies it before the start command. |
lock_files | One path per line, relative to the game folder | Locked after each install or update and before each start. Unlocked while an update runs. | Locked files cannot be edited, uploaded or overwritten through the panel. On Linux the agent sets the immutable flag with chattr +i. Allowed at the root and in both platform blocks. |
Option codes
The schema accepts any text for options, so the panel decides what each value means. The meaning depends on where the value is used. Values are case sensitive.
cli_param and reserve_ports port
The panel looks for the letters s and q anywhere in the value, so other letters are ignored.
| Value | How the flag and value are written |
|---|---|
s | A space between cli_string and the value. |
q | The value in double quotes. |
sq or qs | A space, and the value in double quotes. |
| empty or missing | cli_string and the value joined with nothing between them. |
server_params param
The panel compares the whole value with ns, q and s.
| Value | How key and value are written |
|---|---|
ns | Key and value together, with no space and no quotes. |
q | Key, then the value in double quotes, with no space. |
s | Key, a space, then the value without quotes. |
| anything else | Key, a space, then the value in double quotes. This includes empty, sq, qs and sQ. |
| (tick box ticked) | The key alone, for checkbox_key_value. |
replace_texts text and custom_fields field
The whole value is compared. sq is the most common in replace_texts, and s in custom_fields.
| Value | Result in the config file |
|---|---|
| empty | var directly followed by the value. |
s | var, a space, then the value. |
q | var directly followed by the value in double quotes. |
sq | var, a space, then the value in double quotes. |
sc | var, a space, the value, then a comma. Replace only. |
sqc | var, a space, the value in double quotes, then a comma. Replace only. |
key-regex | default is the regular expression to find. In var, %key% is replaced by the value, and the whole match is replaced by var. Backreferences such as $1 work in var. |
tags | Replaces the text inside a tag. default is the tag name and var is a pattern for the rest of the opening tag, so set with \s+name="rcon_password" matches the tag <set name="rcon_password">. Replace only. |
tagValueByName | Replaces the value attribute of the line that contains default and name="var", as in property with ServerName. Replace only. |
| anything else | Behaves like empty when a line is replaced. Nothing is added when the line is missing. The repo has ns once in replace_texts and once in custom_fields. |
Placeholders
Each kind of placeholder is used in a different place. The agents, not the panel, fill in the curly-brace names when a command runs on the host.
| Placeholder | Where it is used | Replaced with |
|---|---|---|
%ID%, such as %PORT% | cli_template | The value of the cli_param, reserve_ports port or server_params entry with that id. A server_params placeholder with no value is removed. |
{GAME_HOME_DIR} | Start command, pre_start, environment_variables, lock_files and server_params keys | The game folder of the server on the host. The agent fills it in. |
{GAME_HOME_DIR_WINDOWS} | Same places, Windows agent | The game folder as a Windows path. |
{MANAGEMENT_HOME_DIR} | Same places, Windows agent | The server management folder, which is the parent of the game folder, as a Cygwin path. |
{MANAGEMENT_HOME_DIR_WINDOWS} | Same places, Windows agent | The same management folder as a Windows path. |
{GAME_SHARED_DIR} | Same places | A folder on the host that servers of the same game can share. The agent creates it when it is missing. |
{STEAM_CMD_DIR} | Same places | The SteamCMD folder. It is filled in only after Install/Update via Steam has run once for the server. |
{STEAMCMD_INSTALL_FILE} | Same places | The name of the update script of this server, with the same condition as {STEAM_CMD_DIR}. A typical use is a server_params key such as -autoupdate -steam_dir {STEAM_CMD_DIR} -steamcmd_script {STEAMCMD_INSTALL_FILE}. |
{GSP_…}, such as {GSP_HOME_DIR} | Same places, older files | Older names, still accepted. The agent turns each {GSP_HOME_…} into {GAME_HOME_…} and drops the GSP_ from the others, so {GSP_STEAM_CMD_DIR} becomes {STEAM_CMD_DIR}. The repo has {GSP_HOME_DIR} in 6 files and {GSP_STEAM_CMD_DIR} in 11 files. |
%input% | player_commands string | The text typed or the option chosen by the administrator. |
%name%, such as %userid% | player_commands string | The field of that name from the player list line, as named in player_info. |
{SERVER_ROOT}, {MOD_FOLDER}, {MOD_PATH}, {MOD_LIST} | workshop_support fields | Only in the Arma 3 file, and not processed by any code yet. |
Checking a file
The panel checks each file against the schema when it reads it, so a file that breaks a rule will not load. The error names the tag that is wrong. The schema also sets the order of tags, so a tag out of order is an error too.
The schema checks the shape of the file, not whether the values make sense. A wrong option code, a bad regular expression or a missing filepath still passes, and only shows when the server starts. Test a new file by creating a server from it and starting it.
Known differences. The tag help inside the panel still lists some values the schema does not allow, such as rconhl for control_protocol, and %ip% or %slots% in cli_template. Use this page and the schema as the reference.
Full example: Example Survival
This is a made-up game. Its layout follows the 7 Days to Die file in the repo, with the names and values changed, so the structure, the bash post_install script and the option values match real game files. The file passes the schema check. Copy it as a starting point and change the values for a real game.
<?xml version="1.0" encoding="utf-8"?>
<game_config>
<game_key>examplesurvival</game_key>
<installer>steamcmd</installer>
<game_name>Example Survival</game_name>
<os>
<windows arch="x64">
<exe>ExampleSurvivalServer.exe</exe>
<cli_template>-logfile ExampleSurvival_Data/output_log.txt -batchmode -nographics -dedicated -configfile=serverconfig.xml</cli_template>
<console_log>ExampleSurvival_Data/output_log.txt</console_log>
<replace_texts>
<text key="port">
<default>property</default>
<var>ServerPort</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
<text key="home_name">
<default>property</default>
<var>ServerName</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
<text key="max_players">
<default>property</default>
<var>ServerMaxPlayerCount</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
<text key="control_password">
<default>property</default>
<var>ControlPanelPassword</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
</replace_texts>
<custom_fields>
<field key="Control Panel Enabled" type="select">
<option value="false">False</option>
<option value="true">True</option>
<default>property</default>
<default_value>false</default_value>
<var>ControlPanelEnabled</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
<desc>Enable or disable the web control panel.</desc>
</field>
<field key="Control Panel Port" type="text">
<default>property</default>
<default_value>8080</default_value>
<var>ControlPanelPort</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
<access>admin</access>
<desc>Port of the control panel web page.</desc>
</field>
<field key="Game World" type="select">
<option value="Navezgane">Navezgane</option>
<option value="RWG">RWG</option>
<default>property</default>
<default_value>Navezgane</default_value>
<var>GameWorld</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
<desc>Map the server loads. RWG creates a random world.</desc>
</field>
<field key="Game Name" type="text">
<default>property</default>
<default_value>My Game</default_value>
<var>GameName</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
<desc>Name of the save game. Changing it starts a new save.</desc>
</field>
</custom_fields>
</windows>
<linux arch="x64">
<exe>ExampleSurvivalServer.x86_64</exe>
<cli_template>-logfile output_log.txt -batchmode -nographics -dedicated -configfile=serverconfig.xml</cli_template>
<console_log>output_log.txt</console_log>
<replace_texts>
<text key="port">
<default>property</default>
<var>ServerPort</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
<text key="max_players">
<default>property</default>
<var>ServerMaxPlayerCount</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
<text key="control_password">
<default>property</default>
<var>ControlPanelPassword</var>
<filepath>serverconfig.xml</filepath>
<options>tagValueByName</options>
</text>
</replace_texts>
<post_install><![CDATA[
if [ ! -f serverconfig.xml ]; then
wget -q https://files.example.com/examplesurvival/serverconfig.xml
fi
mkdir -p Saves
]]></post_install>
<environment_variables>
export LD_LIBRARY_PATH=.
</environment_variables>
<lock_files>
ExampleSurvivalServer.x86_64
</lock_files>
</linux>
</os>
<max_user_amount>64</max_user_amount>
<mods>
<mod key="examplesurvival1">
<name>Stable</name>
<installer_name>123450</installer_name>
<installer_login>anonymous</installer_login>
</mod>
<mod key="examplesurvival2">
<name>Unstable build</name>
<installer_name>123450</installer_name>
<installer_login>anonymous</installer_login>
<betaname>latest_experimental</betaname>
</mod>
</mods>
<configuration_files>
<file description="Server Configurations">serverconfig.xml</file>
<file description="Admin Configurations">Saves/serveradmin.xml</file>
</configuration_files>
</game_config>