                                 DeHackEd v3.1
                             By Greg Lewis (Tree)
                                gregl@umich.edu

                        Updated to work with Final DOOM
                           by John A. Kaczmarski Jr.
                           74017.3225@compuserve.com

  This is a general help file for DeHackEd version 3.1.  For more specific
product information, see the file DEHACKED.TXT.  For important start-up
info and instructions, read README.TXT.  And, if you are more interested
in simply finding fun stuff to experiment with, check out the file
"Fun with DeHackEd" (DHEFUN12.TXT) bundled with this program.  It includes
some fun things to try!  And, if you have problems or questions with
DeHackEd you are encouraged to take a look at the Frequently Asked
Questions section in this file.

  This file is arranged in the following sections:

     1.  Internet Resources
     2.  Donations/Source code
     3.  A Glossary
     4.  Patch File Info
     5.  Command Line Options
     6.  DeHackEd.ini Options
     7.  Available Keys
     8.  Mouse Support
     9.  Thing Editor
      a.  Thing fields
      b.  Bit fields
    10.  Frame Editor
    11.  Misc Editor
      a.  Weapon fields
      b.  Cheat codes
      c.  Miscellaneous data
    12.  Sound Editor
    13.  Sprite Editor
    14.  Text Editor
    15.  Frequently Asked Questions

  So, without further ado, here it is!


 1. *** Internet Resources
\------====================

  This section contains some pointers to other sources of information
regarding DeHackEd on the Internet.  There isn't too much out there, but
there are a few places to look.

  First of all, there are some locations where you can find DeHackEd
itself, along with patch files for the program.  The main FTP site for
this program is

  DeHackEd FTP site:  ftp.cdrom.com  /pub/idgames/utils/exe_edit

In this directory you will find the latest release of this program, along
with numerous patch files.  There are also quite a number of mirrors of
this site, though I will not list them here.

  Two DeHackEd-specific WWW pages are available for general use.  For up to
the minute program information, bug reports, or other news check out the
Official DeHackEd Homepage.  LummoxJR's DeHackEd Grabbag contains info
about fun things that are possible, along with some sample patches.  From
these pages you can also browse through a large part of the Doom WWW
network.

  Official DHE Page: http://www.umich.edu/~gregl/dhe.html
  The DHE Grabbag:   http://www.daimi.aau.dk/~hykkelbj/doom/special/DHE

  And finally, I am always available through email.  I will warn that I
generally get very busy during the school year, so email sometimes takes
the back burner and it takes several days for me to reply.  I can be
reached at the following address.

  Email address: gregl@umich.edu

  Here is some information on the Linux/SGI version of DeHackEd.  It was
ported over to Linux by Sam Lantinga, email at slouken@cs.ucdavis.edu.  It
is available at the following two sites.

  ftp.cdrom.com:/pub/doom/utils/exe_edit/ldhe-bin.0.8a.tar.gz
  ftp.cdrom.com:/pub/doom/utils/exe_edit/ldhe-src.0.8a.tar.gz

  ftp.cc.gatech.edu:/pub/Linux/games/doom/ldhe-bin.0.8a.tar.gz
  ftp.cc.gatech.edu:/pub/Linux/games/doom/ldhe-src.0.8a.tar.gz

This version is based on DeHackEd v2.3, so it is slightly older.  The
author is hard at work on a DHE v3.0 compatible version, however, so
keep an eye peeled for those FTP sites (and the DeHackEd web page) for
the new version.


 2. *** Donations/Source code
\------=======================

  I've released this program to the public domain without requiring a
registration fee for a "registered" version.  However I have put a large
chunk of time into this program, especially with the new Ultimate Doom
compatible version, and I would appreciate donations from those who have
found this program to be useful or interesting.  I estimate a suitable
sum to be about $10 for my efforts.  Consider what else you can get for
$10... maybe an hour in a video arcade, if you're decent, or 8 hours of
movie watching.  Mess around with DeHackEd for a bit and you'll soon
realize that you can spend a lot more time for your money with it than
with many other things.  Support a poor college student today! :)

My snail-mail address is:
        Greg Lewis
        1205 Sylvan Lane
        Midland, MI  48640

  If you are interested in the source code for this program, I am willing
to email you a copy of it.  Just drop me an email message at the address
listed at the top of this file and I'll send it your way.  Note that if
you are interested enough in the program to be asking for the source code,
I would highly appreciate a donation from you (hint hint).  I feel that is
only fair to receive some payment for giving away the long hours of hard
work I put into DeHackEd.  Be sure that you know how to receive UUEncoded
or MIME encoded messages, because that is how I'll be sending it to you.
DeHackEd is written in Borland C++ v3.1, although it is 95% straight C
code.


 3. *** A Glossary
\------============

  There are a few new terms that I will be using throughout this file,
