Eternity Engine ExtraData Reference v1.0 -- 8/20/04

Return to the Eternity Engine Page
Introduction to ExtraData

ExtraData is a new data specification language for the Eternity Engine that allows arbitrary extension of mapthings, lines, and sectors with any number of new fields, with data provided in more or less any format. The use of a textual input language forever removes any future problems caused by binary format limitations. The ExtraData parser is based on the libConfuse configuration file parser library by Martin Hedenfalk, which is also used by GFS and EDF.

Each section in this document deals with one of the ExtraData constructs, as well as how to embed ExtraData in a WAD and how to associate it with a given map.

Plans are in place to steadily introduce more features and functionality to ExtraData in future versions of the Eternity Engine. This documentation will be regularly updated to reflect all changes and additions.

Return to Table of Contents


General Syntax

Return to Table of Contents


Embedding and Associating ExtraData

ExtraData is embedded directly as a text script into a lump of any name. This can be done with any number of wad file management tools, including WinTex (though WinTex has some bugs which make the process more complicated).

An ExtraData script is associated with a map via use of the MapInfo variable extradata. A map can only have one ExtraData script, but it is possible for multiple maps to share the same script.

Example of ExtraData specification via MapInfo:

   [level info]
   extradata = EDLUMP01
ExtraData (as well as all other MapInfo variables) can be specified in either global or level-header MapInfo scripts.

Return to Table of Contents


Mapthings

Mapthings define monsters, lamps, control points, items, etc -- anything that is spawned on the map at level start.

Each field in the mapthing definition, with the exception of the recordnum field, is optional. If a field is not provided, it takes on the default value indicated below the syntax information. Fields may also be provided in any order.

Note that the order of mapthing definitions in ExtraData is not important. The recordnum field serves to identify mapthing records.

Return to Table of Contents


Creating ExtraData Control Objects

Mapthing records in ExtraData are only associated with a special control object that must be placed on the map in the usual manner in your editor of choice.

The ExtraData control object has a doomednum of 5004. Each control object specifies its corresponding ExtraData mapthing record number as an integer value in its mapthing options field. If your editor does not allow entering arbitrary values into the options field of mapthings, you will need to use the BOOM command-line editor, CLED. As of the initial writing time of this document, both DETH and Doom Builder support entering arbitrary integer values for the options field. Check your editor's documentation or user interface to verify if it supports this.

The x, y, and angle fields of the ExtraData control object are passed on to the thing which will be spawned at the control point's location, so those fields of the control object should be set normally. The true type and options fields of the thing to be spawned, along with any extended fields, are specified in the ExtraData record which the control thing references.

Any number of ExtraData control objects can reference the same ExtraData record. In the event that a control object references a non-existant ExtraData record, the ExtraData script for a level is missing, or the thing type referenced by an ExtraData record isn't valid, an Unknown thing will be spawned at the control point's location. See the EDF Documentation for information on the required Unknown thingtype definition. Note that you cannot spawn ExtraData control objects using ExtraData. Attempting this will also result in an Unknown thing.

Return to Table of Contents


Mapthing Syntax and Fields

The syntax of the ExtraData mapthing record is as follows. Remember that all fields except the recordnum field are optional and can be specified in any order.
mapthing
{
   recordnum = <unique number>
   
   # These fields are normal mapthing fields
   type      = <doomednum> OR <EDF thingtype mnemonic>
   options   = <options flag list>
   
   # These fields are ExtraData extensions
   tid       = <number>
   args      = { <special field>, ... }
}
Explanation of fields: Return to Table of Contents