# Doom Legacy 1.48 User Reference Manual

1. Introduction
2. Install
3. Setup
4. Basic gameplay
5. Console
6. Network games
7. Commandline options
8. Notes

## INTRODUCTION

Hello all Doom fans of the world, welcome to the latest release of Doom Legacy!

Since Doom was out we have been fans of deathmatching. Some of us are fans of coop play. And, single play is popular too. Don't ask us why, but we liked Doom more than Duke Nukem, Quake or other clones. We simply enjoy the atmosphere, look and feel of Doom.

We always dreamed of Doom sources being released. How many days we spent talking about the features we'd put in it! In the middle of 1997 we heard a rumour that the Doom sources would be released. Some months later the miracle happened: In December 1997, id Software made the full source code of Doom public. A great number of open source projects have started around the sources since, and Doom Legacy is competing to be the best of the choices!

Doom Legacy can play Doom, Boom, Marine's Best Friend (MBF), and Heretic maps. In addition to the original games by id Software and Raven Software, there are hundreds of free, fan-made maps available on the Internet. These maps are typically distributed as PWAD files, which are not fully self-contained. For each game you will also need the corresponding IWAD data file, which contains all the graphics, wall and floor textures, sounds, and music for that game. For example, if you want to play Doom II maps, you'll need the IWAD file doom2.wad, or one of the free replacements.

Doom Legacy itself is free software, meaning that you can copy and distribute it without charge. The original Doom and Heretic IWAD files (doom.wad from Doom, doomu.wad from Ultimate Doom, doom2.wad from Doom2, tnt.wad or plutonia.wad from Final Doom, heretic.wad from Heretic) are still copyrighted products and available commercially.

There are also some free replacement IWADs which can be used instead. FreeDoom (doom2.wad or freedoom.wad) is a free substitute for Doom2. I recommend freedoom-0.8 rather than the later versions, which are a different style. Blasphemer (heretic.wad) is a free substitute for Heretic, but it does not have monsters yet (it needs volunteers to work on it!). The Legacy engine will recognize and play Chexquest (chex.wad), Chexquest2, and Chexquest-Newmaps (newmaps.wad), but not Chexquest3.

Legacy has implemented the fundamental and de-facto-standard Boom extensions, and the Marine's Best Friend (MBF) extensions. Legacy also has implemented among other things 3D floors, swimmable water and other special effects using extended linedef codes, and supports the FraggleScript scripting language.

To get started with Legacy, we recommend trying some of the following PWADs. These are a few selected examples that demonstrate some of the features that Doom Legacy provides. There are many more in the repositories, such as at Doomworld.

- Demonstrations of new editing features: Legacy_3ddemo.wad and rainbowstar.wad
- Wads that use Legacy 3D floors: 3DHorror.wad, phobia.wad, hth2.wad, Compound.wad, GRAIL2.WAD, nocturnus.wad, spone2.wad
- Wads that use the Legacy features to implement different capabilities: Twilight.wad (with Twilight.DEH), bspeek.wad (Blake Stone), nimrod.wad, NEWBOXE.WAD (boxing match)
- Wads (and DEH files) that alter the players, sounds, and attributes, to be something very different: Delirium.deh (patch file) or Delirim.wad, skinbots/Skins.wad (skins), 99PLAYER.WAD (skins)
- Deathmatch wads: andydm1.wad, toxdm1.wad, MRPD3D.wad, MRQ3DM17.wad, sleeper.wad, shbullet.wad
- Chexquest sequel: Chexquest-newmaps.wad

We hope that this new release brings you a lot of enjoyment. Have fun!!

-The Doom Legacy Team

### What's new

See here for the latest changes.

### What's coming

We have planned other features. See our website.

## INSTALL

Installing Doom Legacy depends upon the operating system and the user preferences:

DoomLegacy needs to be installed in its own directory, and not your HOME directory. DoomLegacy has protections against using your HOME directory, such as refusing to search it for support files. Support files in your HOME directory will be inaccessible.

A full explanation of the source packages install is in the INSTALL manual.

### Preferences

Select one of install methods. This will determine where the binary, wads, and docs are installed. In some cases a directory may be specified.

#### System Share Install

Install to a System executable directory, like "/usr/local/bin" or "/Program Files". The docs and wads are installed to a user share directory, like "/usr/local/share/games/doomlegacy" or "c:/games". The owner of the files will be privileged.

#### Games Share Install

Install the binary in the games directory, but wads and docs in a system share directory, for use by all system users. The default games directory is games/doomlegacy and the default share directory . The owner of the files will be privileged. A directory may be specified.

#### Games Install

Install in the games directory, for use by all system users. All components will be installed into the same games directory, which by default is "/usr/local/games/doomlegacy" or "c:/games/doomlegacy". The owner of the files will be privileged. A specific directory may be specified.

#### User Install

Install for the use of the immediate user, owned by the immediate user. The install directory must be within the user directory space. The User may specify a directory.

### Linux

The installation can be system-wide or just for the user. Some wad files can also be installed system-wide. These can be put into one of the system wad directories. The user can also keep private wad directories. All will be searched, see the search directory list in the INSTALL manual.

Doom Legacy will use the HOME environment variable, which is usually set by your Linux login, to find your user home directory. It will make a hidden directory named .doomlegacy there for storing your configuration files and saved games.

If HOME is not set, Doom Legacy will fall back on an old behavior, and look for legacyhome in the current directory. If necessary, it will create legacyhome in the program directory. It will then use legacyhome as the legacy directory.

Use the -home and -config switches:
$ doomlegacy -home ~/doomstuff -game plutonia $ doomlegacy -home ~/doom -config ~/doom/plutconfig.cfg -game plutonia

PWAD and DeHackEd files can be included using the -file switch.

Examples:
$ doomlegacy -game tnt $ doomlegacy -game plutonia -file wads/pl2/PL2.WAD $ doomlegacy -iwad freedoom.wad -file new_map13.wad $ doomlegacy -file wads/Twilight/TWILIGHT.DEH wads/Twilight/TWILIGHT.WAD

Script files can also be used to start Doom Legacy:

#!/bin/sh cd /usr/local/games/legacy/ USER="Shotgun-wizard" DOOMWADDIR=wads doomlegacy -iwad doom2.wad -file DM8.WAD

### Windows

The installation can be system style, a games directory, or within the user home directory. Support files, like wads, legacy.wad, autoexec.cfg, and config.cfg, need to be found by Doom Legacy.

The installation should put all files in known directories, which makes it easy to start Doom Legacy without needing to change to the program directory. The known directories are listed in the INSTALL manual.

