                DMapEdit v1.0 - a doom map editor!

Welcome to DMapEdit.  DMapEdit is a true map editor, and not just a 
thing editor.  Right now, however, there are still many unknowns about 
what everything in the wad file maps do, specifically, segs, nodes, and 
reject, and how each relates to sectors.  If you don't know what I'm
blabbering about, don't worry.  If you do, and would like to try and
hack out some of this stuff, or already know how all this stuff works,
be sure to read the 'hackers.txt' file.

-------------

Doom is a trademark of id Software Inc.
DMapEdit is my trademark
Vesa.bgi is copyright (c) 1991 Jordan Hargraphix

Copyright (c) 1994 Jason Hoffoss.  All rights reserved.

You may freely distribute this program, as long as it is distributed 
intact (all 8 original files) and unmodified.  You may not sell this 
program, for profit or any other purpose.

-------------

My address is:

        Jason Hoffoss
        10321 110th st. N.
        Stillwater, MN  55082

Donations and postal mail can be send to this address.  E-Mail can be 
send to me on these BBSs:

        The Death Cookie: (612) 773-0646
        The Express Lane: (612) 422-3707 or 422-1585

At present, I don't have an Internet account, however, I hope to soon.  
Until then, if anyone at the U of M would like to act as a contact for 
me, let me know.  I do have read access to the newsgroup alt.games.doom, 
so comments, suggestions, etc can be posted there, and I may see it.  It 
is rather high traffic, however, so if it's important, don't rely on 
that.  You will also note I said "read" access, so I can't post anything 
to the newgroup.  Oh well.

-------------

So, what all can you do with this editor?  Well, it is a full featured 
thing editor, so you can move things around, change them, add/delete 
them, etc.  Thing editing has no limitations on it.  You can also edit 
vertexes, adding/deleteing and moving them about as you wish.  Changing 
them around and saving it back to the WAD file may cause problems with 
the segs, but since I really don't know what segs do, I can't say for 
sure.  You can save your new level to a data file, however, and use it 
with a later version of DMapEdit, when available, which will be able to 
correct any problems, so you can create your 'new worlds' now.  You just 
can't play them.  Lastly, you can edit lines, adding/deleting them.  So, 
just what do all these terms I mentioned mean?

Things:
   Things are all objects in the game, such as barrels, dead bodies, 
guns, ammo, monsters, player starting points, etc.  Walls, doors, 
elevators, windows, etc are not objects.  They are lines..

Lines:
   Lines are straight line segments from one point to another.  They are 
usually walls, or semi-walls, but not always.  Sometimes they represent 
the edge of a lighted area, or a trigger to activate something elsewhere 
when crossed by a player.  A line is always present where ceiling or 
floor heights change, such as stairs, windows, etc.

Vertexes:
   All lines run between 2 vertexes.  A vertexes is simply a point.

------------------------------------------------------------------------

Ok, running this program is pretty easy.  Doom.wad or doom1.wad must be 
in the current directory, but dmapedit and it's files doesn't.  So, you 
can start dmapedit with:

dmapedit

  or

c:\wherever\it\is\dmapedit

dmapedit defaults to vesa svga 640x480x256 colors.  If this is a 
problem, or you don't like it, read about the -v switch at the end of 
this file.

Once the program is up and running, you should see a map of episode 1, 
mission 1.  The program defaults to thing edit mode at startup.  At this 
point, you can move things around by pressing the left mouse button on a 
thing and dragging it to it's new location.  Pressing the left mouse 
button while not on a thing will add a new thing (using the defaults) 
and placing it when you releast the button.  The right mouse button is 
used to delete a thing.  The middle button (if you have one) is used to 
change the information about a thing, or the default thing if you are 
not on a thing at the time you press the button.  This is the standard 
mouse interface I use for this program, and editing vertexes and lines 
works the same way.

----------------

These are all the keyboard commands:

         ?: display key commands

