M.D.E. - "My DOOM Editor"
by Patrick J. Steele
Copyright (c) 1994, Patrick J. Steele
NOTE: This *is* a beta version. The reason I call it beta
is because I don't think it's "polished" or user-friendly
enough to be a final product, but it is fully functional.
It will not change your WAD file unless you tell it to
(explained later). Also, this program will only work on the
registered version of DOOM.
Beta or not, PLEASE MAKE A BACKUP OF YOUR WAD FILE BEFORE
USING ANY DOOM EDITOR.
** NEW TO VERSION 0.9b **
* You can now change the floor/ceiling textures! Just
click on the name of the texture (in the sectors dialog
box) and the textures available will be presented.
Press the "<" and ">" to move through the textures.
Select a texture by clicking on it's name under the
* You can now change the wall textures! When the data
for a sidedef is displayed, the 3 textures associated
with that sidedef can be changed using the "+" and "-"
buttons next to the texture names.
* You can set up your own "triggers"! A trigger is
something that happens when a wall is pressed or a line
crossed. You can set up your own crushing ceilings,
lowering platforms and teleport locations!
* MDE now uses the DOOM palette. This allows the
floor/ceiling textures to be viewed as they would in
the game. The red component is heavily used in the
DOOM palette so the screen has a sort of "red tint" to
* Since I have the triggers option, this version will
work on all three episodes of DOOM.
This program is using FastGraph/Light, a powerful graphics
library for C/C++, BASIC, PASCAL and FORTRAN. I highly
recommend it to all programmers looking for a fast graphics
library that supports a *lot* of video cards/modes.
Ted Gruber Software
PO Box 13408
Las Vegas, NV 89112
Orders/Info (702) 735-1980
FAX (702) 735-4603
BBS (702) 796-7134
The one drawback is the external driver needed to run
FG/Light applications. It's included with MDE and it must
be loaded before running MDE. It takes about 120k of
conventional memory. The full blown version of FastGraph
does not require this driver (and it has a lot more
features), but it was $150 more than FG/Light ($49). So, I
hope you have enough memory to run MDE. I still need to do
more testing to determine the minimum amount needed to run.
* There is a problem that I know about and I'm looking into,
although it may be out of my control. I have a Microsoft
mouse and the mouse driver that came with it is ver. 9.1.
For some reason, that mouse driver (when running MDE) moves
along at 2 pixels horizontally instead of 1, so I only
receive values of 0,2,4,6,8,etc... from the mouse. If an
object is in placed in an odd pixel (1,3,5,7,etc...) you
will not be able to select it. Older Microsoft mouse
drivers do not have this problem. I found a ver 8.2
Microsoft mouse driver, and when using that one, MDE works
fine. I'm going to see if I change the mouse speed or
something to see if I can get it to move along every pixel
horizontally. If you have ver 9.1 of the Microsoft mouse
driver I'm sorry - I'm trying to remedy the situation. See
if you can get an older version (8.2 works).
* Occasionally, after selecting a new floor/ceiling texture,
the new texture name is not displayed in the sectors dialog
box correctly. This is a display problem only. If you back
out of the dialog box with the right mouse button and then
go back in by selecting the "Edit Sector" button, the
correct name is displayed. I'm looking into it.
To run MDE, you'll first need to load the FastGraph/Light
driver. This is included with MDE. After extracting MDE,
This will load the FastGraph/Light driver (when you are done
with MDE, you may unload the FG/Light driver with "FGDRIVER
/u"). To run MDE, enter:
MDE [WAD file] [ExMy]
[WAD file] - is the name of the .wad file you want to modify
[ExMy] - where x is the episode# and y is the level
EXAMPLE: To modify the final level of Episode #1, enter:
MDE DOOM.WAD E1M8
This will use DOOM.WAD as the wad file and edit level 8 of
episode 1 (level 9 is the secret level).
You will be given an overhead view of the map. The blue
dots are objects, the green points are vertexes. Move the
mouse to the edges of the screen and the map will
Press the left mouse button while pointing to an object
(blue dot) or a vector (green dot) to bring up detailed
You may change what the object is, the angle it faces,
what skill levels it will appear on and whether it will
show up only in network play.
In the DOOM maps, two vertexes form a line (called a
"linedef" in the WAD file). A line consists of a
"from" vertex and a "to" vertex. When you select a
vertex, MDE will display a green line that corresponds
to a linedef. MDE assumes the vertex you selected was
the "from" vertex.
NOTE: Some lines are formed by two vertexes at the same
x,y location. Example:
This map shows a line going from 1 to 2, a line from 2
to 3, and a line from 2 to 4. If you select vertex 2,
MDE will find the first line that uses vertex 2 as the
"from" vertex. If the line from 2 to 3 was the first
one, that line would always be selected. To tell MDE
to ignore the first instance of the vertex, hold the
ALT key down while pressing the left mouse button on a
vertex. In this example, the result would be the line
from 2 to 4 being selected.
Once a line is selected, a dialog box will display
information for that "linedef". A sample dialog box is
| Select SideDef to View |
| Control 1 + - |
| Flags 0 + - |
| Trigger 0 + - |
| SideDef1 SideDef2 |
NOTE: The "SideDef2" button will only be displayed if
there are two sidedefs (explained later) for this line.
"Control" - This field has something to do with
defining a "wall" versus an "opening" in the DOOM
playfield. A typical value is 1, which means a
wall that the DOOM player may not pass. There may
or may not be a wall stopping you. At the
beginning of Episode 1, Level 1, you can look out
the 2 windows and see the blue armor in the green
ooze. Technically, the opening for the window is
low enough to allow the DOOM player to pass, but
the Control value is set to 1, so you may not jump
out the window. "Control" is also used in
conjunction with the "Flags" field to make a wall
into a door. As you look at the linedefs on the
existing map, you will see some common values
used. I don't have all of the values documented,
so you may play around with this field.
"Flags" - The primary use of this field is for
special "trigger" functions (explained later). I
have also seen this field used in conjunction with
the "Control" field for doors.
"Trigger" - This field will tie a line and a
sector together, so when this line is crossed or
the wall this linedef defines is pushed, something
will happen in the sector with the same trigger
number. That "something" will depend on the
"Flags" field. For example, the value 35 in the
Flags field will cause a sector to go dark (loose
all light) - 77 will start the up/down motion of a
crushing ceiling. More on triggers later.
For these 3 fields, click the +/- buttons to
increase and decrease the values. Hold down the
control key while clicking with the mouse to
change the value by 10.
Clicking on one of the two "sidedef" buttons will bring
up information for a sidedef (explained later). A
sample dialog box for a sidedef is show below:
| T-above - + - |
| T-norml STARTAN3 + - |
| T-below - + - |
| Edit Sector Restore |
"T-above" shows the name of the texture used to
define the area of a wall "above" a sector where
there is an adjacent sector with a higher ceiling.
"T-norml" is the name of the normal (eye-level)
texture used to define the wall image.
"T-below" is the name of the texture used to
define the area of a wall "below" a sector where
there is an adjacent sector with a lower floor.
For the 3 texture fields, click the +/- buttons to
move forward/backward through the list of
available texture names. Hold down the control
key while clicking with the mouse to change the
value by 10. A texture of "-" means there is
nothing defined for that texture. See the
"DETAILED INFORMATION" section below for help on
"Edit Sector" will bring up detailed info about
the sector this sidedef surrounds (defines). You
may change a sectors' floor/ceiling height, the
amount of light in the sector, set up special
flags for the sector (radioactive damage,
flickering lights, pulsating lights, etc...) and
set the trigger number for special effects.
"Restore" will restore the texture names to the
ones first displayed in this dialog box. If you
got lost in the selection of wall textures, press
"Restore" to bring the old names back. Once you
leave this dialog box, the names are saved in
memory for the rest of the editing session.
When you press the "Edit Sector" button, a third dialog
box will appear with information for that sector. A
sample is show below:
| Ceiling CEIL3_5 72 + - |
| Floor FLOOR4_2 0 + - |
| Light 144 + - |
| Special 0 + - |
| Trigger 0 + - |
"Ceiling" and "Floor" shows the name of the
texture used on the ceiling and the floor,
respectively (CEIL3_5 and FLOOR4_2 in this
example), the ceiling height (72) and the floor
height (0) and the usual +/- buttons for changing
the height of the ceiling/floor. Click on the
texture name to change the ceiling or floor
texture. Available textures will be displayed
along with a ">" and "<" for scrolling through the
textures. Click on the name of the texture
(displayed below the texture) to select it.
The ranges for the ceiling/floor seem to be from
512 to -264. A difference of more than 28 will
prevent the DOOM player from crossing into a
higher sector. The DOOM player may fall any
"Light" displays the light level for the sector.
The ranges are from 0 (very dark!) to 255 (full
"Special" - set special flags for this sector. A
few that have been found are:
0 - Normal sector
1 - light level blinks randomly
2 - light quickly blinks
3 - lights blink
4 - lights pulsate and 10% health loss
5 - 5% health loss
6 - DO NOT USE! Exits to DOS with "unknown
7 - 2% health loss (typical green acid)
8 - lights pulsate
9 - secret sector (increments the # of
10 - unknown
11 - 10% health loss
12 - blink (down to very dark)
13 - quick pulsate
14 - unknown
15 - unknown
16 - 20% health loss
Beyond that, use at your own risk!
"Trigger" - This will tie a sector and a linedef
together. Set this field to the same number as
the trigger field in a linedef to "connect" the
sector and linedef.
Click the right mouse button to back out of all of
To move an object, select it with the right mouse button.
While holding down the right mouse button, drag the object
where you want it and release the mouse button.
Press 'E' to export the placement of the objects for this
level. A file will be created called DMAPExMy.DAT where x
is the episode# and y is the level.
Press 'I' to import object placement data from the
corresponding .DAT file as explained above.
Before you exit, press 'W' to write your changes to the WAD
file. If you don't press 'W' your changes will not be
saved! Press [ESC] to exit the program.
Here's some more detailed info about MDE. The moving and
changing of objects is pretty straightforward. What I'll
explain here is the options you have with the vertexes,
sidedefs and sectors. If you want to understand more of
what's here, please D/L DMSPCS10.ZIP (The Unofficial DOOM
Specs). That's what made this editor possible (thank you
email@example.com!!) and it may explain better what I'm
about to describe.
Each line will have at least one side defined, called a
"sidedef", or possibly two. A line will only have one
sidedef if the DOOM player will never see the other side.
For example, on the first level of episode one, the DOOM
player can turn around 180 degrees and see a door. There is
no way (except with cheat codes) for the player to be on the
other side of that door, so that line only has one sidedef.
An example of a line with two sidedefs is also on the first
level of episode one. If you look out the window to the
right, there's the familiar pool of ooze with the combat
(blue) armor. The lines defining that pool of acid have two
sidedefs, the side that faces "in" the pool of acid, and the
side that faces "out" of the pool.
As noted above, each line has at least one sidedef. A
collection of sidedefs forms (or "defines/surrounds") a
sector. A sector is where the floor/ceiling altitude is
defined and where the lighting and special flags (for acid
damage, etc...) are defined. You may edit the altitude of
the floor and the ceiling, set the light level, and set
special flags for the sector. You may also tie a line to a
sector with the "Trigger" field.
The names of the textures for a sidedef should help you pick
which sector to modify when there are two sidedefs (since I
cannot tell from the vertex you select which sector you want
The three texture names for a sidedef, T-above, T-norml, and
T-below, all have special meaning. The T-norml level is
easy - it's the "eye-level" texture for the wall. The above
and below names are a little tricky.
The above texture tells DOOM what to draw "above" a sector,
if the sector's ceiling is lower than an adjacent sector.
Episode 1, Level 1 will give us a good example.
Start on this level, and go the left. When you stand at the
base of the stairs (leading up to the armor), there are two
columns with some pulsating lights. This is an example of a
sector with a lower ceiling than an adjacent sector.
At the top of the column is a kind of diamond shaped light.
That is the ceiling texture for that sector. The sector you
are standing in has a higher ceiling than the column, thus
DOOM needs to know what to draw "above" the column. If you
look at sidedef1 for each of the 4 sides of the column, T-
above is set to TEKWALL4.
This same reasoning applies to the below texture. If the
column and gone all the way to the floor, you wouldn't need
a below texture. However, the floor of the column is
"higher" than the "adjacent" sector (which is the sector you
are standing in). DOOM needs to know what to draw under the
I'm going to explain triggers first (before the "Control"
field). This is because I've played around with triggers
more than the "Control" field!
First off, to get a sector "tied in" to a line, set the
"Trigger" field for the linedef and the sector to the same
value. Once a line and sector are tied together, you can
define what will happen to the sector when the line is
crossed (usually - some things require buttons).
The "Flags" field of a line will determine what will happen
in the "tied in" sector. Here's some values to play with:
46 - Wall must be "shot" to open
35 - Set the light level to 0 in the sector (panic time!)
13 - Set the light level to 255
9 - Bring sector to level of adjacent sector (like pushing
the button to lower the platform with the chain saw on
Episode 1, Level 2)
21 - Same as 9, but only temporary. The sector will rise
back up after a momentary delay.
77 - Start a crushing ceiling
74 - Stop a crushing ceiling
88 - Trigger a platform to lower temporarily. You get a
pause of a second or two to step on the platform, then it
will raise again.
87 - Seems to start a platform on an automatic up and down
22 - Raise the sector to the level of the adjacent sector
and make the two sectors have the same floor texture. This
can be used to cause a sector in a pool of ooze to raise up
and form a walkway.
37 - This is the opposite of 22. It causes the sector to
lower to the sector of the adjacent sector and take on the
floor texture of that other sector. This has the effect of
a walkway lowering and disappearing.
90 - Temporarily open a door when this line is crossed.
2 - Make a door opening sound and raise the sector.
103 - Seems to basically open a door when a the wall this
trigger is on is pushed.
97 - Teleport! This *requires* a teleport destination
object to be in the sector this trigger is tied to. You
will teleport into the sector that is "tied in" to the
linedef. If you have a 97 trigger set up, DOOM will look
for the sector the line is tied to. If there is no teleport
destination object in that sector, the teleport will not
work (nothing will happen).
Many of these have been verified to work, but some need a
little "tweaking" (i.e. the "Control" field must be set to a
certain value also - see below).
The following "Flags" value have meaning, but are not tied
to a "trigger".
11 - End the level (go to next level)
51 - End the level (go to secret level)
48 - Texture is "animated" (like the pedestal with green
armor at the beginning of Episode 1, Level 1)
I'm still working on this field. A few values for this
field must be used with a certain "flags" value. These are:
Control 36/Flags 1 - This seems to be your basic door
Control 4/Flag 1 - This is also a door, but it stays open
When setting up some of the "Triggers", the "Control" field
can be set to help the "visual" aspect of the effect.
Example: If you have a trigger of 2 (make a door opening
sound and raise the sector), you will probably want to set
the "Control" field to 4. Here's why:
Imagine a ceiling that will come down when a line is crossed
(that's easy to do with Flags value 77). This will cause
the ceiling to move down, thus an "above" texture will need
to be defined. If the control field is not 4, the "above"
texture is just pasted on the sidedef as the ceiling comes
down. Imagine the "above" texture being the numbers 1-5
listed vertically - here's the effect:
| 1 | | 1 | | 1 | | 1 | | 1 |
+-------+ | 2 | | 2 | | 2 | | 2 |
+-------+ | 3 | | 3 | | 3 |
+-------+ | 4 | | 4 |
+-------+ | 5 |
It looks "funny". The wall doesn't actually look like it's
"moving" up and down. If you set the control field to 4,
the effect will be like this:
| 5 | | 4 | | 3 | | 2 | | 1 |
+-------+ | 5 | | 4 | | 3 | | 2 |
+-------+ | 5 | | 4 | | 3 |
+-------+ | 5 | | 4 |
+-------+ | 5 |
See the difference? The five is always at the bottom of the
wall. The "above" texture "moves" with the wall. This
should be used in any of the triggers than cause a sector to
raise or lower.
Ok, now I need to know what you think. I need all feedback
- good/bad/wants/needs. Please leave feedback to me on:
Software Creations: (508) 368-7036
User name: Patrick Steele
I also have an America On-Line account (firstname.lastname@example.org)
- but, I've been having a real hard time getting on to
AOL, so you may have better luck with the above
You can preview the floor/ceiling textures but not the wall
textures. The floor/ceiling are simple 64x64 pixel squares,
which makes it easy. The wall textures are composed of
"parts" which are put together to form one wall. Some walls
are only one part, but others can be as many as 10 parts!
It's really a speed issue. I have the code to pull the
parts out of the WAD file and then assemble them into a wall
based on the texture information - it's just not as fast as
I'd like. To help you pick a wall texture, I've included a
utility called "WALLS". To run it, type:
WALLS [WAD file] [TEXTURE1 or TEXTURE2]
This will display all of the wall textures along with their
names. There's two texture structures in the WAD file,
TEXTURE1 and TEXTURE2. To display the texture names from
the first one, enter:
WALLS DOOM.WAD TEXTURE1
Consequently, use TEXTURE2 to view the other textures.
I still plan on setting the mouse to a sort of "bulls-eye"
to make object/vertex selection easier.
I'm going to change the export to export the object
placement data for an entire episode (not just on level as
it is now). I also need to add exporting of the linedef,
sidedef and sector data that is changed. This may, however,
result in going back to a single export file per level
(because of disk space).
I'd like to be able to add objects to a level. This is
rather easy process in memory, but again, when it comes to
disk space, I'll need to recreate the entire .wad file!
(Got a spare 10megs for the new wad file!?). As for
deleting objects, just move them off the map.
I need to add a confirmation if you attempt to leave the
program without writing your changes.