# Doom Legacy 1.44 User Reference Manual

1. Introduction
2. Install
3. Basic gameplay
4. Console
5. Network games
6. Commandline options
7. 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. 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, 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, sounds and music in the game. For example, if you want to play Doom II maps, you'll need the file "doom2.wad". 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), which 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. 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.

In addition to the now fundamental Boom 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 the following PWADs:

- The new editing features are demonstrated in Legacy_3ddemo.wad and rainbowstar.wad
- Wads that use Legacy 3D floors: 3DHorror.wad, phobia.wad, hth2.wad
- Deathmatch wads: andydm1.wad, shbullet.wad Chexquest sequel: Chexquest-newmaps.wad

We hope that this new version brings you a lot of enjoyment. Have much 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 is extremely simple, just follow these steps:

- Unpack the archive
- Start the Launcher
- Fill in required information about WAD locations and hardware options
- Launch the game!

If you want, you can set the following environment variables to have additional control over Legacy behaviour. None of them are required.

- The environment variable DOOMWADDIR defines the path where the wad files are located. This way you can easily share you wad files between different programs. By default, Legacy looks for wad files in the current directory.
- The variable USER, containing your username, is used as the default value for your player name in multiplayer games.
- You home directory, defined by the variable HOME, will be the place where Legacy stores your config and savegame files. If this variable is not defined, they will be stored in the current directory.

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

OpenGL uses a separate file, 'glconfig.cfg', so that the OpenGL settings do not disturb an existing config file. This does mean that switching to OpenGL requires setting up the controls again.

### 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!!!

### Setting up the sound

- SDL

  In the SDL version of Legacy the SDL library handles sound. If it is installed correctly then Legacy will have sound effects. 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 it to detect the SDL_mixer version.

- WINDOWS

  In the Windows native version the sound is autodetected using DirectX so make sure your card works well with DirectX and it legacy will us it. Additionally the Legacy could utilize the hardware 3D sound for making more realistic sound environment. Specify -ds3d command line parameter to use generic 3D sound driver (DirectSound 3D). This driver are suitable for most 3D sound chips.

- DOS

  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.

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

To setup the DOUBLE CLICK for mouse/joystick buttons: enter the click one time, so that it displays, e.g. 'MOUSEBUTTON1'. Then re-enter the click a second time, and it will transform into a dbl-click, e.g. 'MOUSEBUTTON1' will become 'DOUBLEMOUSE1'. 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 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

We wanted to keep the compatibility with the traditional Doom gameplay, but we needed also to go forward and bring more depth to the deathmatches. One of these steps is enabling manual aiming.

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 don't use it and do their best to aim up and down... NEW since Legacy v1.2: with allowautoaim you can disable autoaiming, that is, impose manual aim to all players in a network game, use with caution!!

### 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 and an OpenGL-based hardware renderer.

The OpenGL renderer is faster and shinier than the software one, but does not do everything that the software renderer does. It does have coronas, and other light effects that the software renderer does not do.

## 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 runs smooth for example by using a lower resolution graphics mode.
- 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 'up-to-date', not the others.
- 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', ...

NOTE that there is no 'dedicated' server for now.

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

Legacy uses the UDP port 5029 only and can accept messages from any port so it works perfectly with NAT (Network Address Translation). Because the IP of any computer behind the firewall is not routable the server cannot get a usable IP address during player join-game. If you are familiar with IpAutoforward funtionality of Linux, you can make a usable IP appear.

* The server types:

Start a server with one of the following server commands. One player can play on the server itself. Other switches can also be included to select the game and wad.
> doomlegacy -server <num-of-computers>

The server will wait until the specified number of computers 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 computers can also join later.
> doomlegacy -server

This starts the server and does not wait for any computers. It starts the game immediately. Other players can join later.

* Clients are the other players who join in the server:

Each additional player connects to the server with one of the following connect commands.
> doomlegacy -connect <ip address of server>

Connects to a specific server computer using their ip address.
> doomlegacy -connect

This will auto-detect a server on a LAN. This only works when computers are directly connected. If you play through internet, the server can NOT be auto-detected, and you must specify it's IP address.
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

You don't need to put all parameters on the client side like : -deathmatch, -warp xx, -respawn, -fast, etc because the server automatically sends those to all clients upon connection.

Also the -file parameter is not needed by the player anymore. The server will send the file needed to the client. Let's say rather the client can download it from the server. But of course the client will first check for the file in the directory or subdirectory.

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.

You want to know some things : you need a good ping value, perfect is less than 30, more than this will be very 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 you believe like the game is 'smooth' when it is not in reality.

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

  If player i has fragged player j F[i][j] times, the total frags of player i are given by T[i] = sum_j F[i][j]. The Buchholz score of player i is sum_j F[i][j] * T[j].

- 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). Is 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 you can make more frags, and forget about the ones which have already too much frags compared to you. Go for the victories, more than the frags.
- DEATHS: this ranking shows the players who have died the most!

## COMMANDLINE OPTIONS

Here are the command-line options Legacy recognizes:

FIXME console commands cd, gr_stats, nodownload consvar FIXME video mode lists, window caption, cv_fullscreen..

option | description
--- | ---
General 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.
-iwad <filename> | Set the main IWAD file to use. This determines the game mode.
-file <filename1> [<filename2>...] | Load one or more additional PWAD or DeHackEd files, possibly replacing some of the IWAD data.

-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. The valid game-name at this time are:

game-name | mode
--- | ---
doom, doommode | Doom1
freedu, doomu, ultimode | Ultimate Doom
freedoom, freedm, doom2, plutonia, tnt | Doom2
blasphem, heretic, heremode | Heretic
heretic1 | Heretic shareware
chex1 | Chexquest
The following are valid game-names, but the mode is not supported yet.
hexen, hexemode | Hexen
hexen1 | Hexen demo
strife | Strife
strife0 | Strife demo

Savegames are now marked with the game name, and will not load with a different game name.

-home <dirname> | Set your home directory location, where your configfiles and savegames are kept.
-config <filename> | Set the configfile 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.

-opengl | Start the game in OpenGL mode. Default: use the software renderer.
-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.
-noversioncheck | Do not check that legacy.wad version matches the executable version.
-skill <1-5> | Select the skill level, start game immediately.
-episode <number> | Select the episode, start game immediately.
Video, sound and music
-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.
-nosound | Disable all sound effects (including music)
-nomusic | Disable music
-nocd | Disable CD music
-precachesound |
Networking
-server | Spawn a server.
-connect [<IP> | <address>] | Connect to a server at the specified address. If no address is given, search for servers in LAN.
-port | Set the UDP port to use.
-ipx | Use IPX network protocol instead of IP.
-nodownload | Do not download any files from servers.
-teamplay -teamskin | Similar to the good old -deathmatch, this activates team play by either color (teamplay) or skin (teamskin).

## NOTES

### DeHackEd patches

Doom Legacy supports dehacked patches... of course its now done a more subtle way: you just specify the dehacked patch file at the command prompt, instead of actually patching the executable.

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

All text changes are supported, you can edit the .deh manually and replace strings by larger strings than the original Doom, it works. Sprite renaming works too, well, pretty much anything works :)