DeHackEd / BEX Reference: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
Line 12: Line 12:


Comments can be provided for your own benefit, or for that of other editors. Comments start with a pound sign (#) and extend to the end of the line. Example:  
Comments can be provided for your own benefit, or for that of other editors. Comments start with a pound sign (#) and extend to the end of the line. Example:  
  # This is a comment
# This is a comment
Note that comments are not allowed within some blocks, including several of the BEX extension blocks. It is best to keep all comments outside of blocks for this reason.  
Note that comments are not allowed within some blocks, including several of the BEX extension blocks. It is best to keep all comments outside of blocks for this reason.  


It is common for this header to appear in DeHackEd files which pre-date the DOOM source release:  
It is common for this header to appear in DeHackEd files which pre-date the DOOM source release:  
  Patch File for DeHackEd v3.0
Patch File for DeHackEd v3.0
   
   
  # Note: Use the pound sign ('#') to start comment lines.
# Note: Use the pound sign ('#') to start comment lines.
   
   
  Doom version = 21
Doom version = 21
  Patch format = 6
Patch format = 6


However, none of this information is needed or used by Eternity in any way, and it is discarded as unrecognized text. You do not need to include any header information in your own files. Note that the patch version information is important for old patches in that it will tell you whether or not Eternity can use the file. Patches of format other than 6 are not guaranteed to work, and Eternity does NOT support the older, obsolete binary patch format.
However, none of this information is needed or used by Eternity in any way, and it is discarded as unrecognized text. You do not need to include any header information in your own files. Note that the patch version information is important for old patches in that it will tell you whether or not Eternity can use the file. Patches of format other than 6 are not guaranteed to work, and Eternity does NOT support the older, obsolete binary patch format.

Revision as of 06:12, 26 October 2019

DeHackEd with BOOM Extensions (BEX) is a form of text script for modifying various aspects of the DOOM engine. Originally, DeHackEd patches were used by the DeHackEd program to modify the DOOM.EXE file itself. Now, modern source ports provide alternative methods of use.

Eternity allows use of DeHackEd files via the -deh command-line parameter, via GFS files, and as a text lump called "DEHACKED" in wad files. Eternity can also specify up to two DeHackEd patches which are always added at start-up in its configuration file. Starting with Eternity Engine v3.31 public beta 5, DeHackEd/BEX files can also be included by EDF modules.

DeHackEd allows editing of things, frames, codepointers, ammo and weapon data, cheats, miscellaneous settings, and text strings. Through BEX and Eternity extensions, support has also been added for a cleaner form of text substitution, default level par times, a more powerful method of codepointer editing, helper thing type editing, and better support for substitution of sprite, sound, and music names.

DeHackEd does NOT support the addition or deletion of any of these elements, however. It is limited to the number and order of entries as they exist in the source port. For information on how Eternity addresses this problem via the EDF system, see the EDF Documentation.

Back to Eternity Engine
  • This section incorporates text from the HTML Eternity documentation.

General Syntax

White-space, empty lines, and unrecognized tokens are ignored outside of any block, and the DeHackEd parser is in general very forgiving.

Comments can be provided for your own benefit, or for that of other editors. Comments start with a pound sign (#) and extend to the end of the line. Example:

# This is a comment

Note that comments are not allowed within some blocks, including several of the BEX extension blocks. It is best to keep all comments outside of blocks for this reason.

It is common for this header to appear in DeHackEd files which pre-date the DOOM source release:

Patch File for DeHackEd v3.0

# Note: Use the pound sign ('#') to start comment lines.

Doom version = 21
Patch format = 6

However, none of this information is needed or used by Eternity in any way, and it is discarded as unrecognized text. You do not need to include any header information in your own files. Note that the patch version information is important for old patches in that it will tell you whether or not Eternity can use the file. Patches of format other than 6 are not guaranteed to work, and Eternity does NOT support the older, obsolete binary patch format.

BEX Extension: INCLUDE Directive

To include a DEH or BEX file in another one, put one or more of the following lines in your BEX file:

  INCLUDE filename
  INCLUDE NOTEXT filename

Filename must be specified in full, including a path if it's not going to be in the current directory, and including its .deh or .bex extension. It is better by far to ship a file completely self-contained, but you can use this during testing and development, or to adjust existing patches for your own use.

The NOTEXT directive will cause Eternity to skip any DeHackEd-style text blocks in the included file, with the assumption that you're doing something else in your main BEX file instead.

You may not nest include files (one include file can't include another). In addition, DEHACKED lumps in wads cannot use INCLUDE directives in any form.

Thing Block

See DeHackEd / BEX Reference/Thing Block

Frame Block

See DeHackEd / BEX Reference/Frame Block

Sound Block

See DeHackEd / BEX Reference/Sound Block

Ammo Block

See DeHackEd / BEX Reference/Ammo Block

Weapon Block

See DeHackEd / BEX Reference/Weapon Block

Cheat Block

See DeHackEd / BEX Reference/Cheat Block

Misc Block

See DeHackEd / BEX Reference/Misc Block

BEX Extension: [STRINGS] Block

See DeHackEd / BEX Reference/BEX Extension: STRINGS Block

BEX Extension: [PARS] Block

See DeHackEd / BEX Reference/BEX Extension: PARS Block

BEX Extension: [CODEPTR] Block

See DeHackEd / BEX Reference/BEX Extension: CODEPTR Block

Eternity Extension: [HELPER] Block

See DeHackEd / BEX Reference/Eternity Extension: HELPER Block

Eternity Extension: [SPRITES] Block

See DeHackEd / BEX Reference/Eternity Extension: SPRITES Block

Eternity Extension: [SOUNDS] Block

See DeHackEd / BEX Reference/Eternity Extension: SOUNDS Block

Eternity Extension: [MUSIC] Block

See DeHackEd / BEX Reference/Eternity Extension: MUSIC Block

BEX String Mnemonics Table

See DeHackEd / BEX Reference/BEX String Mnemonics Table

Sound Table

See DeHackEd / BEX Reference/Sound Table