The Marathon Markup Language

### Introduction

The Marathon Markup Language (MML), a subset of the Extensible Markup Language (XML): This was created for the purpose of configuring the Marathon engine in a non-hardcoded way. MML scripts are stored in the "Scripts" subdirectory of the local data directory, and the "MML" subdirectory of the global data directories and accessed in alphabetical order (scripts in the local directory are read after the global ones so they can override their settings).

For more on XML, check out these links:

- xml.com; has lots of XML-related stuff
- Sixpack, a MacOS-native XML editor

One feature that I've attempted to maintain is that any set of values can always be overrode by another. For example, if you set some color to be red in one file, and that color to be green in a file processed after it, that color will be green.

Many of the element attributes here are some sort of index value, and they are all counted from 0 unless specified otherwise; for example, collections are numbered from 0 to 31. But one problem that I currently face is that the lists in this document are shown as starting from 1 instead of 0. I'm not sure how to correct that without numbering the items by hand; this document contains the kludge of adding 1000.

Here is the format:

### Marathon Root Element: <marathon>

This is the root element, the one that contains all the others. Other Marathon-related root elements may be defined in the future, however, such as root elements for stuff that is intended for individual map levels. These may have a format like <maralevel index="value">.

This element has no attributes and contains these child elements:

- String-Set Element: <stringset>
- Interface-Stuff Element: <interface>
- Motion-Sensor Element: <motion_sensor>
- Overhead-Map Element: <overhead_map>
- Infravision Element: <infravision>
- Motion-Sensor Element: <motion_sensor>
- Animated-Textures Element: <animated_textures>
- Control-Panels Element: <control_panels>
- Platforms Element: <platforms>
- Liquids (Medias) Element: <liquids>
- Sounds Element: <sounds>
- Fader Element: <faders>
- Player Element: <player>
- View Element: <view>
- Weapons Element: <weapons>
- Items Element: <items>
- Damage-Kicks Element: <damage_kicks>
- Scenery Element: <scenery>
- Landscapes Element: <landscapes>
- Texture-Loading Element: <texture_loading>
- OpenGL-Rendering Element: <opengl>
- Software Rendering Element: <software>
- Dynamic-Limits Element: <dynamic_limits>
- Player-Name Element: <player_name>
- Scenario Element: <scenario>
- Keyboard-Defaults Element: <keyboard>
- Cheating Element: <cheats>
- Logging Configuration Element: <logging>
- Console: <console>
- Level Scripting
- Appendix 1: Additional Elements
- Appendix 2: Lists of Entity Types

### String-Set Element: <stringset>

This element is an imitation of MacOS 'STR#' resources. It has an attribute of "index", which has a numerical value corresponding to the original resource ID:

- 128: Errors
- 129: Filenames
- 130: Top-Level Interface Items
- 131: Prompts
- 132: Network Errors
- 133: Key Codes to Names
- 134: Preferences Advice
- 135: Computer Interface
- 136: Join Dialog Messages
- 137: Weapon Names
- 138: File Search Path
- 139: Preferences Groupings
- 140: Postgame Network Game Statistics
- 141: Net Game Setup
- 142: New Join Dialog Messages
- 143: Progress Strings for Networking
- 145: Difficulty Level Names
- 150: Item Names
- 151: Item types
- 152: Player and Team Color Names
- 153: Net Statistics Strings
- 200: OpenGL-Option Color-Picker Prompts

This element contains child elements with form <string>, which have an attribute of "index", and contents of whatever the string is supposed to be. The index is zero-based, unlike the original STR# resources, whose indices are one-based. For example, the filenames are specified in this fashion:

    <!-- STR# Resource: "Filenames" -->
    <stringset index="129">
    <string index="0">Shapes</string>
    <string index="1">Shapes.16</string>
    <string index="2">Sounds</string>
    <string index="3">Sounds.16</string>
    <string index="4">Aleph One Preferences</string>
    <string index="5">Map</string>
    <string index="6">Untitled Game</string>
    <string index="7">Marathon</string>
    <string index="8">Aleph One Recording</string>
    <string index="9">Physics Model</string>
    <string index="10">Music</string>
    <string index="11">Images</string>
    <string index="12">Movie</string>
    </stringset>

### Interface-Stuff Element: <interface>

This kind of element specifies stuff used in the heads-up display (HUD). It has one attribute, "motion_sensor", which is boolean, and which indicates whether or not the motion sensor will be active. In what follows, the HUD coordinates used will be x = rightward and y = downward, with the HUD's top left corner being at x = 0, y = 320. This element also contains these kinds of child elements:

- <rect>, with all interface rectangles; it contains the attributes
  - index, others are short integers
  - top
  - left
  - bottom
  - right
  All of them are mandatory. The interface rectangles have the meanings listed below.
- <color>, for all interface colors; it is indexed. For more on specifying colors, go here. The interface colors have the meanings listed below.
- <font>, for all interface fonts; it is indexed. For more on specifying fonts, go here. The interface fonts have the meanings listed below.
- <vidmaster>, for customizing the vidmaster level-selection dialog; it contains the attribute:
  - stringset_index: this is the index of a stringset containing the dialog text. Here's an example:

        <interface>
            ...
            <vidmaster stringset_index="1234" />
        </interface>

        <stringset index="1234">
            <string index="0">Before proceeding any further, you</string>
            <string index="1">must take the oath of the vidmaster:</string>
            <string index="2"></string> <!-- empty string for line break -->
            <!-- [QUOTE] at string's start makes Aleph One use a different text style -->
            <string index="3">[QUOTE]"I pledge to punch all switches,</string>
            <string index="4">[QUOTE]to never shoot where I could use grenades,</string>
            <string index="5">[QUOTE]to admit the existence of no level</string>
            <string index="6">[QUOTE]except Total Carnage,</string>
            <string index="7">[QUOTE]to never use Caps Lock as my 'run' key,</string>
            <string index="8">[QUOTE]and to never, ever, leave a single Bob alive."</string>
        </stringset>

- <weapon>, for the weapon display; it contains the attributes
  - index: the only mandatory attribute
  - shape: the shape number (which frame in "Interface")
  - start_y: these are for the text-display rectangle
  - end_y
  - start_x: if centered, then equal to -1
  - end_x: if centered, then equal to -1
  - top: weapon sprite's position in screen
  - left
  - multiple: whether the display will show two of them instead of only one, which is a boolean value. If multiple is set, the following attributes are read:
  - multiple_shape: second weapon shape; either replaces shape (if multiple_unusable_shape is not specified) or is drawn in addition to shape (if multiple_unusable_shape is specified) when the player has a second weapon and enough ammo to use it
  - multiple_unusable_shape: drawn in addition to shape, when the second weapon has not been picked up or is out of ammo
  - multiple_delta_x: offsets from shape of multiple_shape and multiple_unusable_shape
  - multiple_delta_y
  and an optional child element, <ammo>, which contains the attributes
  - index: either 0 or 1, and the only mandatory attribute
  - type: this has these possible values
    - 0: No display (alien weapon, for example)
    - 1: Box display (partially-filled box; takes interface-color indexes instead of shapes)
    - 2: Discrete-bullet display
  - left: position in screen
  - top
  - across: how many bullets (energy-weapon max number)
  - down: how many bullets (unused for energy weapons)
  - delta_x: bullet offset (energy-weapon width)
  - delta_y: bullet offset (energy-weapon height)
  - bullet_shape: the shape number for a bullet, or the full-region color index
  - empty_shape: the shape number for an empty bullet, or the empty-region color index
  - right_to_left: whether the bullets go right-to-left instead of left-to-right, which is a boolean value.

Here is a list of all the interface rectangles:

1000. Player Name
1001. Oxygen
1002. Shield
1003. Motion Sensor
1004. Microphone
1005. Inventory
1006. Weapon Display
1007. New-Game Button
1008. Load-Game Button
1009. Gather Button
1010. Join Button
1011. Preferences Button
1012. Replay Button
1013. Save-Last Button
1014. Replace-Saved Button
1015. Credits Button
1016. Quit Button
1017. Center Button

Here is a list of all the interface colors:

1000. Ammo Box-Display Full
1001. Ammo Box-Display Empty
1002. Black
1003. Inventory Text
1004. Inventory Header Background
1005. Inventory Background
1006. Slate Player
1007. Red Player
1008. Violet Player
1009. Yellow Player
1010. White Player
1011. Orange Player
1012. Blue Player
1013. Green Player
1014. White
1015. Invalid Weapon
1016. Computer Border-Text background
1017. Computer Border Text
1018. Computer Text
1019. Computer White Text
1020. Computer Red Text
1021. Computer Dark Green Text
1022. Computer Cyan Text
1023. Computer Yellow Text
1024. Computer Dark Red Text
1025. Computer Blue Text

Here is a list of all the interface fonts:

1000. Interface
1001. Weapon Name
1002. Player Name
1003. Interface Item Count
1004. Terminal
1005. Terminal Title
1006. Network Statistics

Here is a list of all the weapon displays:

