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 change the resultant executable to a custom name to distinguish them from the main Doom II executable.

In others, such as Cyberdreams, the user is advised to do this seperately as to deviate it from other and Doom II executables. 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 DeHackeEd executable with a release instead of relying on a installer/bat file or an instruction (or a combination of these) did also exist and it was (and is) considered illegal due to it relying on iD Software's executables. Legalization efforts exist to seperate these exe's to only supply a patch instead, leaving the choice to the user whether or not to play it in a source port or on vanilla Doom.

Nowadays, 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.