If there is difficulty, it will be due to Doom Legacy not finding your HOME directory, not finding where legacy.wad is stored, or not finding the IWAD. Ensure there is a consistent HOME directory, so it uses the same config file each time you play. Put the needed files in known directories, and check that that the HOME or UserProfile environment variable is set to your home directory. When started with the "-v" switch, Doom Legacy will print to stderr.txt where it finds directories and the search list.

A legacy directory will be created in your user home directory for savegames and saved config files. Set the environment variable "HOME" in a batch file, or use the -home switch when starting Doom Legacy. In Windows, "UserProfile" will be checked as an alternative to HOME.

Failing to find a user home directory, it will fall back on an old behavior of using "legacyhome" for the legacy home directory. If necessary, it will create "legacyhome" in the program directory.

Use the -home and -config switches:
> doomlegacy -home c:\games\doomsave -game plutonia > doomlegacy -home c:\games\doomsave -config c:\games\plutconfig.cfg -game plutonia

Use the verbose switch -v, and Doom Legacy will print to stderr the directory names that it used. On Win98 this becomes a file named stderr. The use of directory names with spaces may fail.

It is difficult to start a program under windows and set command line switches. Most of the settings that the launcher supported can now be set from menus and the console. However the -game, -file, and -config must be set from command line switches.

Doomlegacy will invoke a Launcher window when it is started without switches. It will also invoke the Launcher window when the game selection results or iwad selection are invalid. The Launcher window provides input of the game switches, iwad, config, home, and doomwad directories.

Another way to start Doom Legacy is to create shortcuts. These can be executed using a mouse. Specify in the shortcut the command line, and change the starting directory to where the doomlegacy program resides.

Example shortcut for Doom Legacy with plutonia2 wad: Shortcut: dl_plut2 command: doomlegacy -game plutonia -file c:\games\pl2\PL2.WAD current directory: c:\games\legacydir

Creating a batch file with the necessary commands is also an easy way to record a combination of switches. Run the batch file to start doomlegacy with the particular game and PWAD. In the following batch file examples, legacydir, homedir, configdir, and waddir stand for directories that you specify.

DOOM2.BAT cd c:\legacydir\ doomlegacy -game doom2 DM8.BAT cd c:\legacydir\ doomlegacy -iwad waddir\doom2.wad -home c:\homedir\ -config c:\homedir\config8.cfg DM2MOD.BAT SET HOME=c:\games\home SET DOOMWADDIR=c:\games\wads cd c:\games\legacydir doomlegacy -game doom2 -file levl9.wad mod2.deh mod8.bex

### Windows with launcher

Newer Launchers can be used with Doom Legacy, as most command line switches are somewhat standard. Most of the settings that a launcher supports can now also be set from the console also, or using an autoexec file.

The old Legacy Launcher is not supported, and I am trying to bury it; it is dead. The source code is lost and we cannot fix it.

The old launcher can misplace the doom settings file (doomargs.tmp), putting it into the directory where the IWAD is found. It then specifies a doomargs file to Legacy without using the directory name. Legacy will start without seeing the file, or will use a stale file.

The best solution is to never specify a directory name on the IWAD file when using the old launcher. Let Legacy search the known directories for the IWAD file. If necessary, you can put in the Legacy executable directory a soft link to the directory where you keep the IWAD files. Legacy will search through it.

The launcher has some problems with setting home and config directories. You will likely have to include "-config mydir\config.cfg", and/or "-home homedir" in options.

- Unpack the archive to a suitable program directory, like C:\games\doomlegacy
- Start the Launcher
- Fill in required information about WAD locations and hardware options
- Give the IWAD filename without a directory, and let Legacy search for it.
- Launch the game!

### Environment variables

The following environment variables alter Doom Legacy behavior. None of them are required.

- DOOMWADDIR: This environment variable defines a path where wad files are located. This way you can easily share your wad files between different programs.
- USER: This variable contains your username, is used as the default value for your player name in multiplayer games.
- HOME: This variable indicates your home directory. In the home directory Doom Legacy will create a legacy directory to store your config and savegame files. If this variable is not defined, a default legacy home directory will be checked for existing, or one created in the program directory. Failure to have a consistent HOME will lead to losing your config, and savegames will not be saved.
- UserProfile: This variable is checked on Windows systems as a substitute for HOME, if HOME is not defined.

## SETUP

### Wad files

Doom Legacy will look in all directories of the search directory list. See the search directory list in the INSTALL manual.

Some wad files can be put into one of the absolute path wad directories, making them available to all users and all doom programs. like "/doomwads", or "/games/doomwads".

The IWAD files should go in a separate directory that can be shared between all Doom source ports (such as /usr/local/share/games/doomwads).

The user can also keep private wad directories relative to HOME. Put your personal wad files into one of the relative path directories, like "doomwads", or "games/doomwads".

Setting DOOMWADDIR environment variable specifies an additional wad directory to be searched. This can be set at login, or in a script file that starts Doom Legacy.

Doom Legacy will also search the installation directory, but it is not a recommended location for wad files. The wad files would not be shared, leading to duplicate copies. Installing and deleting wad files from the installation directory will damage the installation eventually, such as overwriting or deleting a required file by mistake. The legacy.wad file should be in the installation directory because it is only used by Doom Legacy.

You can also make soft links to one of the above mentioned directories, or point to the actual IWAD files. The valid file names for each game selection can be found in docs/technical/wad_selection.txt.

$ ln -s wads/idgames/doom1.wad doom1.wad $ ln -s wads/idgames/doom2.wad doom2.wad $ ln -s wads/idgames/doomu.wad doomu.wad $ ln -s wads/idgames/plutonia.wad plutonia.wad $ ln -s wads/idgames/tnt.wad tnt.wad $ ln -s wads/freedoom-iwad-0.7/doom2.wad freedoom.wad $ ln -s wads/freedoom-iwad-0.9/freedoom2.wad freedoom2.wad

Doom Legacy will search the current directory only if it is not the user home directory. It will refuse to search a default directory containing a "Desktop", "Pictures", or "Music" directory. This prevents long searches through directories that are not likely to contain wad files.

### Setting up the game

Legacy uses a configuration file (config.cfg) to setup the game. Your personal control settings are saved in your config.cfg file. They can be changed by menus in Legacy, and are saved when quitting the game.

When config.cfg does not exist, Legacy will write one using a default config.

Each drawmode has an optional config file for drawmode dependent settings. These are typically the video mode, gamma settings, fullscreen, and vert sync settings. Any other config file setting can also be included. The settings from the drawmode config file override the settings from the main config file.

Drawmode config files, where two letters indicate the drawmode that loads it:

