AssaultCube Documentation
NOTE: You're currently viewing a development (Git) version of AssaultCube's documentation.

To view the documentation from the current version of the game instead, click here.

Command line arguments

When you launch AssaultCube, you're able to pass what are known as "arguments" or "switches" to the launcher, which will force particular settings to occur when AssaultCube runs.

Depending on your operating system, the way to pass these arguments will differ, see the following:

Microsoft Windows
Microsoft Windows
Linux
Linux
Apple Mac OS X
Apple Mac OS X
In the AssaultCube folder is a file named "assaultcube.bat". Right click this and open it with "notepad" to edit the launcher for the client.
After running the server wizard, in this folder will be a "server_autoconfigured.bat". Right click this and open it with "notepad" to edit the launcher for the server.

All arguments need to be placed after the phrase: bin_win32\ac_client.exe
... and before the phrase: %1 %2 %3 %4 %5

Remember to save the file when you've finished!
In the AssaultCube folder is a file named "assaultcube.sh". Open it with your favourite text editor (such as: gedit, GNU nano, Vim, GNU Emacs, Kate, etc.) to edit the launcher for the client.
After running the server wizard, in this folder will be "server_autogenerated.sh". Open it with your favourite text editor to edit the launcher for the server.

For the client, all arguments must be placed within the quotes on this line: CUBE_OPTIONS="--home=${HOME} /.assaultcube --init"
For the server, just add your arguments after the phrase: ./server.sh.

Remember to save the file when you've finished!
After starting the AssaultCube launcher, under the "Main" tab of the AssaultCube launcher is an "Advanced options" bar. You can type all the arguments you need for the client into there.

For the server, under the "Server" tab of the AssaultCube launcher is an "Advanced options" bar. You can type all the arguments you need for the server into there.

Arguments for the AssaultCube client

These arguments are specifically for the clients launcher, not the server. All of the arguments are case-sensitive!
Note: Some of these options can be changed in-game through the menus, without the need to manually force these arguments.

  Argument Description
G
R
A
P
H
I
C
A
L
-wX Sets the desired screen width to X. The default is -w1024
-hY Sets the desired screen height to Y. The default is -h768
-t Forces AssaultCube to run in "window" mode (turns fullscreen off).
You can explicitly force fullscreen mode by using -t1
-zN Sets the precision of the z-buffer to N bits.
This should be at least 24 or you may experience depth problems.
-bN Sets the colour depth to N bits per pixel (example: -b16 would set the colour depth to 16-bits).
-sN Sets the stencil buffer precision to N bits.
This needs to be either 8 to enable shadowing effects, or 0 to turn it off (the default).
-aN Sets full-scene anti-aliasing to N samples (example: -a4 is 4x).
-vN Enables v-sync if N is greater than 0. If N equals -1 then system defaults will be used.
O
N

L
A
U
N
C
H
--loadmap=FILE Forces AssaultCube to load the map named FILE when launched.
--loaddemo=FILE Forces AssaultCube to playback the demo named FILE when launched.
-e"C" Executes the command C on launch (i.e. -e"echo hello"). Refer to the CubeScript command reference for a list of all possible commands.
M
O
D
D
I
N
G
--init Executes the init script before starting the graphics and sound subsystems (recommended). By default, the file ./config/init.cfg is used. This can be overriden by setting --init=yourfile.cfg
--mod=PATH Adds the specified path to the list of directories to be searched when loading resources. Use this to "MOD" the game in a clean way without having to place/replace files in the main directory.
See the custom mods page for more information.
Note: Mods need to be added into the --home directory if one is specified.
--home=PATH Specifies the AssaultCube home folder.
AssaultCube will write custom settings and files to this directory (recommended).
-mHOSTNAME/IP Sets the client to update its serverlist from the hostname or IP address of a different masterserver.
The default is -massault.cubers.net
--masterport=PORT Sets the port of the masterserver the client will use, the default is 28760.
--mastertype=TYPE Sets the method the client will use to contact the masterserver. 0 is TCP only, 1 is HTTP over TCP (default).
M
I
S
C
-T Tags a timestamp to each line of text output to the console.
-d This starts the executable file for the AssaultCube CLIENT, as an AssaultCube SERVER instead. You don't need this argument if you're using the server executable. There is no need to use this argument unless you know what you're doing.
-N Sets the number of lines in clientlog.txt file (after the lines are logged, the file is closed). Example: -N10000
--version Prints out the version number (example: 1.202) instead of running AssaultCube.
--protocol Prints out the protocol number (example: 1201) instead of running AssaultCube.

