Command Line Parameters

From SRB2 Wiki
(Redirected from Command Line)
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. The parameters can be executed by either using the SRB2 Launcher's command line, by use of the Windows Command Prompt, or by the execution of a batch file, e.g., opengl.bat, whose text is srb2win.exe -opengl.

In the table 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.

Parameter Description

-bandwidth bytes_per_second

Sets a bandwidth usage for servers. SRB2 uses 20,000 bytes per second by default. The limits are 1,000 bytes per second and 100,000 bytes per second, respectively.

-bindaddr external_ip_address

Listens for incoming connections on the specified address only.

-clientport portnum

Specifies the local UDP port to use. Overrides -udpport. Useful for running multiple instances simultaneously.

-config filename

Uses a custom configuration file instead of config.cfg.

-compress

Optimizes sidedefs. This feature is unsupported and may end up removing sidedefs that were needed by a special effect.

-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.

-consisdump

Prints out debug information into the console if a consistency failure happens in a netgame.

-console

Creates a separate console window to show the SRB2 console's output and to allow console commands to be entered.

-coopsound

Lowers the sound priority of SRB2, thus allowing to play along with other sound-playing applications running simultaneously.

-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.

-dedicated

Starts a dedicated server, where the host is not actually in the game, but can still use the console.

-ds3d

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

-extratic num

Sends up to num (default 1) extra previous tics to clients per server tic.

-file filename1 filename2 ...

Specifies extra WAD and SOC files to be added to the game.

-fmod3d

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

-framebuffer

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

-freq frequency

Sets the playback frequency of sound samples, in hertz.

-gametype gametype

Sets the gametype when hosting a server. The gametype parameter is in the same format as that accepted by the MAP command.

-gettickcount

Uses an alternative timing mechanism.

-height height

Sets the screen height in pixels. Only certain width/height combinations are supported.

-home folder

Shows where to store the config.cfg, gamedata.dat, and DOWNLOAD folder.

-internetserver

Advertises a server on the Master Server.

-ipx

Uses IPX networking instead of UDP/IP.

-maxdemo size

Determines the maximum size that recorded demos may have, in kilobytes. Default is 1024 kilobytes, or 1 megabyte.

-noblit

Does not use hardware blit code.

-nodigmusic

Turns off digital music.

-nodinput

Doesn't use DirectInput.

-nodownload

Doesn't download files from servers.

-nodownloading

Doesn't send files to be downloaded when acting as the server.

-nodraw

Instead of DirectDraw, uses GDI system.

-noendtxt

Does not print out ENDOOM lump to the text console window.

-noerror

Suppresses an error message if a script file cannot be executed.

-nofiles

Doesn't download files from servers and quits when being forced to.

-nojoy

Disables joystick.

-nomidimusic

Turns off midi music.

-nomouse

Disables the mouse.

-nomusic

Turns off music.

-nosound

Starts the game without any sound drivers.

-nosound

Turns off sound effects.

-openal

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

-opengl

Uses OpenGL as SRB2's renderer.

-packetsize bytes_per_packet

Changes the size of the UDP packets sent in netgames.

-password password

Sets the password for the server.

-playdemo demoname

Plays back a demo.

-precachesound

Preloads sound effects into memory.

-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.

-resetdata

Doesn't load the gamedata file. SRB2 can still write to the gamedata however, and it is overwritten upon unlocking anything.

-room ID

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 starts a server.

-silent

Surpresses the return message if a script file is successfully executed or a configuration file is saved.

-sounddriver drivername

Changes the sound driver.

-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.

-timetic

The time will show up in tics instead of minutes and seconds.

-udpport portnum

Specifies the local UDP port to use.

-ultimatemode

Starts a game on Ultimate Mode.

-usecd

Plays back music from a music CD instead of music.dta.

-voodoo

Turns on gr_voodoocompatibility, which limits flats and textures to 256×256 pixels.

-warp mapnum

Specify a map number after this, and the game will automatically warp to that map. Use the integer representation. Also, this will not work if the game isn't modified or it's a netgame. If you want to play in Single Player and warp to a map, modify the game, for example by adding "-file srb2.srb".

-width width

Sets the screen width in pixels. Only certain width/height combinations are supported.

-win

Starts SRB2 in windowed mode.

-winmidi devicenumber

Overrides the choice of device for MIDI output.
Personal tools