- config8p.cfg (8 bit pal)
- config15.cfg (15 bit)
- config16.cfg (16 bit)
- config24.cfg (24 bit)
- config32.cfg (32 bit)
- configbp.cfg (explicit bpp)
- confign.cfg (native)
- configgl.cfg (OpenGL)
- configmg.cfg (MiniGL)
- configwg.cfg (Windows Glide)
- configwd.cfg (Windows D3D)

Use the option menu controls to insert and delete config file settings. First change to the drawmode that you want to modify. The drawmode config file will be loaded automatically. Change to the options menu page, press F3, move to the item to be inserted, and press INSERT. Press F1 to return to normal menu operation.

Config setting keys:

- F1 = normal menu
- F2 = Main config values only
- F3 = Drawmode config values only
- F4 = normal menu
- INSERT = add the menu item to the config file
- DEL = delete the menu item from the config file

Menu entries that are not relevant to the drawmode config, like the control key assignments, do not have support for insert to the drawmode config file.

OpenGL had a separate file, 'glconfig.cfg', which is no longer used. It can be kept around if you ever run older versions of Doom Legacy. The new OpenGL config file is configgl.cfg, but it will only contain drawmode specific settings.

Develop mode (-devgame or -devparm), will use devdataconfig.cfg as its config file.

### Setting up the sound

The binary downloads of Doom Legacy use SDL sound. The other options require downloading source code and compiling with your own selection of compile options.

- SDL

  In the SDL version of Legacy the SDL library handles sound. If it is installed correctly then Legacy will have sound effects.

  The latest SDL version is 1.2.15, and it fixes some earlier Win32 issues.

  Music requires SDL_mixer version 1.2.7 or later. Earlier SDL_mixer versions do not have a working RWOPS interface. Legacy can play music using files instead, but this requires recompiling Legacy, allowing the compile to detect the SDL_mixer version.

  SDL_mixer is a separate download and installation, and the latest is version 1.2.12.

- WINDOWS

  The Windows SDL version uses SDL for the sound.

  The Windows native version normally uses DirectX to autodetect the sound, so make sure your card works well with DirectX and then legacy will use it.

  Additionally, Legacy could utilize hardware 3D sound drivers for making a more realistic sound environment. This requires that the specified compile option be selected, and such options are only valid for compiling the Windows native version. Because these driver options were developed before WinXP, they may have to be debugged for newer Windows OS.

  Specify -ds3d command line parameter to use generic 3D sound driver (DirectSound 3D). This driver is suitable for most 3D sound chips.

  FMOD is an alternative sound library. To use FMOD, Legacy must be compiled with the FMOD library and FMOD configuration selected. FMOD support was incompletely developed, so compilation has not been sucessfull. FMOD compilation is disabled by default.

- DOS

  DOS support is still present, but it has been years since it has been tested. A more modern operating system provides better support.

  The sound and music card is auto-detected at the game startup.

  If you don't get any sound in Legacy, check that the BLASTER variable is set. Type 'set' at the dos prompt (or dosbox under Windows) : do you see a line like 'BLASTER=A220 I5 D1 ...' ? If not, run the installation of your soundcard for DOS mode, it will usually modify your autoexec.bat so that the BLASTER variable will be set. See the FAQ.TXT for more.

  If the BLASTER variable is set, but you still don't hear any sounds, or the sounds are not right, then edit the SOUND.CFG file, and manually set your type of soundcard, see there for more.

### Setting up the controls

Setting up the controls, mouse and joystick, video mode etc. is done while in the game, using the main game menus: Setup Controls, Video Options, Game Options. You can change all game settings at any time during the game.

The mouse will be activated by default, to disable it, change the 'use_mouse' variable in the console. The joystick will not be used as default, set the 'use_joystick' variable at the console.

The mouse and joystick sensitivities can be set using the console variables, and there is some menu support.

There are double click control variables for mouse and joystick, that adjust the double click detection time. A normal double click time is about 6.

If your button assignments have made it impossible to access the menu. and you do not have a keyboard, you have a problem. You won't be able to change those menu assignments either. In this case you must find the config.cfg file in your legacy directory, and edit it. You can delete any offending "setcontrol" lines (must delete the entire line), and let Doom Legacy revert to default settings.

- Mouse : 2 per machine
- Mouse Buttons : 8 per mouse
- Mouse Wheel : 1 per mouse (UP, DOWN)
- Joysticks : 4 per machine
- Joystick Buttons : 16 per joystick
- Joystick Triggers : 2 per joystick/controller
- Joystick Hat : 1 per joystick/controller (UP, RIGHT, DOWN, LEFT)

### Controller

Support for an xbox-style gamepad has been added. It appears to be a joystick with many buttons, triggers, and a hat. Button assignments have been made for menuesc, pause, and automap, so it is possible to play without a keyboard.

- Pause: Joystick 0, Button 6, Controller BACK button.
- MenuEsc: Joystick 0, Button 7, Controller START button.
- Automap: Joystick 0, Button 8.
- During the wait for players, when it asks for 's' to start, it will also accept joystick button 2,3,4, or 5, as start.
- All joystick buttons have double-click sensing.
- Accidentally activating double-click button in the menus happens, and that setting ignores normal button presses. Delete that button assignment and start over.

### Setup Controls menu

You can bind actions to one or two keys, like in all decent games. Select an action, press ENTER, and then press the desired key, mouse button, or joystick button. To CLEAR the keys attached to a control, use the BACKSPACE key.

mouse b1 | First mouse, button 1.
mouse2 b3 | Second mouse, usually for second player. Button 3.
mouse2 b3 d | Second mouse. Button 3 double click.
joy0 b0 | First joystick, button 0.
joy3 b15 | There can be 4 joysticks, buttons 0 to 15.
joy0 hu | The 4 hat directions, 'hu', 'hd', 'hl', 'hr'.
joy0 lt | 'lt', 'rt' are left and right trigger.

To setup the DOUBLE CLICK for mouse/joystick buttons: enter the click one time, so that it displays, e.g. 'mouse b1'. Then re-enter the click a second time, and it will transform into a dbl-click, e.g. 'mouse b1' will become 'mouse b1 d'. You can use double-clicks for any joystick/mouse button, and you can attach any action to it.

When controlperkey is "Several", a single key can be set to multiple actions, e.g. go backward and 'use' at the same time. Normally when a key is set for an action, other uses of the same key are cleared.

### Gamma controls

The control of gamma is much finer than before. The gamma table is now generated from the control settings, instead of using four preset gamma tables.

The gamma control functions:

- Gamma: Only has a gamma slider
- Gamma_black: Gamma control and black level control.
- Gamma_bright_black: Gamma control, bright control, and black level control.
- Linear: Has bright and black level controls, as two set-points of piecewise linear brightness correction. It is included for use with LCD displays.