1000. Knife (placeholder; really one's fists)
1001. Pistol
1002. Fusion Pistol
1003. Assault Rifle
1004. Rocket Launcher
1005. Flamethrower
1006. Alien Weapon
1007. Shotgun
1008. Ball
1009. SMG

### Motion-Sensor Element: <motion_sensor>

This kind of element is for assigning motion-sensor features; the assignment is done by doing <assign>, which has attributes "monster" (which one of these in the list) and "type", which is

1000. Self, Friendly Player, and Bob
1001. Alien
1002. Hostile Player

One can disable it by specifying that the top-level element <interface> has attribute "motion_sensor" with value "false".

### Overhead-Map Element: <overhead_map>

This kind of element is for setting up overhead-map features. It can have an attribute of "mode", which has possible values:

1000. Normal: automapping is cumulative (the default)
1001. Currently visible only
1002. All

It can also have the attribute "title_offset", whose value is how many pixels downward to offset the title text.

One can assign various types to monsters; they can either never show up, or else show up as a Bob or as an alien. This must be done separately for living and dead monsters, because the engine "forgets" what monster type a dead monster is.

Thus, one assigns live monsters with <assign_live> and dead ones with <assign_dead>. Which live monster to assign one specifies with an attribute "monster", which takes a monster type, while which dead monster to assign one specified with an attribute of "coll", which takes a collection ID. Both elements assign to a type of display, specified with attribute "type"; the possible types are:

- -1(NONE): won't ever show up
- 0: Bob (shown by default)
- 1: Alien (not shown by default)

One can display additional stuff by specifying an appropriate element; this elements have an attribute of "on", which is a boolean value.

- <aliens>: shows characters other than players and Bobs
- <items>: shows anything that can be picked up
- <projectiles>: shows these
- <paths>: shows the paths that the monster AI has worked out

Lines can be specified with the element <line>, which has these attributes, all mandatory:

- type:
  1000. Wall (solid)
  1001. Elevation (not solid; floor on one side higher than on the other side)
  1002. Control panel
- scale: 0 is minimum map scale and 3 is maximum map scale
- width: width value in pixels

Colors can be specified with the element <color>, which is indexed; For more on specifying colors, go here. Here are what the colors are:

1000. Plain polygon
1001. Platform
1002. Water
1003. Lava
1004. Sewage
1005. JjaroGoo
1006. PfhorSlime
1007. Hill
1008. Solid Line
1009. Elevation Line
1010. Control Panel
1011. Bob Display
1012. Monster Display
1013. Item Display
1014. Projectile Display
1015. Checkpoint Display
1016. Annotation
1017. Map Title
1018. Path
1019. Minor Ouch
1020. Major Ouch

Fonts can be specified with the element <font>, which is indexed; For more on specifying fonts, go here. Here are what the fonts are:

1000. Annotation at scale 0 (lowest)
1001. Annotation at scale 1
1002. Annotation at scale 2
1003. Annotation at scale 3 (highest)
1004. Map title

One can disable it by specifying that the top-level element <view> has attribute "map" with value "false".

### Infravision Element: <infravision>

This kind of element contains what is needed to specify infravision colors. These are assigned by texture collection, and there are 4 colors to choose from. The assignment is done with element <assign>, which has the attributes "coll" (for collection) and "color" (for which one of the colors). Here are the default colors:

1000. Aliens (red)
1001. Friends and Items (green)
1002. Walls and Scenery, also the S'pht (blue)
1003. Player Stuff and Explosion Effects (yellow)

Colors can be specified with the element <color>, which is indexed; For more on specifying colors, go here.

### Animated-Textures Element: <animated_textures>

This kind of element is for specifying animated textures. Animated textures are specified as sequences, which contain loops of texture frames and various timing and phase information. For example, suppose that a sequence contains frames (a,b,c). As time goes on, frame a will be translated first into frame a, then into frame b, then into frame c, and then will repeat the sequence, as shown below:

a | - | a | b | c | a | b | c | ...
b | - | b | c | a | b | c | a | ...
c | - | c | a | b | c | a | b | ...

This element has two kinds of child elements, <clear> and <sequence>.

The first one, <clear>, clears the sequences; if it has an attribute of "coll", it will clear the sequences for the collection specified in that attribute's value; if not, it will clear all the sequences. However, this command can be followed by commands to create sequences, which will then be executed as if no "clear" command had been issued.

The second one, <sequence>, specifies the sequences themselves. It takes these attributes:

- coll: which collection (mandatory)
- numticks: how many engine ticks to stay at each frame (mandatory)
- framephase: how many frames ahead to start (optional: default = 0)
- tickphase: how many ticks into a frame to start (optional: default = 0)
- select: for choosing some frame to translate into the loop of frames as if it was the first one; this frame need not be a member of the loop. If this is -1, then it is the frames in the loop that are translated. (optional: default = -1; use the loop frames)

This one also contains a child element, <frame>, which has a mandatory attribute of "index", which is the frame's index. There must be at least one of these in a sequence, for rather obvious reasons.

### Control-Panels Element: <control_panels>

This kind of element specifies various control-panel features, such as what kind it is, what items it accepts, and so forth. It has these attributes:

- reach: the maximum distance one can reach to touch a control panel, in World Units (default: 1.5)
- horiz: how compressed-to-horizontal the reaching must be; no compression is 1 (default: 2)
- single_energy: how much the single-energy panel recharges (default: 150)
- single_energy_rate: the single-energy panel's recharge rate (default: 1)
- double_energy: how much the double-energy panel recharges (default: 300)
- double_energy_rate: the double-energy panel's recharge rate (default: 2)
- triple_energy: how much the triple-energy panel recharges (default: 450)
- triple_energy_rate: the triple-energy panel's recharge rate (default: 3)

Each kind of control panel is specified with the child element <panel>, which has these attributes:

- index: which one of the types of control panel (mandatory)
- type: what that control panel does
- coll: which shapes collection
- active_frame: which frame when the panel is active
- inactive_frame: which frame when the panel is inactive
- pitch: what pitch of panel-active sound
- item: what item the panel accepts (-1 is none)

This element has an optional child element, "sound", with two attributes, both mandatory: type and which. The type indicates when the sound is to play, while which is the index in the list of sound definitions (-1 means none).

The map files themselves reference control panels by definition; here are the default control-panel definitions:

1000. Water: Oxygen Refuel
1001. Water: Energy Refuel (1x)
1002. Water: Energy Refuel (2x)
1003. Water: Tag Switch (Accepts Chip)
1004. Water: Light Switch
1005. Water: Platform Switch
1006. Water: Tag Switch
1007. Water: Pattern Buffer
1008. Water: Computer Terminal
1009. Water: Tag Switch (Destroyable)
1010. Lava: Energy Refuel (1x)
1011. Lava: Energy Refuel (2x)
1012. Lava: Energy Refuel (3x)
1013. Lava: Light Switch
1014. Lava: Platform Switch
1015. Lava: Tag Switch
1016. Lava: Pattern Buffer
1017. Lava: Computer Terminal
1018. Lava: Oxygen Refuel
1019. Lava: Tag Switch (Accepts Chip)
1020. Lava: Tag Switch (Destroyable)
1021. Sewage: Energy Refuel (1x)
1022. Sewage: Energy Refuel (2x)
1023. Sewage: Energy Refuel (3x)
1024. Sewage: Light Switch
1025. Sewage: Platform Switch
1026. Sewage: Tag Switch
1027. Sewage: Pattern Buffer
1028. Sewage: Computer Terminal
1029. Sewage: Oxygen Refuel
1030. Sewage: Tag Switch (Accepts Chip)
1031. Sewage: Tag Switch (Destroyable)
1032. Pfhor: Energy Refuel (1x)
1033. Pfhor: Energy Refuel (2x)
1034. Pfhor: Energy Refuel (3x)
1035. Pfhor: Light Switch
1036. Pfhor: Platform Switch
1037. Pfhor: Tag Switch
1038. Pfhor: Pattern Buffer
1039. Pfhor: Computer Terminal
1040. Pfhor: Oxygen Refuel
1041. Pfhor: Tag Switch (Accepts Chip)
1042. Pfhor: Tag Switch (Destroyable)
1043. Jjaro: Energy Refuel (1x)
1044. Jjaro: Energy Refuel (2x)
1045. Jjaro: Energy Refuel (3x)
1046. Jjaro: Light Switch
1047. Jjaro: Platform Switch
1048. Jjaro: Tag Switch
1049. Jjaro: Pattern Buffer
1050. Jjaro: Computer Terminal
1051. Jjaro: Oxygen Refuel
1052. Jjaro: Tag Switch (Accepts Chip)
1053. Jjaro: Tag Switch (Destroyable)

The control panels can do various things; these are:

1000. Oxygen Refuel
1001. Energy Refuel (1x)
1002. Energy Refuel (2x)
1003. Energy Refuel (3x)
1004. Light switch
1005. Platform switch
1006. Tag switch
1007. Pattern buffer (for saving games)
1008. Computer terminal

The sound types are:

1000. Activating
1001. Deactivating
1002. Unusable

### Platforms Element: <platforms>

This kind of element specifies various platform features, such as its sounds and how deadly it is when it crunches. Each individual platform type is specified with a <platform> child element, which has these attributes:

- index: which one of the platform types (mandatory)
- start_extend: sound index for platform starting to extend (-1 for none)
- start_contract: same for starting to contract
- stop_extend: same for stopping extending
- stop_contract: same for stopping contracting
- obstructed: same for obstructed by something
- uncontrollable: same if one is unable to control it
- moving: same for moving in general
- item: index of item that acts like a key (-1 for none)

The index is which one of these platform types:

1000. S'pht Door
1001. S'pht Split Door
1002. Locked S'pht Door
1003. S'pht Platform
1004. Noisy S'pht Platform
1005. Heavy S'pht Door
1006. Pfhor Door
1007. Heavy S'pht Platform
1008. Pfhor Platform

This element also has child element <damage> (how much damage; it is described in greater detail here),

### Liquids (Medias) Element: <liquids>

This kind of element specifies various liquid features, such as how deadly a liquid is, and so forth. Each individual liquid type is specified with a <liquid> child element, which has these attributes:

- index: which one of the liquid types (mandatory)
- coll: which shapes collection
- frame: which frame
- transfer: this is the texture-rendering transfer mode.
- damage_freq: this is for indicating how often to apply a liquid's damage. This is bitwise-ANDed with the number of engine ticks, and damage gets applied if the result is all zeros. Thus, if this quantity has a value of (2^n-1), then damage will be applied every (2^n) ticks.
- submerged: this is the fader used to do the submerged appearance; its default index values are those of their liquids.

The index value is which one of these liquid types:

1000. Water
1001. Lava
1002. Pfhor
1003. Sewage
1004. Jjaro

while the "submerged" value is which one of these liquid types

1000. Water
1001. Lava
1002. Sewage
1003. Jjaro
1004. Pfhor

This element also has child elements <damage> (how much damage; it is described in greater detail here), <effect> and <sound>. The latter two have two attributes, both mandatory: type and which. The type indicates when to make the effect / sound, while which is the index in the list of effect or sound definitions (-1 means none).

The effects:

1000. Small Detonation
1001. Medium Detonation
1002. Large Detonation
1003. Large Emergence

The sounds:

1000. Feet Entering
1001. Feet Leaving
1002. Head Entering
1003. Head Leaving
1004. Splashing
1005. Ambient Over
1006. Ambient Under
1007. Platform Entering
1008. Platform Leaving

### Sounds Element: <sounds>

This kind of element specifies various sound features. Its attributes are various formerly-hardcoded sounds here and there; these are made variable for Marathon 1 compatibility:

Name | Default | Description
terminal_logon | #141 | Logging-on sound at a terminal
terminal_logoff | #142 | Logging-off sound at a terminal
terminal_page | #143 | Next-page sound at a terminal
teleport_in | #1 | Teleporting in
teleport_out | #2 | Teleporting out
got_powerup | #19 | Picked up a powerup
got_item | #20 | Picked up anything else
crunched | #3 | Monster getting crunched
exploding | #198 | Juggernaut exploding
breathing | #6 | Made when player is underwater (will play more often if oxygen bar is low)
oxygen_warning | #7 | Warning when getting low on oxygen
adjust_volume | #18 | Made when sound volume gets changed
button_success | #143 | Made when an interface-button action succeeds (changes resolution, for example)
button_failure | #5 | Made when an interface-button action fails (unable to change resolution, for example)
button_inoperative | #11 | Made when an interface button cannot make any action
ogl_reset | #198 | OpenGL textures getting reset

It has child elements that specify which ambient and random sound assignments to use, and also which external files to use, if desired. The ambient and random sound assigments are assignments from their indices to the list of (general) sound definitions, and are specified with child elements <ambient> and <random>. Each of them has these attributes, both mandatory:

- index: which one of the ambient or random sound types
- sound: which index in the list of sounds (-1 for none)

The ambient sounds are:

1000. Water
1001. Sewage
1002. Lava
1003. Goo
1004. Under Liquids
1005. Wind
1006. Waterfall
1007. Siren
1008. Fan
1009. S'pht Door
1010. S'pht Platform
1011. Heavy S'pht Door
1012. Heavy S'pht Platform
1013. Light Machinery
1014. Heavy Machinery
1015. Transformer
1016. Sparking Transformer
1017. Machine Binder
1018. Machine Bookpress
1019. Machine Puncher
1020. Electric
1021. Alarm
1022. Night Wind
1023. Pfhor Door
1024. Pfhor Platform
1025. Alien Noise 1
1026. Alien Noise 2
1027. Alien Harmonics

The random sounds are:

1000. Water Drip
1001. Surface Explosion
1002. Underground Explosion
1003. Loon
1004. Creak

The external sounds are specified with the child element <sound>, which has these attributes:

- index: which index in the list of sounds
- slot: which of the slots (0 to 4) gets its sound replaced with the external sound.
- file: the name of he soundfile to use; can include a path

One clears the external-sound definitions currently present wtih the child element <sound_clear>.

### Fader Elements: <faders>

This kind of element is for specifying various fader features, the faders being what causes the whole screen to change color when one is underneath a liquid or getting hit by something. It has two kinds of child elements, <fader> and <liquid>.

The first kind, <fader>, specifies features of each individual fader; it has attributes

- index: which fader
- type: which type of fade effect to apply
- initial_opacity (floating point: 0 = none, 1 = complete)
- final_opacity (floating point: 0 = none, 1 = complete)
- period: time for fader effect to complete, in engine ticks (1/30 second)
- flags: various features; get this value by adding the numerical values corresponding to the desired features:
  - `1 (hex 0001)` Full screen
  - `2 (hex 0002)` Random transparency; makes flickering effect
- priority: higher is higher priority

and a child element <color>, which is not indexed. For more on specifying colors, go here. The fader types are these:

1000. Tint: fade to the fader's color value:
      [new color] = [old color] + ([fader color] - [old color])*[opacity]
1001. Randomize: do random shifts of the colors:
      [new color] = [old color] + [opacity]*[random numbers]
1002. Negate: darkens light colors and lightens dark colors. For each channel:
      [opacity complement] = 1 - [opacity]
      if [old color] > 0.5 then
      [new color] = max([old color], xor([fader color], [old color]) + [opacity complement])
      else
      [new color] = min([old color], xor([fader color], [old color]) - [opacity complement])
      Intermediate results may be out of (0,1) range.
1003. Dodge: some weird processing. For each channel:
      [new color] = max([old color], 1 - (1 - [fader color])*[old color] - [opacity])
      Intermediate results may be out of (0,1) range.
1004. Burn: some weird processing. For each channel:
      [opacity complement] = 1 - [opacity]
      [new color] = max([old color],[fader color]*[old color] + [opacity complement])
      Intermediate results may be out of (0,1) range.
1005. Soft tint: fade to the fader's color value multiplied by the intensity (maximum of color-channel values):
      [intensity] = max(color channels of [old color])
      [new color] = [old color] + ([fader color]*[intensity] - [old color])*[opacity]

In all these equations, color values are from 0 (black) to 1 (white), and out-of-range result values are reduced to that range by subtracting whichever integer will put the result into that range.

The second kind, <liquid>, specifies faders for liquids; it has attributes

- index: which liquid to apply the fader to
- fader: this specifies which fader to use for this liquid.
- opacity: how strong is the fader effect (floating point: 0 = none, 1 = complete)

The index is which one of these liquid types:

1000. Water
1001. Lava
1002. Sewage
1003. Jjaro
1004. Pfhor

### Player Element: <player>

This kind of element specifies various player-character features, such as starting energy, starting oxygen, rebellion-map stripped energy (specified with attributes), and starting items, damage types, powerup durations and item assignments (specified with child elements), and shapes (player collection and sequences for various states). The attributes are:

- energy: how much to start with (default: 150)
- oxygen: how much to start with (default: 10800)
- stripped: how much energy one has if one starts in a rebellion level
- light: self-luminosity (the miner's-light effect) (floating point: default: 0.5)
- oxygen_deplete: how much oxygen one loses per engine tick under a liquid or in vacuum (default: 1)
- oxygen_replenish: how much oxygen one gains per engine tick in air (default: 0)
- vulnerability: what kind of damage (true damage type) one is vulnerable to when the invincibility powerup is active (can be -1 (NONE)) (default: 9, fusion-bolt damage)
- guided: whether the players' projectiles seek their targets (default: false)
- half_visual_arc: the sideways angle from forward that the guided-projectile targeting will use to look for in a target; it is in Marathon's angle units, where 90 degrees = 128 (default: 128/3 = 42).
- half_vertical_visual_arc: the vertical angle from horizontal that the guided-projectile targeting will use0 to look for in a target; it is in Marathon's angle units, where 90 degrees = 128 (default: 28/3 = 42).
- visual_range: In World Units (default: 31)
- dark_visual_range: In World Units (default: 31)
- single_energy: how much the single-energy powerup recharges (default: 150)
- double_energy: how much the double-energy powerup recharges (default: 300)
- triple_energy: how much the triple-energy powerup recharges (default: 450)
- can_swim: will swim when under a liquid; otherwise, will move "normally" (boolean; default: true)

Note: the oxygen depletion and replenishment rates can be negative if one so desires, making changes in the opposite direction.

The starting items can be set with an element of <item>, which has attributes:

- index (which one in list)
- type (which item type)

Both of them are mandatory. The first weapon in the list is the one that will get used. The default list is:

- 0: Pistol
- 1: Knife
- 2: Knife
- 3: Pistol Ammo
- 4: Pistol Ammo
- 5: Pistol Ammo
- 6 to 15: Knife

The responses to various kinds of damage can be set with an element of <damage>, which has attributes:

- index (which one in player-damage list; mandatory, but the others are optional)
- threshold: if the amount of damage is greater than this, then fader (fade)+1 is used instead of fader (fade).
- fade: what of the faders to use.
- sound: Sound to make.
- death_sound: Death sound to make.
- death_action: Behavior of sprites when killed. Here are the appropriate behavior types:
  - 6: Hard death (blown to bits by explosion)
  - 7: Soft death (stays in shape)
  - 8: Flaming death

If there is none of something, then it gets a value of -1. Soft death for sprites can also be specified with a -1.

The durations of the powerups can be set with an element of <powerup>. It has these attributes

- invisibility (default: 2100 or 70 seconds)
- invincibility (default: 1500 or 50 seconds)
- extravision (default: 5400 or 3 minutes)
- infravision (default: 5400 or 3 minutes)

These have a value of the number of engine ticks the powerup lasts; an engine tick is 1/30 second.

The item assignments of the powerups can be set with an element of <powerup_assign>. It has these attributes

- invincibility: item ID (default: 11)
- invisibility: item ID (default: 10)
- infravision: item ID (default: 12)
- extravision: item ID (default: 17)
- triple_energy: item ID (default: 21)
- double_energy: item ID (default: 20)
- energy: item ID (default: 19)
- oxygen: item ID (default: 18)

If one turns some ammo or other non-powerup item into a powerup, be sure to set its item type to be "powerup" with the items element.

Player shapes can be set with an element of <shape>, which differs from the usual element with that name; the player shapes have an overall collection and various sequences, and each element will set either that collection or one of the sequences. It has these attributes, all of which are mandatory:

- type: overall type of shape value
- subtype: more specific type: depends on which overall type
- value: the shape value to use

The types and subtypes have these values:

1000. Collection and Death Sequences
      1000. Collection (default: 6)
      1001. Hard dying (default: 9)
      1002. Soft dying (default: 8)
      1003. Hard dead (default: 11)
      1004. Soft dead (default: 10)
1001. Leg Sequences (player actions)
      1000. Stationary (default: 7)
      1001. Walking (default: 0)
      1002. Running (default: 0)
      1003. Sliding (default: 24)
      1004. Airborne (default: 23)
1002. Idle-Weapon Torso Sequences
1003. Charging-Weapon Torso Sequences
1004. Firing-Weapon Torso Sequences
      1000. Fists (defaults: 1, 1, 2)
      1001. Pistol (defaults: 3, 3, 4)
      1002. Fusion Pistol (defaults: 20, 21, 22)
      1003. Assault Rifle (defaults: 26, 26, 27)
      1004. Rocket Launcher (defaults: 14, 14, 15)
      1005. Flamethrower (defaults: 12, 12, 13)
      1006. Alien Weapon (defaults: 31, 31, 32)
      1007. Shotgun (defaults: 16, 16, 17)
      1008. Ball (defaults: 28, 28, 28)
      1009. SMG (defaults: 33, 33, 34)
      1010. Two Pistols (defaults: 5, 5, 6)
      1011. Two Shotguns (defaults: 18, 18, 19)

### View Element: <view>

This kind of element specifies various view features. It has these attributes:

- map: indicates whether or not to show the overhead map (boolean; default: true)
- fold_effect: indicates whether or not to make the field of view stretch horizontally and squeeze vertically as one teleports (boolean; default: true)
- static_effect: indicates whether or not to make teleporting objects have the sparkling "static" effect and whether they get squeezed horizontally as they teleport (boolean; default: true)
- interlevel_in_effects: set false to skip all teleport effects (and sound) when entering level (boolean; default: true)
- interlevel_out_effects: set false to skip all teleport effects (and sound) when leaving level (boolean; default: true)

This element has the child elements <font>, for setting on-screen-display fonts and <fov>, which is for setting field-of-view features.

The default on-screen font is "Monaco", size 12, normal style; for more on setting fonts, go here.

Field-of-view features are set with child element <fov>, which has these attributes:

- normal: the normal field of view (default: 80)
- extra: the extravision-powerup field of view (default: 130)
- tunnel: the tunnel-vision field of view, good for long-distance sharpshooting (default: 30)
- rate: how much to change the FOV in degrees/(engine tick) (default: 1.667 or 50 degrees/s)
- fix_h_not_v: fix the view's horizontal FOV angle instead of its vertical FOV angle (boolean; default: false). Here is what happens when one shifts from a HUDded to a HUDless view:
  - fix_h_not_v false: the horizontal FOV shrinks
  - fix_h_not_v true: the vertical FOV expands

All of them are in degrees, all of them are floating-point values (can be non-integer) between 0 and 180, and all of them are optional.

### Weapons Element: <weapons>

This kind of element specifies various features of the weapons, such as shell casings and weapon order (child elements <shell_casings> and <order>).

Shell-casing features one can specify with the child element <shell_casings>, which has these attributes:

- index (mandatory)
- coll: which shapes collection
- seq: which sequence
- x0: initial position (horizontal)
- y0: initial position (vertical)
- vx0: initial velocity (horizontal)
- vy0: initial velocity (vertical)
- dvx: acceleration (horizontal)
- dvy: acceleration (vertical)

The time unit here is the engine tick; x0, y0, vx0, vy0, dvx, and dvy are all floating-point values that are relative to the screen (0 = left, 1 = right; 0 = bottom, 1 = top).

The various types of shell casings are:

1000. Assault rifle
1001. Centered pistol
1002. Left-side pistol
1003. Right-side pistol
1004. SMG

The weapon order can be specified with the child element <order>, which has these attributes, both mandatory:

- index: which in the ordering list
- weapon: what weapon index

The default weapon order is

1000. Fist
1001. Pistol
1002. Fusion Pistol
1003. Shotgun
1004. Assault Rifle
1005. SMG
1006. Flamethrower
1007. Rocket Launcher
1008. Alien Weapon
1009. Ball

### Items Element: <items>

This kind of element specifies various features of items that can be picked up. These are specified with the child element <item>, which has these attributes:

- index (mandatory)
- type: what kind of item:
  1000. weapon
  1001. ammunition
  1002. powerup
  1003. generic item
  1004. weapon powerup (note: the engine does not currently support this type)
  1005. ball
- singular: index of singular name string (only one of them)
- plural: index of plural name string (more than one of them)
- maximum: maximum number that a player may possess
- invalid: what environments the item cannot be used in; this value is determined by the sum of values for individual environment types:
  - `0 (hex 0000)` Normal
  - `1 (hex 0001)` Vacuum
  - `2 (hex 0002)` Magnetic
  - `4 (hex 0004)` Rebellion
  - `8 (hex 0008)` Low Gravity
  - `8192 (hex 2000)` Network
  - `16384 (hex 4000)` Single Player

The item shape can be specified with a shape child element, which can be blank (<shape/>).

### Damage-Kicks Element: <damage_kicks>

This element specifies the velocity impulse that some damage type will produce. The kick for each damage type is specified with a <kick> child element, which has these attributes:

- index: which "true" damage type (mandatory)
- base: quantity of kick that is always present
- mult: how much to multiply the damage amount by to obtain an additional kick
- vertical: indicates whether the kick will have a vertical component in addition to a horizontal one (boolean)

### Scenery Element: <scenery>

This kind of element specifies various features of scenery objects, including size and solidity. Each individual type of scenery object is specified with a <object> child element, which has these attributes:

- index: which one of the scenery-object types (mandatory)
- flags: various features; get this value by adding the numerical values corresponding to the desired features:
  - `1 (hex 0001)` Solid (can't pass through it)
  - `2 (hex 0002)` Unused
  - `4 (hex 0004)` Destroyable
- radius: horizontal dimension in internal units, for doing collision detection.
- height: vertical dimension like above; if negative, then object's extent downward from reference point (good for ceiling objects).
- destruction: effect to make when destroyed (-1 is none).

This element's shapes can be specified with child elements <normal> and <destroyed>, for before-and-after shapes; each of them has the actual shape value specified with a shape child element.

Some notes on the flags:

"Destroyable" is not meaningful unless the object is also "solid"; this is because a projectile must collide with the object in order to destroy it. Thus, a solid but indestructible object would get flags="1", and a destroyable one would get flags="5".

The index is which one of these scenery-object types:

1000. Lava: light dirt
1001. Lava: dark dirt
1002. Lava: bones
1003. Lava: bone
1004. Lava: ribs
1005. Lava: skull
1006. Lava: hanging light 1
1007. Lava: hanging light 2
1008. Lava: small cylinder
1009. Lava: large cylinder
1010. Lava: block 1
1011. Lava: block 2
1012. Lava: block 3
1013. Water: pistol clip
1014. Water: short light
1015. Water: long light
1016. Water: siren
1017. Water: rocks
1018. Water: blood drops
1019. Water: water thing
1020. Water: gun
1021. Water: Bob remains
1022. Water: puddles
1023. Water: big puddles
1024. Water: security monitor
1025. Water: alien supply can
1026. Water: machine
1027. Water: fighter's staff
1028. Sewage: stubby green light
1029. Sewage: long green light
1030. Sewage: junk
1031. Sewage: big antenna 1
1032. Sewage: big antenna 2
1033. Sewage: alien supply can
1034. Sewage: bones
1035. Sewage: big bones
1036. Sewage: Pfhor pieces
1037. Sewage: Bob pieces
1038. Sewage: Bob blood
1039. Pfhor: green light
1040. Pfhor: small alien light
1041. Pfhor: alien ceiling rod light
1042. Pfhor: bulbous yellow alien object
1043. Pfhor: square gray organic object
1044. Pfhor: Pfhor skeleton
1045. Pfhor: Pfhor mask
1046. Pfhor: green stuff
1047. Pfhor: Hunter shield
1048. Pfhor: bones
1049. Pfhor: alien sludge
1050. Jjaro: short ceiling light
1051. Jjaro: long light
1052. Jjaro: weird rod
1053. Jjaro: Pfhor ship
1054. Jjaro: Sun
1055. Jjaro: large glass container
1056. Jjaro: nub 1
1057. Jjaro: nub 2
1058. Jjaro: Lh'owon
1059. Jjaro: floor whip antenna
1060. Jjaro: ceiling whip antenna

### Landscapes Element: <landscapes>

This kind of element is for modifying landscape rendering. This element has two kinds of child elements, <clear> and <landscape>.

The first one, <clear>, clears the landscape options, setting them back to their defaults; if it has an attribute of "coll", it will clear the sequences for the collection specified in that attribute's value; if not, it will clear all the sequences. However, this command can be followed by commands to set up landscape options, which will then be executed as if no "clear" command had been issued.

The second one, <landscape>, specifies the landscape options themselves. It takes these attributes:

- coll: which collection (mandatory)
- frame: which frame to apply the options to (default: -1, all frames)
- horiz_exp: exponent for power of 2 that is the number of wraparound repeats in the horizontal direction. (default: 1 - two repeats)
- vert_exp: exponent for power of 2 that makes a vertical scaling equal to the scaling produced by the same value of horiz_exp in the horizontal direction. (default: 1 - equal to two horizontal repeats)
- ogl_asprat_exp: exponent for power of 2 that is the ratio of width to height of the part of the texture that OpenGL will use (width is fixed; height can be variable). This part will always be centered in height, and will either include some untextured area or will not include the top and bottom parts. (default: 1 -- height is 1/2 width)
- vert_repeat: whether texture repeats in the vertical direction (default: false -- clamped in the vertical direction; last pixels stretched out)
- azimuth: angle in degrees to rotate the texture leftward relative to the map. This could be useful for aligning landscape features with map ones. (default: 0)

### Texture-Loading Element: <texture_loading>

This kind of element is for setting what textures are to be loaded. It has one attribute, "landscapes", which is boolean; it indicates whether or not to load M2/Moo-style landscapes (collections 26 to 30). It also has a child element, <texture_env>, for indicating what wall-texture and scenery collections are to be loaded. It takes these attributes, all mandatory:

- index: which one of the texture environments (water, lava, sewage, etc.)
- which: which position in the texture-environment definition (0 = first, etc;). There are currently 7 such positions available.
- coll: which collection in that position; -1 is no collection.

The defaults for Marathon 2/oo are, in order (walls, scenery):

1000. 17, 22 -- Lh'owon Water
1001. 18, 23 -- Lh'owon Lava
1002. 19, 24 -- Lh'owon Sewage
1003. 20, 25 -- Jjaro
1004. 21, 26 -- Pfhor

Those for Marathon 1 are, in order (walls, control panels, scenery):

1000. 17, 8, 23 -- Marathon Set 1
1001. 18, 8, 23 -- Marathon Set 2
1002. 19, 8, 23 -- Marathon Set 3
1003. 2, 24, 25 -- Pfhor

Note also that Marathon 1 has its landscapes in the wall-texture collections; the attribute "landscapes" is to be false for it.

### OpenGL-Rendering Element: <opengl>

This kind of element is for modifying the OpenGL rendering. Currently, both texture-rendering modification and fog are supported; texture-rendering modification modifies the rendering of each bitmap. This element has these kinds of child elements, <txtr_clear>, <texture>, <model_clear>, <model>, <shader>, and <fog>.

The first one, <txtr_clear>, clears the texture options, setting them back to their defaults. If it has an attribute of "coll", it will clear the sequences for the collection specified in that attribute's value; if not, it will clear all the sequences. However, this command can be followed by commands to set up texture options, which will then be executed as if no "txtr_clear" command had been issued.

The next one, <texture>, specifies the texture options themselves. It takes these attributes:

- coll: which collection (mandatory).
- clut: which color table. Values 0 to 7 are the familiar color-table values, and there are these special values:
  - All color tables: -1 (default)
  - Infravision: 8
  - Silhouette: 9 [used for invisibility and static effect]
- bitmap: which one to apply the options to (mandatory).
- opac_type: what type of opacity to use (default: 0 -- crisp edges).
- opac_scale: scaling value for the opacity; how much to multiply it by (default: 1 -- no change).
- opac_shift: shift value for the opacity; how much to add after multiplying (default: 0 -- no change).
- void_visible: can see into the void (what's not in any map polygon) through this texture; can cause smearing and weird show-through (default: false; cannot see into void).
- normal_image: the name of the file whose image content to substitute in "normal" rendering (sensitive to light levels).
- normal_mask: the name of the file whose image content becomes the opacity mask for "normal" rendering (sensitive to light levels). It must be used with a normal_image file.
- glow_image: the name of the file whose image content to substitute in "glowing" rendering (independent of light levels).
- glow_mask: the name of the file whose image content becomes the opacity mask for "glowing" rendering (independent of light levels). It must be used with a glow_image file.
- minimum_glow_intensity: the threshold at which "glowing" images are independent of light levels. Above this threshold, normal lighting calculations are used. (default: 1 -- always light at full intensity)
- offset_image: the name of the file whose image content to use for bump mapping (normals in RGB channels, height map in alpha channel).
- normal_blend: which blend mode for semitransparent normal textures (default: 0 -- crossfade)
- glow_blend: which blend mode for semitransparent glowing textures (default: 0 -- crossfade)
- image_scale: The amount to scale a substituted sprite, from pixel units to internal distance units. If it is zero or less, then it and the offsets are ignored.
- x_offset: The amount to shift the top left corner rightward, in internal units.
- y_offset: The amount to shift the top left corner downward, in internal units.
- type: the texture type to use for image quality adjustments. If not set, the image quality settings in graphics preferences will be ignored for this image, and the largest version in the file used.
- normal_premultiply: the normal image uses premultiplied alpha (default: false, the image does not use premultiplied alpha)
- glow_premultiply: the glow image uses premultiplied alpha (default: false, the image does not use premultiplied alpha)
- normal_bloom_scale: when rendering bloom effects in the shader renderer, scale the normal image's light level by this amount. (default: 0 -- no light during bloom effect)
- normal_bloom_shift: when rendering bloom effects in the shader renderer, add this value to the normal image's light level after scaling. (default: 0)
- glow_bloom_scale: when rendering bloom effects in the shader renderer, scale the glow image's light level by this amount. (default: 1 -- full intensity during bloom effect)
- glow_bloom_shift: when rendering bloom effects in the shader renderer, add this value to the glow image's light level after scaling. (default: 0)
- landscape_bloom: when rendering bloom effects in the shader renderer, AND when the texture is used as a landscape, scale the image's light level by this amount. Note that glow images are not currently supported for landscapes. (default: 0.5)

Note: all resulting values will be pegged to the range 0 to 1. Here are the various opacity types:

1000. Crisp edges. The opacity threshold is 0.5.
1001. Fuzzy edges.
1002. Fuzzy edges with opacity = average of color channels.
1003. Fuzzy edges with opacity = maximum of color channels.

Here are the various blend types, to be used for semitransparent rendering:

1000. Crossfade blending; reasonable for semitransparent, non-glowing object
1001. Additive blending; reasonable for glowing, low-opacity object

The opacities of all but the first will be scaled and shifted with opac_scale and opac_shift. The first one of these is good for objects with well-defined edges; the others are good for clouds, flames, energy-weapon bolts, and so forth, which will not have sharp boundaries. The average and maximum modes were included as a way of producing variable opacity without adding any new files; this hack was inspired by the semitransparency handling in the Tomb Raider series. The idea here is that the brighter regions are likely to be the more opaque ones in these cases. I've put both of them in because they behave somewhat differently; max has the same strength for saturated colors as for grays, while mean has less strength for saturated colors than for grays.

Here are the texture types:

1000. Wall Textures
1001. Landscape Textures
1002. Inhabitants
1003. Weapons in hand

The next one, <model_clear>, clears all the model definitions; it works much like <txtr_clear>.

The next one, <model> specifies a 3D model to be used in place of some sequence. Models can either be static, having no built-in animations (most 3D-model formats), or they can be dynamic, having such animations (Brian Barnes's Dim3 model format, for example). These animations are specified by sequence (animation in BB's terminology); each sequence should have at least one frame. There is one special "sequence", the neutral pose, which indicates a model with no animations applied. This element takes child elements <seq_map> and <skin>, and these attributes:

- coll: which collection (mandatory).
- seq: which sequence in the Marathon engine. Checked after the sequence mapping is searched for a sequence; it may be omitted if a sequence mapping is being used. Recommended for use with static models; for dynamic models, it maps onto the model's neutral pose.
- file: the name of the file containing the model data. For static models, this is the only file, for Dim3 models, this is the "mesh" file (basic model data).
- file1: an extra model-data file. Unnecessary for static models; for Dim3 models, this is the "pose" file (frames).
- file2: an extra model-data file. Unnecessary for static models; for Dim3 models, this is the "animate" file (sequences).
- type: a string identifying the model-data format:
  - Alias|Wavefront Object: "obj"
  - 3D Studio Max Object: "max"
  - QuickDraw 3D / Quesa 3D Metafile: "qd3d" or "3dmf" or "quesa"
  - Brian Barnes Dim3 animated model: "dim3"
  The following types are also accepted, but have known bugs and are only present for backward compatibility:
  - Alias|Wavefront Object: "wave" to "wavefront"
  - 3D Studio Max Object: "3ds" to "3ds max" or "3dsmax"
  If it is absent, the type will then be guessed from the file contents, an operation that may work on some file formats but not others.
- scale: how much to scale the model before rendering, from model coordinates to internal coordinates. A negative scale will cause the model to be reflected around all three axes (default: 1).
- x_rot: rotation in degrees around the x-axis (default: 0).
- y_rot: rotation in degrees around the y-axis (default: 0).
- z_rot: rotation in degrees around the z-axis (default: 0).
- x_shift: shift in internal units in the x direction (default: 0).
- y_shift: shift in internal units in the y direction (default: 0).
- z_shift: shift in internal units in the z direction (default: 0).
- side: which side is visible (default: clockwise):
  - +: clockwise side
  - 0: both sides
  - -: counterclockwise side
- norm_type: which sort of normals to use for doing the lighting (default: originals)
  1000. None
  1001. Original-model normals (may be none)
  1002. Reverse-direction original-model normals (may be none)
  1003. Normals in the direction of the polygons' clockwise sides
  1004. Normals in the direction of the polygons' counterclockwise sides
- norm_split: threshold for spltting the vertex normals for clockwise-side or counterclockwise-side normals; if the normals' standard deviation is greater than this value, then a vertex's normal is split into one for each of its polygons. (default: 0.5)
- light_type: what sort of lighting to use (default: fast)
  1000. Fast lighting; only one calculation of the player light
  1001. Like above, but the player light won't fade off on the sides
  1002. Individual-vertex calculation of the player light (more accurate, but slower)
  1003. Like above, but the player light won't fade off on the sides
- depth_type: what sort of depth to use in the depth sorting
  - +: Farthest bounding-box point (good for all-or-nothing-opacity objects)
  - 0: Center of bounding box
  - -: Nearest bounding-box point (good for semitransparent objects)
  Ideally, objects with all-or-nothing opacity ought to be rendered before semitransparent ones; these different depth options offer a way to approximate that effect.
- force_sprite_depth: require sprites to be depth-sorted inside the model (default: false)
  This flag, active only in the shader renderer, will force sprites to strictly obey the Z-buffer. This allows sprites to be drawn correctly between different sections of a model (good for open models, like a house), but at the expense of clipping artifacts between sprites and walls/floors. In the default case, sprites are drawn entirely behind or entirely in front of the model. Use this flag sparingly, as the side effects are quite noticeable.

The scaling and rotations will be applied before the shifts; the rotations will be applied in order x, y, and z.

Its child element of <seq_map> is the sequence-mapping element, has these attributes, both mandatory:

- seq: sequence in the Marathon engine to map to.
- model_seq: sequence in the model, starting from 0. The model sequence -1 is the neutral pose.

A model element can have several such elements, covering many of a collection's sequences.

The model element's child element of <skin> has these attributes, which closely parallel those of <texture>:

- clut: which color table (default: -1 -- all of them).
- opac_type: what type of opacity to use (default: 0 -- crisp edges).
- opac_scale: scaling value for the opacity; how much to multiply it by (default: 1 -- no change).
- opac_shift: shift value for the opacity; how much to add after multiplying (default: 0 -- no change).
- normal_image: the name of the file whose image content to substitute in "normal" rendering (sensitive to light levels).
- normal_mask: the name of the file whose image content becomes the opacity mask for "normal" rendering (sensitive to light levels). It must be used with a normal_image file.
- glow_image: the name of the file whose image content to substitute in "glowing" rendering (independent of light levels).
- glow_mask: the name of the file whose image content becomes the opacity mask for "glowing" rendering (independent of light levels). It must be used with a glow_image file.
- minimum_glow_intensity: the threshold at which "glowing" images are independent of light levels. Above this threshold, normal lighting calculations are used. (default: 1 -- always light at full intensity)
- normal_blend: which blend mode for semitransparent normal textures (default: 0 -- crossfade)
- glow_blend: which blend mode for semitransparent glowing textures (default: 0 -- crossfade)
- offset_image: the name of the file whose image content to use for bump mapping (normals in RGB channels, height map in alpha channel).
- normal_bloom_scale: when rendering bloom effects in the shader renderer, scale the normal image's light level by this amount. (default: 0 -- no light during bloom effect)
- normal_bloom_shift: when rendering bloom effects in the shader renderer, add this value to the normal image's light level after scaling. (default: 0)
- glow_bloom_scale: when rendering bloom effects in the shader renderer, scale the glow image's light level by this amount. (default: 1 -- full intensity during bloom effect)
- glow_bloom_shift: when rendering bloom effects in the shader renderer, add this value to the glow image's light level after scaling. (default: 0)

The next one, <shader>, specifies custom shader definitions used by the shader-capable renderer. It takes these attributes:

- name: which shader to specify (mandatory). The following shaders are used:
  - sprite
  - invincible
  - invisible
  - landscape
  - wall
  - bump
  - sprite_bloom
  - invincible_bloom
  - invisible_bloom
  - landscape_bloom
  - wall_bloom
  - bump_bloom
  - blur
  - bloom
- vert: the path to a file containing the vertex shader program.
- frag: the path to a file containing the fragment shader program.
- passes: number of passes to use when rendering. Currently only the "bloom" shader supports multiple passes. (default: -1 -- use shader default, which is 3 for bloom)

The final one, <fog>, has these attributes:

- type: which type of fog:
  1000. Above liquid
  1001. Below liquid
  The default is 0 (above liquid).
- on: (boolean; default: false)
- depth: the fog depth in World Units (default: 8)
- landscapes: whether this fog affects landscape textures (default: true)

and a color subelement, which indicates the fog color (default: gray [red = green = blue = 0.5]).

### Software Rendering Element: <software>

This kind of element is for modifying the software rendering. This element has the child element <texture>

<texture> specifies options for wall textures only, CLUT 0. It takes these attributes:

- coll: which collection
- bitmap: which bitmap to apply the options to
- opac_type: what type of opacity to use (default: 0 -- no change).
- opac_scale: scaling value for the opacity; how much to multiply it by (default: 1 -- no change).
- opac_shift: shift value for the opacity; how much to add after multiplying (default: 0 -- no change).

Here are the various opacity types:

1000. Crisp edges. Opacity is unaltered (this will cause no visible change in the software renderer).
1001. Fuzzy edges.
1002. Fuzzy edges with opacity = average of color channels.
1003. Fuzzy edges with opacity = maximum of color channels.

In all cases, the wall texture's bitmap transparency definition is unaltered by opac_shift, opac_scale, and opac_type. Therefore, if a bitmap is marked transparent, the pixels that use color 0 will always be transparent, regardless of this MML.

### Dynamic-Limits Element: <dynamic_limits>

This kind of element specifies various dynamic limits, more specifically, the maximum numbers of various entities whose quantity varies during the game. These are specified with various child elements, each one of which has a mandatory attribute of "value", which is set to the appropriate number. Here they are:

- <objects> (default: 1024) Every sort of inhabitant object (players, monsters, items, projectiles, scenery)
- <monsters> (default: 512) Monsters / Non-Player Characters (NPC's).
- <paths> (default: 128) Paths for NPC's to follow; if not enough, they will not move.
- <projectiles> (default: 128) Bullets, missiles, flame, fist punches, etc.
- <effects> (default: 128) Explosions, splashes, etc.
- <rendered> (default: 1024) How many inhabitants to render at any one time.
- <local_collision> (default: 64) Target visibility, NPC-NPC collisions, etc.
- <global_collision> (default: 256) Projectiles with other objects

### Player-Name Element: <player_name>

This is the default player name in netgames, which takes the form:

    <player_name>Marathon Player</player_name>

### Scenario Element: <scenario>

This element is for identifying the scenario. It has an attribute "name" which is the scenario name displayed in the Find Internet Game client, an attribute "version" which is the scenario version displayed in the Find Internet Game client, and an attribute "id" which is used to determine which games to gray out. The defaults for name, version, and id are blank.

There are also child elements <can_join> which specify other scenario ids this one can join.

Scenario names are limited to 32 characters in length. Scenario version strings are limited to 8 characters in length. Scenario IDs are limited to 24 characters in length.

Games show up as joinable when any of these is true:

- The joiner's scenario id is blank
- The gatherer's scenario id is blank
- The joiner's scenario id matches the gatherer's scenario id
- The gatherer's scenario id matches one of the joiner's can_join elements

All matches are case sensitive.

For example:

    <scenario name="Marathon Infinity" id="Marathon Infinity">
    <can_join>Marathon 2</can_join>
    </scenario>

### Keyboard-Defaults Element: <keyboard>

This element is for setting the default keyboard settings. It has an attribute "set" which indicates which of the three sets to set keys for (Standard, Arrows, PowerBook), and a child element <key> with attributes

- index: which key action
- sdl: the SDL key code

Here are the various actions:

1000. Moving Forward
1001. Moving Backward
1002. Turning Left
1003. Turning Right
1004. Sidestepping Left
1005. Sidestepping Right
1006. Looking Left
1007. Looking Right
1008. Looking Up
1009. Looking Down
1010. Looking Center
1011. Cycle Weapons Backward
1012. Cycle Weapons Forward
1013. Left Trigger State
1014. Right Trigger State
1015. Sidestep Don't Turn
1016. Run Don't Walk
1017. Look Don't Turn
1018. Action Trigger State
1019. Toggle Map
1020. Microphone Button

Here are the SDL key definitions, which have been cribbed from the SDL include file "SDL_keysym.h":

    	/* The keyboard syms have been cleverly chosen to map to ASCII */
    	SDLK_UNKNOWN		= 0,
    	SDLK_FIRST		= 0,
    	SDLK_BACKSPACE		= 8,
    	SDLK_TAB		= 9,
    	SDLK_CLEAR		= 12,
    	SDLK_RETURN		= 13,
    	SDLK_PAUSE		= 19,
    	SDLK_ESCAPE		= 27,
    	SDLK_SPACE		= 32,
    	SDLK_EXCLAIM		= 33,
    	SDLK_QUOTEDBL		= 34,
    	SDLK_HASH		= 35,
    	SDLK_DOLLAR		= 36,
    	SDLK_AMPERSAND		= 38,
    	SDLK_QUOTE		= 39,
    	SDLK_LEFTPAREN		= 40,
    	SDLK_RIGHTPAREN		= 41,
    	SDLK_ASTERISK		= 42,
    	SDLK_PLUS		= 43,
    	SDLK_COMMA		= 44,
    	SDLK_MINUS		= 45,
    	SDLK_PERIOD		= 46,
    	SDLK_SLASH		= 47,
    	SDLK_0			= 48,
    	SDLK_1			= 49,
    	SDLK_2			= 50,
    	SDLK_3			= 51,
    	SDLK_4			= 52,
    	SDLK_5			= 53,
    	SDLK_6			= 54,
    	SDLK_7			= 55,
    	SDLK_8			= 56,
    	SDLK_9			= 57,
    	SDLK_COLON		= 58,
    	SDLK_SEMICOLON		= 59,
    	SDLK_LESS		= 60,
    	SDLK_EQUALS		= 61,
    	SDLK_GREATER		= 62,
    	SDLK_QUESTION		= 63,
    	SDLK_AT			= 64,
    	/*
    	   Skip uppercase letters
    	 */
    	SDLK_LEFTBRACKET	= 91,
    	SDLK_BACKSLASH		= 92,
    	SDLK_RIGHTBRACKET	= 93,
    	SDLK_CARET		= 94,
    	SDLK_UNDERSCORE		= 95,
    	SDLK_BACKQUOTE		= 96,
    	SDLK_a			= 97,
    	SDLK_b			= 98,
    	SDLK_c			= 99,
    	SDLK_d			= 100,
    	SDLK_e			= 101,
    	SDLK_f			= 102,
    	SDLK_g			= 103,
    	SDLK_h			= 104,
    	SDLK_i			= 105,
    	SDLK_j			= 106,
    	SDLK_k			= 107,
    	SDLK_l			= 108,
    	SDLK_m			= 109,
    	SDLK_n			= 110,
    	SDLK_o			= 111,
    	SDLK_p			= 112,
    	SDLK_q			= 113,
    	SDLK_r			= 114,
    	SDLK_s			= 115,
    	SDLK_t			= 116,
    	SDLK_u			= 117,
    	SDLK_v			= 118,
    	SDLK_w			= 119,
    	SDLK_x			= 120,
    	SDLK_y			= 121,
    	SDLK_z			= 122,
    	SDLK_DELETE		= 127,
    	/* End of ASCII mapped keysyms */

    	/* International keyboard syms */
    	SDLK_WORLD_0		= 160,		/* 0xA0 */
    	SDLK_WORLD_1		= 161,
    	SDLK_WORLD_2		= 162,
    	SDLK_WORLD_3		= 163,
    	SDLK_WORLD_4		= 164,
    	SDLK_WORLD_5		= 165,
    	SDLK_WORLD_6		= 166,
    	SDLK_WORLD_7		= 167,
    	SDLK_WORLD_8		= 168,
    	SDLK_WORLD_9		= 169,
    	SDLK_WORLD_10		= 170,
    	SDLK_WORLD_11		= 171,
    	SDLK_WORLD_12		= 172,
    	SDLK_WORLD_13		= 173,
    	SDLK_WORLD_14		= 174,
    	SDLK_WORLD_15		= 175,
    	SDLK_WORLD_16		= 176,
    	SDLK_WORLD_17		= 177,
    	SDLK_WORLD_18		= 178,
    	SDLK_WORLD_19		= 179,
    	SDLK_WORLD_20		= 180,
    	SDLK_WORLD_21		= 181,
    	SDLK_WORLD_22		= 182,
    	SDLK_WORLD_23		= 183,
    	SDLK_WORLD_24		= 184,
    	SDLK_WORLD_25		= 185,
    	SDLK_WORLD_26		= 186,
    	SDLK_WORLD_27		= 187,
    	SDLK_WORLD_28		= 188,
    	SDLK_WORLD_29		= 189,
    	SDLK_WORLD_30		= 190,
    	SDLK_WORLD_31		= 191,
    	SDLK_WORLD_32		= 192,
    	SDLK_WORLD_33		= 193,
    	SDLK_WORLD_34		= 194,
    	SDLK_WORLD_35		= 195,
    	SDLK_WORLD_36		= 196,
    	SDLK_WORLD_37		= 197,
    	SDLK_WORLD_38		= 198,
    	SDLK_WORLD_39		= 199,
    	SDLK_WORLD_40		= 200,
    	SDLK_WORLD_41		= 201,
    	SDLK_WORLD_42		= 202,
    	SDLK_WORLD_43		= 203,
    	SDLK_WORLD_44		= 204,
    	SDLK_WORLD_45		= 205,
    	SDLK_WORLD_46		= 206,
    	SDLK_WORLD_47		= 207,
    	SDLK_WORLD_48		= 208,
    	SDLK_WORLD_49		= 209,
    	SDLK_WORLD_50		= 210,
    	SDLK_WORLD_51		= 211,
    	SDLK_WORLD_52		= 212,
    	SDLK_WORLD_53		= 213,
    	SDLK_WORLD_54		= 214,
    	SDLK_WORLD_55		= 215,
    	SDLK_WORLD_56		= 216,
    	SDLK_WORLD_57		= 217,
    	SDLK_WORLD_58		= 218,
    	SDLK_WORLD_59		= 219,
    	SDLK_WORLD_60		= 220,
    	SDLK_WORLD_61		= 221,
    	SDLK_WORLD_62		= 222,
    	SDLK_WORLD_63		= 223,
    	SDLK_WORLD_64		= 224,
    	SDLK_WORLD_65		= 225,
    	SDLK_WORLD_66		= 226,
    	SDLK_WORLD_67		= 227,
    	SDLK_WORLD_68		= 228,
    	SDLK_WORLD_69		= 229,
    	SDLK_WORLD_70		= 230,
    	SDLK_WORLD_71		= 231,
    	SDLK_WORLD_72		= 232,
    	SDLK_WORLD_73		= 233,
    	SDLK_WORLD_74		= 234,
    	SDLK_WORLD_75		= 235,
    	SDLK_WORLD_76		= 236,
    	SDLK_WORLD_77		= 237,
    	SDLK_WORLD_78		= 238,
    	SDLK_WORLD_79		= 239,
    	SDLK_WORLD_80		= 240,
    	SDLK_WORLD_81		= 241,
    	SDLK_WORLD_82		= 242,
    	SDLK_WORLD_83		= 243,
    	SDLK_WORLD_84		= 244,
    	SDLK_WORLD_85		= 245,
    	SDLK_WORLD_86		= 246,
    	SDLK_WORLD_87		= 247,
    	SDLK_WORLD_88		= 248,
    	SDLK_WORLD_89		= 249,
    	SDLK_WORLD_90		= 250,
    	SDLK_WORLD_91		= 251,
    	SDLK_WORLD_92		= 252,
    	SDLK_WORLD_93		= 253,
    	SDLK_WORLD_94		= 254,
    	SDLK_WORLD_95		= 255,		/* 0xFF */

    	/* Numeric keypad */
    	SDLK_KP0		= 256,
    	SDLK_KP1		= 257,
    	SDLK_KP2		= 258,
    	SDLK_KP3		= 259,
    	SDLK_KP4		= 260,
    	SDLK_KP5		= 261,
    	SDLK_KP6		= 262,
    	SDLK_KP7		= 263,
    	SDLK_KP8		= 264,
    	SDLK_KP9		= 265,
    	SDLK_KP_PERIOD		= 266,
    	SDLK_KP_DIVIDE		= 267,
    	SDLK_KP_MULTIPLY	= 268,
    	SDLK_KP_MINUS		= 269,
    	SDLK_KP_PLUS		= 270,
    	SDLK_KP_ENTER		= 271,
    	SDLK_KP_EQUALS		= 272,

    	/* Arrows + Home/End pad */
    	SDLK_UP			= 273,
    	SDLK_DOWN		= 274,
    	SDLK_RIGHT		= 275,
    	SDLK_LEFT		= 276,
    	SDLK_INSERT		= 277,
    	SDLK_HOME		= 278,
    	SDLK_END		= 279,
    	SDLK_PAGEUP		= 280,
    	SDLK_PAGEDOWN		= 281,

    	/* Function keys */
    	SDLK_F1			= 282,
    	SDLK_F2			= 283,
    	SDLK_F3			= 284,
    	SDLK_F4			= 285,
    	SDLK_F5			= 286,
    	SDLK_F6			= 287,
    	SDLK_F7			= 288,
    	SDLK_F8			= 289,
    	SDLK_F9			= 290,
    	SDLK_F10		= 291,
    	SDLK_F11		= 292,
    	SDLK_F12		= 293,
    	SDLK_F13		= 294,
    	SDLK_F14		= 295,
    	SDLK_F15		= 296,

    	/* Key state modifier keys */
    	SDLK_NUMLOCK		= 300,
    	SDLK_CAPSLOCK		= 301,
    	SDLK_SCROLLOCK		= 302,
    	SDLK_RSHIFT		= 303,
    	SDLK_LSHIFT		= 304,
    	SDLK_RCTRL		= 305,
    	SDLK_LCTRL		= 306,
    	SDLK_RALT		= 307,
    	SDLK_LALT		= 308,
    	SDLK_RMETA		= 309,
    	SDLK_LMETA		= 310,
    	SDLK_LSUPER		= 311,		/* Left "Windows" key */
    	SDLK_RSUPER		= 312,		/* Right "Windows" key */
    	SDLK_MODE		= 313,		/* "Alt Gr" key */
    	SDLK_COMPOSE		= 314,		/* Multi-key compose key */

    	/* Miscellaneous function keys */
    	SDLK_HELP		= 315,
    	SDLK_PRINT		= 316,
    	SDLK_SYSREQ		= 317,
    	SDLK_BREAK		= 318,
    	SDLK_MENU		= 319,
    	SDLK_POWER		= 320,		/* Power Macintosh power key */
    	SDLK_EURO		= 321,		/* Some european keyboards */

    	/* Add any other keys here */

    	SDLK_LAST

### Cheating Element: <cheats>

This element controls whether or not the engine will respond to the cheat codes; it has these attributes:

- on: it is boolean (default: false [cheating off])

and this child element: <keyword>, which is for specifying the cheat keywords. It has a mandatory attribute, "index", and some contained text, as with the text-string elements.

The cheat-code keywords and their defaults are

1000. Energy (1x): NRG
1001. Oxygen: OTWO
1002. Map Everything: MAP
1003. Invisible: BYE
1004. Invincible: NUKE
1005. Infravision: SEE
1006. Extravision: WOW
1007. Pistol: MAG
1008. Assault Rifle: RIF
1009. Rocket Launcher: POW
1010. Flamethrower: TOAST
1011. Fusion Gun: MELT
1012. Shotgun: PUFF
1013. SMG: ZIP
1014. Alien weapon: PZBXAY
1015. All weapons' ammo: AMMO
1016. Jump: QWE
1017. Everything (almost): SHIT
1018. Save at this spot: YOURMOM

For example, making the energy cheat into "JUICE" means setting up

    <keyword index="0">JUICE</keyword>

Hold down control and type the cheat code in to activate it.

### Logging Configuration Element: <logging>

This element is used to configure Aleph One's logging behavior. It has no attributes of its own. Its single child element, <logging_domain>, requests particular logging behaviors for a logging domain.

The <logging_domain> element has the following attributes:

- domain (string, required): names the logging domain whose behavior should be modified. At the moment, the only logging domain is "global", in which all logging is currently done.
- threshhold (integer): only log messages at a level strictly lower than (i.e. less detailed than) the threshhold will appear. See below for information about logging levels.
- show_locations (boolean): determines whether log entries will include source code filenames and line numbers.
- flush (boolean): determines whether output to the log file should be flushed after every log message (slower) or allowed to sit in a buffer for later writing (faster, but may fail to write log entries just before an application crash).

The following are the currently-defined standard log levels:

- logFatalLevel = 0: program must exit
- logErrorLevel = 10: can't do something significant
- logWarningLevel = 20: can continue but results could be really screwy
- logAnomalyLevel = 30: can continue, results could be off a little, but no big deal
- logNoteLevel = 40: something worth mentioning
- logTraceLevel = 50: details of actions and logic
- logDumpLevel = 60: values of data etc.

Note that the <threshhold> attribute requires that the level be specified as an integer (but that it need not equal one of the standard levels), and further that log messages with level exactly equal to the threshhold level will NOT be seen.

Example:

    <logging>
    <logging_domain domain="global" threshhold="40" show_locations="true" flush="true"/>
    </logging>

This would set up the "global" logging domain such that only messages more important than "notes" would be seen; that source code filenames and line numbers would be included in the log; and that the log file would be flushed after every message, so a message logged just before an application crash would appear in the log file.

### Console

The <console> tag controls messages typed into or printed to the screen. It has these attributes:

- lua: boolean, enables a Lua interpreter in solo play, handy for debugging maps and scripts

There are also child elements for macros and carnage messages:

#### Macros

Macros are substitutions performed on commands entered into the console. For instance, you can make a macro that changes ".1" into "I'll defend". Macros can be used for chat, or to shorten other commands. Each macro child element has an input and an output attribute. To trigger the macro, type a dot immediately followed by the macro input into the console.

Macro inputs can be letters and numbers, but not spaces. Anything after the first space will remain unsubstituted. For instance, ".1 you losers" becomes "I'll defend you losers"

Example:

    <console>
    <macro input="1" output="I'll defend"/>
    </console>

#### Carnage Messages

Carnage messages are printed to the screen when a player is killed by himself or another player in a net game (assuming the gatherer has not disabled carnage messages). Each <carnage_message> tag has these attributes:

- projectile_type: the type of projectile that triggers this message
- on_kill: a string containing the message to print when one player kills another. In the string, %aggressor% will be replaced with the name of the player who did the killing, and %player% will be replaced with the name of the player who was killed.
- on_suicide: a string containing the message to print when a player kills himself. In the string, %player% will be replaced with the name of the player who suicided.

A blank string (the default) results in nothing being printed.

Example:

    <console>
    <carnage_message projectile_type="14"
         on_kill="%aggressor% killed %player% with a SPNKR"
         on_suicide="%player% suicided with a SPNKR"/>
    </console>

### 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.

- <mml> executes the MML script in the resource specified in the value of the attribute "resource"
- <music> plays the music file specified in the value of the attribute "file"
- <random_order> has the boolean attribute "on", which indicates whether the music files are to be played in random order; if not (the default), they are played in looping sequence.
- <movie> plays at the beginning of a level the movie file specified in the value of the attribute "file". It has an optional attribute, "size" (default: 2), which indicates how much the movie is to be scaled when playing back. If this attribute is specified for level index 256, this movie will be played after completing the last level of the scenario.
- <load_screen> displays the file in the attribute "file" in place of the OpenGL loading progress dialog. An optional attribute "scale" defaults to true, and says whether to resize the image to fill the screen. An optional attribute "stretch" defaults to true, and says whether to ignore aspect ratio when scaling the image to fill the screen. Optional attributes "progress_left", "progress_top", "progress_right", and "progress_bottom" specify where to display an optional progress bar, in image co-ordinates. The progress bar will fill left to right if it is wider than it is high, and bottom to top if it is taller than it is wide. Lastly, two optional color child elements can be specified, indices 0 and 1, for background and foreground colors of the progress bar, respectively.

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.

Aleph One supports playing back MPEG-1 movies, and AIFF, WAV, Ogg/Vorbis, and mp3 music.

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:

- index: which fake level-index value to use for the end of the game (default: 99); all chapter screens have the resource ID (1500 + (level index)). If there is more than one ending chapter screen, then this is for finding the first one.
- count: how many in sequence (default: 1), with resource ID's incremented by one for each one.

You can also use <load_screen>, <music>, and <random_order> in a <default_levels> tag in regular <marathon> MML.

### Appendix 1: Additional Elements

#### Colors

Colors are specified with the element <color> colors may be either indexed (being list members), or non-indexed (being in isolation). The color channels are red, green, and blue, with values that range from 0 to 1.

- index (mandatory if indexed; must be absent if not indexed)
- red
- green
- blue

All the color-channel attributes (red, green, blue) are mandatory. This example makes color 7 be yellow:

    <color index="7" red="1" green="1" blue="0"/>

#### Shapes

Shapes can be specified with the element <shape>. A shape specification includes which collection, which color table, and which sequence or frame; a shape may also be allowed to be blank. A shape's attributes are

- coll: which collection (0 to 31)
- clut: which color table; default is 0 (0 to 7)
- seq: which sequence (0 to 255)
- frame: like the above, included if the meaning of "frame" is clearer in some context.

A blank shape is specified as one having no attributes: <shape/>. A non-blank shape requires the collection and sequence attributes, and optionally the color-table attribute (default: 0).

#### Damage

Damage is specified with the element <damage>. Damage features are set with these attributes, which are all optional.

- type ("true" damage index; none is -1)
- flags (0 or 1 [is alien: weaker in easier difficulty levels])
- base
- random
- scale (1 = identity scaling)

#### Fonts

Fonts are specified with the element <font> like colors, fonts may be either indexed (being list members), or non-indexed (being in isolation).

- index (mandatory if indexed; must be absent if not indexed)
- name: the font name; it can be a series of names separated by commas or semicolons, much like HTML font specifications. If a series of the names, the engine will look for a font with the first name, and then the second, and so forth, until it finds such a font.
- size: the font size in points (standard unit)
- style: the font style, which follows MacOS conventions; it is the sum of whichever of these attributes are used:
  - 1: Bold
  - 2: Italic
  - 4: Underline
  - 8: Outline
  - 16: Shadow
  - 32: Condense
  - 64: Extend
  Normal is none of these attributes, or 0.
- file: this is for SDL support, and indicate which font file to use.

None of the font attributes proper are mandatory. This example sets font 4 to the default font for the computer terminals.

    <font index="4" name="Courier" size="12" style="0"/>

#### Boolean data

This is not a separate element, but a kind of value of an attribute. These values for a boolean attribute,

- 1
- t
- true

indicate that a flag is to be on or an action is to be taken. These values,

- 0
- f
- false

indicate that a flag is to be off or an action is not to be taken.

### Appendix 2: Lists of Entity Types

The collections:

1000. Interface
1001. Weapons in Hand
1002. Juggernaut
1003. Tick
1004. Explosion Effects
1005. Hunter
1006. Player
1007. Items
1008. Trooper
1009. Pfhor Fighter
1010. S'pht'Kr
1011. F'lickta
1012. Bob
1013. VacBob
1014. Enforcer
1015. Drone
1016. S'pht
1017. Walls - Water
1018. Walls - Lava
1019. Walls - Sewage
1020. Walls - Jjaro
1021. Walls - Pfhor
1022. Scenery - Water
1023. Scenery - Lava
1024. Scenery - Sewage
1025. Scenery - Jjaro
1026. Scenery - Pfhor
1027. Landscape - Day
1028. Landscape - Night
1029. Landscape - Moon
1030. Landscape - Outer Space
1031. Cyborg

The monsters:

1000. Player
1001. Tick - Energy
1002. Tick - Oxygen
1003. Tick - Kamikaze
1004. S'pht - Minor
1005. S'pht - Major
1006. S'pht - Minor Invisible
1007. S'pht - Major Invisible
1008. Pfhor Fighter - Minor
1009. Pfhor Fighter - Major
1010. Pfhor Fighter - Minor Projectile
1011. Pfhor Fighter - Major Projectile
1012. Bob - Crew
1013. Bob - Science
1014. Bob - Security
1015. Bob - Bad
1016. Drone - Minor
1017. Drone - Major
1018. Drone - Big Minor
1019. Drone - Big Major
1020. Drone - Subverted
1021. Cyborg - Minor
1022. Cyborg - Major
1023. Cyborg - Minor Flame
1024. Cyborg - Major Flame
1025. Enforcer - Minor
1026. Enforcer - Major
1027. Hunter - Minor
1028. Hunter - Major
1029. Trooper - Minor
1030. Trooper - Major
1031. Mother of All Cyborgs
1032. Mother of All Hunters
1033. F'lickta - Sewage
1034. F'lickta - Water
1035. F'lickta - Lava
1036. S'pht'Kr - Minor
1037. S'pht'Kr - Major
1038. Juggernaut - Minor
1039. Juggernaut - Major
1040. Tiny Fighter
1041. Tiny Bob
1042. Tiny F'lickta
1043. VacBob - Crew
1044. VacBob - Science
1045. VacBob - Security
1046. VacBob - Bad

The items to be picked up:

1000. Knife (apparently some placeholder item for "nothing")
1001. Pistol
1002. Pistol Ammo
1003. Fusion Pistol
1004. Fusion Pistol Ammo
1005. Assault Rifle
1006. Assault Rifle Bullets
1007. Assault Rifle Grenades
1008. Rocket Launcher
1009. Rockets
1010. Invisibility Powerup
1011. Invincibility Powerup
1012. Infravision Powerup
1013. Alien Weapon
1014. Alien Weapon Ammo
1015. Flamethrower
1016. Flamethrower Ammo
1017. Extravision Powerup
1018. Oxygen Powerup
1019. Energy Powerup x1
1020. Energy Powerup x2
1021. Energy Powerup x3
1022. Shotgun
1023. Shotgun Ammo
1024. S'pht Door Key
1025. Uplink Chip
1026. Light Blue Ball
1027. Red Ball (the skull)
1028. Violet Ball
1029. Yellow Ball
1030. Brown Ball
1031. Orange Ball
1032. Blue Ball
1033. Green Ball
1034. SMG
1035. SMG Ammo

The weapons:

1000. Fist
1001. Pistol
1002. Fusion Pistol
1003. Assault Rifle
1004. Rocket Launcher
1005. Flamethrower
1006. Alien Weapon
1007. Shotgun
1008. Ball
1009. SMG

The projectiles:

1000. Rocket
1001. Grenade
1002. Pistol Bullet
1003. Rifle Bullet
1004. Shotgun Bullet
1005. Staff Hit
1006. Staff Bolt
1007. Flamethrower Flames
1008. S'pht Bolt - Minor
1009. S'pht Bolt - Major (Seeking)
1010. Alien-Weapon Bolt
1011. Fusion Bolt - Minor
1012. Fusion Bolt - Major
1013. Hunter Bolt
1014. Fist Punch
1015. Armageddon Sphere
1016. Armageddon Electricity
1017. Juggernaut Rocket
1018. Trooper Bullet
1019. Trooper Grenade
1020. S'pht'Kr Bolt - Minor
1021. S'pht'Kr Bolt - Major
1022. Juggernaut Missile
1023. Energy Drain - Minor
1024. Energy Drain - Major
1025. Oxygen Drain
1026. Drone Bolt - Minor
1027. Drone Bolt - Major
1028. Drone Bolt - Subverted
1029. Grenade - Minor Cyborg (Bouncing)
1030. Grenade - Major Cyborg (Seeking)
1031. Ball
1032. Dispersal - Minor Fusion
1033. Dispersal - Major Fusion
1034. Dispersal - Overloaded Fusion
1035. F'lickta Claw
1036. F'lickta Glob
1037. F'lickta Lava Glob
1038. SMG Bullet

The effects:

1000. Rocket Explosion
1001. Rocket Contrail
1002. Grenade Explosion
1003. Grenade Contrail
1004. Bullet Impact
1005. Alien Weapon Impact
1006. Flamethrower Flame
1007. Pfhor Hit
1008. Player Hit
1009. Bob Hit
1010. Bad Bob Hit
1011. Enforcer Hit
1012. S'pht Bolt Minor Impact
1013. S'pht Bolt Major Impact
1014. S'pht Bolt Major Contrail
1015. Pfhor Projectile Impact
1016. Pfhor Melee Hit
1017. Hunter Projectile Detonation
1018. Hunter Hit
1019. Minor Fusion Impact
1020. Major Fusion Impact
1021. Major Fusion Contrail
1022. Fist Hit
1023. Minor S'pht'Kr Impact
1024. Minor S'pht'Kr Impact
1025. S'pht'Kr Hit
1026. Trooper Hit
1027. Water Lamp Breaking
1028. Lava Lamp Breaking
1029. Sewage Lamp Breaking
1030. Pfhor Lamp Breaking
1031. Clank (melee hit)
1032. Teleport In
1033. Teleport Out
1034. Small Water Splash
1035. Medium Water Splash
1036. Large Water Splash
1037. Large Water Emergence
1038. Small Lava Splash
1039. Medium Lava Splash
1040. Large Lava Splash
1041. Large Lava Emergence
1042. Small Sewage Splash
1043. Medium Sewage Splash
1044. Large Sewage Splash
1045. Large Sewage Emergence
1046. Small Goo Splash
1047. Medium Goo Splash
1048. Large Goo Splash
1049. Large Goo Emergence
1050. Minor Drone Projectile Impact
1051. Major Drone Projectile Impact
1052. Subverted Drone Projectile Impact
1053. Drone Hit
1054. Cyborg Projectile Explosion
1055. Cyborg Hit
1056. Minor Fusion Dispersal
1057. Major Fusion Dispersal
1058. Overloaded Fusion Dispersal
1059. Sewage F'lickta Hit
1060. Sewage F'lickta Projectile Hit
1061. Water F'lickta Hit
1062. Lava F'lickta Hit
1063. Lava F'lickta Projectile Hit
1064. F'lickta Claw
1065. Juggernaut Hit
1066. Juggernaut Missile Contrail
1067. Small Jjaro Splash
1068. Medium Jjaro Splash
1069. Large Jjaro Splash
1070. Large Jjaro Emergence
1071. VacBob Hit
1072. Bad VacBob Hit

Player-damage types (out of order from "true" damage types):

1000. Explosion
1001. Crushing
1002. Bullet
1003. Shotgun Bullet
1004. Electrical Staff
1005. Hulk Slap
1006. Absorbed
1007. Teleporter
1008. Flame
1009. Hound Claws
1010. S'pht Bolt
1011. Alien-Weapon Bolt
1012. Hunter Bolt
1013. Fusion Bolt
1014. Fist
1015. F'lickta Claws
1016. F'lickta Glob
1017. S'pht'Kr Bolt
1018. Lava
1019. Goo
1020. Suffocation
1021. Energy Drain
1022. Oxygen Drain
1023. Drone Bolt

"True" damage types:

1000. Explosion
1001. Electrical Staff
1002. Bullet
1003. Absorbed
1004. Flame
1005. Hound Claws
1006. Alien-Weapon Bolt
1007. Hulk Slap
1008. S'pht Bolt
1009. Fusion Bolt
1010. Hunter Bolt
1011. Fist
1012. Teleporter
1013. S'pht'Kr Bolt
1014. F'lickta Claws
1015. F'lickta Glob
1016. Crushing
1017. Lava
1018. Suffocation
1019. Goo
1020. Energy Drain
1021. Oxygen Drain
1022. Drone Bolt
1023. Shotgun Bullet

The faders:

1000. Start Cinematic Fade In
1001. Cinematic Fade In
1002. Long Cinematic Fade In
1003. Cinematic Fade Out
1004. End Cinematic Fade Out
1005. Red (bullets, fists)
1006. Big Red (bigger bullets, fists)
1007. Picked Something Up
1008. Bright (teleporting)
1009. Long Bright (nuclear explosions)
1010. Yellow (explosions)
1011. Big Yellow (big explosions)
1012. Purple
1013. Cyan (Pfhor-staff/projectile hits)
1014. White (absorbed)
1015. Big White
1016. Orange (flamethrower)
1017. Long Orange (M1 lava)
1018. Green (Hunter projectile)
1019. Long Green (M1 goo)
1020. Static (S'pht projectile)
1021. Negative (minor fusion bolt)
1022. Big Negative (major fusion bolt)
1023. Flicker Negative (Drone bolt)
1024. Dodge Purple (alien weapon)
1025. Burn Cyan (Armageddon Beast electricity)
1026. Dodge Yellow (Armageddon Beast projectile)
1027. Burn Green (Hunter projectile)
1028. Tint Green (under goo)
1029. Tint Blue (under water)
1030. Tint Orange (under lava)
1031. Tint Gross (under sewage)
1032. Tint Jjaro (under JjaroGoo)

The texture-mapping transfer modes:

1000. Normal
1001. Fade Out to Black
1002. Invisibility
1003. Subtle Invisibility
1004. Pulsate
1005. Wobble
1006. Fast Wobble
1007. Static
1008. 50% Static
1009. Landscape
1010. Smear
1011. Fade Out Static
1012. Pulsating Static
1013. Fold In
1014. Fold Out
1015. Horizontal Slide
1016. Fast Horizontal Slide
1017. Vertical Slide
1018. Fast Vertical Slide
1019. Wander
1020. Fast Wander
1021. Big Landscape

The sounds:

1000. Startup
1001. Teleport In
1002. Teleport Out
1003. Body Being Crunched
1004. Creak
1005. Absorbed
1006. Breathing
1007. Oxygen Warning
1008. Suffocation
1009. Energy Refuel
1010. Oxygen Refuel
1011. Can't Toggle Switch
1012. Switch On
1013. Switch Off
1014. Puzzle Switch
1015. Chip Insertion
1016. Pattern Buffer
1017. Destroy Control Panel
1018. Adjust Volume
1019. Got Powerup
1020. Got Item
1021. Bullet Ricochet
1022. Metallic Ricochet
1023. Empty Gun
1024. S'pht Door Opening
1025. S'pht Door Closing
1026. S'pht Door Obstructed
1027. S'pht Platform Starting
1028. S'pht Platform Stopping
1029. Loon
1030. SMG Firing
1031. SMG Reloading
1032. Heavy S'pht Platform Starting
1033. Heavy S'pht Platform Stopping
1034. Fist Hitting
1035. Pistol Firing
1036. Pistol Reloading
1037. Assault Rifle Firing
1038. Grenade Launcher Firing
1039. Grenade Exploding
1040. Grenade Flyby
1041. Fusion Firing
1042. Fusion Exploding
1043. Fusion Flyby
1044. Fusion Charging
1045. Rocket Exploding
1046. Rocket Flyby
1047. Rocket Firing
1048. Flamethrower
1049. Body Falling
1050. Body Exploding
1051. Bullet Hitting Flesh
1052. Fighter Activate
1053. Fighter Wail
1054. Fighter Scream
1055. Fighter Chatter
1056. Fighter Attack
1057. Fighter Projectile Hit
1058. Fighter Projectile Flyby
1059. S'pht Attack
1060. S'pht Death
1061. S'pht Hit
1062. S'pht Projectile Flyby
1063. S'pht Projectile Hit
1064. Cyborg Moving
1065. Cyborg Attack
1066. Cyborg Hit
1067. Cyborg Death
1068. Cyborg Projectile Bounce
1069. Cyborg Projectile Hit
1070. Cyborg Projectile Flyby
1071. Drone Activate
1072. Drone Start Attack
1073. Drone Attack
1074. Drone Dying
1075. Drone Death
1076. Drone Projectile Hit
1077. Drone Projectile Flyby
1078. Bob Wail
1079. Bob Scream
1080. Bob Hit
1081. Bob Chatter
1082. Bad Bob Chatter
1083. Bob Trash Talk
1084. Bob Apology
1085. Bob Activation
1086. Bob Clear
1087. Bob Stop Shooting Me, You Bastard
1088. Bob Area Secure
1089. Bob Kill the Player
1090. Water
1091. Sewage
1092. Lava
1093. Goo
1094. Under Liquids
1095. Wind
1096. Waterfall
1097. Siren
1098. Fan
1099. S'pht Door
1100. S'pht Platform
1101. Alien Harmonics
1102. Heavy S'pht Platform
1103. Light Machinery
1104. Heavy Machinery
1105. Transformer
1106. Sparking Transformer
1107. Water Drip
1108. Walking in Water
1109. Exit Water
1110. Enter Water
1111. Small Water Splash
1112. Medium Water Splash
1113. Large Water Splash
1114. Walking in Lava
1115. Enter Lava
1116. Exit Lava
1117. Small Lava Splash
1118. Medium Lava Splash
1119. Large Lava Splash
1120. Walking in Sewage
1121. Exit Sewage
1122. Enter Sewage
1123. Small Sewage Splash
1124. Medium Sewage Splash
1125. Large Sewage Splash
1126. Walking in Goo
1127. Exit Goo
1128. Enter Goo
1129. Small Goo Splash
1130. Medium Goo Splash
1131. Large Goo Splash
1132. Major Fusion Firing
1133. Major Fusion Charged
1134. Assault Rifle Reloading
1135. Assault Rifle Shell Casings
1136. Shotgun Firing
1137. Shotgun Reloading
1138. Ball Bounce
1139. You Are It
1140. Got Ball
1141. Computer interface Logon
1142. Computer interface Logout
1143. Computer interface Page
1144. Heavy S'pht Door
1145. Heavy S'pht Door Opening
1146. Heavy S'pht Door Closing
1147. Heavy S'pht Door Open
1148. Heavy S'pht Door Closed
1149. Heavy S'pht Door Obstructed
1150. Hunter Activate
1151. Hunter Attack
1152. Hunter Dying
1153. Hunter Landing
1154. Hunter Exploding
1155. Hunter Projectile Hit
1156. Hunter Projectile Flyby
1157. Enforcer Activate
1158. Enforcer Attack
1159. Enforcer Projectile Hit
1160. Enforcer Projectile Flyby
1161. F'lickta Melee Attack
1162. F'lickta Melee Attack Hit
1163. F'lickta Projectile Attack
1164. F'lickta Projectile Sewage Attack Hit
1165. F'lickta Projectile Sewage Flyby
1166. F'lickta Projectile Lava Attack Hit
1167. F'lickta Projectile Lava Flyby
1168. F'lickta Dying
1169. Machine Binder
1170. Machine Bookpress
1171. Machine Puncher
1172. Electric
1173. Alarm
1174. Night Wind
1175. Surface Explosion
1176. Underground Explosion
1177. S'pht'Kr Attack
1178. S'pht'Kr Hit
1179. S'pht'Kr Flyby
1180. S'pht'Kr Being Hit
1181. S'pht'Kr Exploding
1182. Tick Chatter
1183. Tick Falling
1184. Tick Flapping
1185. Tick Exploding
1186. Ceiling Lamp Exploding
1187. Pfhor Platform Starting
1188. Pfhor Platform Stopping
1189. Pfhor Platform
1190. Pfhor Door Opening
1191. Pfhor Door Closing
1192. Pfhor Door Obstructed
1193. Pfhor Door
1194. Pfhor Switch Off
1195. Pfhor Switch On
1196. Juggernaut Firing
1197. Juggernaut Warning
1198. Juggernaut Exploding
1199. Juggernaut Preparing to Fire
1200. Enforcer Exploding
1201. Alien Noise 1
1202. Alien Noise 2
1203. VacBob Wail
1204. VacBob Scream
1205. VacBob Hit
1206. VacBob Chatter
1207. Bad VacBob Chatter
1208. VacBob Trash Talk
1209. VacBob Apology
1210. VacBob Activation
1211. VacBob Clear
1212. VacBob Stop Shooting Me, You Bastard
1213. VacBob Area Secure
1214. VacBob Kill the Player