Command line parameters

From SRB2 Wiki
(Redirected from Command line parameter)
Jump to navigation Jump to search
This article or section is outdated and has not been fully updated to reflect the current version of SRB2.

Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.

SRB2 has many command line parameters that can be used to launch the game with special settings, such as switching graphics renderers, changing networking parameters or adding files. These parameters can be added via a command line interpreter such as the Windows Command Prompt (cmd.exe), or by executing a batch file. Launcher programs for SRB2 allow the user to set some of these parameters in a graphical interface.

It is possible to load command line parameters from an external text file, called a response file, and pass them to SRB2. To do this, add @file to the list of parameters, where file is the response file in question. The contents of the file will then be appended to the list of parameters. For example, if the file windowed.txt contains the text -win -width 640 -height 480, then executing srb2win.exe -nomusic @windowed.txt is equivalent to srb2win.exe -nomusic -win -width 640 -height 480.

List of parameters

In the tables below, text to be entered exactly is in Roman type, text to be replaced with an appropriate value is in italic type, and optional parameters are enclosed in square brackets.

General settings

Parameter Description
-config filename Uses the specified configuration file instead of config.cfg.
-console Creates a separate console window that shows the SRB2 console's output and allows console commands and variables to be entered.
-detachconsole DirectDraw builds only

Detaches SRB2 from any console window it might be attached to and creates a separate console window that shows the SRB2 console's output and allows console commands and variables to be entered.

-file filename1 filename2 ... Specifies extra WAD, PK3, SOC or Lua files to be added to the game.
-home folder Specifies the game's home folder, where files such as config.cfg, gamedata.dat, savegames, logs, screenshots, the DOWNLOAD folder and Record Attack replays are stored.
-nodata Starts the game without loading game data; unlike -resetdata, the game will not overwrite the game data file.
-resetdata Starts the game without loading game data; unlike -nodata, the game can overwrite the game data file later.
-gamedata filename Sets the gamedata file to use for saving time attack records and unlocked secrets. In the case of a custom modification being added, this will override the name set in the MainCfg parameter GameData.
-skipintro Skips the intro on startup, immediately going to the title screen instead.
-ultimatemode Starts a game in Ultimate mode.
-warp mapnum Automatically warps to the specified map upon starting the game. The map can be supplied either in the integer representation (e.g., -warp 101) or in the extended map number representation (e.g., -warp MAPA1). Use of this parameter marks the game as modified, unless -server is also used.
-writetextmap Writes a TEXTMAP file of the converted UDMF map into your SRB2 folder. A warning for anything that couldn't be converted automatically will be printed in the console.


Parameter Description
-borderless SDL2 builds only

Starts up the game with a borderless window.

-height height Sets the screen height in pixels. Only certain width/height combinations are supported.
-noblit In SRB2 executables that use the SDL 1.2 library, this causes video surfaces to be created in system memory rather than video memory. In the official SRB2 executables, which use SDL2, this has no effect.
-nodraw Turns off rendering once the timedemo console command is used. This is useful for testing how fast the game can process a demo without rendering. Rendering will remain disabled after processing the demo, so in order to read the console output afterwards, you either need to check the log or use the -console parameter to create an external console.
-renderer renderer Sets the chosen renderer as SRB2's renderer, can be either Software or OpenGL. Takes priority over -software or -opengl.
-opengl Sets OpenGL as SRB2's renderer.
-software Sets Software as SRB2's renderer.
-nogl Disables loading of the OpenGL library.
-softblit SDL2 builds only

Makes SDL2 render the game with a fallback software renderer and with a 32-bit RGBA pixel format instead of a 16-bit RGB format.

-width width Sets the screen width in pixels. Only certain width/height combinations are supported.
-win Starts SRB2 in windowed mode.


Parameter Description
-nodigmusic Turns off digital music.
-nomidimusic Turns off MIDI music.
-nomusic Turns off music.
-nosound Turns off sound effects.
-noaudio Starts the game without any audio drivers, turning off music and sound effects.
-precachesound Preloads sound effects into memory.


Parameter Description
-nodinput DirectDraw builds only

Doesn't use DirectInput.

-nohidapi SDL2 builds only

Disables HIDAPI joystick drivers.