Arguments for the AssaultCube server

These arguments are specifically for the servers launcher, not the client. All of the arguments are case-sensitive!

  Argument Description
S
I
Z
E
-cN Sets the maximum number of players that can play on the server to N (default 6). The masterserver will only register servers with N set to a value less or equal 16. If extra players try to connect they will receive a "server full" error message.
N
A
M
I
N
G
-nS Sets the server description that shows in the server list. Make sure you keep it short, otherwise it'll become truncated, example: -n"Fruity: Bananas & Cherry"
-n1S Sets a prefix for the server description that remains when the server description is changed using the /serverdesc command. A prefix AND/OR suffix MUST be specified for the /serverdesc command to work.
-n2S Sets a suffix for the server description that remains when the server description is changed using the /serverdesc command. A suffix AND/OR prefix MUST be specified for the /serverdesc command to work.
-oN Sets the servers MOTD (message of the day), which appears on the client's console after they connect to the server.
I
P

&

P
O
R
T
-iIP Binds the AssaultCube server to a single IP address. This option is only of use for servers that have multiple IP addresses. Don't use this unless you know what you're doing.
-fPORT The AssaultCube server uses 2 ports (UDP), the default ports are 28763 and 28764. You need to use different ports if you want to run several servers on the same IP address. This argument allows you to bind the AssaultCube server to other ports. For example: -f9000 would run a server on ports 9000 and 9001.
P
R
I
V
A
T
I
S
I
N
G
-pPASSWD Sets the password of the server PASSWD. Only clients that know the password will be able to connect. Clients will be required to append the password to the end of the connect command.
-mHOSTNAME/IP Forces the server to register with the hostname or IP address of a different masterserver.
The default is -massault.cubers.net
If you want your server to be hidden and not report to the masterserver, use -mlocalhost
--masterport=PORT Sets the port on the masterserver to which the server will register, the default is 28760.
A
D
M
I
N
I
S
T
R
A
T
O
R
-xPASSWD Sets the administrator password to PASSWD. If you don't want your commandline to contain the password, or if you need more than one admin password, use the file "config/serverpwd.cfg".

Once logged in with the administrator password (by using /setadmin 1 YOURPASS), further administrator options are presented to you when opening the menu (however, not all, check the CubeScript command reference for other options).
-PfkbMASRCDEPw Sets whether the role required to perform a specific action belongs to a "player" or an "administrator". The characters fkbMASRCDEPw are used to set these requirements.
A lower-case character enables normal players to perform the action, whereas an upper-case character will only allow an administrator to perform the action.
If a character doesn't appear, then the defaults for that setting will be used.

  DEFAULT? Vote description
fLowerVote to force a player to the enemy team.
kLowerVote to kick a player.
bLowerVote to ban a player (and remove bans).
mUpperVote to change mastermode (open/private/match).
aUpperVote to enable/disable autoteam.
sUpperVote to shuffle the teams.
rUpperVote to record a demo of the next game (if autorecording is disabled).
cUpperVote to clear all demos on the server.
dUpperVote to change server description.
eUpperVote for co-op edit mode.
pLowerVote to pause or resume match.
tLowerSend private messages to any player.
wLower Can vote to kick for "weak" reasons. A "weak" reason is one where the server can't detect if the player being voted against is lagging, teamkilling, spamming or cheating.
xUpperCan vote to ban for "weak" reasons.

