The Heretic Hack Editor (HHE)

HHE was a game behavior editor for Heretic, written by Greg Lewis and designed to be similar to the popular DeHackEd behavior editor for Doom. However, HHE never reached the level of polish that DeHackEd did, and there are some distinct gotchas when trying to use it, especially with the Shadow of the Serpent Riders edition of Heretic.

This page is meant to help with some of the more obtuse characteristics of the editor, for anyone who might still want to mod Heretic the old fashioned way. As far as I know, Chocolate Heretic is the only modern port that can use HHE patches; other ports generally have their own methods for changing game behavior. The program itself is for DOS and is unlikely to work on anything newer than Windows 9x versions.

General usage of the editor is very similar to DeHackEd, and information on modding with DeHackEd usually applies, except that HHE's code pointer section might not be functional.

This page is a work in progress and some info may be incomplete. Due to the limited utility of the program, further documentation of it isn't a high priority for me at the moment.

SotSR setup

For working with Heretic: Shadow of the Serpent Riders (aka Heretic v1.3) some changes to the default HHE.INI file are required. The values generally circulated (I do not know if the code pointer value is valid, but the rest seems to be working) are as follows:

# The size of the user-defined heretic.exe file.
size = 728031

# These are the offsets for the various data sections...
thingoff = 617600
soundoff = 639734
frameoff = 583860
spriteoff = 583348
ammooff = 635780
weaponoff = 636204
textoff = 563284
codepoff = 258020

By default, HHE works with v1.0 of Heretic. I am not sure of the values needed to use it with v1.2, but they are unlikely to be necessary. Also note that loading an HHE patch built for the SotSR version of Heretic in Chocolate Heretic will require an additional -hhever 1.3 parameter.

Reorganizing behavior

The lack of even the somewhat limited codepointer manipulation that DeHackEd offered is fairly restrictive when it comes to rearranging how enemies and weapons should behave. It is possible to shuffle codepointers a bit by messing around with the "next frame" property in the frame table, but at most you can use the same number and type of code pointers as the original. Deviating further is likely to be more about trimming things down than anything else (sacrificing the Tome of Power for greater freedom in redefining the weapons, for instance).


Some of the bits/flags have rather unhelpful labels. Here are some clues for some of the more cryptic ones.

Bits 2:

  • 12: Unknown - MF2_PASSMOBJ, allows this thing to move over/under other things (given to monsters)
  • 13: Particles (?) - MF2_CANNOTPUSH, this thing cannot push other things
  • 14: Unknown - MF2_FEETARECLIPPED (For internal use)
  • 15: Varying Damage - MF2_BOSS, this thing is a boss monster
  • 17: Does Not Push Things - MF2_NODMGTHRUST, doesn't cause damage momentum when hitting something

Weapon modding

Note that setting the type of ammo that a weapon uses only partially works; the setting in the weapons pane determines which ammo type will be displayed on the status bar and checked when making sure the weapon hasn't run out of ammo, but attacks will subtract from whatever ammo type the code pointer was originally attached to. So if you, say, make the crossbow use a wand firing frame, it'll use wand crystals even if you leave the weapon's ammo type as arrows. Leaving them mismatched can result in some weird stuff like being able to fire the weapon infinitely and ending up with negative ammo counts. Furthermore, if you make a weapon use a different ammo type than its slot usually dictates, you may end up with problems when it comes to the automatic weapon switching when out of ammo, so you should probably stick close to the original arsenal's layout here and do more of your modding in the properties of the projectiles themselves.

Thing table