Arrow keys,
 home, end,
   page up,
 page down: These keys will scroll the map around..

         +: zoom in

         -: zoom out

     alt-q,
     alt-x,
       esc: quit and exit editor

       ins: add (same as left mouse)

       del: delete (same as right mouse button)

     space: change/edit (same as middle mouse button)

     1 - 5: change displayed vertex point size

         0: turn off vertex point display

         t: change displayed things icon size: big, small, off

         \: change displayed lines size (thickness)

        F1: select thing edit mode

        F2: select vertex edit mode

        F3: select line edit mode

         s: save map to a data file

         l: load map from a data file

     alt-w: write map to WAD file

     alt-r: reload map from WAD file

         c: change episode and mission

         m: change thing display filter (see below)

         n: start a new map from scratch (erase currently displayed map)

         z: show current statistics (may mean very little to you, though)

Note: Thing icons can't be turned off while in thing edit mode.

--------------------
Thing display filter
--------------------

Things are not always on every difficulty level.  Generally, harder 
difficulty levels tend to have more monsters running around.  The thing 
display filter is to allow you to display only what you want to display, 
such as only level 1 things.  Using this filter is a little tricky, 
however.

There are 5 different flags used by all things in doom:

        flag 1: skill level 1 & 2
        flag 2: skill level 3
        flag 3: skill level 4 & 5
        flag 4: deathmatch mode
        flag 5: deaf monster

Skill level 1 being "don't hurt me" and 5 being "Nightmare".  If a skill 
level flag is set, then this thing will appear to a player playing on 
that skill level.  If the deathmatch mode flag is set, then this thing 
will only appear when playing a deathmatch mode game.  Note that this 
flag is in addition to the skill level flag.  If you just set the 
deathmatch mode flag and leave all three skill level flags cleared, then 
the thing will never appear in any deathmatch mode game.

The deaf monster flag is only useful with monsters.  If it is set, then
monster will only "activate" (come alive) upon spoting a player or being
attacked.  If the monster isn't deaf, then it will also "activate" whenever
it hears a players weapon being used (even punching air will do it).

There are 2 switches for each of these flags in the filter.  There are a 
total of 4 possible combinations for these 2 switches.  The first switch
is used as a matching state.  The second switch is set if you want to
force the first switch to match a flag exactly.  This may be confusing, 
so I will detail the 4 possible switch combinations..

Combination 1: both switches off (O O)

With this combination, the flag is ignored and not displayed.  If all 4 
flags have this combination, nothing will be displayed.

Combination 2: first switch on, second off (* O)

This will display the thing if the flag is set.  If the flag isn't 
set, the thing may still be displayed if another flag with this 
combination is set.  This is a basic OR situation between flags.

Combination 3: first switch off, second on (O *)

For a thing to be displayed with this combination, the flag must be 
off.  If the flag is on, the thing will not be displayed, regardless of 
the other flag settings.  This is used to hide what you don't want 
displayed.

combination 4: both switches on (* *)

With this combination, similar to combination 3, the flag must be on to 
display this thing.  Unlike combination 2, a thing will not be displayed 
if the flag is off, period.  Other flags have no effect on it.

Common filter settings:

        O = off, * = on


Display level 1 & 2 things:

Skill level 1 & 2: * O
    Skill level 3: O O
    Skill level 4: O O
  Deathmatch mode: O O


Display only level 4 things, non-deathmatch mode:

Skill level 1 & 2: O O
    Skill level 3: O O
    Skill level 4: * O
  Deathmatch mode: O *


Display all things:

Skill level 1 & 2: * O
    Skill level 3: * O
    Skill level 4: * O
  Deathmatch mode: * O


Display only Deathmatch mode things:

Skill level 1 & 2: O *
    Skill level 3: O *
    Skill level 4: O *
  Deathmatch mode: * O

Display only things unique to level 4:

Skill level 1 & 2: O *
    Skill level 3: O *
    Skill level 4: * O
  Deathmatch mode: O O

-------------
Thing editing
-------------

Editing things is very easy.  If you want to move a thing to somewhere 
else on the map, just click on it with the left mouse button, and drag 
it to it's new location while holding the button down.  To delete 
something from the map, click on it with the right mouse button.  And, 
to add a new thing to the map, click the left mouse button while the 
mouse isn't on a thing.  (it will be placed when you release the button, 
so you can drag it around too.)  You can tell if you are on a thing by a 
box around the thing.  If you see this box around it, then that is the 
thing currently selected.  Information about this currently selected 
thing is displayed at the top of the screen.