For example: -PbmA enables ban & mastermode to be voted by normal players, but only an administrator can change autoteam.
The '-P' argument can be used several times, for example: '-Pb -Pm -PA' is the same as '-PbmA'.
L
O
G
G
I
N
G
-V Verbose mode. This enables additional log messages to be printed, including the server configuration files after parsing. Using this argument twice will also enable logging of DEBUG messages. Be careful as your logs will show a part-obscured version of the serverpwd.cfg file.
-T Tags a timestamp to each line of text output to the console/log files.
-NID Sets the log identity to ID . By default, the log identity is 'IP[port]'.
On Linux systems, the log identity is used for the syslog to identify server log entries.
On Windows and Apple systems, the log identity is used to create the server log filename.
-Fn Sets the syslog facility to n. Values from 0 to 7 are allowed, to make use of the facilities "local0" through to "local7". By default, local6 is used. For further information, read the documentation of your installed syslog daemon.
-LFn Sets the level of logging to n for logging to file. On Linux systems, this argument enables ADDITIONAL logging, as Linux systems already log to syslog.
The following levels can be selected:

0DEBUGLogs all messages.
1VERBOSE Logs all messages of level VERBOSE and above
This is the same as using the -V argument.
2INFO Logs all messages of level INFO and above.
This is the default on Windows/Mac.
3WARNINGLog only messages of level WARNING and above.
4ERRORLog only messages of level ERROR.
5NONEDon't log to file. This is the default on Linux systems.
-LSn Sets the level of logging to n for logging to syslog. This argument is ignored on non-Linux systems. The following levels can be selected:

0DEBUGLogs all messages.
1VERBOSE Logs all messages of level VERBOSE and above
This is the same as using the -V argument.
2INFO Logs all messages of level INFO and above.
This is the default for Linux.
3WARNINGLog only messages of level WARNING and above.
4ERRORLog only messages of level ERROR.
5NONEDon't log to syslog. This is the default on Windows/Mac systems.
-l Disables periodic logging of the game's current status/score (enabled by default).
T
H
R
E
S
H
O
L
D
S
-kN Sets the kick threshold to N. If a players score drops below it, he will be kicked automatically. The default is -5, all negative values DO require a minus sign.
-yN Sets the ban threshold to N. If a players score drops below it, he will be banned automatically. The default is -6, all negative values DO require a minus sign.
-kAN Sets the threshold (in seconds) for the "AFK" auto-kick to N. The server won't auto-kick if:
  • The servers mastermode is PRIVATE or MATCH.
  • If there are 4 or less players.
  • If the mode isn't team-based AND the server isn't full.
The server will assume inactive players, even if chatting or in spectate mode, as AFK. If the value is set lower than 30 seconds, then AFK auto-kick is disabled. The default setting is 45 seconds.
-kBN Sets the amount of minutes a banned player will remain banned from the server to N
The default is 20 minutes.
M
A
P
S

&

M
O
D
E
S
-AN Restricts voting to administrators for a specific map OR a specific mode OR a specific mode on a specified map. To restrict a specific mode only, use a hash and append the mode number to the end of this argument. To restrict a specific map only, append the map name to this argument. To restrict a specific mode on a map, append the map name to this argument, followed by a hash and the mode number.
This argument can be used several times.

Example: -Aac_desert#13 would restrict mode 13 on ac_desert.
-Aac_shine restricts map ac_shine
-A#11 restricts mode 11 (tosok) with any map.
-Mcurd Sets whether the role required to sendmap belongs to a "player" or an "administrator". The characters curd are used to set these requirements.
A lower-case character enables normal players to do the listed sendmap action, whereas an upper-case character will only allow an administrator to do the listed sendmap action. If a character doesn't appear, then the defaults for that setting will be used.
  DEFAULT? Sendmap action description
