All variable names (ie %ServerWD%) are case sensitive!
|%ServerWD%||Resolves to server's working directory value|
|%Root%||Replaced with the associated server's root path setting|
|%DATE%||Replaced with current date||Invalid file/path characters are replaced with '-'|
|%TIME%||Replaced with current time||Invalid file/path characters are replaced with '-'|
|%IP%||Replaced with the Query IP value for server|
|%Port%||Replaced with the server's game port value|
|%Port+##%||Replaced with the server's game port plus value after '+' symbol||If %Port% would return 27015, %Port+5% would return 27020|
|%Port-##%||Replaced with the server's game port minus value after '+' symbol||If %Port% would return 27015, %Port-10% would return 27005|
|%RconPort%||Replaced with the server's rcon port value|
|%QryPort%||Replaced with server's Query Port setting|
|%QryPort2%||Replaced with server's Query Port 2 setting|
|%ServerID%||Replaced with the server's ID #|
|%OwnerID%||Replaced with the owner's ID #|
|%SDefID%||Replaced with the server definition's ID #|
|%SDef%||Replaced with the server definition's textual name|
|%Var1% - %Var12%||Replaced with the value for custom variable||May use value (1-12) for the various variables|
|%DependsID%||Replaced with ID of the server the server depends on||Added in 1.862|
|%Depends*%||Replaced with the variable of the server the server depends on||Added in 1.862 - See 'Dependency Server Variables' section below for details|
|%SteamCMD%||Replaced with full path and executable of steamcmd; useful for update tool.||Panel/monitor will download SteamCMD the first time the variable is encountered. Added in 1.88|
|%SteamID%||Replaced with the game type's defined Steam ID value||Added in 2.30. Useful for update command line in server templates.|
|%RandomString%||Replaced with a 12 character random string||Added in 2.36. Useful to specify a random password or seed in templates or command lines.|
|%JavaHome%||Replaced with path to java||Added in 2.36. On Windows searches registry and returns path to Java install (HLKM\SOFTWARE\JavaSoft\Java Runtime Environment\Currentversion --> HKLM\software\javasoft\java runtime environment<curver>\JavaHome), you still need to specify \bin\java_executable. For Linux returns /usr/bin/java|
|%MaxPlayers%||Replaced with the Max Player monitoring value||Useful for templates and setting max player values.|
|%PID%||Replaced with the PID value for the server.||Useful for extras, etc.|
|%Utility%||Replaced with the path of the auto-installer's utility cache.||Introduced in 2.471|
Nested variables are allowed. For example you may use the variable %Root% for the server's working directory value. Any reference to %ServerWD% would then resolve to the contents of %Root%.
Dependency Server Variables
Version 1.862 now allows servers that are dependencies of other servers to use variables from the server it depends on. Use the variable %Depends * % and replace '*' with the variable you want to use. For example if you want to get the %IP% variable you'd use %DependsIP%, to get the game port you can use %DependsPort%, etc. All variables will work with this method if the server depends on another server.
With version 1.58+ you can mark all Custom Variables as public variables. This will allow these variables to be editable by the server owner from a special page accessible from the Server Management page, via a link labeled "Srvr Vars". The page will display the variable description and a text box that contains the current setting for the variable and allow the user to change the values. Sub-user and group members with the edit command line permissions will be allowed to view/edit the values as well.
When using public variables as commandline options, be sure to quote them in the command line. This will prevent users from setting additional switches via this feature. For example, let's say you want to allow users to use their own username/password for the steamcmd update system. You make custom var 5 and 6 the steamcmd username and password. The update commandline should look something like:
+login "%Var5%" "%Var6%" +force_install_dir ../csgo_ds +app_update 740 validate