Dhe31 start

DeHackEd 3.1 splash screen

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. The latest version of DeHackEd, version 3.1, was released on February 26, 1997. 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.

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.

Dhe31 text

Editing Doom text-strings

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.

Thing numbers

Dhe31 things

editing thing properties

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 info.c in the Doom source code). This number is different from the number used to identify things when editing levels.

Thing number Usage
1 Player
2 Trooper
3 Sergeant
4 Archvile
5 Archvile fire
6 Revenant
7 Revenant rocket
8 Fireball Trail
9 Mancubus
10 Mancubus fireball
11 Chaingun Sargeant
12 Imp
13 Demon
14 Spectre
15 Cacodemon
16 Baron of Hell
17 Baron fireball
18 Hell Knight
19 Lost Soul
20 Spiderdemon
21 Arachnotron
22 Cyberdemon
23 Pain Elemental
24 SS Nazi
25 Commander Keen
26 Big Brain
27 Demon Spawner
28 Demon Spawn Spot
29 Demon Spawn Cube
30 Demon Spawn Fire
31 Barrel
32 Imp Fireball
33 Caco Fireball
34 Rocket (in air)
35 Plasma Bullet
36 BFG Shot
37 Arach. Fireball
38 Bullet Puff
39 Blood Splat
40 Teleport Flash
41 Item Respawn Fog
42 Teleport Exit
43 BFG Hit
44 Green Armor
45 Blue Armor
46 Health Potion
47 Armor Helmet
48 Blue Key Card
49 Red Key Card
50 Yellow Key Card
51 Yellow Skull Key
52 Red Skull Key
53 Blue Skull Key
54 Stim Pack
55 Medical Kit
56 Soul Sphere
57 Invulnerability Sphere
58 Berserk Sphere
59 Blur Sphere
60 Radiation Suit
61 Computer Map
62 Lite Amp. Visor
63 Mega Sphere
64 Ammo Clip
65 Box Of Ammo
66 Rocket
67 Box of Rockets
68 Energy Cell
69 Energy Pack
70 Shells
71 Box of Shells
72 Backpack
73 BFG 9000
74 Chaingun
75 Chainsaw
76 Rocket Launcher
77 Plasma Gun
78 Shotgun
79 Super Shotgun
80 Tall Lamp
81 Tall Lamp 2
82 Short Lamp
83 Tall Gr. Pillar
84 Short Gr. Pillar
85 Tall Red Pillar
86 Short Red Pillar
87 Pillar with Skull
88 Pillar with Heart
89 Eye in Symbol
90 Flaming Skulls
91 Grey Tree
92 Tall Blue Torch
93 Tall Green torch
94 Tall Red Torch
95 Small Blue Torch
96 Small Green Torch
97 Small Red Torch
98 Brown Stub
99 Technical Column
100 Candle
101 Candelabra
102 Swaying Body
103 Hanging Arms Out
104 One-legged Body
105 Hanging Torso
106 Hanging Leg
107 Hanging Arms Out 2
108 Hanging Torso 2
109 One-legged Body 2
110 Hanging Leg 2
111 Swaying Body 2
112 Dead Cacodemon
113 Dead Marine
114 Dead Trooper
115 Dead Demon
116 Dead Lost Soul
117 Dead Imp
118 Dead Sergeant
119 Guts and Bones
120 Guts and Bones 2
121 Skewered Heads
122 Pool of Blood
123 Pole with Skull
124 Pile of Skulls
125 Impaled Body
126 Twitching Body
127 Large Tree
128 Flaming Barrel
129 Hanging Body 1
130 Hanging Body 2
131 Hanging Body 3
132 Hanging Body 4
133 Hanging Body 5
134 Hanging Body 6
135 Pool Of Blood 1
136 Pool Of Blood 2
137 Brains

Code pointers

Player code pointers