Controls for gamma function, black level, bright level, and gamma are on an options page. The values can also be changed by a console set command, or in your personal config.cfg file.

gammafunc Gamma_bright_black black -2 gamma 2 bright -1

To see the current setting on the console, just type the name, without a value. Normal levels are black 0, gamma 0.

To set the gamma correction to your preference, find a dark area in a wad or use the gamma.wad file (i.e. -file gamma.wad). Set the black level to give a good looking even gray scale in the darkest areas (little gray room in gamma.wad). White textures will not go completely to black, but will instead stay gray. The software renderer is limited to 32 light levels, so do not try to get it perfect in the darkest three gray test strips as it is not possible. Instead try to get the gray intervals even. You should be able to just barely see an object right in front of you in the darkest room, and see white textures across the room as a dark gray patch.

Then go to a normally lit area and adjust gamma to give the brightness and evenness of tone that you would expect.

Use the bright control to adjust the brightest outdoor scenes after the gamma and black levels are set. Unlike most monitors, this bright control actually controls the brightest light levels.

Your preferences may be different. From experiments, trying too hard to set a perfect black leads to extreme gamma settings to correct for the side effects. It is a compromise, as actual hardware varies, and the gamma table equations represent ideal CRT behavior. LCD monitor gamma response is even less ideal.

Evenness is usually more important than absolute brightness. The brightness appearance is affected greatly by the amount of light over your monitor. If the wall textures look harsh, then the gamma is set too high, or the black level is set too low.

Original Doom gamma settings are at (0, -3, -6, -9, -12). gamma index : GAMMA value 12: 1.48 11: 1.44 10: 1.4 9: 1.36 8: 1.32 7: 1.28 6: 1.24 5: 1.2 4: 1.16 3: 1.12 2: 1.08 1: 1.04 0: 1.0 -1: 0.96 -2: 0.92 -3: 0.88 -4: 0.836 -5: 0.793 -6: 0.75 -7: 0.706 -8: 0.663 -9: 0.62 -10: 0.58 -11: 0.54 -12: 0.50

## BASIC GAMEPLAY

### Shooting up and down

There's nothing changed, except of course a totally new deathmatch experience.

About the BFG: the BFG ball can be fired up or down, but the invisible rays that spray from you have always 'autoaim', they're not dependent of your up and down aim. Let's be clear: apart from being able to shoot the BIG BFG BALL up or down, the side-effect of the BFG is as before.

### Autoaim toggle

The original Doom games had autoaim, which allowed them to use the mouse for player movement (forwards and back). Side to side motion turned the player. This left the user without any way to move the view up and down, so autoaim would aim the shots at monsters that were above or below the aiming point.

DoomLegacy has mouselook, which uses the mouse to look left, right, up, and down. Shots go where the player is looking. If you have the crosshairs enabled, then it shows where shots are going. With mouselook, autoaim is not needed, so autoaim can be disabled.

Since Legacy v1.2, there are controls for what is allowed in a network game. We wanted to keep the compatibility with the traditional Doom gameplay, but we also needed to go forward with improvements with controls, which brings more depth to the deathmatches.

In network play, you may feel like it's unbalanced if some people use the autoaim, as they don't have to make the effort of aiming properly, and others manually aim, and thus may miss above or below the opposing player. Turning allowautoaim to OFF will impose manual aim to all players in a network game. Use with caution as you may offend!!

### Weapon changes

We didn't dare of course change the existing weapons functionality! You may appreciate however, the fact that you can remap every weapon to any key, in the Setup Controls menu. Since you can map two keys per 'control', you can keep the original keys '1'-'8' for the weapons, and add a shortcut to your preferred ones. eg: '5' and 'r' for rockets.

### New cheats

idcd##
  Similar to the 'idcmus##', but for CD Audio tracks. Example: 'idcd02' starts cd track 2.
idfly
  Fly around levels, using the jump key to gain altitude.

### Savegame directories

Legacy allows savegame directories, with up to 99 savegames in each directory. This feature can be enabled/disabled by a compile time option.

The savegame file names include the level name and play time. The savegames also have a human-readable header with this and more information, including the command line switches used.

The cursor movement keys are up-arrow, down-arrow, page-up, and page-down.
The delete key will delete the selected savegame or directory.

The savegame menus now include a directory name. The directory is selected by moving the cursor up to the directory name, and pressing ENTER. The menu will present all the existing directory names. The blank directory line is the legacy default directory which contains all the directories and savegames.

To create a new directory, move to the directory line, press ENTER, type in a new directory name, and press ENTER.

### OpenGL renderer

Legacy includes two different graphics engines, the old Doom software renderer (with many improvements) and an OpenGL-based hardware renderer.

The OpenGL renderer is shinier and has fancier effects than the software one, but it does not do everything that the software renderer does. The OpenGL renderer does draw explosion light, and other light effects that the software renderer does not do.

The coronas that previously were OpenGL only, are now available with software rendering too. The native drawmode can also look very nice, and often renders much faster than OpenGL in large maps.

Some wads rely upon violating wad rules to get trick effects. Most rely upon tricking the software renderer into not drawing something. Using those wads with the OpenGL renderer you will see holes in the floor and ceiling, and warning messges about polygons.

OpenGL relies upon having video card hardware acceleration. This requires that your video card drivers support OpenGL operations. Without OpenGL hardware acceleration, SDL will emulate the OpenGL operations using software run on your CPU, which is very very slow. How well a video card works with OpenGL is dependent upon the drivers. The SDL library interfaces with the video card drivers. Updating your SDL library may improve the drawing, and fix broken features.

Video cards have different levels of hardware acceleration, and rendering speed. Activate only as many fancy rendering options as your video card can draw fast. Turning off Trilinear and Bilinear filtering usually will gain speed.

## CONSOLE

See here for more about the console.

## NETWORK GAMES (MULTIPLAYER)

Since Legacy 1.2, the network part of Doom has been totally rewritten. It now uses a better transfer method for the packets, (which is usually faster), and also implements a basic Client/Server model, where some critical game options are changeable only by the server in multiplayer games.

Since the network communication is faster, we have upped the maximum number of players to 32!

### Client/server model features

The network code has been totally rewritten, here are the main features:

- Players can join in while a game is in progress. No need to restart the game to add a new player.
- Up to 32 players in a game.
- The speed now depends on the server. If the server loses frames, all the other players will experience the slow down. Thus, make sure that the server has a good internet connection and runs smooth. You may want to run the server with a lower resolution graphics mode, to reduce its load.
- The server can kick any player out of the game. The player will be returned to the title screen.
- Consistency failure now only kicks out the player who was not consistent with the server. The other players are not affected.
- Critical game variables are sent to all the players when they are changed on the server, and only the server can change them. Examples are 'allowjump', 'respawnitemtime', 'deathmatch', ...
- The multiplayer menu allows bots to be in a game. In Network play, they seem to work in Coop, but not in deathmatch. Bots are a work-in-progress. The bots are a substitute for real players. Insert your own joke here, but wait until you have tried playing COOP with them.

