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

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>
- 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>
- Monsters Element: <monsters>
- 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
144. Difficulty Level Names
145. Item Names
146. Item types
147. Player and Team Color Names
148. Net Statistics Strings
149. 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:

0. Player Name
1. Oxygen
2. Shield
3. Motion Sensor
4. Microphone
5. Inventory
6. Weapon Display
7. New-Game Button
8. Load-Game Button
9. Gather Button
10. Join Button
11. Preferences Button
12. Replay-Last Button
13. Save-Last Button
14. Replay-Saved Button
15. Credits Button
16. Quit Button
17. Center Button
18. [unused]
19. [unused]
20. Computer Terminal Screen
21. Computer Terminal Header
22. Computer Terminal Footer
23. Computer Terminal Full-width Page
24. Computer Terminal Left Page
25. Computer Terminal Right Page
26. Computer Terminal Logon Graphic
27. Computer Terminal Logon Title [Marathon only]
28. Computer Terminal Logon Location [Marathon only]
29. Player Respawn Indicator [Marathon only]
30. Blinking HUD Light [Marathon only]

Here is a list of all the interface colors:

0. Ammo Box-Display Full
1. Ammo Box-Display Empty
2. Black
3. Inventory Text
4. Inventory Header Background
5. Inventory Background
6. Slate Player
7. Red Player
8. Violet Player
9. Yellow Player
10. White Player
11. Orange Player
12. Blue Player
13. Green Player
14. White
15. Invalid Weapon
16. Computer Border-Text background
17. Computer Border Text
18. Computer Text
19. Computer White Text
20. Computer Red Text
21. Computer Dark Green Text
22. Computer Cyan Text
23. Computer Yellow Text
24. Computer Dark Red Text
25. Computer Blue Text

Here is a list of all the interface fonts:

0. Interface
1. Weapon Name
2. Player Name
3. Interface Item Count
4. Terminal
5. Terminal Title
6. Network Statistics

Here is a list of all the weapon displays:

