The Marathon Markup Language - Level Scripting

Unlike most MML elements, a level-script element can only live in a map file, and it must be TEXT resource 128 or some equivalent, in order for its parser to know where to find it. Its root element is <marathon_levels> and not <marathon>, to distinguish it from the usual sort of MML.

It has child elements <level>, <end>, <default>, <restore>, and <end_screens>, all but the last one specify what individual level scripts to execute. The element <level> has a mandatory attribute, "index", which specifies which level the script is for; the first one is index 0. The element <end> specifies a script that is for the end of a game; The element <default> specifies a script that is for the entire map file; it is executed before a level's script is executed, for rather obvious reasons. The element <restore> is intended to restore parameters to their A1 defaults when switching to another map file; this is done because the parameters that the MML parser sets are set in a "sticky" fashion, and because saving and restoring default values inside the code would require a whole lot of extra coding.

These elements have child elements that specify the script entries; the entries are executed in the order that they are specified in the file. This means that music files played in sequential order will be played in the order that they are specified in, the first in the list played first, etc.

Directoris and files are specified in Unix fashion, <dirname>/<dirname>/<filename>, with a ':' being translated into a '/' in the MacOS. The root directory for such specifications is the map file's parent directory, so something like "Music/bang_my_head.mp3" means looking for file "bang_my_head.mp3" in the directory "Music", which is in the same directory that the map file lives in.

The MacOS version uses Quicktime for music and movie playing, meaning that any of these formats can be used:

Finally, the <end_screens> element is for specifying which PICT resources are to be used as the end-of-game screen displays. This specification is done with these attributes:

Home