so first off I'll define everything and explain it in simple terms.

  Thing:   A Thing in Doom is any object that's in the game, such as
     monsters, the player, items, weapons, and decorations.  If some-
     thing isn't part of the floor, ceiling, or walls, it's a Thing.
     These are the most complicated objects in the exe, and have the
     most information stored about them.  This information includes
     what pictures to show onscreen, what sounds are associates with
     it, its height, width, speed, etc.

  Sprite:  A Sprite is a collection of all the pictures that belong to
     one Thing.  For instance, there is a Sprite that contains all of
     the pictures for the Baron of Hell, from first activation to gory
     death.  Sprites can be referred to by a 4-letter name (which
     DeHackEd will display for you on the Sprite editing screen).  The
     Sprite for the Baron is called BOSS, and is Sprite #42.

  Frame:   A Frame is one picture individual picture of a Sprite.  For
     example, there is one Frame that shows the Baron with its hand back,
     ready to throw a fireball at the player.  The most complex Sprites
     may have 20-25 individual Frames in them, whereas simple Sprites
     only have one or two Frames.  Frames also contain info about how
     long the picture should be displayed, and which picture to display
     after the current one.  Frames are named by adding a letter to the
     end of a Sprite name.  The name for the Baron with its arm back is
     BOSSE, with a Sprite number of 42 and a Sprite sub-number of 4. The
     code for converting the sub-number to the letter is 0=A, 1=B, 2=C,
     3=D, etc.

  Weapon:  A weapon of the player, and associated info, such as what
     picture to use for the weapon, and the ammunition that the weapon
     uses.

  Sound:   A sound that's played at some time.  The name is obvious, but
     other sound values (labeled with "descriptive" names such as "0 / 1"
     and "Value"), are still uncertain.  Play around with them, and
     perhaps you'll find something new.

  Patch:   A patch file is a file that DeHackEd uses to make its changes
     to the Doom executable file.  This is explained in more detail in
     the next section.


 4. *** Patch File Info
\------=================

  This is some more info on patch files, which may help explain any
difficulties you are having with them.

  Patch files are entirely different from WAD files.  WAD files can
contain level info, sound, and graphics info (stuff normally found in
the main Doom WAD file).  They are used simply by typing
     doom -file <wadname>
at the command line.  Patch files, however, contain info from inside the
exe file, and cannot be used with the "-file" parameter.  DeHackEd is the
only program that can apply these patches and change the Doom exe file.

  The newest format of patch files includes only the information you've
modified and NOT all the data (as older types of patch files used to do).
They now have an easy-to-understand text format and can be created with any
common text editor (if you know what the different names are).  Load the
SAMPLE.DEH patch file that came with your copy of DeHackEd into a text
editor for full information on the text format.  Or just play around and
create your own patch files and look at 'em.

  Because of the new format of patch files, any changes you've made to Doom
will stay even when you load a new patch file.  The 'z' command has been
added so that you can return to the original Doom settings at any time.  So
in order to load a patch and remove any other previous changes, you'll need
to hit 'z' before 'l'oading the new patch.  To make this easier on the user
DeHackEd will now ask if you wish to reload the original exe data every time
you load a patch.  Normally, if you want to remove all traces of previous
patches, you should answer yes.  If you have a good grasp of what is going
on you can set the 'askatload' variable to false in the ini file and skip
that question.


 5. *** Command Line Options
\------======================

  Next, an explanation of command line options.  All parameters are totally
optional;  if you don't include anything more than the path DeHackEd will run
normally and go to the editing screens.  If any options other than just
the path are included, DeHackEd will run in 'batch' mode and not actually
enter the editor.  If present, the doom path must be first.  Other than that
restriction the arguments can be included in any order, any number of times.
They will be processed in the order they appear, left to right.  The full
command line syntax for DeHackEd is:

  dehacked [doompath] [-reload] [-load <patch1> <patch2> ...] [-save <patch>]

  [doompath] is optional, and specifies a different location for the
doom files, doom.exe and doom.wad, other than the current directory.  If
you give a path on the command line it will override the exename and
wadname that you give in the DEHACKED.INI file.

  -reload will return the exe file to its original data.  Because the new
patch format does not overwrite all data, but only values that need to be
changed, it's sometimes necessary to ensure that the exe is back to normal.

  -load <patch1> <patch2> ... will update the doom.exe file with the
patches called <patch1>, <patch2>, etc.

  Conversely, the -save <patch> option will save the current doom.exe
status to a patch file named <patch> and return to the DOS prompt.  These
options are similar to 'l' and 's' in DeHackEd, although when used in
DeHackEd the 'l' option requires a 'w' after it to actually write the
changes to the doom.exe file.  See section 7 for more info on 'l'oading
and 's'aving.

  Example command line:

     dehacked c:\games\doom -load sample.deh

  This will start DeHackEd, using the Doom files found in c:\games\doom,
load in the info from the sample.deh patch file, and return to the DOS
prompt.

  The command line parameters are processed from left to right, so it's
possible to do several things at once.  The next example is what I would
imagine is the best way to automatically load a patch file from a batch
file:

        dehacked -save current.deh -reload -load newpatch.deh
        doomhack  . . .
        dehacked -reload -load current.deh
        del current.deh

  This will save the current state of the exe file, then reset it to the
original Doom data and load your custom patch file.  Then doomhack is run,
with whatever parameters you want.  Finally the exe is reset to normal
once again and the user's data is restored.


 6. *** DeHackEd.ini Options
\------======================

  Included with DeHackEd is an ini file which can specify several parameters
