Server configuration files are located in the
cfg folder, and typically end with the extension
.cfg. They are the primary way to configure Source-based game servers. All CFG files have the same functionality: they simply execute commands in the order which they are listed in the file. However, different CFG files are executed in different orders and in different circumstances.
These are plain text files containing one or more game commands, each separated by a new line, or by a semicolon (
;). A line beginning with two forward slashes (
//) denotes a comment.
You may use
exec to execute a CFG file, either from the server console or within another CFG file.
Valve.rc is executed only once: when the server first starts. This is for initial settings and commands, and generally is not modified by the server operator.
server.cfg is executed at each map load (after
server.cfg for your custom settings, and settings which need to be reset every time a map loads. By default, there are lots of comments in this file explaining what various settings do.
After a map loads, a game mode is loaded, followed by executing the game mode's CFG file.
The CFG file for a game mode should be located at
<gameplay_name> is the name of the game mode file, excluding the file extension. This is the same name you would put in the gameplay cycle, and the same name that you would get by running
ge_gameplaylist. For example, if you wanted to use custom settings for License to Kill, you would create the file
If you change a setting for a specific game mode, be sure to add the command to set it back in
server.cfg. Otherwise, the setting may persist after the map changes. For the below example, let's assume you want to enable Paintball Mode for License to Kill. In
server.cfg, you have:
ltk.cfg, you have:
In this example,
server.cfgis executed when the map loads, running
ltk.cfgthen executes when the game mode loads, running
server.cfgis executed again, running