DeHackEd

DeHackEd is an editor originally created for vanilla Doom that allows the operation of the executable to be changed. It was developed by Greg Lewis. Hit points, sounds, frame sequences, text strings and several other miscellaneous values can be changed. Modifications can be distributed in the form of DeHackEd "patches" which can be applied to the executable. In order to do this, DeHackEd has the ability to generate an exact copy of the Doom or Doom II executable, which by default is called.

The most common patches add fast monsters and weapons, player-seeking-self-detonating barrels, and so on. However, more balanced and artistic modifications can and have been made. Even though many advanced effects can be achieved with DeHackEd, it does not offer the complete flexibility that a custom source port can provide. Monster AI and armor classes are fixed for example.

Older DeHackEd patches use a binary format of data to be applied to an executable file using the DeHackEd patching utility. Later versions of DeHackEd save their patches in a human-readable plain text format that can be edited with any text editor.



Boom included the ability to load DeHackEd patches and affect changes to the game upon startup without any modification to the executable file. Other source-ports added similar functionality, and command-line loadable DeHackEd support is now common with most modern source-ports. Boom also provided the BEX (Boom EXtended) extensions for DeHackEd support. BEX allows greater flexibility in string editing, application of codepointers to any frame, and extra codepointers.

Doomhack
Besides being the default name of the executable DeHackEd generates as a copy of the Doom II executable, Doomhack, stylized as is also an umbrella moniker to describe any custom executable that applies a DeHackEd patch to the Doom executable, which is often Doom II's. However, the shareware release of Doom may also be used when a user wants to create a patch. In DeHackEd's, one can specify a custom name for the resulting executable, set by the user.

Several WADs, primarily those released as partial conversions and total conversions such as Hacx, Mordeth and Strain, use either custom installer programs or primitive batch files to apply their patch to a copy of the Doom II executable. This is done through the main DeHackEd program in conjunction with DeuSF and NWT to append extra flats and textures to the patch, but can also be used to simply merge the patch and the executable together. These installers also changed the resulting executables to a custom name to distinguish them from the main Doom or Doom II executable. Not every batch file or installer did this however, or confusingly changed the DeHackEd exectuable back to Doom II.

This method was the primary means of modifying the engine before the existence of source ports, as nowadays the user simply loads the patch alongside their port of choice, negating the use of a custom DeHackEd engine.

Supplying a modified DeHackEd executable with a release instead of relying on a installer/batch file or an instruction (or a combination of these) did also exist and was (and is) considered illegal due to it relying on id Software's executables. Supplying a patch instead avoids this by including only a minimum amount of novel information to apply to the original file and requiring the end user to possess the original. This also leaves the choice to the end user whether to play it in a source port or on vanilla Doom.

In the present day, for those projects that target pure vanilla/DOS compatibility, Doomhack may still be used. Because of this, and because of its prior function as a means to modify the engine, Doomhack can be seen as a predecessor to the later source ports, that made modifications possible before the Doom source code was released.

Thing numbers
When modifying things in DeHackEd, each thing type has an associated number. These correspond to the index in the thing info table inside the executable ( found in in the Doom source code). This number is different from the DoomEd number used to identify things when editing levels. Note that the DeHackEd index starts at 1, while the table index starts at 0.