for DeHackEd.  They allow you to customize where you want your patch files
located, what your doom files are named, and more.  A summary of the
allowable command line options follows:

  #     Start comment lines with a pound sign.  Anything after the pound
        sign is ignored.
  editname = <filename>
        This is the name of the doom exe file that DeHackEd will perform
        the actual changes to, and full path if necessary.  This doesn't
        need to be included if you are running DeHackEd from the directory
        that your the exe file resides in, and it's got the proper name.
        Normally this file is named doomhack.exe.  The doomhack.exe file
        is not part of Doom, it is merely a copy of the doom.exe (or
        doom2.exe) file.
  normalname = <filename>
        This is the name of your regular, UNCHANGED doom.exe file.  DeHackEd
        will never change the data in this file.  It's mostly used by
        DeHackEd to save patches.
  wadname = <filename>
        This is the name of your doom.wad file, and full path if necessary.
        This must be a registered wad file, not a shareware file.  This is
        needed for verification that you are really registered, and not
        just trying to fake it.  Once again, if this is in the same
        directory that DeHackEd is run from you don't need this parameter.
  pathname = <path>
        This is the path from which you want Doom to be run.  This is only
        used when using the 'r'un option from inside DeHackEd.
  params = <Doom parameters>
        These are command-line parameters that are fed to Doom when it's
        run using the 'r'un option from within DeHackEd.  Useful if you
        are using DeHackEd for a custom patch for a WAD you are writing;
        you can simply include a '-file <wadname>' in this line, and
        Doom will load your level every time DeHackEd runs it.
  patchdir = <path>
        This is the directory that DeHackEd will look in for patch files.
        A nifty way of keeping all of your thousands of .DEH files out
        of the Doom main directory.
  askatload = <true | false>
        By default this option is true.  If it is true, every time you
        load a new patch file in the editor it will ask if you wish to
        reload the original exe data.  When set to false the question is
        NOT asked and it is up to you to know what you are doing.
  loadlogo = <true | false>
        This determines if DeHackEd shows the cool logo when the program
        starts up.  If you don't like the logo for some reason, just give
        this variable a value of "false".  It is true by default.

  The following parameters are all totally optional, and need only be
used if you have a really wierd doom.exe file.
  doomver = <0 | 1 | 2 | 3 | 4 | 5>
        This is the version of Doom you are hacking.  0 is for Doom v1.666
        and Doom 2 v1.7(a).  1 is Doom 2 v1.666, 2 is Doom 1 or 2 v1.9,
        and 3 is the Ultimate Doom v1.9.  This *must* be included if any of
        the following options are set.
  doomsize = <size>
        The size of your Doom.exe file.  I've had a few people complain
        that they have a non-standard doom.exe file size, and this may
        fix your problem simply by changing this.  If you get erroneous
        results though, you may have to play with the following params...
  thingoff = <offset>
  soundoff = <offset>
  frameoff = <offset>
  spriteoff = <offset>
  ammooff = <offset>
  weaponoff = <offset>
  textoff = <offset>
  cheatoff = <offset>
  codepoff = <offset>
        These are the offsets in the Doom exe file for their corresponding
        data chunks.  PLAY WITH THESE AT YOUR OWN RISK.  Note that there
        is no "miscoff" variable...  the miscellaneous data is too
        widespread to be controlled as easily as everything else.  Also,
        the codepoff variable is almost certainly useless, due to the
        way the code pointers are stored.
  textlength = <length>
        This is the length of the text data and should be used in
        conjunction with the previous offsets.


 7. *** Available Keys