cUpperUpload new maps to the server.
uUpperUpdate existing maps (with the same, or a newer revision).
rUpperRevert existing maps (to an older revision).
dUpperDelete a map from the server.
For example: -MCuD enables updating maps for normal players, but only admins can create or delete maps. The '-M' argument can be used several times on the commandline. For example: '-MC -Mu -MD' is equivalent to '-MCuD'.
Note: Only maps in the "incoming" folder are affected. Maps in the "official" and "servermaps" folders are treated as read only. Also note that deleting maps is disabled for BOTH players AND admins by default; to enable deletion of maps, you MUST use this argument.
-Zi Sets the size limit (in megabytes) for maps being uploaded to the "incoming" folder to i. Any map being uploaded exceeding this limit, will be rejected. The default is 10 megabytes.
D
E
M
O
S
-Dn All games DO record demos (which can't be disabled). This argument however, sets the maximum number of recorded demos to be held in the servers RAM at a time to n. As demos can become quite large (sometimes up to 2 megabytes), it may be wise not to keep this setting too high if you're low on RAM and/or are running many servers. Up to 5 demos are kept in RAM by default. The oldest demo will be deleted automatically as necessary, to allow for recording of further demos. If an invalid number is specified (example: 0), then this argument will revert to the default of 5 demos.
-DI Limit downloading of demos until the intermission (this will increase the intermission time if someone is downloading a demo).
-Wf Sets the path (and optionally, the filename prefix) to write recorded demos to from RAM. As an example: -Wserverdemos/mydemo would save all demos to the directory "serverdemos", with a prefix in the filenames of "mydemo".
Demo filenames will contain the (optional) prefix, the (encoded) time, game mode and map. To set a path without filename prefix, ensure you add a '/' to the end of this argument.
The server owner has to take precautions that demo files don't fill up the file system, as demos can become quite large (sometimes over 2 megabytes).
--demofilenameformat=s Changes the format used for saving demos (if the -W argument is used) to s. See demonameformat for options.
--demotimestampformat=s Changes the timestamp format used for saving demos (if the -W argument is used) to s. See demotimeformat for options.
--demotimelocal=s Changes whether timestamps are converted to localtime (if s is set to 1) or to use UTC (if s is set to 0 - this is the default) when saving demos (if the -W argument is used). See demotimelocal.
C
H
A
N
G
E

C
F
G

F
I
L
E
P
A
T
H
S
-Cf Reads commandline arguments from a file (no files are read by default). For example, -Cconfig/servercmdline.txt will read arguments from that file. Only one argument per line is allowed in the file. Empty lines, and any text after '//' in the file gets ignored. The file is only read once at server startup, so changing the file's content will not affect a running server; you would need to restart it.
See ./config/servercmdline.txt for additional info.
-Xf Changes the location of the administrator password file.
The default is: -Xconfig/serverpwd.cfg
-rf Changes the location of the map rotation file.
The default is: -rconfig/maprot.cfg
-Bf Changes the location of the IP blacklist file.
The default is: -Bconfig/serverblacklist.cfg
-Kf Changes the location of the nickname blacklist file.
The default is: -Kconfig/nicknameblacklist.cfg
-gf Changes the location of the forbidden words file.
The default is: -gconfig/forbidden.cfg
-If Changes the location of the "serverinfo text" filename prefix. The server automatically adds "_en.txt" as a suffix to complete the filename.
The default is: -Iconfig/serverinfo
-Of Changes the location of the MOTD (message of the day) filename prefix. The server automatically adds "_en.txt" as a suffix to complete the filename.
The default is: -Oconfig/motd
The MOTD will only be read from a file if the -o argument hasn't been specified.
M
I
S
C
-SWr Starts the server as Microsoft Windows service and sets the name of the Windows service that should be used to r. This will only work if the server is started directly from the Windows Service Manager.
-uN Sets the up-stream bandwidth (per player) to N bytes per second. Only set this argument if you know what you're doing, as specifying a incorrect value is worse than not specifying it.
© Copyright, Rabid Viper Productions
We would be grateful for any donations considered towards AssaultCube
Sponsored links