Frame #Pointer #BEX equivalentFunction
1187520Light0Light restore (after flash)
2185392WeaponReadyWeapon bobbing pointer
3185808LowerWeapon select pointer
4185872RaiseWeapon deselect pointer
6186000PunchPlayer punch
9185648ReFireIf fire button is held, jumps back to first shooting frame instead of frame with this pointer
14186832FirePistolPlayer pistol shot
17187536Light1Light flash (dim)
22186960FireShotgunPlayer shotgun blast
31187552Light2Light flash (bright)
36187120FireShotgun2Player super shotgun blast
38185760CheckReloadCheck shells (if 1 or 0 left, skip reloading frames and select different weapon)
39166848OpenShotgun2Play sound DBOPN
41166864LoadShotgun2Play sound DBLOAD
43166880CloseShotgun2Play sound DBCLS
52187312FireCGunPlayer chaingun shot (check ammo; don't go to -1 ammo, change weapon)
60185936GunFlashDisplay firing frame
61186432FireMissilePlayer launch rocket
71186176SawPlayer use chainsaw
77186528FirePlasmaPlayer fire plasma bullet
84187744BFGsoundPlay sound BFG
86186480FireBFGPlayer fire BFG shot

Monster / thing code pointers

Frame #Pointer #BEX equivalentFunction
119187568BFGSprayBFG blast effect
127166160ExplodeRadius explosion
157166112PainPlay pain sound
159167808PlayerScreamPlay sound PLDETH or PDIEHI
160166144FallDead body mode
166166096XScreamPlay sound SLOP
174161536LookWait to wake up
176161744ChaseStandard monster walking code pointer
184162224FaceTargetTurn to face the direction of the current target
185162320PosAttackTrooper pistol shot
190165984ScreamPlay death sound
243164160VileChaseArch-Vile walking code pointer (check to resurrect monsters)
255164496VileStartPlay sound VILATK
257164704VileTargetCreate Arch-Vile flame on target, enable radius blast for frame 264
264164784VileAttackTarget jumps in air, takes 20 points of damage
281164512StartFirePlay sound FLAMEST
282164576FireContinuously reposition Arch-Vile flame on target
285164544FireCracklePlay sound FLAME
316163424TracerRevenant fireball homing & smoke trail code pointer
336163808SkelWhooshPlay sound SKESWG
338163840SkelFistRevenant punch, play sound SKEPCH if hit
341163328SkelMissileLaunch Revenant fireball with possible homing (and smoke trail) effect
376164992FatRaisePlay sound MANATK
377165024FatAttack1Launch 2 Mancubus fireballs: one straight, one left
380165152FatAttack2Launch 2 Mancubus fireballs: one straight, one right
383165280FatAttack3Launch 2 Mancubus fireballs: one left, one right
397166208BossDeathCheck for special sector lowering (666/667)
417162592CPosAttackChaingunner or Wolfenstein SS shoot chaingun, fires 2 successive hitscan pellets
419162720CPosRefireCheck line of sight to stop firing
454162896TroopAttackLaunch Imp fireball or scratch at close range
487163008SargAttackDemon bite
506163088HeadAttackLaunch Cacodemon fireball or bite at close range
539163232BruisAttackLaunch Baron of Hell / Hell Knight fireball or scratch at close range
590165472SkullAttackLost Soul attack
603166784MetalPlay sound METAL & standard walking pointer
616162448SPosAttackSpiderdemon shoot chaingun (same as Sergeant's attack), fires 3 hitscan pellets
618162784SpidRefireCheck line of sight to stop firing
635166816BabyMetalPlay sound BSPWLK & standard walking pointer
648162848BspiAttackLaunch Arachnotron plasma bullet
676166752HoofPlay sound HOOF & standard walking pointer
685163184CyberAttackLaunch Cyberdemon rocket
711165888PainAttackSpawn Lost Soul
718165920PainDieSpawn 3 or 4 Lost Souls & set body to dead
774161440KeenDieCheck for special sector lowering (tag 666) and dead body mode
779167008BrainPainPlay sound BOSPN
780167024BrainScreamPlay sound BOSDTH and create explosions (frames 799-801) at 320 units south from Romero's head at heights between 128 and 640 units
783167312BrainDieEnd level
785166912BrainAwakePlay sound BOSSIT and initialize boss spawn spots list (game will crash if too many spots are present)
786167328BrainSpitFire spawn cube - landing required on level or game will crash
787167488SpawnSoundPlay sound BOSCUB
788167520SpawnFlyCheck for spawn point (spawn monster other than former humans, cyberdemons or spiderdemons)
801167184BrainExplodeCreate explosion (frames 127 - 129)

Source port code pointers

Code pointerFunctionSource port
NULLZeroes out an existing codepointerBoom

See also

  • WhackEd - an enhanced DeHackEd/BEX editor designed for Windows.

External links

Community content is available under CC-BY-SA unless otherwise noted.