DeHackEd and Boom Extensions grant access to many of Boom's original
and extended functions and parameters. This document is an attempt to
conceptualize and explain what it means to fully utilize the Doom engine
in theory, as well as what can actually be done in practice.
The scope of this document is confined by what Doom itself was
designed for. ZDoom scripting is beyond the scope. This document
considers Boom (the source port by TeamTNT) as a conceptual base and
PrBoom+ as a reference for application and testing.
Much of the information for this document was gathered from "Dehacked support in BOOM, extended
support" and "Patch File for DeHackEd
v3.0".
Scripting the engine is as simple as writing a text file called
dehacked.lmp
, putting it in a subfolder called
lumps
, and adding the following lines to your
wadinfo.txt
file.
[LUMPS] DEHACKED
DeuTex will pack dehacked.lmp
into your wad the
next time you run deutex -make
.
More detailed information on how to use DeuTex will be
covered in another document.
The engine's entire script is a list of 967
frames of animation and action. A frame in dehacked.lmp
looks like this.
Frame 22 (Shotgun 2) Sprite = 2 Subsprite = 0 Duration = 7 Next frame: 23 (Shotgun 3)
Sprites (Boom's Visual Effects): the
engine loads 137 sprites for use in any frame
of the script. For animation each sprite has one or more subsprites
named A through Z etc.. Unfotunately you must refer to the sprites and
subsprites by number in the dehacked lump.
Note: you can tell the engine to render the subsprite in full
brightness for one frame by adding 32768 to the subsprite number.
Note: each sprite has either one viewing angle (angle 0) or eight
(angles 1-8). The engine automatically displays sprites from the correct
viewing angle. Greg Lewis wrote about this feature in Naming
conventions for Doom Sprites and Adding and
Replacing Doom Sprites.
Code Pointers (Boom's Internal Functions):
the engine has 74 functions available to any
frame of the script. You can assign one fuction to each frame as
follows in dehacked.lmp
.
[CODEPTR] FRAME 22 = FireShotgun
Note: although designed well, some of the engine's functions if assigned to the wrong frame can cause major bugs and crashes! Take care especially not to assign monster attacks to the player or vice versa.
The engine provides access to 137 things
which act as decorations, monsters, or pickups. Each thing has a set of
physical properties, a set of sounds to make, and frames to act out from
the script. The following lines in dehacked.lmp
are used to
create Doom's Imp.
Thing 2 (Hell Trooper) Hit points = 80 Reaction time = 7 Pain chance = 180 Speed = 8 Width = 1048576 Height = 3670016 Mass = 100 Alert sound = 39 Attack sound = 12 Pain sound = 27 Death sound = 62 Action sound = 76 Initial frame = 442 First moving frame = 444 Injury frame = 455 Close attack frame = 452 Far attack frame = 452 Death frame = 457 Exploding frame = 462 Respawn frame = 470 Bits = SOLID+SHOOTABLE+COUNTKILL Thing 32 (Hellfire) Speed = 10 Missile damage = 8
The engine loads 108 sounds which every thing can be
assigned to make noise with, under specific circumstances.
Note: some exceptions and additions have been hard-coded into Boom
and can't generally be changed by the dehacked lump. [list and describe
these]
The narrator speaks in the second person present tense.
It communicates with you while setting up the game, tells you the names
of item pickups and maps, speaks during intermission screens, and more.
These strings are defined in dehacked.lmp
like
this.
[STRINGS] STSTR_NCON = No Clipping Mode ON PD_BLUE0 = You need a blue key to open this door GOTPLASMA = You got the plasma gun! HUSTR_E1M1 = E1M1: Hangar C5TEXT = Congratulations, you've found the secret\nlevel... CC_BARON = Baron of Hell
All of the strings that can be defined are listed in this document under STRINGS.
The development of Doom, The Ultimate Doom, and Hell on Earth reveals a natural progression of additions and improvements to the engine. Boom did a lot of work to continue that evolution, and lives on in PrBoom+. Heretic and Hexen introduced more environmental interaction and object scripting which is a tradition that lives on in ZDoom and the amazing modifications made by people utilizing the modern GZDoom port.