\------================

  Available keys are as follows:

  ESC   Exits to DOS.  Or, if you are in an input box, or just about
        *anywhere* in the program for that matter, it will back you
        out to whatever you had previously been doing.

  Enter Edits the current field, if it is an editable field.  To leave an
        editing box if you hit Enter by mistake, simply hit ESC.

  Space Displays or plays the current field, if applicable.  If you are
        on a "frame" field, such as any of the Thing frames, it shows the
        frame that you've got highlighted.  (Note:  If you are on the
        "Next Frame" field in the Frame editor you WILL see the next frame,
        not the current frame.)  If the frame you are viewing is the first
        in a series of frames, repeatedly pressing the spacebar will cycle
        through all of the frames.  Use the right and left arrow keys to
        view different sides of the Thing, if it has more than one different
        view.  Escape will exit.  The spacebar will also view the full text
        strings in the Text Editor, and play the sounds when you are in a
        sound field.

  A     The About window.  This brings up two windows that shows you
        what version of DeHackEd you are working with (and some credits),
        and also a small summary of what Doom exe you are editing, and
        how much memory you have free, etc.

  C     The copy command.  This will copy information from one entry to
        another.  The syntax is fairly basic:  enter the number of the
        entry to copy FROM, and the entry number to copy TO.  A clipboard
        for Things is available as Thing #138, which is just a temporary
        storage Thing (and is not actually present in the Doom.exe file).
        When entering the number of the object to copy from or to simply
        hit the enter key to use the current object.

  G     Goes to a specific Thing.  If you are in the Thing editor and know
        which Thing you want to see, you can go right to it by picking the
        name out of a list of names without bothering to page through all
        the Things looking for it.  When the list of Things appears, you
        can do a speed-search by typing in the first few letters of the
        name.  Or, another quick alternative is to just type in the Thing
        number.  If you are in the Frame editor, you will see a list of
        all of the Things exactly as if you were in the Thing editor.  When
        you choose Thing, DeHackEd will find the Initial Frame for that
        Thing and jump to it.  Entering a number will again allow you to
        jump straight to a certain Frame.
        If you not in the Thing or Frame editing screens you will be able
        to enter the number directly and go straight to that object (like
        hopping straight to Sound #45 by typing in that number).
        In the Text editor the 'g' key allows you to search for a text
        string.  Type in any search string up to 40 characters in length,
        and DeHackEd will examine the entire Text data to find any
        occurences of that string.

  J     Jumps to the information in the current field, in it's respec-
        tive editor.  For example, if you are in the Thing editor and the
        'Death Frame' is highlighted, and you press the 'j' key, you will
        jump to the Frame editor with the corresponding Frame number high-
        lighted.  A very handy tool for moving around the various editors.
        Generally it'll jump to a "logical" place, if there is one.

  L     Loads a patch file.  You can enter a patch file (complete with
        path, if necessary) in the input box, or you can just hit the
        enter key to choose the patch from a list of all the patches in
        your patch directory.  An extension of ".deh" will be assumed for
        the patch file if none is given.  Note that you will need to use
        'w' to write the changes to the exe file after loading it, or the
        changes will not show up if you try to run Doom.  DeHackEd will do
        its best to convert patch files between all of the different exe
        formats to the current version of Doom that you have, but be warned
        that sometimes some of the information (usually the Text data)
        will not be compatible.  When the information is loaded, only
        values that are replaced are actually changed...  all other data
        (including any changes you have made) will be left intact.  If you
        want to avoid this, use 'z' to reload the original exe information
        before loading the patch.  Alternately you can answer 'y'es to the
        question about reloading the original exe data when you load the
        patch.  You can also load patches from the command line by typing
          dehacked -load <patchname>

  R     Runs Doom.  It allows you to quickly test-run Doom, to check out
        the changes you've made (remember to hit 'w' before running!).
        After Doom finishes, you will be returned to your current place
        in the editor to continue working.  You can specify command-line
        parameters for Doom and the directory to run Doom from in the
        DeHackEd.ini file (see section 6).

  S     Save a patch file.  You must enter the patch filename, and it
        will save all changed material to the patch file, in a text
        format.  An extension of ".deh" is assumed if you don't give one.
        You can also do this from the command line by typing
          dehacked -save <filename>

  U     Undo all changes.  This reloads the information straight from the
        hacked Doom exe file, which in effect returns you to your most
        recent 'w'rite of all the data.

  W     Writes all changes to the Doom exe file.  This step is necessary
        to get any results!

  Z     Reload the ORIGINAL exe data.  So if you've been playing around
        and now all the monsters look like med-kits, and your rocket
        launcher shoots plasma that looks like lost souls, hit this key
        to get back to the real original Doom data.

  F2    Thing Editor.  This is the main Thing editor, the default screen in
        DeHackEd.  See section 9 for more detailed Thing info.

  F3    Frame Table.  Displays Frame information, in a list format.
        See section 10 for more detailed Frame info.

  F4    Misc Editor.  This allows you to edit the weapons, ammunition,
        cheat codes, and other miscellaneous data, including player health
        and similar goodies.  Section 11 talks more about this screen.

  F5    Sound Table.  A jolly good table of all the sounds.  Check out
        section 12 for more Sound table info.

  F6    Sprite Table.  A handy list of all the sprites, in case someone
        needs it.  Section 13 deals with the Sprites.

  F7    Text Editor.  This shows all the text strings in the Doom.exe
        file.  Section 14 has more info.


 8. *** Mouse Info
\------============

  Some notes on the mouse support.  Generally just click places to find
out what happens!  The status bars on the top and bottom of the screen are
there expressly for the mouse users (click on 'em to get help, exit, see
the "About" window, load/save patch files, or switch screens).  Clicking
on any of the fields will switch to it, and double-clicking will bring up
the editing box for that field.  Click on the "Thing Number" in the upper
left window as a shortcut to the Goto Thing function.  Clicking on any
sound or frame name will play the sound or show the frame for you.  Right
clicking at any time will act exactly like the Escape key was pressed
(except for exiting the program), i.e. get you out of input boxes, leave
the frame viewer, etc.  The way it's designed should (hopefully) be
intuitive.

  A problem has been reported with some mice where the mouse only moves
in the top half of the screen.  I have not been able to duplicate the bug
with my Microsoft mouse and driver, so it must be something fruity with
other mouse drivers.  I'm hoping that a minor change I made has fixed the
problem, but I won't be sure of this until I hear from someone who can
tell me one way or another.  Either way, just remember that you can do
anything with the keyboard that you can do with the mouse.


 9. *** Thing Editor
\------==============

a.  Thing fields

  This is the first thing you see when you start up DeHackEd.  It is also
  one of the main areas of the program.  Edit Things by highlighting the
  desired field and hitting Enter, or double-clicking on it with the mouse.

  The Player entry is slightly "special" in regards to how much Doom
  uses the info in the Player fields.  Entries such as Speed and Hit
  Points are NOT changable through DeHackEd; they are controlled else-
  where in the exe and aren't easily accessible.  Several of these fields
  have been discovered and are now available in the Misc editor (F4).  Most
  of the Player entries, however, can be used and changed normally.

  Thing Number:
        The number of the Thing.  Basically it's just for reference,
        numbered in order according to how the Things are stored in the
        Doom exe file.
  Thing Name:
        A short descriptive name for the Thing.  This info can now be
        edited, but any changes you make to the Thing Name will be erased
        as soon as you leave DeHackEd...  the only way to make them stick
        is to 's'ave a patch file just before you leave, and then 'l'oad
        that patch back up when you enter DeHackEd the next time.
  Thing ID#:
        This is the Thing's 'identification number' which is used in level
        development (WAD files).  Wherever this number appears in a WAD
        file, this Thing will appear.
  Hit Points:
        How much damage it can sustain.  For all non-living Things, its
        generally 1000 (not necessary though).
  Speed:
        How fast it can go.  Projectiles have their speed multiplied by
        65536, but DeHackEd displays projectiles the same way it does
        normal speeds (so you don't need to wade though large numbers for
        projectile speeds).  Whether a certain Thing is a projectile or not
        is determined by bit #16, 'Projectile'.  If that bit is set, the
        speed is displayed as a Projectile, otherwise it is a "normal"
        speed.  Basically though, just ignore it and DeHackEd will take
        care of it for you.  =-}
  Width:
        The radius of the Thing.  A narrow Thing is harder to hit!  To fit
        a Thing through a narrow passageway, you need to have the passage
        slightly wider than twice it's width.  Thus a passage must be 33
        to allow the Marine through, even though his actual radius is 16.
  Height:
        Same as width, but it's height.  Duh.  :-)
  Missile Damage:
        If it's a projectile, how much damage it does upon impact.  Note
        that Lost Souls have this set to 3, because they function as
        projectiles during their attack.
  Reaction Time:
        For monsters, their reaction time.  Lower=quicker to attack,
        higher=slower to attack.
  Pain Chance:
        Chance out of 256 that a monster's attack will be interrupted by an
        injury.  The Lost Soul always will (256), and the Spider Boss
        rarely will (40).
  Mass:
        Thing's mass.  Set a trooper's to 1 and watch him fly!  Note the
        Cyberdemon has a high mass, and your rockets don't budge him much.
  Bits:
        This is the actual value of all of the bits.  Just change this one
        number if you want to set all of the bits at once to something.
        See also the Bit fields portion of the text, coming up in a few
        pages (section 9b).

  SOUNDS
  Alert:
        Sound made when the monster first spots the player, or a projectile
        is launched.  These all point to the sounds in the Sound table.
  Attack:
        Sound made during a close attack.
  Pain:
        Sound made when the Thing is injured.
  Death:
        Sound made when the Thing dies.  For projectiles and barrels, the
        sound of its explosion.
  Action:
        Sound made when the Thing is just milling around.

  FRAMES
  First Normal:
        What an inactive thing looks like, or a monster that's not yet
        active.  All frame numbers refer to the Frame table.  Only the first
        frame is listed, you will need to refer to that Frame entry in the
        Frame table to find out if it's actually a sequence of frames.
  First Moving:
        A movable Thing's "first steps."
  Injury:
        Frame played for an injured Thing.
  Close Attack:
        Attacks that are close (clawing imps).
  Far Attack:
        Attacks that are far away (imp winding up for a fireball attack).
  Death:
        Monster death or barrel/projectile explosion.
  Explode Death:
        Exploding death (slop!) for players, troopers, imps, and sargeants.
  Respawn:
        This is the frame that's shown when the Thing comes back to life
        due to the ArchVile.  Things that do not have a Frame shown for
        this field cannot be raised by the ArchVile.


