Command line parameters - SRB2 Wiki (2024)

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.

Contents

  • 1 List of parameters
    • 1.1 General settings
    • 1.2 Video
    • 1.3 Sound/Music
    • 1.4 Controls
    • 1.5 Demos/Replays
    • 1.6 Server
    • 1.7 Networking
    • 1.8 Debugging
    • 1.9 System
  • 2 Console commands/variables

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

ParameterDescription
-config filenameUses the specified configuration file instead of config.cfg.
-consoleCreates a separate console window that shows the SRB2 console's output and allows console commands and variables to be entered.
-detachconsoleDirectDraw 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 folderSpecifies 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.
-nodataStarts the game without loading game data; unlike -resetdata, the game will not overwrite the game data file.
-resetdataStarts the game without loading game data; unlike -nodata, the game can overwrite the game data file later.
-gamedata filenameSets 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.
-skipintroSkips the intro on startup, immediately going to the title screen instead.
-ultimatemodeStarts a game in Ultimate mode.
-warp mapnumAutomatically 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.
-writetextmapWrites 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.

Video

ParameterDescription
-borderlessSDL2 builds only

Starts up the game with a borderless window.

-height heightSets the screen height in pixels. Only certain width/height combinations are supported.
-noblitIn 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.
-nodrawTurns 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 rendererSets the chosen renderer as SRB2's renderer, can be either Software or OpenGL. Takes priority over -software or -opengl.
-openglSets OpenGL as SRB2's renderer.
-softwareSets Software as SRB2's renderer.
-noglDisables loading of the OpenGL library.
-softblitSDL2 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 widthSets the screen width in pixels. Only certain width/height combinations are supported.
-winStarts SRB2 in windowed mode.

Sound/Music

ParameterDescription
-nodigmusicTurns off digital music.
-nomidimusicTurns off MIDI music.
-nomusicTurns off music.
-nosoundTurns off sound effects.
-noaudioStarts the game without any audio drivers, turning off music and sound effects.
-precachesoundPreloads sound effects into memory.

Controls

ParameterDescription
-nodinputDirectDraw builds only

Doesn't use DirectInput.

-nohidapiSDL2 builds only

Disables HIDAPI joystick drivers.

-nojoyDisables use of joysticks.
-nomouseDisables use of mouse.
-noxinputSDL2 builds only

Disables detection of XInput gamepad devices.

Demos/Replays

ParameterDescription
-maxdemo sizeDetermines the maximum size that recorded demos may have, in kilobytes. The default value is 1,024 kilobytes, or 1 megabyte.
-metalRecords 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 demonamePlays back the specified demo.
-record demonameRecords 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 demonamePlays 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.

Server

ParameterDescription
-dedicatedStarts a dedicated server, where the host is not a player in the game and instead monitors the game from a console window.
-gametype gametypeSets the gametype when hosting a server. This parameter is in the same format as that accepted by the map command's own -gametype parameter.
-nouploadTurns off downloading, so the game doesn't send files to be downloaded when acting as the server.
-password passwordSets the server password, which players can use to log in as netgame administrators.
-room IDIf 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.
-serverAutomatically hosts a server upon starting the game.

Networking

ParameterDescription
-bandwidth bytes_per_secondSets 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.
-noipv6Disables listening for incoming IPv6 connections.
-nodownloadDoesn't download files from servers.
-packetsize bytes_per_packetChanges 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 portnumSpecifies the UDP port to use when joining a server. By default a random port number will be used.
-useuPnPTurns on Universal Plug and Play support. Warning: This feature is untested.

Debugging

ParameterDescription
-consisdumpPrints out debug information into the console if a synch failure happens in a netgame.
-debugDisplays 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.
-noforkAllows GDB to be attached more easily by disabling the signal handler process

System

ParameterDescription
-3DNowEnables 3DNow!-specific code, if not already enabled.
-486Enables i486-specific code, if not already enabled.
-586Enables Pentium 5-specific code, if not already enabled.
-framebufferSDL2 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.

-MMXEnables MMX-specific code, if not already enabled. Note: MMX-specific rendering code will not be used if SRB2 is also launched with -noASM.
-MMXExtEnables code specific to AMD MMX extensions, if not already enabled.
-noASMDisables ASM rendering code. The non-ASM rendering code will be used instead.
-NOCPUIDPrevents 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.
-noSSEDisables SSE-specific code, if SSE support is currently enabled. Overrides -SSE.
-SSEEnables SSE-specific code, if not already enabled.
-SSE2Enables SSE2-specific code, if not already enabled.

Console commands/variables

Main article: Console > Command line

Retrieved from ""

Command line parameters - SRB2 Wiki (2024)

References

Top Articles
Latest Posts
Article information

Author: Fr. Dewey Fisher

Last Updated:

Views: 6447

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Fr. Dewey Fisher

Birthday: 1993-03-26

Address: 917 Hyun Views, Rogahnmouth, KY 91013-8827

Phone: +5938540192553

Job: Administration Developer

Hobby: Embroidery, Horseback riding, Juggling, Urban exploration, Skiing, Cycling, Handball

Introduction: My name is Fr. Dewey Fisher, I am a powerful, open, faithful, combative, spotless, faithful, fair person who loves writing and wants to share my knowledge and understanding with you.