### Setting up a network game

A network game can be started either using the commandline parameters -server and -connect, or from the multiplayer menu that allows you to connect to a server or create one yourself.

The Legacy server uses only one port (usually the UDP port 5029) and can accept messages from any port so it works perfectly with NAT (Network Address Translation).

A firewall often interferes with connecting. Most of the IP ports of a computer behind a firewall are not visible to the network. You may have to use the firewall controls to make the DoomLegacy server and client ports visible on the networks. If you are playing network games with machines external to your network, then you will need to make your IP address, and Doom Legacy ports, visible to the external network. There may be multiple firewalls involved, such as one on your desktop, one on the wifi-router, and one in the broadband router. In some cases, the server might get an un-usable IP address during player join-game. If you are familiar with the IpAutoforward funtionality of Linux, you can make a usable IP appear.

The server port can be specified using a command line switch "-udpport 5102". You must avoid any existing port your ISP may be using for services. Multiple Doom Legacy servers can coexist on the same network, playing separate games, as long as they use different server port numbers. If the server uses a different server port, then all clients that want to connect to that server, must also specify the same server port address (using -udpport). All the connect commands assume that the server and client have specified the same server port.

The UDP ports, user reserved, start at 5000. For Doom Legacy, I recommend using a server port number greater than 5029, such as 5100 .. 5199, to avoid conflicts with other programs.

#### The server

Start a server from the Multiplayer menu or from the command line. One player can play on the server itself.

#### Server command line switches

Doom Legacy can start as a server from the command line with one of the following commands. Other switches can also be included to select the game and wad.

$ doomlegacy -server <num-of-players>

The server will wait until the specified number of players have connected and then will start the game. This is like the old way to start a game. It is more fair because all players start at the same time and with the same weapons. Of course other clients can also join later.

$ doomlegacy -server

This starts the server immediately. It does not wait for any other clients. It also starts the game immediately. Other players can join later.

#### Clients

Clients are the other players who join the game by connecting to the server. Each additional player connects to the server with one of the connect commands. If there is more than one server, the client must choose which server before connecting.

The client can specify a client port address, such as "-clientport 7303". Clients can use any port number that is unused on their IP address. If that port is in use then Doom Legacy will try ports in the 7000 to 7099 range, until it finds an unused one. This allows multiple clients on the same computer, assuming it has enough speed, controls, and displays. Players on separate computers can use the same client port addresses, as they will have different IP addresses. In most cases the default client port works fine.

The server does not use the client port number setup. The server will get the IP address and client port number for each player from the client connect message.

To detect servers on the local network, the local network search address must be specified in one of the server config vars, server1, server2, or server3. These can be set using the console. Your computer might have an IP address such as "192.168.1.14". For a network would be "192.168.1". The network broadcast address is the network address with last number as 255. Doom Legacy servers on the network will answer the broadcast.

>server2 "192.168.1.255"

Servers can be specified by any of the config vars, server1, server2, or server3. The address is checked for a running server.

>server1 "10.42.22.63"

#### Client command line switches

Doom Legacy can connect to the server from the command line with one of the following connect commands.

To connect to a specific server computer using their ip address.

$ doomlegacy -connect <ip address of server>

Without the ip address, it will auto-detect the server on the LAN. This only works when computers are directly connected on a LAN where the client can broadcast an ASKINFO message to the server port. If you play through internet, only the servers on a local internet can be auto-detected.

$ doomlegacy -connect
Example A, 3 players on a LAN: player 1 (the server) $ doomlegacy -server 3 player 2 (client) $ doomlegacy -connect player 3 (client) $ doomlegacy -connect Example B, 2 players, through internet: player 1 (the server) $ doomlegacy -server 2 player 2 (client) $ doomlegacy -connect xxx.xxx.xxx.xxx Example C, a 3 player game, with _TWO_ computers, one is split-screen: player 1 (the server) $ doomlegacy -server 3 player 2 and 3 (2 clients on the same computer) $ doomlegacy -splitscreen -connect

The server will send the clients all relevant game parameters, they do not need to be specified on the commandline (and in fact would be overridden). Also the -file parameter is not needed on the clients anymore. The clients will automatically download any necessary PWAD files from the server if they cannot be found locally.

Use '-notime' to disable file date check on clients. Normally the game will warn you if a client has a file loaded by the server, but with a different date. Clients should have the exact same version of the files added by the server.

To make a network game enjoyable you will need a good ping value, ideally less than 30, more than this may be unplayable because there is not, for the moment, code to reduce the latency between command entered at keyboard and command execution. In other words, Doom Legacy doesn't use interpolation to make the game smooth when it is not in reality.

#### Consistency

The Doom Legacy server performs a consistency check on the player positions. If it detects a consistency failure, it will kick out the player.

Doom Legacy 1.46.2 introduced consistency repair. The server now keeps a consistency error count for each node. Upon detecting a consistency error with a node, the server will try a series of escalating repair attempts before it kicks the node out of the game.

- Server sends a repair message with the player current position, momentum, the random number index, and the current tick. This is usually adequate to repair a minor anomoly, or math difference.
- At 3 consistency errors, the server repair message suggests a savegame. The client requests a savegame download from the server, and then a position update. The client screen will briefly go black duing the download. Because the game does not pause during this, the player may find they have been mobbed and even killed.
- When the consistency errors exceed 7, the server kicks the player node.
- The server reduces the consistency error count when there are no errors.

Due to new network messages, and messages that changed codes, Doom Legacy 1.47.2 is network incompatible with previous versions of DoomLegacy.

### Multiplayer intermission screen

- FRAGS: the usual frags rankings
- BUCHHOLZ: a chess scoring system. You earn more points when you frag a good player (one that has a lot of frags at the end of the game). This is more balanced that the original frags system, because you can't get a good score simply by slaughtering clueless newbies.

  It defines F[i][j] as the number of times player i has fragged player j.
  The total frags of player i are given by
  T[i] = sum( F[i][j], where j = 0..num_players).
  The Buchholz score of player i is:
  sum( F[i][j] * T[j], where j = 0..num_players).

- INDIVIDUAL: the players are all compared 1 to 1, when a player wins he earns 3 points, if they draw they each get 1 point. Then all the points are added and the winner is the one with the most points. This was suggested by Cristian Romero (romero-c@usa.net). It is not perfect, but is already interesting enough: think of it more 'individual'. You have to make more frags compared to each other player to earn points. So you will want to go after players that are close to you in their number of frags, and forget about the ones which have already have more frags than you. Go for the victories, more than the frags.
- DEATHS: this ranking shows the players who have died the most!