b.  Bit Editor

   0.Can be picked up:    Something that can be picked up by the player,
                          like an ammo clip.
   1.Obstacle:            Something that can't be walked through.
   2.Shootable:           It will only take damage if this is set.  Note
                          that barrels also have this set.
   3.Total invisibility:  The Thing just can't be seen, no-how, no-way.  It
                          won't even show up with iddt-iddt.
   4.Can't be hit:        This is set for objects that will collide with
                          something themselves, but can not be hit by
                          anything else.  E.g. rockets, which collide with
                          things (obviously) but can not be shot down.
   5.Semi-deaf            Monsters become active if they see you (like
                          normal), or if you fire a weapon AND there is a
                          direct line of sight between you and the monster.
   6.In pain:             Used internally by the Doom exe to determine if a
                          monster is in pain or not.
   7.Steps before attack: Reportedly the monster will take a step before
                          attacking the player.  This hasn't been verified.
   8.Hangs from ceiling:  For those gory legs & mangled bodies.  Have it
                          set if the Thing hangs from the ceiling.
   9.No gravity:          Used for floating monsters and Things that aren't
                          on the ground.
  10.Travels over cliffs: Set for projectiles and players.  This bit allows
                          the Thing to travel from one sector to another
                          even when the dropoff height difference is greater
                          than 16 (or 24?).  Turn this on for Imps, and the
                          Imps on E1M1 will jump off their platform after you.
  11.Picks up items:      This Thing (i.e. the player) can pick up Gettable
                          Things.
  12.No clipping:         Same effect as idspispopd/idclip, but also
                          effective for monsters.
  13.Slides along walls:  Apparently available for monster types that were
                          never used in Doom.  Reportedly this bit will
                          only work in the beta versions of Doom and was
                          disabled for the release versions.
  14.Floating:            For floating monsters, like the Cacodemon and the
                          Lost Soul.
  15.Semi-no clipping:    Kinda like no-clipping, kinda not.  You can't
                          walk through walls, or trigger any linedefs, but
                          you can walk over any height cliff in your way.
  16.Projectiles:         Set for projectiles.  Allows the projectile to
                          leave your body.  If it is turned off, the proj-
                          ectile explodes as soon as it is fired, because
                          it originates from "inside" your body.
  17.Disappearing Weapon: This is used for weapons such as the shotgun that
                          the sargeants use, so that it disappears when
                          picked up in a multi-player game.  Normal weapons
                          do not have this set, however, because they stick
                          around in normal multi-player games when picked up.
  18.Partial invisibilty: The Spectre effect.
  19.Puffs (vs. bleeds):  Whether a thing bleeds (bit off) or puffs (bit on)
                          when hit.  The barrel is the only default Thing
                          that has this set.
  20.Sliding helpless:    ???
  21.No auto-leveling:    Valid only for floating Things, this bit makes it
                          so that flying monsters do not need to rise/sink
                          to the player's level before attacking. This makes
                          it quite unfair for the player!
  22.Affects Kill %:      This Thing counts as part of the Kill% at the end
                          of the level.
  23.Affects Item %:      Just like Kill%, but for Things.
  24.Running              ??? Perhaps active if the player is holding down
                          the Run key.
  25.Not in deathmatch:   Things not present in Deathmatch mode, such as keys
                          and the normal "Player" starting spots (deathmatch
                          spots are used instead).
  26.Color 1             \ 00-greens->greens       01-greens->browns
  27.Color 2             / 10-greens->indigos      11-greens->dark reds
  28.Unused
  29.Unused
  30.Unused
  31.Unused