-nojoy Disables use of joysticks.
-nomouse Disables use of mouse.
-noxinput SDL2 builds only

Disables detection of XInput gamepad devices.


Parameter Description
-maxdemo size Determines the maximum size that recorded demos may have, in kilobytes. The default value is 1,024 kilobytes, or 1 megabyte.
-metal Records replay data that is used for the Metal Sonic race. By default, you will be warped to MAP01 and play as Sonic. In levels where a different character is forced (e.g., Echidnapolis Zone), that character will be used instead. To record the demo in a different map, use the -warp parameter. Overrides -record.
-playdemo demoname Plays back the specified demo.
-record demoname Records a demo, which can be played back with the playdemo/timedemo console commands. By default, you will be warped to MAP01. To record the demo in a different map, use the -warp parameter.
-timedemo demoname Plays back the specified demo at the highest possible speed and prints out information about how fast it was processed in the console afterwards. Useful for benchmarking.


Parameter Description
-dedicated Starts a dedicated server, where the host is not a player in the game and instead monitors the game from a console window.
-gametype gametype Sets the gametype when hosting a server. This parameter is in the same format as that accepted by the map command's own -gametype parameter.
-noupload Turns off downloading, so the game doesn't send files to be downloaded when acting as the server.
-password password Sets the server password, which players can use to log in as netgame administrators.
-room ID If used with the -server or -dedicated parameter, advertises the server on the Master Server. ID specifies the room in which the server is hosted: 33 is the Standard room, while 28 is the Casual room.
-server Automatically hosts a server upon starting the game.


Parameter Description
-bandwidth bytes_per_second Sets the network bandwidth for servers. SRB2 uses 30,000 bytes per second by default. The minimum value is 1,000 bytes per second.
-bindaddr external_ip_address external_ip_address2 ... Listens for incoming connections on the specified address (or addresses) only.
-bindaddr6 external_ip_address external_ip_address2 ... Listens for incoming connections on the specified IPv6 address (or addresses) only.
-connect [external_ip_address] If an external IP address is specified, SRB2 will automatically try to connect to a netgame with that IP address. If no IP address is specified, SRB2 will search for a server on the local network and connect to the first server found.
-extratic [num] Sends up to num (defaults to 1 if num is not given) extra previous tics to clients per server tic.
-noipv6 Disables listening for incoming IPv6 connections.
-nodownload Doesn't download files from servers.
-packetsize bytes_per_packet Changes the size of the UDP packets sent in netgames. The minimum value for this is 75 bytes per packet, while the maximum (and default) value is the network bandwidth (which is 1,450[confirm? – discuss] bytes by default).
-port portnum

-serverport portnum

Specifies the UDP port to use when hosting a server. This defaults to port 5029.
-clientport portnum Specifies the UDP port to use when joining a server. By default a random port number will be used.
-useuPnP Turns on Universal Plug and Play support. Warning: This feature is untested.


Parameter Description
-consisdump Prints out debug information into the console if a synch failure happens in a netgame.
-debug Displays more in-depth technical information in the console, e.g., sprites loaded, file-searching details, etc.
-debugfile [num] Outputs extra debug info to the file debugnum.txt. If num is omitted, it is calculated from the player number.


Parameter Description
-3DNow Enables 3DNow!-specific code, if not already enabled.
-486 Enables i486-specific code, if not already enabled.
-586 Enables Pentium 5-specific code, if not already enabled.
-framebuffer SDL2 builds only

Prevents SRB2 from logging any output to the command line. Useful for framebuffer-based systems where this text would interfere with the game display.

-MMX Enables MMX-specific code, if not already enabled. Note: MMX-specific rendering code will not be used if SRB2 is also launched with -noASM.
-MMXExt Enables code specific to AMD MMX extensions, if not already enabled.
-noASM Disables ASM rendering code. The non-ASM rendering code will be used instead.
-NOCPUID Prevents SRB2 from detecting the processor features supported by the current system/computer, as well as preventing SRB2 from automatically enabling code for any features found.
-noSSE Disables SSE-specific code, if SSE support is currently enabled. Overrides -SSE.
-SSE Enables SSE-specific code, if not already enabled.
-SSE2 Enables SSE2-specific code, if not already enabled.

Console commands/variables