## LAUNCHER

The Launcher window is invoked when there is an error with the game selection, the iwad specified cannot be loaded, there is a fatal error in the startup, or if the command line is empty.

If there is an error, the console window will display first with the errors. Pressing escape will proceed to the Launcher window.

The Launcher window has input lines like a menu. Use the up and down arrow to move between items. Type in names for the directories, or use backspace to erase names. On the switches line the entire switch syntax must be input, on the others only the name is input. The left and right arrows will cycle through the game selections. When you are satisfied, the continue entry will restart Doom Legacy with your new command line input submitted. The QUIT entry will exit Doom Legacy entirely.

- HOME: Set your home directory location, where your config files and savegames are kept. This will be submitted by the launcher using the "-home" switch.
  Example: "myhome", which will be submitted as "-home myhome".
- DOOMWADDIR: A directory to search for legacy.wad, IWAD, and PWAD files.
- CONFIG: The main config file to use. This will be submitted by the launcher using the "-config" switch.
  Example: "myconfig", which will be submitted as "-config myconfig".
- SWITCH: Any of the switches allowed on the command line, specified in the same format. This line will be simply copied to the command line by the launcher.
  Example: "-opengl -nomusic -file map01.wad -deh fix2.deh".
- IWAD: A specific IWAD specified in place of the game IWAD. This will be submitted by the launcher using the "-iwad" switch.
  Example: "myiwad", which will be submitted as "-iwad myiwad".
- GAME: The possible games, selected using the left and right arrow keys. This will be submitted by the launcher using the "-game" switch.
  Example: "doom2", which will be submitted as "-game doom2".
- CONTINUE: Restart Doom Legacy with the new command line switches and selections.
- QUIT: Quit Doom Legacy entirely.

## COMMANDLINE OPTIONS

Here are the command-line options Legacy recognizes:

