Doom level format


FraggleScript is a scripting language originally created for the SMMU source port. The language has since been used in the Doom Legacy, ReMooD and GZDoom source ports. The name of the language comes from the author of SMMU, Simon "Fraggle" Howard.

FraggleScript scripts are embedded inside the level header — the entry in a WAD preceding the other level data, which is usually empty. The level header is divided into a number of sections; for example:

[level info]

levelname = The Doom Wiki
author = Mr. Shiny



script 1
    tip("Script 1 has been activated!"); 

In the above example the level info section is used to set information about the level, including the name of the level and its author. The scripts section contains the actual FraggleScript script data.

The syntax of the language is inspired by C. The scripts section is divided into a number of scripts, each of which is assigned a number. Individual scripts can be triggered by linedefs inside the level (crossing a line or pressing a button, for example). The sector tag is used to indicate the script number to activate.

Code written outside of any script is executed when the level is loaded, and can be used to set up the environment for the other scripts.

For a complete list of functions, see FraggleScript functions.

External links[edit]