Doom Wiki
Register
Advertisement
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 equivalent Function
1 187520 Light0 Light restore (after flash)
2 185392 WeaponReady Weapon bobbing pointer
3 185808 Lower Weapon select pointer
4 185872 Raise Weapon deselect pointer
6 186000 Punch Player punch
9 185648 ReFire If fire button is held, jumps back to first shooting frame instead of frame with this pointer
14 186832 FirePistol Player pistol shot
17 187536 Light1 Light flash (dim)
22 186960 FireShotgun Player shotgun blast
31 187552 Light2 Light flash (bright)
36 187120 FireShotgun2 Player super shotgun blast
38 185760 CheckReload Check shells (if 1 or 0 left, skip reloading frames and select different weapon)
39 166848 OpenShotgun2 Play sound DBOPN
41 166864 LoadShotgun2 Play sound DBLOAD
43 166880 CloseShotgun2 Play sound DBCLS
52 187312 FireCGun Player chaingun shot (check ammo; don't go to -1 ammo, change weapon)
60 185936 GunFlash Display firing frame
61 186432 FireMissile Player launch rocket
71 186176 Saw Player use chainsaw
77 186528 FirePlasma Player fire plasma bullet
84 187744 BFGsound Play sound BFG
86 186480 FireBFG Player fire BFG shot

Monster / thing code pointers[]

Frame # Pointer # BEX equivalent Function
119 187568 BFGSpray BFG blast effect
127 166160 Explode Radius explosion
157 166112 Pain Play pain sound
159 167808 PlayerScream Play sound PLDETH or PDIEHI
160 166144 Fall Dead body mode
166 166096 XScream Play sound SLOP
174 161536 Look Wait to wake up
176 161744 Chase Standard monster walking code pointer
184 162224 FaceTarget Turn to face the direction of the current target
185 162320 PosAttack Trooper pistol shot
190 165984 Scream Play death sound
243 164160 VileChase Arch-Vile walking code pointer (check to resurrect monsters)
255 164496 VileStart Play sound VILATK
257 164704 VileTarget Create Arch-Vile flame on target, enable radius blast for frame 264
264 164784 VileAttack Target jumps in air, takes 20 points of damage
281 164512 StartFire Play sound FLAMEST
282 164576 Fire Continuously reposition Arch-Vile flame on target
285 164544 FireCrackle Play sound FLAME
316 163424 Tracer Revenant fireball homing & smoke trail code pointer
336 163808 SkelWhoosh Play sound SKESWG
338 163840 SkelFist Revenant punch, play sound SKEPCH if hit
341 163328 SkelMissile Launch Revenant fireball with possible homing (and smoke trail) effect
376 164992 FatRaise Play sound MANATK
377 165024 FatAttack1 Launch 2 Mancubus fireballs: one straight, one left
380 165152 FatAttack2 Launch 2 Mancubus fireballs: one straight, one right
383 165280 FatAttack3 Launch 2 Mancubus fireballs: one left, one right
397 166208 BossDeath Check for special sector lowering (666/667)
417 162592 CPosAttack Chaingunner or Wolfenstein SS shoot chaingun, fires 2 successive hitscan pellets
419 162720 CPosRefire Check line of sight to stop firing
454 162896 TroopAttack Launch Imp fireball or scratch at close range
487 163008 SargAttack Demon bite
506 163088 HeadAttack Launch Cacodemon fireball or bite at close range
539 163232 BruisAttack Launch Baron of Hell / Hell Knight fireball or scratch at close range
590 165472 SkullAttack Lost Soul attack
603 166784 Metal Play sound METAL & standard walking pointer
616 162448 SPosAttack Spiderdemon shoot chaingun (same as Sergeant's attack), fires 3 hitscan pellets
618 162784 SpidRefire Check line of sight to stop firing
635 166816 BabyMetal Play sound BSPWLK & standard walking pointer
648 162848 BspiAttack Launch Arachnotron plasma bullet
676 166752 Hoof Play sound HOOF & standard walking pointer
685 163184 CyberAttack Launch Cyberdemon rocket
711 165888 PainAttack Spawn Lost Soul
718 165920 PainDie Spawn 3 or 4 Lost Souls & set body to dead
774 161440 KeenDie Check for special sector lowering (tag 666) and dead body mode
779 167008 BrainPain Play sound BOSPN
780 167024 BrainScream Play sound BOSDTH and create explosions (frames 799-801) at 320 units south from Romero's head at heights between 128 and 640 units
783 167312 BrainDie End level
785 166912 BrainAwake Play sound BOSSIT and initialize boss spawn spots list (game will crash if too many spots are present)
786 167328 BrainSpit Fire spawn cube - landing required on level or game will crash
787 167488 SpawnSound Play sound BOSCUB
788 167520 SpawnFly Check for spawn point (spawn monster other than former humans, cyberdemons or spiderdemons)
801 167184 BrainExplode Create explosion (frames 127 - 129)

Source port code pointers[]

Code pointer Function Source port
NULL Zeroes out an existing codepointer Boom

See also[]

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

External links[]

Advertisement