HHE gives the wrong names for some of the things in the things window when used with v1.3. I would guess Heretic's internal thing table was altered between versions; the discrepancy begins around entry 88 and it seems that the "Phoenix Puff" object was removed. Some of the names in HHE are also unorthodox compared to the object's official name. A ditto mark (") in the Actual Thing column means that HHE's description is accurate.

NB: The thing numbers in HHE's table are independent of the thing numbers used in creating a map (which can be customized by the program).

Number HHE's name Actual thing in v1.3
1 Crystal Vial "
2 Silver Shield "
3 Enchanted Shield "
4 Bag of Holding "
5 Map Scroll "
6 Shadowsphere "
7 Quartz Flask "
8 Wings of Wrath "
9 Invulnerability "
10 Tome of Power "
11 Morph Ovum "
12 Morph Projectile "
13 Mystic Urn "
14 Torch " (item)
15 Time Bomb " (item)
16 Time Bomb, Active "
17 Chaos Device "
18 Gasbag Pod
19 Gasbag Fragment Pod Fragment
20 Gasbag Generator Pod Generator
21 Water Droplet "
22 Water Splash "
23 Lava Splash "
24 Lava Smoke "
25 Sludge Droplet "
26 Sludge Splash "
27 Skull Hang 70 "
28 Skull Hang 60 "
29 Skull Hang 45 "
30 Skull Hang 35 "
31 Chandelier "
32 Serpent Torch "
33 Small Pillar "
34 Stalagmite, Small "
35 Stalagmite, Large "
36 Stalactite, Small "
37 Stalactite, Large "
38 Fire Brazier "
39 Barrel "
40 Brown Pillar "
41 Moss 1 " (3 strands)
42 Moss 2 " (1 strand)
43 Wall Torch "
44 Hanging Corpse "
45 Key Statue, Blue "
46 Key Statue, Green "
47 Key Statue, Yellow "
48 Key Statue Ball " (alterations affect all 3 colors)
49 Volcano "
50 Volcano Ball "
51 Volcano Chunk " (small lava fragment)
52 Tel. Spark Red 1 " (map placement ver.)
53 Tel. Spark Blue 1 " (map placement ver.)
54 Tel. Spark Red 2 " (spawned)
55 Tel. Spark Blue 2 " (spawned)
56 Teleport Flash "
57 Teleport Spot "
58 Smoke Puff 1 Staff Puff
59 Blazing Blue Puff Powered Staff Puff
60 Smoke Puff 2 Chicken Peck Puff
61 Gauntlet "
62 Gauntlet Puff PL1 "
63 Gauntlet Puff PL2 "
64 Dragon Claw "
65 Drag. Claw Puff Dragon Claw Tomed Puff
66 Drag. Claw Sparkle " (Tomed trail)
67 Drag. Claw Spike " (Tomed rippers)
68 Drag. Claw Puff 2 Dragon Claw Wall Puff
69 Drag. Claw Puff 3 Dragon Claw Impact Puff
70 Mace Firemace
71 Mace Small Ball 1 "
72 Mace Medium Ball "
73 Mace Small Ball 2 "
74 Mace Big Ball "
75 Hellstaff "
76 Staff Shot PL1 "
77 Staff Shot PL2 "
78 Staff Drip Green "
79 Staff Drip Yellow "
80 Staff Drip Red "
81 Staff Drip Blue "
82 Wand Shot PL1 Unused?
83 Wand Shot PL2 Tomed Wand Ball
84 Wand Puff 1 "
85 Wand Puff 2 Tomed Wand Puff
86 Phoenix Rod "
87 Phoenix Shot "
88 Phoenix Puff Phoenix Smoke Trail
89 Phoenix Smoke Tomed Phoenix Rod Fire
90 Phoenix Flame Ethereal Crossbow
91 Ethereal Crossbow Crossbow Shot (center)
92 Arrow Shot 1 Crossbow Shot (Tomed center)
93 Arrow Shot 2 Crossbow Shot (side)
94 Arrow Fragment Tomed Crossbow Glitter
95 Arrow Trail Blood Splat 1
96 Blood Drip 1 Blood Splat 2
97 Blood Drip 2 Player
98 Player Bloody Skull (from gibbed player)
99 Bloody Skull Chicken, Player
100 Chicken, Player Chicken, Monster
101 Chicken, Monster Chicken Feather
102 Chicken Feather Golem
103 Mummy Nitrogolem
104 Mummy Chief Golem Ghost
105 Mummy Ghost Nitrogolem Ghost
106 Mummy Chief Ghost Golem spirit
107 Rising Spirit Nitrogolem attack
108 Flaming Skull Weredragon
109 Weredragon Weredragon attack
110 Weredragon Shot 1 Unused?
111 Weredragon Shot 2 Unused?
112 Weredragon Shot 3 Weredragon attack smoke trail
113 Weredragon Shot 4 Ophidian
114 Ophidian Ophidian blue shot
115 Ophidian Ice Ball Ophidian red shot
116 Ophidian Fire Ball Iron Lich
117 Lich, Iron Iron Lich ice shot
118 Lich Ice Crystal Iron Lich ice shard
119 Lich Ice Shard Iron Lich fire shot
120 Lich Fire Iron Lich tornado
121 Lich Tornado Sabreclaw
122 Clink Disciple of D'Sparil
123 Wizard Disciple shot
124 Wizard Shot 1 Gargoyle
125 Gargoyle Fire Gargoyle
126 Garg. Leader Gargoyle gibs 1
127 Garg. Glob 1 Gargoyle gibs 2
128 Garg. Glob 2 Gargoyle fireball
129 Garg. Fireball Undead Warrior
130 Knight Undead Warrior Ghost
131 Knight Ghost UW Green Axe
132 Knight Green Axe UW Red Axe
133 Knight Red Axe D'Sparil on Serpent
134 D'Sparil Beast Chaos Serpent fireball
135 D'Sp. Beast Fire D'Sparil, dismounted
136 D'Sparil D'Sparil thunderbolt
137 D'Sparil Attack D'Sparil thunderbolt trail
138 D'Sp. Attack Part D'Sparil summoning effect
139 D'Sp Summon Ring D'Sparil teleporting?
140 Sorceror Teleport Maulotaur
141 Maulotaur Maulotaur fire spread
142 Maulotaur Fireball Maulotaur ground trail?
143 Maul. Explosion Maulotaur ground flame
144 Maul. Ground Attack Green Key
145 Green Key Blue Key
146 Blue Key Yellow Key
147 Yellow Key Wand Crystal
148 Wand Crystal Crystal Geode
149 Wand Crystal Geode Mace Spheres
150 Mace Balls, Small Pile of Mace Spheres
151 Mace Balls, Large Ethereal Arrows
152 Ethereal Arrows Quiver of Ethereal Arrows
153 Eth. Arrow Quiver Lesser Runes
154 Lesser Runes Greater Runes
155 Greater Runes Flame Orb
156 Flame Orb Inferno Orb
157 Inferno Orb Claw Orb
158 Claw Orb Energy Orb
159 Energy Orb Wind
160 Clipboard Clipboard (in-editor use)