0. Knife (placeholder; really one's fists)
1. Pistol
2. Fusion Pistol
3. Assault Rifle
4. Rocket Launcher
5. Flamethrower
6. Alien Weapon
7. Shotgun
8. Ball
9. 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

0. Self, Friendly Player, and Bob
1. Alien
2. 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:

0. Normal: automapping is cumulative (the default)
1. Currently visible only
2. 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. won't ever show up
2. Bob (shown by default)
3. 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:
  0. Wall (solid)
  1. Elevation (not solid; floor on one side higher than on the other side)
  2. Control panel (unused)
- 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:

0. Plain polygon
1. Platform
2. Water
3. Lava
4. Sewage
5. JjaroGoo
6. PfhorSlime
7. Hill
8. Solid Line
9. Elevation Line
10. Control Panel (unused)
11. Bob Display
12. Monster Display
13. Item Display
14. Projectile Display
15. Checkpoint Display
16. Annotation
17. Map Title
18. Path
19. Minor Ouch
20. Major Ouch
21. Teleporter

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

0. Annotation at scale 0 (lowest)
1. Annotation at scale 1
2. Annotation at scale 2
3. Annotation at scale 3 (highest)
4. 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:

0. Aliens (red)
1. Friends and Items (green)
2. Walls and Scenery, also the S'pht (blue)
3. 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:

0. Water: Oxygen Refuel
1. Water: Energy Refuel (1x)
2. Water: Energy Refuel (2x)
3. Water: Tag Switch (Accepts Chip)
4. Water: Light Switch
5. Water: Platform Switch
6. Water: Tag Switch
7. Water: Pattern Buffer
8. Water: Computer Terminal
9. Water: Tag Switch (Destroyable)
10. Lava: Energy Refuel (1x)
11. Lava: Energy Refuel (2x)
12. Lava: Energy Refuel (3x)
13. Lava: Light Switch
14. Lava: Platform Switch
15. Lava: Tag Switch
16. Lava: Pattern Buffer
17. Lava: Computer Terminal
18. Lava: Oxygen Refuel
19. Lava: Tag Switch (Accepts Chip)
20. Lava: Tag Switch (Destroyable)
21. Sewage: Energy Refuel (1x)
22. Sewage: Energy Refuel (2x)
23. Sewage: Energy Refuel (3x)
24. Sewage: Light Switch
25. Sewage: Platform Switch
26. Sewage: Tag Switch
27. Sewage: Pattern Buffer
28. Sewage: Computer Terminal
29. Sewage: Oxygen Refuel
30. Sewage: Tag Switch (Accepts Chip)
31. Sewage: Tag Switch (Destroyable)
32. Pfhor: Energy Refuel (1x)
33. Pfhor: Energy Refuel (2x)
34. Pfhor: Energy Refuel (3x)
35. Pfhor: Light Switch
36. Pfhor: Platform Switch
37. Pfhor: Tag Switch
38. Pfhor: Pattern Buffer
39. Pfhor: Computer Terminal
40. Pfhor: Oxygen Refuel
41. Pfhor: Tag Switch (Accepts Chip)
42. Pfhor: Tag Switch (Destroyable)
43. Jjaro: Energy Refuel (1x)
44. Jjaro: Energy Refuel (2x)
45. Jjaro: Energy Refuel (3x)
46. Jjaro: Light Switch
47. Jjaro: Platform Switch
48. Jjaro: Tag Switch
49. Jjaro: Pattern Buffer
50. Jjaro: Computer Terminal
51. Jjaro: Oxygen Refuel
52. Jjaro: Tag Switch (Accepts Chip)
53. Jjaro: Tag Switch (Destroyable)

The control panels can do various things; these are:

0. Oxygen Refuel
1. Energy Refuel (1x)
2. Energy Refuel (2x)
3. Energy Refuel (3x)
4. Light switch
5. Platform switch
6. Tag switch
7. Pattern buffer (for saving games)
8. Computer terminal

The sound types are:

0. Activating
1. Deactivating
2. 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:

0. S'pht Door
1. S'pht Split Door
2. Locked S'pht Door
3. S'pht Platform
4. Noisy S'pht Platform
5. Heavy S'pht Door
6. Pfhor Door
7. Heavy S'pht Platform
8. 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:

0. Water
1. Lava
2. Pfhor
3. Sewage
4. Jjaro

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

0. Water
1. Lava
2. Sewage
3. Jjaro
4. 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:

0. Small Detonation
1. Medium Detonation
2. Large Detonation
3. Large Emergence

The sounds:

0. Feet Entering
1. Feet Leaving
2. Head Entering
3. Head Leaving
4. Splashing
5. Ambient Over
6. Ambient Under
7. Platform Entering
8. 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
center_button | #29 | Main menu center button

It has child elements that specify which ambient, random, and dialog sound assignments to use, and also which external files to use, if desired. The ambient, random, and dialog sound assigments are assignments from their indices to the list of (general) sound definitions, and are specified with child elements <ambient>, <random>, and <dialog>. 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:

0. Water
1. Sewage
2. Lava
3. Goo
4. Under Liquids
5. Wind
6. Waterfall
7. Siren
8. Fan
9. S'pht Door
10. S'pht Platform
11. Heavy S'pht Door
12. Heavy S'pht Platform
13. Light Machinery
14. Heavy Machinery
15. Transformer
16. Sparking Transformer
17. Machine Binder
18. Machine Bookpress
19. Machine Puncher
20. Electric
21. Alarm
22. Night Wind
23. Pfhor Door
24. Pfhor Platform
25. Alien Noise 1
26. Alien Noise 2
27. Alien Harmonics

The random sounds are:

0. Water Drip
1. Surface Explosion
2. Underground Explosion
3. Loon
4. Creak

The dialog sounds are:

0. Intro
1. OK
2. Cancel
3. Error
4. Select
5. Click
6. Type
7. Delete
8. Erase

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 the soundfile to use; can include a path

One clears the external-sound definitions currently present with 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 milliseconds
- 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:

0. Tint: fade to the fader's color value:
   [new color] = [old color] + ([fader color] - [old color])*[opacity]
1. Randomize: do random shifts of the colors:
   [new color] = [old color] + [opacity]*[random numbers]
2. 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.
3. 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.
4. 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.
5. 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:

0. Water
1. Lava
2. Sewage
3. Jjaro
4. 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. Knife
7. Knife
8. Knife
9. Knife
10. Knife
11. Knife
12. Knife
13. Knife
14. Knife
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:

0. Collection and Death Sequences
   0. Collection (default: 6)
   1. Hard dying (default: 9)
   2. Soft dying (default: 8)
   3. Hard dead (default: 11)
   4. Soft dead (default: 10)
1. Leg Sequences (player actions)
   0. Stationary (default: 7)
   1. Walking (default: 0)
   2. Running (default: 0)
   3. Sliding (default: 24)
   4. Airborne (default: 23)
2. Idle-Weapon Torso Sequences
3. Charging-Weapon Torso Sequences
4. Firing-Weapon Torso Sequences
   0. Fists (defaults: 1, 1, 2)
   1. Pistol (defaults: 3, 3, 4)
   2. Fusion Pistol (defaults: 20, 21, 22)
   3. Assault Rifle (defaults: 26, 26, 27)
   4. Rocket Launcher (defaults: 14, 14, 15)
   5. Flamethrower (defaults: 12, 12, 13)
   6. Alien Weapon (defaults: 31, 31, 32)
   7. Shotgun (defaults: 16, 16, 17)
   8. Ball (defaults: 28, 28, 28)
   9. SMG (defaults: 33, 33, 34)
   10. Two Pistols (defaults: 5, 5, 6)
   11. 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:

0. Assault rifle
1. Centered pistol
2. Left-side pistol
3. Right-side pistol
4. 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

0. Fist
1. Pistol
2. Fusion Pistol
3. Shotgun
4. Assault Rifle
5. SMG
6. Flamethrower
7. Rocket Launcher
8. Alien Weapon
9. 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:
  0. weapon
  1. ammunition
  2. powerup
  3. generic item
  4. weapon powerup (note: the engine does not currently support this type)
  5. 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
  3. `(hex 0004)` Rebellion
  4. `(hex 0008)` Low Gravity
  5. `(hex 2000)` Network
  6. `(hex 4000)` Single Player

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

The maximum numbers of items can be overridden per difficulty level with <difficulty> child elements, containing these attributes:

- index: difficulty level (0 is kindergarten, 4 is total carnage)
- maximum: maximum number that a player may possess for this difficulty level (0–32767)

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

### Monsters Element: <monsters>

This element specifies additional characteristics of monsters. Each monster type is specified with a <monster> child element, which has these attributes:

- index: which monster type (mandatory)
- must_be_exterminated: if true, this monster must be killed in order for an extermination level to be completed (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
  3. `(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:

0. Lava: light dirt
1. Lava: dark dirt
2. Lava: bones
3. Lava: bone
4. Lava: ribs
5. Lava: skull
6. Lava: hanging light 1
7. Lava: hanging light 2
8. Lava: small cylinder
9. Lava: large cylinder
10. Lava: block 1
11. Lava: block 2
12. Lava: block 3
13. Water: pistol clip
14. Water: short light
15. Water: long light
16. Water: siren
17. Water: rocks
18. Water: blood drops
19. Water: water thing
20. Water: gun
21. Water: Bob remains
22. Water: puddles
23. Water: big puddles
24. Water: security monitor
25. Water: alien supply can
26. Water: machine
27. Water: fighter's staff
28. Sewage: stubby green light
29. Sewage: long green light
30. Sewage: junk
31. Sewage: big antenna 1
32. Sewage: big antenna 2
33. Sewage: alien supply can
34. Sewage: bones
35. Sewage: big bones
36. Sewage: Pfhor pieces
37. Sewage: Bob pieces
38. Sewage: Bob blood
39. Pfhor: green light
40. Pfhor: small alien light
41. Pfhor: alien ceiling rod light
42. Pfhor: bulbous yellow alien object
43. Pfhor: square gray organic object
44. Pfhor: Pfhor skeleton
45. Pfhor: Pfhor mask
46. Pfhor: green stuff
47. Pfhor: Hunter shield
48. Pfhor: bones
49. Pfhor: alien sludge
50. Jjaro: short ceiling light
51. Jjaro: long light
52. Jjaro: weird rod
53. Jjaro: Pfhor ship
54. Jjaro: Sun
55. Jjaro: large glass container
56. Jjaro: nub 1
57. Jjaro: nub 2
58. Jjaro: Lh'owon
59. Jjaro: floor whip antenna
60. 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 -- mirrored or clamped in the vertical direction, depending on video card support)
- 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):

0. 17, 22 -- Lh'owon Water
1. 18, 23 -- Lh'owon Lava
2. 19, 24 -- Lh'owon Sewage
3. 20, 25 -- Jjaro
4. 21, 26 -- Pfhor

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

0. 17, 8, 23 -- Marathon Set 1
1. 18, 8, 23 -- Marathon Set 2
2. 19, 8, 23 -- Marathon Set 3
3. 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 -1 (default) sets options for all color tables not individually set.
- clut_variant: which drawing modes the options apply to:
  1. All modes
  2. Normal (default)
  3. Infravision
  4. Silhouette [used for invisibility and static effect]
  The value -1 is equivalent to writing three <texture> elements for each of the three drawing modes.
  Note: the options for <clut="-1" clut_variant="0"> are used as the fallback if more specific options are not found. This fallback is used even for infravision and silhouette textures.
- 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).
- 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.
- actual_width: if specified, only the leftmost number of pixels will be used from the _image and _mask files. Use this for small images embedded into a square DDS file, for example.
- actual_height: if specified, only the topmost number of pixels will be used from the _image and _mask files.
- 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).
- 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:

0. Crisp edges. The opacity threshold is 0.5.
1. Fuzzy edges.
2. Fuzzy edges with opacity = average of color channels.
3. Fuzzy edges with opacity = maximum of color channels.

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:

0. Wall Textures
1. Landscape Textures
2. Inhabitants
3. Weapons in hand

The following texture attributes are deprecated, may not work properly, and should no longer be used:

- glow_blend
- image_scale
- normal_blend
- offset_x
- offset_y
- shape_height
- shape_width
- void_visible
- x_offset
- y_offset

The values 8 and 9 for the "clut" attribute are deprecated and should no longer be used. Instead, use a "clut" value of -1 and a "clut_variant" of 1 or 2.

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)
  0. None
  1. Original-model normals (may be none)
  2. Reverse-direction original-model normals (may be none)
  3. Normals in the direction of the polygons' clockwise sides
  4. 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)
  0. Fast lighting; only one calculation of the player light
  1. Like above, but the player light won't fade off on the sides
  2. Individual-vertex calculation of the player light (more accurate, but slower)
  3. 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).
- clut_variant: which drawing modes the options apply to:
  1. All modes
  2. Normal (default)
  3. Infravision
  4. Silhouette [used for invisibility and static effect]
- 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:
  0. Above liquid
  1. 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:

0. Crisp edges. Opacity is unaltered (this will cause no visible change in the software renderer).
1. Fuzzy edges.
2. Fuzzy edges with opacity = average of color channels.
3. 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 three attributes, which are blank strings by default:

- "name" - The scenario name displayed in the interface (Find Internet Game, About Aleph One). The name is also used to organize Quick Saves by scenario; if the scenario name changes, the user's previous quick saves will not be accessible. Limited to 32 characters.
- "id" - This string indicates network compatibility (see below). Limited to 24 characters.
- "version" - The scenario version displayed in the interface. Limited to 8 characters.

Plugins can use any of the scenario attributes to determine whether they are compatibile. Most scenario-specific plugins will use scenario name.

The scenario id is used to gray out games in the Find Internet Game interface. Games show up as joinable when any of these are 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:

0. Moving Forward
1. Moving Backward
2. Turning Left
3. Turning Right
4. Sidestepping Left
5. Sidestepping Right
6. Looking Left
7. Looking Right
8. Looking Up
9. Looking Down
10. Looking Center
11. Cycle Weapons Backward
12. Cycle Weapons Forward
13. Left Trigger State
14. Right Trigger State
15. Sidestep Don't Turn
16. Run Don't Walk
17. Look Don't Turn
18. Action Trigger State
19. Toggle Map
20. Microphone Button

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

1. SDLK_BACKSPACE
2. SDLK_TAB
3. SDLK_CLEAR
4. SDLK_RETURN
5. SDLK_PAUSE
6. SDLK_ESCAPE
7. SDLK_SPACE
8. SDLK_EXCLAIM
9. SDLK_QUOTEDBL
10. SDLK_HASH
11. SDLK_DOLLAR
12. SDLK_AMPERSAND
13. SDLK_QUOTE
14. SDLK_LEFTPAREN
15. SDLK_RIGHTPAREN
16. SDLK_ASTERISK
17. SDLK_PLUS
18. SDLK_COMMA
19. SDLK_MINUS
20. SDLK_PERIOD
21. SDLK_SLASH
22. SDLK_0
23. SDLK_1
24. SDLK_2
25. SDLK_3
26. SDLK_4
27. SDLK_5
28. SDLK_6
29. SDLK_7
30. SDLK_8
31. SDLK_9
32. SDLK_COLON
33. SDLK_SEMICOLON
34. SDLK_LESS
35. SDLK_EQUALS
36. SDLK_GREATER
37. SDLK_QUESTION
38. SDLK_AT
39. SDLK_LEFTBRACKET
40. SDLK_BACKSLASH
41. SDLK_RIGHTBRACKET
42. SDLK_CARET
43. SDLK_UNDERSCORE
44. SDLK_BACKQUOTE
45. SDLK_a
46. SDLK_b
47. SDLK_c
48. SDLK_d
49. SDLK_e
50. SDLK_f
51. SDLK_g
52. SDLK_h
53. SDLK_i
54. SDLK_j
55. SDLK_k
56. SDLK_l
57. SDLK_m
58. SDLK_n
59. SDLK_o
60. SDLK_p
61. SDLK_q
62. SDLK_r
63. SDLK_s
64. SDLK_t
65. SDLK_u
66. SDLK_v
67. SDLK_w
68. SDLK_x
69. SDLK_y
70. SDLK_z
71. SDLK_DELETE
72. SDLK_KP0
73. SDLK_KP1
74. SDLK_KP2
75. SDLK_KP3
76. SDLK_KP4
77. SDLK_KP5
78. SDLK_KP6
79. SDLK_KP7
80. SDLK_KP8
81. SDLK_KP9
82. SDLK_KP_PERIOD
83. SDLK_KP_DIVIDE
84. SDLK_KP_MULTIPLY
85. SDLK_KP_MINUS
86. SDLK_KP_PLUS
87. SDLK_KP_ENTER
88. SDLK_KP_EQUALS
89. SDLK_UP
90. SDLK_DOWN
91. SDLK_RIGHT
92. SDLK_LEFT
93. SDLK_INSERT
94. SDLK_HOME
95. SDLK_END
96. SDLK_PAGEUP
97. SDLK_PAGEDOWN
98. SDLK_F1
99. SDLK_F2
100. SDLK_F3
101. SDLK_F4
102. SDLK_F5
103. SDLK_F6
104. SDLK_F7
105. SDLK_F8
106. SDLK_F9
107. SDLK_F10
108. SDLK_F11
109. SDLK_F12
110. SDLK_F13
111. SDLK_F14
112. SDLK_F15
113. SDLK_NUMLOCK
114. SDLK_CAPSLOCK
115. SDLK_SCROLLOCK
116. SDLK_RSHIFT
117. SDLK_LSHIFT
118. SDLK_RCTRL
119. SDLK_LCTRL
120. SDLK_RALT
121. SDLK_LALT
122. SDLK_RMETA
123. SDLK_LMETA
124. SDLK_LSUPER (Left "Windows" key)
125. SDLK_RSUPER (Right "Windows" key)
126. SDLK_MODE ("Alt Gr" key)
127. SDLK_COMPOSE (Multi-key compose key)
128. SDLK_HELP
129. SDLK_PRINT
130. SDLK_SYSREQ
131. SDLK_BREAK
132. SDLK_MENU
133. SDLK_POWER (Power Macintosh power key)
134. SDLK_EURO (Some european keyboards)

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

0. Energy (1x): NRG
1. Oxygen: OTWO
2. Map Everything: MAP
3. Invisible: BYE
4. Invincible: NUKE
5. Infravision: SEE
6. Extravision: WOW
7. Pistol: MAG
8. Assault Rifle: RIF
9. Rocket Launcher: POW
10. Flamethrower: TOAST
11. Fusion Gun: MELT
12. Shotgun: PUFF
13. SMG: ZIP
14. Alien weapon: PZBXAY
15. All weapons' ammo: AMMO
16. Jump: QWE
17. Everything (almost): SHIT
18. 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:

0. logFatalLevel: program must exit
1. logErrorLevel: can't do something significant
2. logWarningLevel: can continue but results could be really screwy
3. logAnomalyLevel: can continue, results could be off a little, but no big deal
4. logNoteLevel: something worth mentioning
5. logTraceLevel: details of actions and logic
6. logDumpLevel: 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.

Directories 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
  3. Underline
  4. Outline
  5. Shadow
  6. Condense
  7. 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:

0. Interface
1. Weapons in Hand
2. Juggernaut
3. Tick
4. Explosion Effects
5. Hunter
6. Player
7. Items
8. Trooper
9. Pfhor Fighter
10. S'pht'Kr
11. F'lickta
12. Bob
13. VacBob
14. Enforcer
15. Drone
16. S'pht
17. Walls - Water
18. Walls - Lava
19. Walls - Sewage
20. Walls - Jjaro
21. Walls - Pfhor
22. Scenery - Water
23. Scenery - Lava
24. Scenery - Sewage
25. Scenery - Jjaro
26. Scenery - Pfhor
27. Landscape - Day
28. Landscape - Night
29. Landscape - Moon
30. Landscape - Outer Space
31. Cyborg

The monsters:

0. Player
1. Tick - Energy
2. Tick - Oxygen
3. Tick - Kamikaze
4. S'pht - Minor
5. S'pht - Major
6. S'pht - Minor Invisible
7. S'pht - Major Invisible
8. Pfhor Fighter - Minor
9. Pfhor Fighter - Major
10. Pfhor Fighter - Minor Projectile
11. Pfhor Fighter - Major Projectile
12. Bob - Crew
13. Bob - Science
14. Bob - Security
15. Bob - Bad
16. Drone - Minor
17. Drone - Major
18. Drone - Big Minor
19. Drone - Big Major
20. Drone - Subverted
21. Cyborg - Minor
22. Cyborg - Major
23. Cyborg - Minor Flame
24. Cyborg - Major Flame
25. Enforcer - Minor
26. Enforcer - Major
27. Hunter - Minor
28. Hunter - Major
29. Trooper - Minor
30. Trooper - Major
31. Mother of All Cyborgs
32. Mother of All Hunters
33. F'lickta - Sewage
34. F'lickta - Water
35. F'lickta - Lava
36. S'pht'Kr - Minor
37. S'pht'Kr - Major
38. Juggernaut - Minor
39. Juggernaut - Major
40. Tiny Fighter
41. Tiny Bob
42. Tiny F'lickta
43. VacBob - Crew
44. VacBob - Science
45. VacBob - Security
46. VacBob - Bad

The items to be picked up:

0. Knife (apparently some placeholder item for "nothing")
1. Pistol
2. Pistol Ammo
3. Fusion Pistol
4. Fusion Pistol Ammo
5. Assault Rifle
6. Assault Rifle Bullets
7. Assault Rifle Grenades
8. Rocket Launcher
9. Rockets
10. Invisibility Powerup
11. Invincibility Powerup
12. Infravision Powerup
13. Alien Weapon
14. Alien Weapon Ammo
15. Flamethrower
16. Flamethrower Ammo
17. Extravision Powerup
18. Oxygen Powerup
19. Energy Powerup x1
20. Energy Powerup x2
21. Energy Powerup x3
22. Shotgun
23. Shotgun Ammo
24. S'pht Door Key
25. Uplink Chip
26. Light Blue Ball
27. Red Ball (the skull)
28. Violet Ball
29. Yellow Ball
30. Brown Ball
31. Orange Ball
32. Blue Ball
33. Green Ball
34. SMG
35. SMG Ammo

The weapons:

0. Fist
1. Pistol
2. Fusion Pistol
3. Assault Rifle
4. Rocket Launcher
5. Flamethrower
6. Alien Weapon
7. Shotgun
8. Ball
9. SMG

The projectiles:

0. Rocket
1. Grenade
2. Pistol Bullet
3. Rifle Bullet
4. Shotgun Bullet
5. Staff Hit
6. Staff Bolt
7. Flamethrower Flames
8. S'pht Bolt - Minor
9. S'pht Bolt - Major (Seeking)
10. Alien-Weapon Bolt
11. Fusion Bolt - Minor
12. Fusion Bolt - Major
13. Hunter Bolt
14. Fist Punch
15. Armageddon Sphere
16. Armageddon Electricity
17. Juggernaut Rocket
18. Trooper Bullet
19. Trooper Grenade
20. S'pht'Kr Bolt - Minor
21. S'pht'Kr Bolt - Major
22. Juggernaut Missile
23. Energy Drain - Minor
24. Energy Drain - Major
25. Oxygen Drain
26. Drone Bolt - Minor
27. Drone Bolt - Major
28. Drone Bolt - Subverted
29. Grenade - Minor Cyborg (Bouncing)
30. Grenade - Major Cyborg (Seeking)
31. Ball
32. Dispersal - Minor Fusion
33. Dispersal - Major Fusion
34. Dispersal - Overloaded Fusion
35. F'lickta Claw
36. F'lickta Glob
37. F'lickta Lava Glob
38. SMG Bullet

The effects:

0. Rocket Explosion
1. Rocket Contrail
2. Grenade Explosion
3. Grenade Contrail
4. Bullet Impact
5. Alien Weapon Impact
6. Flamethrower Flame
7. Pfhor Hit
8. Player Hit
9. Bob Hit
10. Bad Bob Hit
11. Enforcer Hit
12. S'pht Bolt Minor Impact
13. S'pht Bolt Major Impact
14. S'pht Bolt Major Contrail
15. Pfhor Projectile Impact
16. Pfhor Melee Hit
17. Hunter Projectile Detonation
18. Hunter Hit
19. Minor Fusion Impact
20. Major Fusion Impact
21. Major Fusion Contrail
22. Fist Hit
23. Minor S'pht'Kr Impact
24. Minor S'pht'Kr Impact
25. S'pht'Kr Hit
26. Trooper Hit
27. Water Lamp Breaking
28. Lava Lamp Breaking
29. Sewage Lamp Breaking
30. Pfhor Lamp Breaking
31. Clank (melee hit)
32. Teleport In
33. Teleport Out
34. Small Water Splash
35. Medium Water Splash
36. Large Water Splash
37. Large Water Emergence
38. Small Lava Splash
39. Medium Lava Splash
40. Large Lava Splash
41. Large Lava Emergence
42. Small Sewage Splash
43. Medium Sewage Splash
44. Large Sewage Splash
45. Large Sewage Emergence
46. Small Goo Splash
47. Medium Goo Splash
48. Large Goo Splash
49. Large Goo Emergence
50. Minor Drone Projectile Impact
51. Major Drone Projectile Impact
52. Subverted Drone Projectile Impact
53. Drone Hit
54. Cyborg Projectile Explosion
55. Cyborg Hit
56. Minor Fusion Dispersal
57. Major Fusion Dispersal
58. Overloaded Fusion Dispersal
59. Sewage F'lickta Hit
60. Sewage F'lickta Projectile Hit
61. Water F'lickta Hit
62. Lava F'lickta Hit
63. Lava F'lickta Projectile Hit
64. F'lickta Claw
65. Juggernaut Hit
66. Juggernaut Missile Contrail
67. Small Jjaro Splash
68. Medium Jjaro Splash
69. Large Jjaro Splash
70. Large Jjaro Emergence
71. VacBob Hit
72. Bad VacBob Hit

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

0. Explosion
1. Crushing
2. Bullet
3. Shotgun Bullet
4. Electrical Staff
5. Hulk Slap
6. Absorbed
7. Teleporter
8. Flame
9. Hound Claws
10. S'pht Bolt
11. Alien-Weapon Bolt
12. Hunter Bolt
13. Fusion Bolt
14. Fist
15. F'lickta Claws
16. F'lickta Glob
17. S'pht'Kr Bolt
18. Lava
19. Goo
20. Suffocation
21. Energy Drain
22. Oxygen Drain
23. Drone Bolt

"True" damage types:

0. Explosion
1. Electrical Staff
2. Bullet
3. Absorbed
4. Flame
5. Hound Claws
6. Alien-Weapon Bolt
7. Hulk Slap
8. S'pht Bolt
9. Fusion Bolt
10. Hunter Bolt
11. Fist
12. Teleporter
13. S'pht'Kr Bolt
14. F'lickta Claws
15. F'lickta Glob
16. Crushing
17. Lava
18. Suffocation
19. Goo
20. Energy Drain
21. Oxygen Drain
22. Drone Bolt
23. Shotgun Bullet

The faders:

0. Start Cinematic Fade In
1. Cinematic Fade In
2. Long Cinematic Fade In
3. Cinematic Fade Out
4. End Cinematic Fade Out
5. Red (bullets, fists)
6. Big Red (bigger bullets, fists)
7. Picked Something Up
8. Bright (teleporting)
9. Long Bright (nuclear explosions)
10. Yellow (explosions)
11. Big Yellow (big explosions)
12. Purple
13. Cyan (Pfhor-staff/projectile hits)
14. White (absorbed)
15. Big White
16. Orange (flamethrower)
17. Long Orange (M1 lava)
18. Green (Hunter projectile)
19. Long Green (M1 goo)
20. Static (S'pht projectile)
21. Negative (minor fusion bolt)
22. Big Negative (major fusion bolt)
23. Flicker Negative (Drone bolt)
24. Dodge Purple (alien weapon)
25. Burn Cyan (Armageddon Beast electricity)
26. Dodge Yellow (Armageddon Beast projectile)
27. Burn Green (Hunter projectile)
28. Tint Green (under goo)
29. Tint Blue (under water)
30. Tint Orange (under lava)
31. Tint Gross (under sewage)
32. Tint Jjaro (under JjaroGoo)

The texture-mapping transfer modes:

0. Normal
1. Fade Out to Black
2. Invisibility
3. Subtle Invisibility
4. Pulsate
5. Wobble
6. Fast Wobble
7. Static
8. 50% Static
9. Landscape
10. Smear
11. Fade Out Static
12. Pulsating Static
13. Fold In
14. Fold Out
15. Horizontal Slide
16. Fast Horizontal Slide
17. Vertical Slide
18. Fast Vertical Slide
19. Wander
20. Fast Wander
21. Big Landscape

The sounds:

0. Startup
1. Teleport In
2. Teleport Out
3. Body Being Crunched
4. Creak
5. Absorbed
6. Breathing
7. Oxygen Warning
8. Suffocation
9. Energy Refuel
10. Oxygen Refuel
11. Can't Toggle Switch
12. Switch On
13. Switch Off
14. Puzzle Switch
15. Chip Insertion
16. Pattern Buffer
17. Destroy Control Panel
18. Adjust Volume
19. Got Powerup
20. Got Item
21. Bullet Ricochet
22. Metallic Ricochet
23. Empty Gun
24. S'pht Door Opening
25. S'pht Door Closing
26. S'pht Door Obstructed
27. S'pht Platform Starting
28. S'pht Platform Stopping
29. Loon
30. SMG Firing
31. SMG Reloading
32. Heavy S'pht Platform Starting
33. Heavy S'pht Platform Stopping
34. Fist Hitting
35. Pistol Firing
36. Pistol Reloading
37. Assault Rifle Firing
38. Grenade Launcher Firing
39. Grenade Exploding
40. Grenade Flyby
41. Fusion Firing
42. Fusion Exploding
43. Fusion Flyby
44. Fusion Charging
45. Rocket Exploding
46. Rocket Flyby
47. Rocket Firing
48. Flamethrower
49. Body Falling
50. Body Exploding
51. Bullet Hitting Flesh
52. Fighter Activate
53. Fighter Wail
54. Fighter Scream
55. Fighter Chatter
56. Fighter Attack
57. Fighter Projectile Hit
58. Fighter Projectile Flyby
59. S'pht Attack
60. S'pht Death
61. S'pht Hit
62. S'pht Projectile Flyby
63. S'pht Projectile Hit
64. Cyborg Moving
65. Cyborg Attack
66. Cyborg Hit
67. Cyborg Death
68. Cyborg Projectile Bounce
69. Cyborg Projectile Hit
70. Cyborg Projectile Flyby
71. Drone Activate
72. Drone Start Attack
73. Drone Attack
74. Drone Dying
75. Drone Death
76. Drone Projectile Hit
77. Drone Projectile Flyby
78. Bob Wail
79. Bob Scream
80. Bob Hit
81. Bob Chatter
82. Bad Bob Chatter
83. Bob Trash Talk
84. Bob Apology
85. Bob Activation
86. Bob Clear
87. Bob Stop Shooting Me, You Bastard
88. Bob Area Secure
89. Bob Kill the Player
90. Water
91. Sewage
92. Lava
93. Goo
94. Under Liquids
95. Wind
96. Waterfall
97. Siren
98. Fan
99. S'pht Door
100. S'pht Platform
101. Alien Harmonics
102. Heavy S'pht Platform
103. Light Machinery
104. Heavy Machinery
105. Transformer
106. Sparking Transformer
107. Water Drip
108. Walking in Water
109. Exit Water
110. Enter Water
111. Small Water Splash
112. Medium Water Splash
113. Large Water Splash
114. Walking in Lava
115. Enter Lava
116. Exit Lava
117. Small Lava Splash
118. Medium Lava Splash
119. Large Lava Splash
120. Walking in Sewage
121. Exit Sewage
122. Enter Sewage
123. Small Sewage Splash
124. Medium Sewage Splash
125. Large Sewage Splash
126. Walking in Goo
127. Exit Goo
128. Enter Goo
129. Small Goo Splash
130. Medium Goo Splash
131. Large Goo Splash
132. Major Fusion Firing
133. Major Fusion Charged
134. Assault Rifle Reloading
135. Assault Rifle Shell Casings
136. Shotgun Firing
137. Shotgun Reloading
138. Ball Bounce
139. You Are It
140. Got Ball
141. Computer interface Logon
142. Computer interface Logout
143. Computer interface Page
144. Heavy S'pht Door
145. Heavy S'pht Door Opening
146. Heavy S'pht Door Closing
147. Heavy S'pht Door Open
148. Heavy S'pht Door Closed
149. Heavy S'pht Door Obstructed
150. Hunter Activate
151. Hunter Attack
152. Hunter Dying
153. Hunter Landing
154. Hunter Exploding
155. Hunter Projectile Hit
156. Hunter Projectile Flyby
157. Enforcer Activate
158. Enforcer Attack
159. Enforcer Projectile Hit
160. Enforcer Projectile Flyby
161. F'lickta Melee Attack
162. F'lickta Melee Attack Hit
163. F'lickta Projectile Attack
164. F'lickta Projectile Sewage Attack Hit
165. F'lickta Projectile Sewage Flyby
166. F'lickta Projectile Lava Attack Hit
167. F'lickta Projectile Lava Flyby
168. F'lickta Dying
169. Machine Binder
170. Machine Bookpress
171. Machine Puncher
172. Electric
173. Alarm
174. Night Wind
175. Surface Explosion
176. Underground Explosion
177. S'pht'Kr Attack
178. S'pht'Kr Hit
179. S'pht'Kr Flyby
180. S'pht'Kr Being Hit
181. S'pht'Kr Exploding
182. Tick Chatter
183. Tick Falling
184. Tick Flapping
185. Tick Exploding
186. Ceiling Lamp Exploding
187. Pfhor Platform Starting
188. Pfhor Platform Stopping
189. Pfhor Platform
190. Pfhor Door Opening
191. Pfhor Door Closing
192. Pfhor Door Obstructed
193. Pfhor Door
194. Pfhor Switch Off
195. Pfhor Switch On
196. Juggernaut Firing
197. Juggernaut Warning
198. Juggernaut Exploding
199. Juggernaut Preparing to Fire
200. Enforcer Exploding
201. Alien Noise 1
202. Alien Noise 2
203. VacBob Wail
204. VacBob Scream
205. VacBob Hit
206. VacBob Chatter
207. Bad VacBob Chatter
208. VacBob Trash Talk
209. VacBob Apology
210. VacBob Activation
211. VacBob Clear
212. VacBob Stop Shooting Me, You Bastard
213. VacBob Area Secure
214. VacBob Kill the Player