-
Notifications
You must be signed in to change notification settings - Fork 13
DDF
Doom Definition Files are EDGE-Classic's answer to DehackEd (a utility that allowed you to alter the gameplay of Doom and Doom 2), being much easier to learn while capable of more extensive and complex modifications.
This guide to DDF is probably best used in one of two ways. If you have already used DDF extensively, you can search through it to check the correct usage of a command, or to review new features. However, if this is your first introduction to DDF, this guide will probably be more effective if you read it in conjunction with the relevant DDF categories in the sidebar. That way, you can see how all the various commands are structured and get a good understanding of how all the different files work.
The other thing you should do is experiment. As DDF files are plain text, you can examine any mod or map's DDF without the need for a script decompiler or disassembler. Make a backup of the original DDF files and then try changing around different values and seeing what happens. If something goes terribly wrong, you can always restore the original DDF files. Anyway, let's launch into things.
A DDF file is a simple text file that describes an object.
Comments: Anything after // are comments. They are ignored by the parser. // This is ignored
Spaces are ignored. So this means that calling your monster [EVIL MONSTER]
is exactly the same as calling it [EVILMONSTER]
since the DDF parser will ignore the space.
The underscore '_' character is converted to a space. So you'd use EVIL_MONSTER
if you wanted the DDF parser to recognize a monster called EVIL MONSTER
Upper and lower case is ignored (so writing SHOTGUN
is the same as writing shotgun
).
Anything between quotes '"' is parsed verbatim such as "MAP01: Containment area"
This means that spaces and upper/lowercase characters will be recognized. This is especially important for names of lumps or textures, since any '_' characters would normally be converted to spaces and EDGE-Classic would complain about a missing lump/texture.
The main structure to define an object is
[name]
param1=data1;
param2=data2
The name of the object is the name used to refer to it. Names should be unique, since when there are two entries with the same the later one will override the earlier one. The values of param1, data1, etc. are dependent on what type of object you are trying to define. Each line in the object's definition (other than the name) needs to end with a semicolon.
Boolean: Can be 'true'
or 'false'
Integer: Any whole number
Float: Any floating-point number, such as 123.45
or -0.017
Time: A timing value in seconds. Can also be specified in tics, there are 35 tics in a second. To specify tics, put a 'T' after the number, e.g. 35T
. The special value 'MAXT'
means an infinite delay.
Percentage: An integer value following by %. Range is 0% to 100%.
Music: An integer value that will be looked up in PLAYLIST.DDF.
Sound: A name that will be looked up in SOUNDS.DDF. The wild card character '?' is handled specially, so 'PODTH?'
will match the PODTH1
, PODTH2
, and PODTH3
entries. When it is time to play an SFX with a wild card, a matching SFX will be played at random.
String: A string of characters e.g. "MAP01: Containment area"
LumpName: An eight letter (maximum) string, referring to something stored in the WAD datafile.
Special: A special format only used by that DDF file.
Flags: Various properties that you can add to an object.
States: A series of sprites, e.g. the sequence of sprites to display when something dies.
Language Ref: A string that should be looked up in the language DDF file to get its translation.
This might be a lot to process at first, especially to the new modder. As you begin to play around with DDF files, it will become less abstract, and you should soon have a handle on things. Just remember that the core concept of DDF is simple. You use a plain text file to name an object (be it a weapon, monster, sound, animation etc.) that you can then use in the game. Then, according to the particular object, you change various values to determine how it will behave in-game.
The original DDF docs were written by Andy Baker and Ziggy Gnarly, with updates by Andrew Apted, Andy Brewood and Luke Brennan. © EDGE Team, et al. 1998 - 2021.