FraggleScript

FraggleScript is a scripting language created by Simon "Fraggle" Howard for the SMMU source port. The language has since been used in the Eternity and Doom Legacy source ports.

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 [scripts] include("things.h"); 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: when 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 running scripts.