10. *** Frame Editor
\------==============

  This displays the majority of the Frame information.  Each frame has six
editable fields (of 8 total that are stored in the exe).  The only two
fields that are NOT shown on the screen are always 0 in all of the Frames,
so I decided it would be pointless to try to squeeze them onscreen also.

  Frame #:
     This is the number that is specified in the Thing Frame fields.
  Name:
     A lookup done on the Text info in the doom.exe file, specified by a
     reference to the Sprite #, the Sprite Table, and the Sprite subnumber.
  Sprite #:
     The sprite that is shown for this Frame.
  Sprite Sub #:
     The individual "picture" (for lack of a better word... I think the
     technical term is "lump") suffix for this Frame.  In the Doom WAD file,
     there is (for example) a Sprite called TROO, for the trooper.  The
     sub # specifies which TROO picture to use... TROOA, TROOB, TROOC, etc.
  Bright Sprite:
     This check box determines if a Sprite is ALWAYS displayed at it's full
     brightness.  Sprites that are always displayed at their full brightness
     are Lost Souls, plasma bullets, etc... they are always visible no
     matter what the lighting of the room they are in is.
  Next Frame #:
     Which Frame to play next.  You can skip a few shotgun frames this way,
     to make the super-fast ("combat") shotgun.
  Duration:
     How long the frame stays on the screen.  Make 'em all 1 to make the
     super fast shotgun *really* be super fast!  Notice that the notoriously
     slow BFG has a value of 20 and 10 for a few of its Frames.
     (hint hint... =-)
  Code pointer:
     An offset in the Doom exe file to where it should look for the "action"
     associated with this Frame.  This field is now editable in v3.0!  When
     you edit it, DeHackEd will ask for a new Frame number.  It will then
     replace the code pointer with the code pointer from the Frame you
     specify.  This makes certain that invalid code pointers won't
     accidentally be entered.  The code pointer determines what action
     happens when a certain Frame is displayed.  For example, for Frame 811
     (which is part of the sequence of a barrel exploding) the code pointer
     will cause damage to be done to anything standing near the barrel.  If
     you replace an Imp's Close Attack Frame's code pointer with this one,
     the Imp would do damage just like an exploding barrel whenever the
     player was close to it.  Ouch!


11. *** Misc Editor
\------=============

a. Weapon fields

  Weapon Name:
        The name of the weapon (not editable)
  Ammo Type:
        A pithy description.  This will be 'N/A' when an 'unknown' ammo
        type is given for the Ammo Number.  Ammo type 5 is listed as
        "Unlimited".
  Ammo Number:
        0=bullets       3=rockets
        1=shells        4= ??? (none)
        2=cells         5=unlimited (fist/chainsaw)
  Max ammo cap:
        The starting capacity for the current type of ammo.  It's listed on
        the right side of the slash on the status bar.  Backpacks will
        double this limit automatically.  This will be 'N/A' for unknown
        ammo types.
  Ammo per item:
        How much ammo you get when you pick up a power-up of the current
        ammo type.  For example, normally the bullet power-up gives you 10
        bullets.  This value is multiplied by 5 for the 'large' power-ups,
        i.e. boxes of rockets, boxes of shells, etc.  Different difficulty
        modes also change this.  Also 'N/A' for unknown types.
  Deselect frame:
        This is the frame that's shown when another weapon is selected and
        the current weapon drops off the screen.  This is the number that
        Doom refers to in the Frame list for more info.
  Select frame:
        The frame that's shown when the weapon is selected and is rising
        onto the screen.
  Bobbing frame:
        Frame number for the bobbing weapon.
  Shooting frame:
        Frame played when the weapon shoots.
  Firing frame:
        Frame that actually shows the "flames" from the weapon.


b. Cheat codes

  The cheat codes are a little tricky to deal with, but not as stringent