option | description
--- | ---
Config options
+<console expression> | You can enter any number of console expressions at the command line. They will be executed right after the configfile, but before autoexec.cfg.
-home <dirname> | Set your home directory location, where your configfiles and savegames are kept.
-config <filename> | Set the main config file to use. Default: config.cfg.
-mb <number> | The amount (in MiB) of memory that Legacy allocates for ZALLOC. Otherwise the default of 24 to 80 MiB is used. This and the MIN and MAX limits are set by compile time options. This sets the number of megabytes of memory to allocate to ZALLOC at Doom startup. ZALLOC is used for saving the directories, textures, and other lumps of the wad files. Executable and stack use other memory. If the amount of requested memory is not available, then it will try for half of what is free. There are several compile time options for ZALLOC memory allocation, the updated Zone allocation, automatic growing Zone allocation, and simple and tagged malloc allocations. The default memory allocator, GROW_ZONE, will grow the memory allocation when needed. It is no longer critical to set enough memory on the command line, although it may make loading smoother. Using this switch on the SWITCH line of the Doom Legacy Launcher is ineffective because the memory system has already started by then. However, Doom Legacy is compiled by default with the GROW_ZONE memory system, that automatically increases the memory allocation as needed, so it is not needed. If you were to compile Doom Legacy with the old ZONE_ZALLOC memory system selected, then this switch would be necessary to control it.
-noversioncheck | Do not check that legacy.wad version matches the executable version. This is mostly used for program development.
-cdrom | Execute from CDROM. Overrides DOOMWADDIR, and the legacy home directory settings.
-lang <name> | Load the BEX language file name. If the name is not specified, then the file "lang" will be tried. The language file uses BEX to change some game text. An example french.bex is available.
Game options
-game <game-name> | Forces a particular game mode to be used. This replaces renaming the wad file. If an IWAD is not explicitly given, the appropriate IWAD will be automatically loaded. Savegames are now marked with the game name, and will not load with a different game name. The particulars about a particular game-name are in docs/technical/wad_selection.txt. The valid game-name at this time, and the file names accepted are:
game-name | mode | file name
--- | --- | ---
doom1 | Doom shareware | doom1.wad, doom.wad
doom | Doom1 | doom.wad
doomu | Ultimate Doom | doomu.wad, doom_se.wad, doom.wad
doom2 | Doom2 | doom2.wad
plutonia | Doom2 | plutonia.wad
tnt | Doom2 | tnt.wad
freedu | Ultimate Doom | freedoom1.wad, freedu.wad, doomu.wad
freedoom | Doom2 | freedoom2.wad, freedoom.wad, doom2.wad
freedm | Doom2 | freedm.wad, doom.wad
heretic1 | Heretic shareware | heretic1.wad, heretic.wad
heretic | Heretic | heretic.wad
blasphem | Heretic | BLASPHEM.WAD, blasphem.wad, heretic.wad
chex1 | Chexquest | chex1.wad, chex.wad
doommode | Doom1 | doom1.wad, doom.wad
ultimode | Ultimate Doom | doomu.wad, doom.wad
heremode | Heretic | heretic.wad
The following are valid game-names, but the mode is not supported yet.
hexen1 | Hexen shareware | hexen1.wad, hexen.wad
hexen | Hexen | hexen.wad
hexemode | Hexen | hexen.wad
strife | Strife | strife.wad
strife0 | Strife shareware | strife0.wad, strife.wad
-iwad <filename> | Set the main IWAD file to use. This also determines the game mode when -game is not used.
-file <filename1> [<filename2>...] | Load one or more additional PWAD or DeHackEd files, possibly replacing some of the IWAD data. Zip archives can be loaded (Linux Only, with ZIPWAD compile option). When a zip archive is loaded, all the wad, deh, and bex files within the archive are loaded.
-deh <filename1> [<filename2>...] | Load one or more DEH (DeHackEd) files or BEX files, which can change monster abilities and game text. Also accepts -dehacked.
-noloadfail | Doom Legacy will now fail with an error message when a file fails to load, like many other ports. This will start the Launcher. The -noloadfail switch will cause it to ignore the load failure, as in previous versions of Doom Legacy.
-loadgame <num> | Load savegame by number. This can only access the main savegame directory. Other command line options must set up the correct game and files.
-skill <1-5> | Select the skill level, start game immediately.
-episode <number> | Select the episode, start game immediately.
-warp <number> [<number>] | Select the map, start game immediately. In DoomII, -warp 13 will goto map13. In Ultimate Doom, -warp 1 3 will goto Episode 1, level 3.
-nomonsters | No monsters in the game started from the command line. Does not affect games started from the menus.
-respawn | Respawn monsters when they are killed, in the game started from the command line. Does not affect games started from the menus.
-coopmonsters | Monsters cooperate in the game started from the command line. Does not affect games started from the menus. Monsters do not damage each other. Conflict with monster infight.
-infight | Monsters fight each other in the game started from the command line. Does not affect games started from the menus. Monsters will retaliate and damage each other. Conflict with coopmonsters.
-fast | Monsters move faster and shoot quicker in the game started by Warp or Episode. Does not affect games started from the menus.
-predicting | Monsters aim at moving players better in the game started by Warp or Episode. Does not affect games started from the menus.
-turbo <10-255> | Altered player speed in percent (slower or faster). Add or decrease difficulty, or compensate for system controls.
-noresetplayers | Do not reset players, same as the transition to the next map. This keeps the existing player stats.
Video options
-width <xxx> -height <yyy> | If you like pain, you can set the screen size at the command line instead of using the 'Video Mode' menu. Legacy will switch to 320x200 if it can't find a corresponding mode.
-highcolor | Request a 15 bpp or 16 bpp video mode. If that fails, it will try 8 bpp modes.
-truecolor | Request a 24 bpp or 32 bpp video mode. If that fails, it will try 8 bpp modes.
-native | Request use of a native bpp video mode, based on what video mode is being used when the program starts. If that fails, it will try 8 bpp modes. On most modern systems, native is 24 or 32 bpp. This can now be selected using the options menu drawmode.
-bpp <number> | Select video mode bpp (8,15,16,24,32) explicitly. If that fails, the program will exit.
-win | Only allow windows video modes, ignoring DirectDraw video modes. For WIN32 port.
-opengl | Hardware accelerated rendering using the OpenGL library. Will use hardware acceleration for OpenGL if available. If the video card does not have OpenGL hardware acceleration then it will use the OpenGL emulation in software, which is very slow. OpenGL is the most actively supported hardware acceleration. For SDL, Linux-X11-XSHM, MACOS, and WIN32 ports. MiniGL is a subset library of the OpenGL standard for WIN32 and will use the minigl.dll instead. Requires compiling with the OpenGL library and configuration. Default: use the software renderer. This can now be selected using the options menu drawmode.
-minigl | Hardware accelerated rendering using the MiniGL library. MiniGL is a library of the OpenGL standard for WIN32 and will use the minigl.dll instead. For WIN32 port. Requires compiling with the MiniGL library and configuration.
-3dfx -glide | Hardware accelerated rendering using the Glide library for the Voodoo card. For Linux-X11-XSHM, Linux-X11-GGI, and WIN32 ports. Requires compiling with the Glide library and configuration. Voodoo card support is now a compile-time option.
-winvoodoo | OpenGL parameter for voodoo card on Linux-X11-XSHM. If MESA_GLX_FX is not set as an environment variable, it selects window video modes with "MESA_GLX_FX=window", (default is fullscreen). It also prevents grabbing the mouse. For Linux-X11-XSHM port. Requires compiling with the XSHM library, MESA library, and configuration. Voodoo card support is now a compile-time option.
-d3d | Hardware accelerated rendering using Direct3d library for Windows. Requires compiling with the Direct3d library and configuration. For WIN32 port.
-left | Start a drone client that displays the left view of three screens.
-right | Start a drone client that displays the right view of three screens.
-screendeg <angle> | Start a drone client that displays with an angle offset. Useful for setting up left and right screens. The angle is in degees, but cannot be negative (command line limitation). For left angles input the value of (360-num) instead, such as 270 for -90 degrees, 315 for -45 degrees, 340 for -20 degrees. Limited to range 270 to 0 to 90 degrees.
-polypoolsize <num> | Specify the size of the polygon pool for hardware rendering, in KiB. The default is 1000 KiB. Requires compilation without the ZPLANALLOC compile option. The ZPLANALLOC option allocates such poly without using a pool, and is the default in the compilation.
-display <name> | Specify the X11 display to use for the game, by name. The default is the current display device. For Linux-X11-XSHM port.
-noendtext | Suppress the game EndText screen, which could disrupt some terminal emulations because of the special character attributes used. Much of this problem has been eliminated by interpreting those attributes for each port. For SDL, MACOS, and Linux-X11 ports.
Sound and music options
-nosound | Disable all sound effects (including music). The sound effects volume config var also affects sound.
-nomusic | Disable music. The music volume config var also affects music.
-nocd | Disable CD music.
-precachesound | Preload sound effects. Also enabled by the precachesound config var.
-freq | To set the frequency used by the DirectSound sound buffer. The default is 22050 Hz. For WIN32 port.
-coopsound | To set DirectSound to be cooperative with other windows applications. For WIN32 port.
-ds3d | Use the DirectSound 3D generic sound driver. This driver is suitable for most 3D sound chips. For WIN32 port. Requires compiling with the HW3SOUND compile option.
-sounddriver <driver> | Specify an external hardware sound driver (dll). For WIN32 port. Requires compiling with the HW3SOUND compile option.
-winmidi <num> | Specify an external midi hardware port device ID. How to discover the device IDs is unknown. The default is -1. For WIN32 port.
Input Controller options
-nomouse | Do not use the mouse and skip mouse detection. For Linux-X11-XSHM, and WIN32 port.
-nojoy | Do not use the joysticks and skip joystick detection. For DOS, and WIN32 port.
-nodinput | Get mouse movement from window events instead of DirectInput polling interface. For WIN32 port.
-gettickcount | Do not use the high precision timer, to avoid a win2k timer bug. For WIN32 port.
Networking
-server | Spawn a server. Allows a player on the server.
-dedicated | Spawn a dedicated server, without player. A dedicated server only has console commands for setting up the network and games, not those for the player settings.
-connect [<IP> | <address>] | Connect to a server at the specified address. If no address is given, search for servers in LAN.
-ipx | Use IPX network protocol instead of IP. Must be compiled with USE_IPX compile option enabled.
-udpport | Specify the server port to use on the IP network, or IPX network. This allows multiple servers to be on the same machine. Clients need to specify the same server port. The default should be 5029.
-clientport | Specify the port that the client uses on the IP network, or IPX network. The default is to use the udpport. Specifying a clientport allows running the server and client using different ports, and to have more than one client on a machine. The server does not need this, as the client address and client port is gotten from the connect message for each player.
-net | Specify network play in DOS port version. For DOS port.
-doomatic | Specify doomatic network play in DOS port version. Introduced in version 1.29, it appears to have more advanced network communications than the vanilla network play. For DOS port. Requires doomatic network software.
-nodownload | Do not download any files from servers.
-nofiles | Do not check for having any files, download all from servers.
-extratic <num> | Send extra copies of player movement over the network, to prevent retransmission. Normally 1.
-bandwidth <num> | Set the usable bandwidth of the network, in bytes per second (1000 to 100000). The default is 3000.
-packetsize <num> | Set the usable packetsize for transmissions over the network, in bytes (75 to the hardware limit). The default is the hardware max packetlength.
-debugfile <num> | Writes network debugging information to a file named debug1.txt, where the 1 is the specified num. If the num is not specified, the default is the player number. Will try higher num until it succeeds in opening a file. Must be compiled with the DEBUGFILE compile option enabled.
Multiplayer options
-deathmatch -altdeath | Play deathmatch where multiple players fight each other to score kills. Normal deathmatch has weapons and a few special items respawn, but altdeath has all items and weapons respawn. Without -deathmatch or -altdeath, the game will start cooperative where the players cooperate to fight the monsters. This can also be selected and customized from the menus, with more choices.
-teamplay -teamskin | A variation of -deathmatch that activates team play where teams are identified by color (-teamplay) or skin (-teamskin). The color is applied to the player armor using color translation. A skin is an alternative player sprite, like an orc or mercenary. The skins must be provided in one or more PWAD.
-timer <num> | Timelimit in minutes.
-avg | Austin Virtual Gaming, 20 min. rounds.
-splitscreen | Two players on this screen. One player is the top half and the other is the lower half of the screen. The controls are selected for each player from the keyboard, one or two mice, and multiple joysticks. This may be used alone or with network play.
Demo options
-playdemo <file> | Play the demo from the specified file.
-record <file> | Record a demo to the specified file.
-maxdemo <size> | Set the -record demo buffer to the specified size (in KiB). The default is 20. Use with -record.
Development options
-devparm | Development/debugging mode. Prints out some extra information mainly useful for developers, does not grab the mouse.
-devgame <game-name> | Development mode using devparm for the specified game, in the same format as -game. User can include development files from working directories using -file.
-wart <number> [<number>] | Development modification of warp. Load the selected map from the devmaps directory, and warp to it. In DoomII mode, -wart 13 will load devmaps/cdata/map13. In Ultimate Doom mode -wart 3 1 will load devmaps/E3M1.
-timedemo <file> | Play the demo from the specified file while timing it.
-nodraw | Timedemo option, to get execution time without drawing. Caution: there is no visible display so you must exit the game from memory of the commands (ESC, Q, RETURN, Y).
-noblit | TimeDemo option, to get execution time without blit. Currently, none of the draw ports honor this test.
+connect +map | Options on -server. The actual usages of these have been lost. The "+connect" option will enable some server code, but is not same as -connect. The "+map" option will issue a map command to change to the start map. Example: -server+connect+map
Information
--help | Help menu giving help sections.
-h <section> | Display one of the Help sections:
section | content
--- | ---
g | Help on game and wads
m | Help on multiplayer
c | Help on config
s | Help on server
d | Help on demo
D | Help on Devmode
-v | Verbose. Print more information about warnings, wad errors, and the progression of startup and shutdown.
-v2 | Very verbose. Print detailed information about the video system, modes available and how the mode selection is handled.

