# AssaultCube: Command-line arguments

# Command-line arguments

When launching AssaultCube, irrespective of operating system, a small script is used. These script files can be modified with "switches" to allow different settings to occur on startup.
Note: Some of these options can be changed in-game through the menus without the need to manually edit the script file.

### Contents:

- HowTo: Editing the AssaultCube launcher
- Client switches
- Server switches

## HowTo: Editing the AssaultCube launcher

Microsoft Windows

In the AssaultCube folder, there is a file named "assaultcube.bat". Right click this and open it with "notepad" to edit the clients launcher. Also, after using the server wizard, in this folder will be "server_autoconfigured.bat". Right click this and open it with "notepad" to edit the servers launcher.

All switches are placed after the phrase: bin_win32\ac_client.exe
If you're editing the client, you'll need to add it before the phrase: %1 %2 %3 %4 %5

Remember to save once you're finished!

Linux

In the AssaultCube folder, there is a file named "assaultcube.sh". Open it with your favourite text editor, such as Gedit, Nano, etc. to edit the clients launcher.
Also, after using the server wizard, in this folder will be "server_autogenerated.sh". Open it with your favourite text editor to edit the servers launcher.

All switches for the client must be put inside the quote marks on this line: CUBE_OPTIONS="--home=${HOME}/.assaultcube --init"

All switches for the server must be placed after the phrase: ./server.sh.

Remember to save once you're finished!

| Apple Mac OS X After starting the AssaultCube launcher, under the "main" tab of the AssaultCube launcher is an "Advanced options" bar. You can type all the switches you need for the client into there. Also, under the "server" tab of the AssaultCube launcher is an "Advanced options" bar. You can type all the switches you need for the server into there.

## Client switches

These variables are specifically for the clients launcher, not the server. Switches are case-sensitive!

-wX | Sets desired screen width to X, default is -w1024.
-hY | Sets desired screen height to Y, default is -h768.
-t | Runs AssaultCube in windowed mode (fullscreen off). Using -t1 you can explicitly force fullscreen mode.
-zN | Sets the z-buffer precision to N bits. This should be at least 24 or you may experience depth problems.
-bN | Sets the screen to N bits per pixel.
-sN | Sets the stencil buffer precision to N bits. This should be 8 to enable shadowing effects, or 0 to turn it off (the default).
-aN | Sets FSAA (Full Scene AntiAliasing) to N samples (i.e. -a4 is 4xFSAA).
-vN | Enables vsync if N is greater 0.
-mM | Sets the client to update itself against masterserver M. M is the base url of the master server and has to end in a / and without a http:// prefix, the default is masterserver.cubers.net/cgi-bin/AssaultCube.pl/
--init | Executes the init script before starting the graphics and sound subsystems (recommended). By default the script config/init.cfg is used, but you can override this setting by using --init=yourfile.cfg
--mod=PATH | Adds the specified path to the list of directories that are searched when loading resources. Use this to add your own mods in a clean way without placing files into the main directory.
--home=PATH | Specifies the home directory for the user profile, AssaultCube will write custom settings and files to this directory (recommended).

## Server switches

These variables are specifically for the servers launcher, not the client. Switches are case-sensitive.

-d | This starts an AssaultCube client binary as a dedicated server. The default is a non-dedicated server with only a single client in graphical mode. See the Server Section. You don't need this parameter, if you're using the server binary.
-uN | Sets the server upstream bandwidth (per player) to N bytes per second. only set this parameter if you know what you are doing, specifying a wrong value is worse than not specifying it at all.
-nS | Sets the server description, for people pinging the server. This usually does not need to be set if you have a descriptive domain name already, but if you set it, keep it short as it may otherwise be truncated, i.e. -nBobsInstagibServer
-n1S | Sets a server description prefix.
-n2S | Sets a server description suffix.
| To enable the admin to temporarily change the server description, a server description prefix and/or suffix needs to be set. If the admin executes the command /serverdesc DESC, the server description will be changed to "prefixDESCsuffix". At the end of the game, the default server description (set by -n) is restored automatically.
-iIP | Sets the server ip to IP. This option is only useful for people running servers on machines with multiple network interfaces. Only use this switch if you really know, what you are doing.
-fPORT | Sets the server base port to PORT. An AC server always uses 2 UDP ports: PORT & PORT+1. The default ports are 28763 and 28764. You need to use different ports, if you want to run several servers on the same machine (with one IP address). For example, use -f28765 for a second server.
-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 logfile filename.
-mM | Sets the server to register itself against masterserver M. M is the base url of the master server and has to end in a / and without a http:// prefix, the default is masterserver.cubers.net/cgi-bin/AssaultCube.pl/. If you want your server to be private and not report to the masterserver, use -mlocalhost.
-pPASS | Sets the server password to PASS. Only clients that use the command "/connect IP PORT PASS" will be able to connect.
-cN | Sets the maximum number of players that can play on this server to N (default 6). If more players try to connect they will get a "server full" message.
-xM | Sets the admin password. 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".
-Xf | Sets the admin password file. The default is -Xconfig/serverpwd.cfg
-rC | Sets the maprotation file. Example: -rconfig/maprot.cfg
-Bf | Sets the blacklist file. The default is -Bconfig/serverblacklist.cfg
-oN | Sets the server's "message of the day" (MOTD).
-kN | Sets the kick threshold. If a players score drops below it, he will be kicked automatically (default: -5).
-yN | Sets the ban threshold. If a players score drops below it, he will be banned automatically (default: -6).

-PM

Sets the required role to call specific votes. The two possible player roles are 'player' and 'admin'. 'M' is a string of characters to set vote role requirements per vote type. A lower case character enables the vote call for normal players, an upper case character sets the vote call to require an admin. If a character does not appear in the string, the default setting is used.
The following votes can be adjusted:

k | kick players
b | ban players (and remove bans)
m | change mastermode (open/private)
f | force a player to the other team
a | enable/disable autoteam
s | shuffle the teams
r | record a demo of the next game
c | clear all demos on server
d | change server description
x | vote for maps, that are not present on the server
p | vote for a gamemode that is not supported by the map

For example: -PbmAX enables ban & mastermode to be voted by normal players but only admins can change autoteam or vote for nonexistent maps. The default settings are: "fGkBMasRCDxP".

-D | Enables permanent demo recording. Every game will be recorded. The recorded demos will be held in RAM. By default, up to 5 demos will be kept. The oldest demo will be deleted automatically if necessary, to allow recording of further demos. To change the default of 5 demos in RAM, you can add the number of demos to the parameter, e.g. -D5

-Wf

Sets a path (and optional filename prefix) to write all recorded demos to. The example -Wserverdemos/mydemo would save all demos to the directory 'serverdemos' and prefix the filenames with 'mydemo'. The filename will contain the (optional) prefix, the (encoded) time, game mode and map. To set a path without filename prefix, use -Wpath/. A prefix without path can be set by -Wprefix. The server owner has to take precautions that the demo files don't fill up the filesystem - especially, if permanent demo recording is also enabled (switch '-D').

-SW | Starts the server as windows service and sets the name of the windows service that should be used. Works only for the server binary is started directly from the windows service manager.
-V | Sets the server to verbose mode. This enables additional log messages to be printed, including the server configuration files (after parsing). Be careful: the logfile will contain all content from serverpwd.cfg.