as the Text data.  Cheat codes may consist of lowercase letters of the
alphabet, numbers, and some punctuation, as far as I have verified.  I
don't believe anything that requires a shift key is allows (such as
!&@#$)% etc) but you may want to try it out yourself.  Every cheat except
for IDMUS and IDCLEV (which required addition input) may be truncated as
much as you wish, although null cheats are not allowed.  If several cheats
are modified to be exactly the same, Doom will activate all of them at once.
So you could, if you wished, set every cheat to activate on the letter 'i',
and then when you hit that letter EVERY cheat would activate.  Fun!  The
names should be obvious, but I will list them here for completeness' sake.

  Change music       IDMUS, sets music to that of any level
  Chainsaw           IDCHOPPERS, gives the player the chainsaw
  God mode           IDDQD, player can not be hurt
  Ammo & Keys        IDKFA, player recieves all weapons, ammo, and keys
  Ammo               IDFA, player receives all weapons and ammo
  No Clipping 1      IDSPISPOPD, the walk-through-walls cheat in Doom 1
  No Clipping 2      IDCLIP, the walk-through-walls cheat in Doom 2
  Invincibility      IDBEHOLDV, gives the player the Invincibility Sphere
  Berserk            IDBEHOLDS, gives the player the berserk box
  Invisibility       IDBEHOLDI, gives the player the Invisibility Sphere
  Radiation Suit     IDBEHOLDR, gives the player the radiation suit
  Auto-map           IDBEHOLDA, gives the player the auto map
  Lite-Amp Goggles   IDBEHOLDL, gives the player the lite amp goggles
  BEHOLD menu        IDBEHOLD, shows the little menu of options
  Level Warp         IDCLEV, warps the player to a different level
  Player Position    IDMYPOS, shows the player's x and y position and angle
  Map cheat          IDDT, used on map screen, shows the entire level


c. Miscellaneous data

  The miscellaneous data is by far the most difficult for DeHackEd to deal
with (which is why it has taken so long for it to get included in the
program :).  These difficulties also impose a few limits on some of the data
listed, which will be described below.
  For those who are not familiar with "Armor Class" now is probably a good
time for me to explain it.  Doom has three separate armor classes... 0, 1,
and 2.  0 corresponds to the player having no armor, 1 corresponds to the
green armor and 2 corresponds to the blue armor.  With an armor class of 2
any attack on the player will be divided so that 2/3 of the damage is taken
from the armor and 1/3 is taken from the player's health.  An armor class of
1 divides the damage equally between the player's health and armor, and
(of course) an armor class of 0 means that the armor takes no damage at all.
  Using DeHackEd it is possible to give the armors different armor classes,
but Doom will NOT adjust the damage data accordingly.  Doom will regard any
armor class higher than 2 as being armor class 2.  Why then, you ask, did
I include it?  It is because Doom bases the amount of armor that you get on
the armor class.  An armor class of 5 gives 500% armor when it is picked up.
An armor class of 10 would give 1000% armor.  However this armor would still
behave just like blue armor when it comes to damage.

  Initial Health:
        How much health the player starts out with.  Set this to a negative
        number for some REALLY whacked out effects.
  Initial Bullets:
        How many bullets the player starts out with.  Start 'em out with 5%
        health and 2 bullets and see how much the players like you. :)
  Max Health:
        The maximum health gained by picking up the little blue bonus
        bottles.  Note that medkits and stimpacks will still take the
        player's health up to 100%.
  Max Armor:
        The maximum health gained by picking up the little brown armor
        thingies.
  Green Armor Class:
        The armor class of the Green Armor.  (See above for a description
        of armor classes.)  The formula for armor gained is 100 * armor class.
  Blue Armor Class:
        The armor class of the Blue Armor.  (See above for a description
        of armor classes.)  The formula for armor gained is 100 * armor class.
  Max Soulsphere:
        The maximum health gained from the Soulsphere.
  Soulsphere Health:
        How much health the Soulsphere will give you (if this much health
        will not take the player's total past the Max Soulsphere amount).
        This must be a value in the range -128 through 127.
  Megasphere Health:
        How much health the Megasphere will give you.
  God Mode Health:
        How much health the player gets when he uses the god-mode cheat.
  IDFA Armor:
        How much armor the player gets when using the IDFA cheat.
  IDFA Armor Class:
        The armor class of the armor received from an IDFA.
  IDKFA Armor:
        How much armor the player gets when using the IDKFA cheat.
  IDKFA Armor Class:
        The armor class of the armor received from an IDKFA.
  BFG Cells/Shot:
        How many cells the BFG uses per shot.  This must also be in the
        range -128 through 127.
  Monsters Infight:
        If this check box is checked, monsters will fight their own kind.
        Normally Doom does not allow Imps to fight Imps, for example, or
        Cacodemons to fight each other.  If an Imp gets hit by an Imp
        fireball, it ignores it.  Click this box to change all that.  It
        makes things much easier!


12. *** Sound Editor
\------==============

  Sound Number:
        This is the number that's referenced by the Things for each sound.
  Text Offset:
        The offset into the Text section where the sound name is found.
  Sound Name:
        Found by simply checking the Text section at the correct offset.
  0 / 1:
        This may be related to whether a given sound is ALWAYS played at
        its full volume, no matter how far away it is.  For example, some
        boss activation sounds are always played very loudly even if you
        are far away from them.
  Value:
        This is the mixing value when more than one sound is being played
        at one time.  Lower numbers indicate that the sound will be less
        emphasized among other sounds.


13. *** Sprite Editor
\------===============

  Sprite Number:     The number in the Frame table that refences this
                     Sprite.
  Text Offset:       The offset into the Text section where the Sprite
                     name is found.
  Sprite Name:       Also found through a simple lookup in the Text
                     section.


14. *** Text Editor
\------=============

  Text Offset:       The offset into the Text section of the current
                     Text string.
  Text:              This is the actual text that's located at the
                     text offset.

  Some notes are in order on the Text viewing, editing, etc.  First of
all, if the Text is longer than about 60 characters (too long to fit on
one line in the general Text screen) three ellipses are displayed at the
end of the line.  Non-printing characters, such as new-lines, tabs, and
other screwy characters are shown by a tilde symbol in the text (~).

  If you want to view the actual text, just hit the Spacebar and a window
will pop up with the actual text string in it.  A newline is shown by a
'\n' shown in black (dark grey), tabs by '\t' in black, and so on.  The
text is formatted in basically the same way that it would be on-screen.

  To edit the text, just hit Enter and the view window and an edit window
will pop up.  Enter your new text in the edit window, and hit Escape when
you are done editing.  If you are hitting Escape to cancel the current
editing operation, answer 'n'o when asked if you want your changes saved,
otherwise answer 'y'es and the text will change to your modification.

  Because each text string is a fixed length in the Doom exe file, you
have only a slight lee-way in how long the edited text needs to be.  The
minimum and maximum length for the string you are editing are shown on the
top line of the editing window, along with the current position of the
character you're on.  You will have a range of 4 characters that the new
string must fit into.  Typing beyond the maximum number of characters is
not allowed, and stopping short of the minimum is also not allowed.

  The text editor is not exactly a full-fledged version of Wordperfect, so
the only movement key you have is the back-space...  no arrow keys, no
macros, no spell checker, etc. :-)