## NOTES

### DeHackEd patches

Doom Legacy supports dehacked patches directly, without having to patch the executable. The original DeHackEd was an editor that would patch the Doom executable to change strings and monster behaviors. Doom Legacy will alter its own strings and monster behaviors to get similar, or better results.

As of version 1.44, Legacy allows multiple changes to the same string. Later changes to a string will work, even when Legacy changes, language changes, Chex mode changes, or other deh files, have already changed the string.

You can specify multiple .deh files using the -file option, and they will all be executed, in the order you have given them. Also, since version 1.30, Legacy will look for a lump named DEHACKED in each wad file and treat the contents as a dehacked patch.

We don't check for the dehacked patch version. We added support for patches version 6. It should run ok with (not too) old patches. If you have a problem with the version of the patch, try to convert it. Just load the .deh file into a recent version of Dehacked (3.0), and then save it again. It will then be saved as a text-file, that Legacy will be able to use.

You can edit a .deh file manually and replace strings by larger strings than the original Doom strings, and it works. The original Dehacked could not increase the length of a string, but Legacy can. Sprite renaming works too, well, pretty much anything works :)

Some dehacked lumps were written using thing numbers and frame numbers that were added in Boom, and PrBoom. Thing numbers in the range 138 to 150 in Doom Legacy differ from PrBoom. These numbers must be translated to the numbers that Legacy uses internally.

There is Automatic detection that can correct the thing numbering in some wads. This relies upon comments in the dehacked lump, and upon detecting port specific linedefs. For some wads the user will have to override the Automatic detection, and specify the dehacked thing coding directly.

Note that the thing numbers used in dehacked lumps, are always the internal thing numbers + 1.

MT_DOGS has dog specific code that provides dog behaviors. Using MT_DOGS for something other than a dog, will make it behave like a dog, such as running around and barking.

Currently, Doom Legacy does not provide the dog sprites and sounds. The user must provide a wad that has dog sprites and sounds.
For instance:
`>> legacy -game doom2 -file prboom.wad antaxyz.wad
>> legacy -game doom2 -file dogs1.wad antaxyz.wad
`

option | description
--- | ---
-dehthing | Select dehacked thing coding for the range 138 to 150.
legacy | DoomLegacy untranslated
boom | translate things according to Boom.
prboom | Boom and Beta things
ee | Eternity Engine things

Thing codes in the following lists are as they appear in dehacked.

- legacy:
  DoomLegacy untranslated.
  - 138: MT_CHASECAM
  - 139: MT_SPIRIT
  - 140: MT_SMOK
  - 141: MT_SPLASH
  - 142: MT_PUSH
  - 143: MT_PULL
  - 144: MT_DOGS
  - 145: MT_PLASMA1
  - 146: MT_PLASMA2
  - 147: MT_CAMERA
  - 148: MT_NODE
- boom:
  Translate things according to Boom.
  - 139: MT_PUSH
  - 140: MT_PULL
- prboom:
  Boom and Beta things.
  - 139: MT_PUSH
  - 140: MT_PULL
  - 141: MT_DOGS
  - 142: MT_PLASMA1
  - 143: MT_PLASMA2
  - 144: MT_CAMERA
  - 145: MT_PLASMA3
- ee:
  Eternity Engine things.
  - 138: MT_PUSH
  - 139: MT_PULL
  - 140: MT_DOGS

### BEX patches

Doom Legacy supports BEX, which is similar to dehacked but references changable attributes by a BEX name. BEX has more functionality and is more consise than DeHackEd. A BEX file can be provided using -file or -deh, and BEX can be in the DEHACKED lump. BEX is processed when BEX section names are encountered ("[STRINGS]", "[PARS]", "[CODEPTR]"), and will also handle INCLUDE.