To change the currently selected thing, press the middle button (or the 
spacebar).  This will bring up all information about the thing.  To 
change any of this information, simply select the proper button.  If you 
press the middle button (or the spacebar) while a thing isn't selected, 
then you can change the default thing's information.  The default thing 
is used whenever you add a new thing to the map.  Lastly, pressing the 
Enter key will scan the selected thing's information into the default 
thing.

--------------
Map generation
--------------

Though you can begin making your own maps, I don't recommend you save 
such maps to the WAD file yet, unless you only changes things around.  
If you make any changes to vertexes or lines, many strange things will 
probably happen if you save it to the WAD file and play doom.  Because I 
currently don't know everything about the maps, and how it all 
inter-relates, doom will get confused and act very strange.  So, please 
save any new or modified maps to a datafile.  When the next version of 
DMapEdit is released, which will hopefully have all these things 
resolved, you can then load the datafile and it will fix everything up 
and you can then write it out to a WAD.  So, as you can see, you can get 
started on making your own maps, if you so desire.

Map generation starts with putting vertexes and lines where you want 
them.  This lays the foundation for everything else.  Once all the lines 
are in place, sectors, segs, and nodes need to be generated.  This will 
probably be automatically done my the computer, but I don't know for 
sure just yet.  I will have to figure out how it all works first, but 
I'm pretty sure this is how I will be going about it.  Once all these 
things are identified, you will then be able to change the sidedefs and 
sectors to your liking.  Editing of these are not available yet, 
however, but should be in the next version.  Things can be edited at any 
time during this process, as it works independantly of any of the other 
structures.

Notes:

Maps must have all areas enclosed by lines.  A map with only 3 lines, 
for example, in an open ended box shape, isn't complete.  Keep in mind 
that a line doesn't have to be a wall.  Lines are required anywhere you 
wish to:

        change floor or ceiling height
        change wall angle
        change wall, floor, or ceiling patterns
        change lighting

Next, every map should have a starting point for all four possible 
players.  You should also have, minimum, 4 deathmatch mode starting 
points.

----------------
Future expansion
----------------

What can you expect from future versions of DMapEdit?  Well, I plan to 
add a sector edit mode, and sidedef edit mode.  I also hope to add 
routines to create/resolve all the structures needed by doom for each 
map, so you will be able to actually play maps you create.

I plan to add the ability to save newly created maps to a "working WAD" 
file, so you can leave your original doom.wad file unchanged.  Working 
WAD files would also not have unneeded subfiles in it, so it would be 
far smaller.  You could then play such maps with the command "doom -file 
mymaps.wad"

I plan to change memory usage to dynamically allocate what I need, so 
there will no longer be limits on how many things, lines, etc you can 
have, as long as you have memory available.  To my knowledge, doom doesn't
limited how big all this stuff can be, as long as memory holds out.  
Right now, I don't use EMS or XMS, nor do I think I will need to, but if 
the need arises, I may add it.

and if anyone has any great ideas for anything to put in, go ahead and
send me your ideas.  (donations accompanying suggestions will make me
far more receptive, of course)

---------------------
Alternate video modes
---------------------

DMapEdit defaults to 640x480x256 colors, vesa svga.  If this is a 
problem, you can try setting up another video mode and/or driver.  This 
is all done with the -v switch.

dmapedit -v[driver,]mode

Driver: This data is optional.  With it, you can tell DMapEdit you want 
to use another bgi driver, if you have one.  Be sure to use only a 256 
color mode driver, as this program will not work with any other amount 
of colors.  Also, 640x480 is the recommended minimum resolution.  Though 
you can use lower resolutions (such as 320x200), doing so will have the 
side effect of everything not fitting on the screen, and it will look 
very stupid indeed.  If you can live with that, however, then knock 
yourself out.

Mode: This is a number, from 0 to however many modes the driver selected 
has.  With vesa.bgi, the following modes are available:

        0: 320x200 (VGA/MCGA)
        1: 640x400
        2: 640x480 (default)
        3: 800x600
        4: 1024x768

All modes are in 256 colors, since this is required for DMapEdit to work.

* vesa.bgi is copyright (c) 1991 Jordan Hargraphix.