15. *** Frequently Asked Questions
\------============================

  This section is devoted to questions that I have received regularly in
the past in the hopes that people will read this and not bug me. :)


Q: Help!  I start up DeHackEd up it complains that it can't find my Doom
   files.  What can I do?

A: Take a look at the README.TXT file.  You most likely do not have the
   paths set up correctly so that DeHackEd will know where to find all of
   your Doom files.  Follow the directions in the README.TXT file to solve
   the problem.


Q: I've started up DeHackEd and loaded a patch file, but when I run Doom
   all I get is the original game.  I can't see any changes.  What am I
   doing wrong?

A: There are two possible causes for this.  The first happens if you are
   'r'unning Doom from within DeHackEd.  You need to be sure to write all
   of the changes (using the 'w' key) after loading a patch, but before
   running Doom.  Otherwise the changes won't be made, and you won't see
   any results.

   The second possible problem is if you try to run Doom directly from
   DOS.  DeHackEd does not alter your doom.exe or doom2.exe files... those
   files are always preserved in their original state.  So, if you load
   a patch and try to run Doom you will get exactly the same thing as you
   have always seen.  What you need to do is use a file called DOOMHACK.EXE
   that should be in your Doom directory.  Run this file instead, exactly
   as you would normally run Doom, and you should see the changes that
   were made.


Q: A friend and I are trying to run a deathmatch game.  I want to give
   myself some extra health so that he can't win as easily, but I don't
   know how to do it.  Can you help me?

A: Well, yes and no. :)  First of all, if you make any changes to your
   Doom file you need to be sure that ALL players in a multi-player
   game have exactly the same changes made.  If one person loads up a
   patch file, then everyone must load up that patch file.  If players
   have different changes made to their exe files, Doom will abort with
   a "Consistency failure".  This is a benefit of the very strict "cheat
   prevention" policy that Doom uses.  There is no way around this,
   period.


Q: OK, now my friend and I are trying to play with that really cool
   DMARMY3.DEH patch.  We both load it up in DeHackEd, but when we run
   the setup program (or sersetup or ipxsetup) we see the normal monsters
   and stuff.  Why can't we see any changes?

A: This goes back to the way DeHackEd modifies the exe file.  DeHackEd
   does not actually modify the Doom.exe (or Doom2.exe) file.  It instead
   makes its changes on the DOOMHACK.EXE file.  Whenever you run setup
   (or sersetup or ipxsetup), though, those programs use the normal
   Doom exe file.  You can set up DeHackEd to work with different file
   names by editing the ini file.  So for your problem you could do the
   following (substitute "doom2.exe" for "doom.exe" if you use Doom 2):

   1. Copy doom.exe to doomorg.exe
   2. Copy doomhack.exe to doom.exe
   3. Edit the DEHACKED.INI file, and modify the line that says
      "editname" to end in "doom.exe"
   4. Edit the DEHACKED.INI file, and modify the line that says
      "normalname" to end in doomorg.exe

   After you do this you will be able to use patches just like normal,
   but the setup programs will run the altered Doom file rather than the
   original one.  Fun fun fun!


Q: I want to edit the rocket's radius of damage, and the damage bullets
   do, and change how many bullets the shotgun shoots.  How do I do it?

A: You can't.  Version 3.0 of DeHackEd allowed the capability to edit a
   bunch of previously unalterable things (like player's initial health,
   BFG ammo used, etc), but there are still things that can not be changed.
   You'll just have to design your patch around the limitations.  These
   things are such a fundamental part of the exe file that it would be
   quite difficult to do any modification at all to them.


  That's about it.  Any more question?  Feel free to write me at
gregl@umich.edu for more information.  Have fun!


