Command line parameters
A command line parameter is simply a keyword and, if needs be, associated value typed after the executable's name on the command line. They should not be confused with console commands! A command line parameter is entered before the game is even launched; whereas console commands are entered during the game in the console.
A typical command line looks like:
zdoom -skill 4 -warp 24
“-skill 4” and “-warp 24” are two of the command line parameters ZDoom supports. There are several others, described below:
- Forces all video modes to use pixel doubling, resulting in the final video mode being two times larger than specified.
- Forces all video modes to use pixel quadrupling, resulting in the final video mode being four times larger than specified.
- -bits numbits
- Specifies the display depth. Currently, only 8 is supported (for the software renderer).
- -width x
- -height y
- Specifies the desired resolution of the screen. If only one of -width or -height is specified, ZDoom will try to guess the other one based on a standard aspect ratio. If the specified resolution is not supported by your SDL/DirectDraw drivers, ZDoom will try various resolutions until it either finds one that works, or it will finally give up. To determine which resolutions ZDoom can use, use the vid_describemodes command from the console once you have started the game.
- Causes ZDoom to ignore all the BLOCKMAP information a map provides and generate it instead. This is equivalent to +set genblockmap 1.
- Causes ZDoom to look for savegames and zdoom.cfg in a directory called C:\ZDOOMDAT. Screenshots will also be saved in this directory.
- -config configfile
- Causes ZDoom to use an alternative configuration file. If configfile does not exist, it will be created.
- -iwad iwadfile[.wad]
- The IWAD file specified after this parameter will be used as the game IWAD file.
- ZDoom will look for the IWAD in the current directory, in the same directory as zdoom.exe, in the directory set in the DOOMWADDIR environment variable, and in the directory set in the HOME environment variable. (Verification needed)
- Disables CD audio. Since only the Windows version supports CD audio, other versions ignore this option. (Verification needed)
- -noidle (Windows only)
- When the user presses Alt-Tab to switch from ZDoom to another window, ZDoom will normally reduce its priority class so that it does not slow the rest of the system down. By specifying this parameter, ZDoom will try to run at full speed even when it is not the active window.
- -nojoy (Windows only)
- Disables joystick support. If you have an old-fashioned gameport (non-USB) device attached, it can slow down the game even if you do not intend to use it. Use -nojoy to avoid the slowdown that comes from polling it for input. Only the Windows version supports a joystick.
- Prevents the playback of music.
- Prevents the playback of sound effects.
- Disables both music and sound effects.
- Disables the startup screens used by Heretic, Hexen and Strife, and use the Doom text-mode startup instead.
- Disables sprite renaming. Unless you are playing a mod for Heretic, Hexen or Strife that replaced a few select sprites, you do not need this.
- -savedir path
- Specifies an alternate directory to use for saved files. If this is not specified, ZDoom stores them in the directory indicated by the save_dir CVAR.
- Stands for “Austin Virtual Gaming”. Automatically advances to the next level after 20 minutes. This is equivalent to +set timelimit 20 or -timer 20.
- Sets the dmflags CVAR to make the monsters as fast as in Nightmare mode even if you are not playing Nightmare.
- Sets the dmflags CVAR so that monsters are not spawned on levels.
- Sets the dmflags CVAR so that monsters respawn even if you are not playing at Nightmare difficulty.
- -timer x
- Causes ZDoom to automatically advance to the next level after x minutes. This is equivalent to +set timelimit x.
- -turbo x
- Causes player movement to be x% as fast as normal. Valid values are 10–255, with 100 being normal. Values larger than 100 are considered cheating. This is equivalent to +set turbo x.
- -deh dehfile[.deh]
- Causes ZDoom to apply a DeHackEd or .bex patch to the game. This must be a text patch; binary patches are not supported. (As far as I know, most patches are text patches, so this should not be too much of a problem.) Also, only patch format 6 is known to be supported. Other formats may or may not work properly. If the .deh extension is omitted, ZDoom will automatically add it.
- -bex bexfile[.bex]
- This is the same as -deh, except the default file extension is .bex.
- -file file1[.wad] file2[.wad] file3[.wad] ...
- Used to load one or more PWAD files which generally contain user-created levels. Files listed further right take precedence to files listed before them, so as an example, if both file1.wad and file2.wad contain have a MAP01, the MAP01 in file2.wad will be used instead of the one in file1.wad. If the .wad extension is omitted, ZDoom will automatically add it.
- Using this parameter is no longer needed, zdoom file1.wad file2.wad file3.wad will work just as well as zdoom -file file1.wad file2.wad file3.wad.
- Prevents files from being autoloaded based on the “AutoLoad” sections in the user's configuration file. This flag also disables autoloading of zvox.wad and the skins directory. This can be useful if you use files which are autoloaded when playing normally, but want to load without them for debugging purposes or to play a mod which might be incompatible with them.
- -loadgame saveXX.[zds]
- Automatically loads the specified savegame. To find out a save's file name, press F1 while it is highlighted in the save or load menu. If you do not include the .zds extension, ZDoom will automatically add it for you.
- -playdemo demofile[.lmp]
- ZDoom will automatically play the specified demo when it starts. If the .lmp extension is omitted, it will automatically be added.
- -record demofile[.lmp]
- Records a demo. The -warp parameter or +map command should also be used if you do not want to record the demo on MAP01 or E1M1. You may only record from the start of a map. Loading a savegame and recording from there is unsupported.
- To stop the demo recording, use the “stop” console command. If the .lmp extension is omitted, it will automatically be added. Unlike vanilla Doom, only one person in a multiplayer game needs to specify the -record parameter if they want to record a demo. However, if someone quits before the person recording the demo does, the person recording will automatically quit, too, because demos do not have a way to record when a player leaves the game.
- +playerclass class
- Only relevant when playing a game with several available player classes. Without mods, this applies to Hexen only. For example:
- +playerclass Fighter
- +playerclass Cleric
- +playerclass Mage
- +playerclass Random
- -skill x
- Sets the initial skill level. This is overridden if you start a new game from the New Game menu.
- Note that this is different from the skill CVAR, which ranges from 0-4.
- -timedemo demofile[.lmp]
- Plays back a demo faster than -playdemo and displays a framerate when the demo is over. If the .lmp extension is omitted, it will automatically be added.
- -warp m
- -warp e m
- For Doom II, Final Doom, Hexen and Strife, starts the game on map m. For Chex Quest, Doom and Heretic, starts the game on episode e, map m. The +map command can also be used to perform this action, but it expects the actual name of the map (e.g. MAP01, E1M1).
- Forces a screen wipe to happen after loading a map immediately at startup. Useless unless used in conjunction with -warp or +map.
- -xlat file
- Specify a different default map translator to use if one isn't specified in MAPINFO. The default translators are xlat/doom.txt for Doom, Chex Quest, Urban Brawl and Harmony; xlat/heretic.txt for Heretic and Hexen (though Hexen maps normally need no translator since only Doom-format maps are translated) and xlat/strife.txt for Strife. For playing an Eternity Engine mod, the xlat/eternity.txt file can be used, though keep in mind that many Eternity features are not implemented in ZDoom and will not work even after translation. You can specify your own custom translator.
While not a true command line parameter, the set console command can be called from the command line by prefixing it with '+'. For example, +set developer 1 will print a bunch of debugging messages to the console. Other useful CVARs that can be set in this way for debugging purposes include debuganimated, dumpspawnedthings, showloadtimes and script_debug.
- Resets the window position to the top-left corner of the screen.
- Causes ZDoom to write network debugging information to a file called debugN.txt where N is your player number.
- Prints a message telling you that you “useless mode is activated”. With the original Doom, using -devparm was the only way to take screenshots. With ZDoom, screenshot is just another command, so -devparm serves no real purpose.
- (development version only)
- Produces a file fileinfo.txt which contains hash strings for every loaded lump. This is useful for the purposes of synchronization diagnostics.
- Causes ZDoom not to update the display on the screen, but it still draws everything to an internal buffer. Only useful with -timedemo.
- Causes ZDoom not to draw anything at all. Only useful with -timedemo.
- Quits the game just before video initialization. To be used to check for errors in scripts without actually running the game.
- (Win32 only)
- Sends all output to a system console. Unix and MacOS builds of ZDoom will always do that.
- Informs ZDoom that you will be playing a deathmatch game and sets the dmflags CVAR so that items other than invulnerability and invisibilty respawn after being picked up. Only player 1 needs to specify this.
- Informs ZDoom that you will be playing a deathmatch game and sets the dmflags CVAR so that weapons stay behind when a player picks them up. Only player 1 needs to specify this.
- -dup x
- Causes ZDoom to transmit fewer player movement commands across the network. Valid values range from 1–9. For example, -dup 2 would cause ZDoom to send half as many movements as normal.
- Causes ZDoom to send a backup copy of every movement command across the network.
- -host x
- This machine will function as a host for a multiplayer game with x players (including this machine). It will wait for other machines to connect using the -join parameter and then start the game when everyone is connected.
- -join host's IP address[:host's port]
- Connect to a host for a multiplayer game.
- -net console-number hosts ...
- Informs ZDoom that you will be playing a network game. Using the -host/-join parameters instead is strongly recommended because they are much easier to use.
- -netmode 0 or 1
- Changes the network mode the game uses (Peer-to-Peer or Packet Server). More information on each mode can be found on the Multiplayer page.
- -port x
- Specifies an alternate IP port for this machine to use during a network game. By default, port 5029 is used.
In addition to the above parameters, console commands can be included on the command line by preceding them with a '+'. If you wish to change a CVAR in this manner, it is a good idea to use the set command. This is because any set commands will be executed just after the config file is loaded, and all other commands are executed after every game subsystem has been initialized. For example, to turn on developer messages when you start ZDoom, use the command line:
zdoom +set developer 1
zdoom +developer 1
If you use the second line, you will miss out on all the developer messages that get generated during the startup process.
Remember, if you are not comfortable with the frequent use of the command line, you may enter these commands into any text editor, then save the document with a .bat extension for future use.