Command line parameters

From SRB2 Wiki
(Redirected from Command line parameter)
Jump to: navigation, search

SRB2 has many command line parameters that can be used to launch the game with special settings, such as switching graphics renderers, routing or adding files. These parameters can be executed manually by use of Command Prompt (cmd.exe) for Windows, or by the execution of a batch file, e.g., opengl.bat, whose text is srb2win.exe -opengl. Some launchers designed for SRB2 may also provide an option for these parameters.

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
-compress Optimizes sidedefs. This feature is unsupported and may end up removing sidedefs that were needed by a special effect.
-config filename Uses a custom configuration file instead of config.cfg.
-console Creates a separate console window to show the SRB2 console's output and to allow console commands to be entered.
-detachconsole Creates a separate console window to show the SRB2 console's output and to allow console commands to be entered.
-file filename1 filename2 ... Specifies extra WAD, SOC or Lua files to be added to the game.
-home folder Shows where to store config.cfg, gamedata.dat, and the download folder.
-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.
-skipintro Skips the intro on startup, immediately going to the title screen instead.
-ultimatemode Starts a game in Ultimate mode.
-warp mapnum Specify a map number after this, and the game will automatically warp to that map. Either the integer representation or the MAPxx representation can be used. Use of this command modifies the game, unless -server is also present.
-timetic The time will show up in tics instead of minutes and seconds.

Video

Parameter Description
-borderless Requires srb2win.exe

Starts up the game with a borderless window.

-height height Sets the screen height in pixels. Only certain width/height combinations are supported.
-noblit Does not use hardware blit code. Currently does not function.
-nodraw When timedemo is used, this turns off rendering. Not recommended for use, as this turns off rendering for the rest of the game session afterwards.
-opengl Uses OpenGL as SRB2's renderer.
-polypoolsize size Sets the size of the polygon rendering pool for OpenGL in kilobytes. Default is 1000. This shouldn't need to be changed unless polygons are causing out of memory errors while rendering.
-softblit Requires srb2win.exe
-voodoo Turns on gr_voodoocompatibility, which limits textures and sprites in OpenGL to 256×256 pixels.
-width width Sets the screen width in pixels. Only certain width/height combinations are supported.
-win Windows-only

Starts SRB2 in windowed mode.

Sound/Music

Parameter Description
-ds3d Requires srb2win.exe

Changes the sound driver to DirectSound 3D. The file s_ds3d.dll, which is required to run this, is not included.

-fmod3d Requires srb2win.exe

Changes the sound driver to FMOD 3D system. The file s_fmod.dll, which is required to run this, is not included.

-freq frequency Requires srb2win.exe

Sets the playback frequency of sound samples, in hertz.

-nodigmusic Turns off digital music.
-nomidimusic Turns off midi music.
-nomusic Turns off music.
-nosound Starts the game without any sound drivers, turning off sound effects.
-openal Requires srb2win.exe

Changes the sound driver to OpenAL (Open Audio Library). The file s_openal.dll, which is required to run this, is not included.

-precachesound Preloads sound effects into memory.
-sounddriver drivername Requires srb2win.exe

Changes the sound driver.

-usecd Requires srb2dd.exe

Plays back music from a music CD instead of music.dta. This additionally allows the cd command to be used.

Controls

Parameter Description
-nodinput Requires srb2dd.exe

Doesn't use DirectInput.

-nojoy Disables use of joysticks.
-nomouse Mouse-Operated OSes only

Disables the mouse.

Demos/Replays

Parameter Description
-maxdemo size Determines the maximum size that recorded demos may have, in kilobytes. Default is 1024 kilobytes, or 1 megabyte.
-metal Used for recording the replay data that Metal Sonic will follow in a race. You will play as Sonic by default. In levels where a different character is forced (e.g. Echidnapolis Zone), that character will be used instead. Overrides -record.
-playdemo demoname Plays back a demo. Currently does not function (the game freezes on load); use the playdemo console command instead.
-record demoname Records a demo, that can be played with -playdemo/-timedemo in the command line, or playdemo/timedemo in the console. It is recommended that you also use -debug and -warp.
-timedemo demoname Plays back a demo as fast as possible, and afterwards, you can check the console for info like how long it took to play back the demo. Currently does not function (the game freezes on load); use the timedemo console command instead.

Server

Parameter Description
-dedicated Starts a dedicated server, where the host is not actually in the game, but can still use the console.
-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 password for the server.
-room ID Use this command to host on the master server. It sets in which room a game hosted on the Master Server will appear. 33 is the Standard Room, 28 is the Casual Room.
-server Automatically hosts a server.

Networking

Parameter Description
-bandwidth bytes_per_second Sets a bandwidth usage for servers. SRB2 uses 1,450 bytes per second by default. The limits are 1,000 bytes per second and 100,000 bytes per second, respectively.
-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 ... Same as -bindaddr, but for IPv6 addresses. Requires -ipv6 to be turned on. Warning: this feature is untested
-clientport portnum Specifies the local UDP port to use. Overrides -udpport. If you are hosting a netgame, this is useful for joining your own netgame with another instance of SRB2 on the same computer, especially if you are hosting a dedicated server – see Dedicated server > Joining your own dedicated server.
-connect [external_ip_address] Specify an IP address after this, and SRB2 will automatically connect to a netgame with that external IP. If there is no IP address, SRB2 does a broadcast check for a network game.
-extratic [num] Sends up to num (defaults to 1 if num is not given) extra previous tics to clients per server tic.
-ipv6 Listens for incoming IPv6 connections (?) Warning: this feature is untested
-nodownload Doesn't download files from servers.
-packetsize bytes_per_packet Changes the size of the UDP packets sent in netgames. The minimum limit of this is 75 bytes per packet, the maximum limit (and default) is the bandwidth used per second (which is 1,450 bytes by default) per packet – see also -bandwidth.
-udpport portnum Specifies the local UDP port to use. This is useful for hosting a netgame on a port other than the default port, 5029 – see Multiplayer > Hosting.
-useuPnP Turns on UPnP support. Warning: this feature is untested

Debugging

Parameter Description
-consisdump Prints out debug information into the console if a consistency 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.

System

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 Requires srb2win.exe

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

-gettickcount Windows-only

Uses an alternative timing mechanism.

-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