
Aleph One Lua Scripters' Guide

0. General
0.1 What is This?
0.2 Running a Script
0.3 Units
1. Triggers
2. A1 Functions
2.1 Players
2.2 Monsters
2.3 Items
2.4 Tags
2.5 Lights
2.6 Polygons
2.7 Platforms
2.8 Camera
2.9 Display
2.10 Scoring
2.11 Compass
2.12 Projectiles
2.13 Other
3. Mnemmonics
3.1 Items
3.2 Monsters
3.3 Monster Classes
3.4 Damage Types
3.5 Monster Actions
3.6 Monster Modes
3.7 Faders
3.8 Sounds
3.9 Refuel Panels
3.10 Compass Directions
3.11 Projectile Types
3.12 Polygon Types
3.13 Powerup Types


0. General
----------


0.1 What is This?
-----------------

This is a reference for writing lua scripts to work in A1.
At the time of creation, it lists every trigger and function available to lua scripts.
It is expected that lua functionality will grow in A1, and as it does, so will this document.
Not everything here is completely documented, and any help fixing that would be appreciated.

This is not a reference for lua itself - see lua.org for that.


0.2 Running a Script
--------------------

There are two ways to get a script to run -
level specific MML, and selecting a script at the gather network game dialog.

To use level specific MML, put the script in a TEXT resource in the map file.
Then put in TEXT resource 128 MML telling A1 where to find the script,
which in its most basic form is this:

	<marathon_levels>

	<level index="0">
	<lua resource="1000"/>
	</level>

	</marathon_levels>

By convention we use TEXT resource 1000+x to hold the script for level x,
so the first level in the map file (which has level index 0) gets its script
in TEXT resource 1000.

This works fine for single player games.  It will also work for multiplayer games,
but only if every player has a copy of the map file and selects it in enviroment prefs.

To use a script via the network game dialog, put then script in a text file.
Then, at the gather network game dialog, select "use script", then select your script file.

When playing network games, even if you are not gathering, it's important not to have
a map file with level specific MML selected in your environment prefs, unless it's the
map file for the map you are playing.  A1 will run the script for that map file,
your game will go out of sync, and you'll be unhappy.


0.3 Units
---------

The unit for distance we use is World Units (WU)
These are the same values you'd see in Forge or with F10 location display,
and 1/1024 of what A1 uses internally and what you'd see in Pfhorte.

Units for speed are . . . well let's say they're messy.  :)


1. Triggers
-----------

These are functions scripts can define which A1 will call at specific times or events.


init()

At beginning of level.


cleanup()

At end of the level.
Primarily this is intended as a last chance for changing netgame scores before the postgame report.


idle()

At each tick.


start_refuel(type, player, side_index)

Whenever a player starts to use a refuel panel.


end_refuel(type, player, side_index)

Whenever a player stops using a refuel panel.


tag_switch(tag, player)

Whenever a player uses a tag switch.
Not called when a projectile (e.g., fists) uses a tag switch.


light_switch(light, player)

Whenever a player uses a light switch.
Not called when a projectile (e.g., fists) uses a light switch.


platform_switch(platform, short player)

Whenever a player uses a platform switch.
Not called when a projectile (e.g., fists) uses a platform switch.


terminal_enter(terminal_id, player)

Whenever a player starts using a terminal.


terminal_exit(terminal_id, player)

Whenever a player stops using a terminal.


pattern_buffer(buffer_id, player)

Whenever a player uses a pattern buffer.


got_item(type, player)

Whenever a player picks up an item.
Also whenever a player gets an item when a script calls add_item().


light_activated(index)

Whenever a light is activated or deactivated.


platform_activated(index)

Whenever a platform is activated or deactivated.


player_revived(player)

Whenever a player revives.  (Presumably only happens in a netgame)
Not called when a player first enters into a level.


player_killed(player, aggressor_player, action, projectile)

Whenver a player dies.
aggressor_player is the player index of who killed em, possibly emself, or -1 if killed by non-player.
There are no mnemonics for "action" at this time, making its use difficult.
projectile is the projectile that delivered the final blow, or -1 if there is no such projectile.


player_damaged(victim_player_index, aggressor_player_index, aggressor_monster_index, damage_type, damage_amount, projectile)

Whenever a player has taken damage, but before he dies if applicable.
aggressor_player_index will be -1 if the victim was damaged by a non-player.
aggressor_monster_index will be -1 if the victim was damaged by neither a player nor a monster.
damage_type is one of the Damage Types, e.g. _damage_fusion.
damage_amount is the amount recently subtracted from the player.  If _damage_oxygen_drain, damage_amount was
assessed against player's oxygen; else against player's suit energy.
projectile is the projectile that delivered the damage, or -1 if there is no such projectile.
The player's suit energy or oxygen may be negative when this trigger is called; if it still is when the trigger
returns, it will be set to 0.
The player's suit energy is tested again after this trigger returns, so a script may prevent a player's death.


monster_killed(monster, aggressor_player, projectile)

Whenever a monster dies.
This is called after a monster has taken lethal damage, but before it's removed form the monster list.
You can use this to find out when a monster created with new_monster dies,
but a monster discovered by select_monster may have already taken lethal damage,
so you may need to check for that case when using select_monster. 
aggressor_player is the player index of who killed it, or -1 if killed by non-player.
projectile is the projectile that delivered the final blow, or -1 if there is no such projectile.


item_created(item_index)

Whenever an item is created and placed on the ground (or floating) somewhere.
You can then use the item_index with some of the item accessor functions
to find out its type, polygon, etc. and base some decisions off that.
NOTE: Currently, this does not trigger on initial item placement because
the initial item placement is done before Lua becomes initialised.


projectile_detonated(type, owner, polygon, x, y, z)

Whenever a projectile detonates, after it has done any area of effect damage.


2 A1 Functions
--------------

These are functions defined in A1 which scripts can call.


2.1 Players
-----------


number_of_players ()

Returns the number of players in the game.


inflict_damage(player, amount [, type])

Inflicts damage on player.
"amount" is how much damage is dealt; type is the damage type used.
If no type is specified, crusher damage is dealt.


get_life(player)
get_oxygen(player)

Returns the shield/oxygen level of player.


set_life(player, shield)

Sets the shield level of player to the amount specified or triple energy (full purple), whichever is less.


set_oxygen(player, oxygen)

Sets the oxygen level of player to the amount specified or one full tank, whichever is less.


get_player_position (player)

Returns three values - the x, y, and z coordinates of player in W.U.


set_player_position(player, x, y, z, polygon)

Sets the player's coordinates to the point x,y,z in polygon. (BE CAREFUL with this function!)


get_player_polygon (player)

Returns the polygon player is standing on.


get_player_angle (player)
set_player_angle (player, yaw, pitch)

Returns/Sets both the facing (yaw) and the elevation (pitch) of player.


get_player_color (player)
set_player_color (player, color)

Gets/Sets the player's color.


get_player_team (player)
set_player_team (player, team)

Returns/Sets the team of player.


get_player_name (player)

Returns the name of player.


get_player_powerup_duration (player, powerup)
set_player_powerup_duration (player, powerup, duration)

Gets/Sets the duration of the player's powerup. See the mnemonics for the powerup list. No powerup has to be picked up before setting the duration.


player_is_dead (player)

Returns true if player is dead, false if alive.


select_weapon(player, type)

Attempt to force player to ready the specifiec weapon.


player_control (player, move_type, value)

(jkvw: not sure how this works)
tiennou: In fact you can use it, but it's behavior is not really useful, and it's pretty hard to have a viable script with it. It's use is like "tell 'player' to 'move_type' by 'value' steps" (altought steps is not appropriate...)


teleport_player (player, poly)

Teleports player to poly, similarly to using a teleporter


teleport_player_to_level (player, level)

Teleports player to level.  Of course, all the other players will also go to that level.
(Note from tiennou: I'm not sure this actually work correctly, because the level index could be off by one... If anyone ever use this thing, tell me if it goes wrong)
(jkvw: Also be aware that the life of a script expires when you change levels.  (regardless of whether it was initiated by mml or network gather dialog))


enable_player(player)
disable_player(player)

Enable/Disable a player. The player cannot move...


player_to_monster_index (player)

Returns the monster index of player.


local_player_index ()

Returns the index of the local player.
In the normal case, you shouldn't needed this.
You'll just make the game go out of sync.


get_player_internal_velocity (player)

Returns the player's velocity and perpendicular velocity (= sidestepping).

(jkvw: internal velocity is movement caused by the player running or sidestepping.  Everything else is external velocity.)


get_player_external_velocity (player)
set_player_external_velocity (player, x, y, z)

Gets/Sets the x, y, and z components of the player's external velocity.


add_to_player_external_velocity (player, x, y, z)

Adds the vector defined by x, y, and z to the player's external velocity.


accelerate_player (player, vertical_velocity, angle, velocity)

Gives the player a burst of acceleration.


player_media (player)

Returns the media the player is under if the player is under a media, nil otherwise.


prompt (player, prompt)

Prompts player using prompt as a prompt, calling the Lua function prompt_callback(player, text) with the text the player typed.
Does not work in multiplayer.


2.2 Monsters
------------


new_monster (type, poly [, facing [, height]])

Creates a new monster of the chosen type in poly.
Facing is in degrees.  (default 0)
Height is distance above the poly floor.  (default 0)
Returns the new monster's monster index.
(Make sure another monster of the same type is already present on the map)


activate_monster (monster)
deactivate_monster (monster)

Activates/Deactivates monster


damage_monster (monster, amount [, type])

Inflicts damage on monster.
"amount" is how much damage is dealt; type is the damage type used.
If no type is specified, fist damage is dealt.


attack_monster (attack_monster, target_monster)

Instructs attack_monster to attack target_monster.


move_monster (monster, poly)

Instructs monster to move to poly.
Once it gets there, it probably won't choose to stay.


select_monster (type, poly)

If there is a monster of type in poly, then returns the index of such a monster.


monster_index_valid(monster)

Returns nil of monster lies outside the acceptable range for monster indices, false if it is an unused slot, or true if it is a valid, in use slot (which can be used with other monster-related functions).


get_monster_position (monster)
get_monster_facing (monster)
get_monster_polygon (monster)

Returns the position/angle/polygon of monster.


get_monster_immunity (monster, type)
set_monster_immunity (monster, type, state)

Sets/Queries monster's immunity to type damage.


get_monster_weakness (monster, type)
set_monster_weakness (monster, type, state)

Sets/Queries monster's weakness to type damage.


get_monster_friend (monster, type)
set_monster_friend (monster, type, state)

Sets/Queries monster's friendliness to monsters of class type.


get_monster_enemy (monster, type)
set_monster_enemy (monster, type, state)

Sets/Queries monster's "enemyness?" to monsters of class type.


get_monster_item (monster)
set_monster_item (monster, type)

Sets/Queries the item monster drops when it dies.
Set it to -1 for none.


get_monster_vitality (monster)
set_monster_vitality (monster)

Sets/Queries the vitality of monster.
A monster's vitality is none (-1) before it gets activated. Make sure the monster you modify was already activated...


get_monster_type(monster)

Returns the monster type of monster.


get_monster_type_class(type)

Returns the class (for enemy/friend relationships) of monsters of type.


set_monster_type_class(type, class)

Sets the class of monsters of type to class.


get_monster_action (monster)

Queries the current AI action of monster.


get_monster_mode (monster)

Queries the current AI mode of monster.


2.3 Items
---------


new_item (type, poly [, height])
Creates a new item of the chosen type in poly.
Height is distance above the poly floor.  (default 0)
Returns the new item's item index.
NOTE: Items can be identified by item indices only when
the items are on the ground (or floating, etc.) - but
not when they are in a player's inventory.


item_index_valid (item_index)

Returns nil if item_index lies outside the acceptable range for item indices,
false if the item_index does not correspond to a current item in the game, or
true if it corresponds to a valid item (which can then be manipulated).


get_item_type (item_index)

Returns the item type of the item specified by item_index.


get_item_polygon (item_index)

Returns the polygon that the item is located on.


delete_item (item_index)

Deletes an item that is on the ground (or floating) somewhere. If you want
to remove an item that a player is carrying, use remove_item instead.


add_item (player, type)

Attempts to give one item of the specified type to player.
Uses marathon's rules for item aquisition.
(for example, you can't use this to give a player a third shotgun
or more ammo than e is allowed to carry.)
Can be used to give players items that don't normally appear in inventory.
(such as invisibility)


remove_item (player, type)

Takes away one item of the specified type from player.
This only works for items that appear in inventory.
(jkvw: Bad things happen when you try to gank balls with this.  Use destroy_ball for that.)


count_item (player, type)

Returns the number of items of the specified type player has ininventory.
(jkvw: In some cases this will return -1, not 0, if a player has none of the specified item.  (I've observed this with balls and with dead players))


destroy_ball (player)

If player is carrying a ball, this destroys it.
Otherwise, it does nothing.


2.4 Tags
--------


get_tag_state (tag)

Returns true iff there exists a platform or light which is both active and is associated with the chosen tag.


set_tag_state (tag, state)

Activate/Deactivate all lights and platforms associated with tag


2.5 Lights
----------

set_light_state (light, state)

Activate or deactivate light depending on state.


get_light_state (light)

Return true if light is active; false if inactive.


2.6 Polygons
------------


get_polygon_floor_height (poly)
get_polygon_ceiling_height (poly)
set_polygon_floor_height (poly, height)
set_polygon_ceiling_height (poly, height)

Sets/Queries the floor/ceiling height of poly.
(jkvw: Is changing poly floor/ceiling heights on the fly a good idea)
(tiennou: There is no real problem with changing, the only thing I was able to see is texture misalignement... You can also use this to make platform with both floor & ceiling moving)
(jkvw: A careless mapmaker may create an untextured wall with this, too.  But yeah, using this is fine.)


number_of_polygons ()

Returns the number of polygons in the map.


get_polygon_type (poly)
set_polygon_type (poly, type)

Sets/Gets the polygon type.


get_polygon_center (poly)

Returns the x and y coordinate of the polygon center.


get_polygon_target (poly)
set_polygon_target (poly, target)

Gets/Sets the light/platform triggered by a polygon or the teleportation destination depending on the polygon's type.


2.7 Platforms
-------------


set_platform_state (poly, state)

If poly is a platform, activate or deactivate it depending on state.


get_platform_state (poly)

If poly is a platform, return true if active; false if inactive.


set_platform_player_control (poly, state)
get_platform_player_control (poly)

Sets/Queries the "player controllable" flag.


set_platform_monster_control (poly, state)
get_platform_monster_control (poly)

Sets/Queries the "monster controllable" flag.


set_platform_speed (poly, speed)
get_platform_speed (poly)

Sets/Queries the platforms speed.


set_platform_movement (poly, state)
get_platform_movement (poly)

Sets/Queries the current moving state of the platform. Extending is true, contracting is false...


get_platform_floor_height (poly)
get_platform_ceiling_height (poly)
set_platform_floor_height (poly, height)
set_platform_ceiling_height (poly, height)

These operate on the platform's heights.
(that is, not on the polygon floor/ceiling, but the position of the platform itself)


get_platform_index (poly)

If poly is a platform, it returns the polygon's platform index.


2.8 Camera
----------

create_camera

Adds a new Lua camera.


add_path_point(camera_index, polygon, point_x, point_y, point_z)

Add a point 'x,y,z' to camera 'camera_index' and put it in 'polygon'.


add_path_angle(camera_index, yaw, pitch, time)

Adds an angle 'yaw,pitch' to camera 'camera_index' with 'time'.
(tiennou: someone who knows what is the 'time' argument write something more useful here...)

activate_camera(player, camera_index)

Starts the camera 'camera_index' for player. Works only on local player.


deactivate_camera(camera_index)

Stops the camera 'camera_index' for the local player.


clear_camera(camera_index)

Deletes all points and angles for the camera 'camera_index'.


2.9 Display
-----------

(jkvw: Don't be scared off by "working only on local player" - these operate correctly, just in a roundabout way.  A1 compares the player index passed in to the local player index, calling the appropriate funciton if the indicies are the same.  (and does nothing otherwise)  So in a net game, screen_print(2, "hi") ends up printing "hi" to player 2 and doing nothing for the other players.)

screen_print([player,] message)

Prints message on the screen of player.
If no player is specified, prints to everyone.
Works only on local player.


screen_fade([player,] fade)

Make the fade 'fade_index' start for player.
If no player is specified, fades for everyone.
Works only on local player.


set_motion_sensor_state (player, state)

Turn on/off the motion sensor for player. Works only on local player.


get_motion_sensor_state (player)

Returns true if player's motion sensor is enabled, false if it is disabled. Works only on local player.


hide_interface(player)
show_interface(player)

Hides/Shows the HUD of player. Works only on local player.


set_fog_depth(depth)
set_fog_color(r, g, b)
get_fog_depth()
get_fog_color()
set_underwater_fog_depth(depth)
set_underwater_fog_color(r, g, b)
get_underwater_fog_depth()
get_underwater_fog_color()

(tiennou: actually, fog is broken, but those specify the fog parameters (color & depth)


crosshairs_active(player)
set_crosshairs_state(player, state)

Gets/Sets the crosshairs state for player. Works only on local player.


zoom_active(player)
set_zoom_state(player, state)

Gets/Sets the tunnel (sniper-mode) vision for player. Works only on local player.


2.10 Scoring
------------


(jkvw: different game types are scored differently.
Time based games have scores in units of ticks.
Every Man For Himself doesn't use network score at all - it relies on kills)


award_points (player, amount)

Increases player's network game score by amount.
Negative values take points away.


award_kills (aggressor_player, slain_player, amount)

Increases aggressor_player's kill count against slain_player by amount.
Negative values take kills away.
Setting agressor_player and slain_player the same awards suicides.
These changes will affect slain_player's death count.


set_points (player, amount)

Sets player's network game score to amount.


set_kills (aggressor_player, slain_player, amount)

Sets aggressor_player's kill count against slain_player.
If aggressor_player and slain_player are the same, it sets suicides.
This will affect slain_player's death count.


get_points (player)

Returns player's network game score.


get_kills (aggressor_player, slain_player)

Returns the kill count of aggressor_player against slain player.
And of course, if they are the same, it returns the number of suicides.


2.11 Compass
------------


use_lua_compass ([player,] state)

Set who controls where the network compass points, either lua or normal network rules.
If player is specified, change only applies to that player.


set_lua_compass_state (player, compass_direction)

Points player's compass in the specified directon.  (if the lua compass is enabled)
The special value _network_compass_use_beacon doesn't point the compass in a specific direction;
it tells the lua compass to point at the location specified by set_lua_compass_beacon.
The "single wedge" mneumonics can be added to get bigger wedges.
(so to point compass N you can do _network_compass_nw + _network_compass_ne)


set_lua_compass_beacon (player, x, y)

Points player's compass towards the location x, y.
(if the lua compass is enabled and _network_compass_use_beacon is set for that player's lua compass state)


2.12 Projectiles
----------------

get_projectile_type (projectile)

Returns the projectile's type.


get_projectile_damage_type (projectile)

Returns the projectile's damage type.


get_projectile_owner (projectile)

Returns the index of the monster that fired projectile, or nil if that monster is no longer associated with the projectile. (won't work right with virulent projectiles)


set_projectile_owner (projectile, monster)

Set the index of the monster that fired the projectile. (The owner of a projectile won't be damaged by it directly.)


get_projectile_target (projectile)

Returns the index of the monster that this projectile is tracking, if it's guided.


set_projectile_target (projectile, monster)

Set the index of the monster that this projectile is tracking. Probably ignored if not guided.


projectile_index_valid(projectile)

Returns nil of projectile lies outside the acceptable range for projectile indices, false if it is an unused slot, or true if it is a valid, in use slot (which can be used with other projectile-related functions).


get_projectile_angle(projectile)
set_projectile_angle(projectile, yaw, pitch)

Returns/Sets both the facing (yaw) and the elevation (pitch) of projectile.


get_projectile_position(projectile)
set_projectile_position(projectile, polygon, x, y, z)

Returns/Sets the polygon and x, y, z position of projectile.


2.13 Other
----------


global_random ()

Returns a random number from A1's global random number generator.
(jkvw: so for a random integer in [0, n-1], you can do "math.mod (global_random (), n)")
This is preferred over random number functionality from lua.
(jkvw: Using lua's functions you may get out of sync in net games and incorrect film playback.)


better_random ()

Like global_random, but with much more useful statistical properties
than A1's global random number generator.


local_random ()

Returns a random number from A1's local random number generator.
This is a good way to put net games out of sync.


get_terminal_text_number (poly, line)

Return the permutation field (the terminal script ID) of the terminal of the line contained in poly.


set_terminal_text_number (poly, line, terminal_text_id)

Sets the permutation field (the terminal script ID) of the terminal of the line contained in poly to terminal_text_id. It can be used to display multiple terminal messages without having to add hundred of terminals hidden behind the first...


activate_terminal (player, text_no)

Activates terminal text "text_no" for the player.


play_sound(player, sound, pitch)

Plays sound to player at pitch. See the mnemonics for the sound list


play_music(track, [track, [...]])

Appends all of the specified tracks to the end of the level's playlist.


fade_music([duration])

Fades out the currently playing song over duration seconds (or 1 if not specified) and clears the level's playlist.


clear_music()

Clears the level's playlist.


stop_music()

Stops the currently playing song and clears the level's playlist.


kill_script()

Stops the execution of the script.
(No more triggers will activate, but whichever one called kill_script() will continue normally.)



get_player_weapon(player)

Returns the weapon currently being wielded by player, or nil if none (such as in a rebellion level).


play_music(track, [track, [...]])

Appends all of the specified tracks to the end of the level's playlist.


fade_music([duration])

Fades out the currently playing song over duration seconds (or 1 if not specified) and clears the level's playlist.


clear_music()

Clears the level's playlist.


stop_music()

Stops the currently playing song and clears the level's playlist.


3 Mnemonics
-----------

Symbols for referring to A1 item types, monster types, and such.


3.1 Items
---------

_item_knife
_item_fist
_item_magnum
_item_magnum_magazine
_item_plasma_pistol
_item_plasma_magazine
_item_assault_rifle
_item_assault_rifle_magazine
_item_assault_grenade_magazine
_item_missile_launcher
_item_missile_launcher_magazine
_item_invisibility_powerup
_item_invincibility_powerup
_item_infravision_powerup
_item_alien_weapon
_item_alien_weapon_magazine
_item_flamethrower
_item_flamethrower_canister
_item_extravision_powerup
_item_oxygen_powerup
_item_energy_powerup
_item_double_energy_powerup
_item_triple_energy_powerup
_item_shotgun
_item_shotgun_magazine
_item_spht_door_key
_item_uplink_chip
_item_light_blue_ball
_item_red_ball
_item_violet_ball
_item_yellow_ball
_item_brown_ball
_item_orange_ball
_item_blue_ball
_item_green_ball
_item_smg
_item_smg_ammo


3.2 Monsters
------------

_monster_minor_tick
_monster_major_tick
_monster_kamikaze_tick
_monster_minor_compiler
_monster_major_compiler
_monster_minor_invisible_compiler
_monster_major_invisible_compiler
_monster_minor_fighter
_monster_major_fighter
_monster_minor_projectile_fighter
_monster_major_projectile_fighter
_monster_green_bob
_monster_blue_bob
_monster_security_bob
_monster_explodabob
_monster_minor_drone
_monster_major_drone
_monster_big_minor_drone
_monster_big_major_drone
_monster_possessed_drone
_monster_minor_cyborg
_monster_major_cyborg
_monster_minor_flame_cyborg
_monster_major_flame_cyborg
_monster_minor_enforcer
_monster_major_enforcer
_monster_minor_hunter
_monster_major_hunter
_monster_minor_trooper
_monster_major_trooper
_monster_mega_cyborg
_monster_mega_hunter
_monster_sewage_yeti
_monster_water_yeti
_monster_lava_yeti
_monster_minor_defender
_monster_major_defender
_monster_minor_juggernaut
_monster_major_juggernaut
_monster_tiny_pfhor
_monster_tiny_bob
_monster_tiny_yeti
_monster_green_vacbob
_monster_blue_vacbob
_monster_security_vacbob
_monster_explodavacbob


3.3 Monster Classes
-------------------

_monster_class_player
_monster_class_bob
_monster_class_madd
_monster_class_possessed_drone
_monster_class_defender
_monster_class_fighter
_monster_class_trooper
_monster_class_hunter
_monster_class_enforcer
_monster_class_juggernaut
_monster_class_drone
_monster_class_compiler
_monster_class_cyborg
_monster_class_explodabob
_monster_class_tick
_monster_class_yeti


3.4 Damage Types
----------------

_damage_explosion
_damage_staff
_damage_projectile
_damage_absorbed
_damage_flame
_damage_claws
_damage_alien_weapon
_damage_hulk_slap
_damage_compiler
_damage_fusion
_damage_hunter
_damage_fists
_damage_teleporter
_damage_defender
_damage_yeti_claws
_damage_yeti_projectile
_damage_crushing
_damage_lava
_damage_suffocation
_damage_goo
_damage_energy_drain
_damage_oxygen_drain
_damage_drone
_damage_shotgun


3.5 Monster Actions
-------------------

_monster_is_stationary
_monster_is_waiting_to_attack_again
_monster_is_moving
_monster_is_attacking_close
_monster_is_attacking_far
_monster_is_being_hit
_monster_is_dying_hard
_monster_is_dying_soft
_monster_is_dying_flaming
_monster_is_teleporting
_monster_is_teleporting_in
_monster_is_teleporting_out


3.6 Monster Modes
-----------------

_monster_mode_locked
_monster_mode_losing_lock
_monster_mode_lost_lock
_monster_mode_unlocked
_monster_mode_running


3.7 Faders
----------

_fade_start_cinematic_fade_in
_fade_cinematic_fade_in
_fade_long_cinematic_fade_in
_fade_cinematic_fade_out
_fade_end_cinematic_fade_out
_fade_red
_fade_big_red
_fade_bonus
_fade_bright
_fade_long_bright
_fade_yellow
_fade_big_yellow
_fade_purple
_fade_cyan
_fade_white
_fade_big_white
_fade_orange
_fade_long_orange
_fade_green
_fade_long_green
_fade_static
_fade_negative
_fade_big_negative
_fade_flicker_negative
_fade_dodge_purple
_fade_burn_cyan
_fade_dodge_yellow
_fade_burn_green
_fade_tint_green
_fade_tint_blue
_fade_tint_orange
_fade_tint_gross
_fade_tint_jjaro


3.8 Sounds
----------

_snd_startup
_snd_teleport_in
_snd_teleport_out
_snd_crushed
_snd_nuclear_hard_death
_snd_absorbed
_snd_breathing
_snd_oxygen_warning
_snd_suffocation
_snd_energy_refuel
_snd_oxygen_refuel
_snd_cant_toggle_switch
_snd_switch_on
_snd_switch_off
_snd_puzzle_switch
_snd_chip_insertion
_snd_pattern_buffer
_snd_destroy_control_panel
_snd_adjust_volume
_snd_got_powerup
_snd_get_item
_snd_bullet_ricochet
_snd_metallic_ricochet
_snd_empty_gun
_snd_spht_door_opening
_snd_spht_door_closing
_snd_spht_door_obstructed
_snd_spht_platform_starting
_snd_spht_platform_stopping
_snd_owl
_snd_smg_firing
_snd_smg_reloading
_snd_heavy_spht_platform_starting
_snd_heavy_spht_platform_stopping
_snd_fist_hitting
_snd_pistol_firing
_snd_pistol_reloading
_snd_assault_rifle_firing
_snd_grenade_launcher_firing
_snd_grenade_expolding
_snd_grenade_flyby
_snd_fusion_firing
_snd_fusion_exploding
_snd_fusion_flyby
_snd_fusion_charging
_snd_rocket_exploding
_snd_rocket_flyby
_snd_rocket_firing
_snd_flamethrower
_snd_body_falling
_snd_body_exploding
_snd_bullet_hit_flesh
_snd_fighter_activate
_snd_fighter_wail
_snd_fighter_scream
_snd_fighter_chatter
_snd_fighter_attack
_snd_fighter_projectile_hit
_snd_fighter_projectile_flyby
_snd_spht_attack
_snd_spht_death
_snd_spht_hit
_snd_spht_projectile_flyby
_snd_spht_projectile_hit
_snd_cyborg_moving
_snd_cyborg_attack
_snd_cyborg_hit
_snd_cyborg_death
_snd_cyborg_projectile_bounce
_snd_cyborg_projectile_hit
_snd_cyborg_projectile_flyby
_snd_drone_activate
_snd_drone_start_attack
_snd_drone_attack
_snd_drone_dying
_snd_drone_death
_snd_drone_projectile_hit
_snd_drone_projectile_flyby
_snd_bob_wail
_snd_bob_scream
_snd_bob_hit
_snd_bob_chatter
_snd_assimilated_bob_chatter
_snd_bob_trash_talk
_snd_bob_apology
_snd_bob_activation
_snd_bob_clear
_snd_bob_angry
_snd_bob_secure
_snd_bob_kill_the_player
_snd_water
_snd_sewage
_snd_lava
_snd_goo
_snd_underwater
_snd_wind
_snd_waterfall
_snd_siren
_snd_fan
_snd_spht_door
_snd_spht_platform
_snd_alien_harmonics
_snd_heavy_spht_platform
_snd_light_machinery
_snd_heavy_machinery
_snd_transformer
_snd_sparking_transformer
_snd_water_drip
_snd_walking_in_water
_snd_exiting_water
_snd_entering_water
_snd_small_water_splash
_snd_medium_water_splash
_snd_large_water_splash
_snd_walking_in_lava
_snd_entering_lava
_snd_exiting_lava
_snd_small_lava_splash
_snd_medium_lava_splash
_snd_large_lava_splash
_snd_walking_in_sewage
_snd_exiting_sewage
_snd_entering_sewage
_snd_small_sewage_splash
_snd_medium_sewage_splash
_snd_large_sewage_splash
_snd_walking_in_goo
_snd_exiting_goo
_snd_entering_goo
_snd_small_goo_splash
_snd_medium_goo_splash
_snd_large_goo_splash
_snd_major_fusion_firing
_snd_major_fusion_charged
_snd_assault_rifle_reloading
_snd_assault_rifle_shell_casings
_snd_shotgun_firing
_snd_shotgun_reloading
_snd_ball_bounce
_snd_you_are_it
_snd_got_ball
_snd_computer_login
_snd_computer_logout
_snd_computer_page
_snd_heavy_shpt_door
_snd_heavy_spht_door_opening
_snd_heavy_spht_door_closing
_snd_heavy_spht_door_open
_snd_heavy_spht_door_closed
_snd_heavy_spht_door_obstructed
_snd_hunter_activate
_snd_hunter_attack
_snd_hunter_dying
_snd_hunter_landing
_snd_hunter_exploding
_snd_hunter_projectile_hit
_snd_hunter_projectile_flyby
_snd_enforcer_activate
_snd_enforcer_attack
_snd_enforcer_projectile_hit
_snd_enforcer_projectile_flyby
_snd_flickta_melee_attack
_snd_flickta_melee_hit
_snd_flickta_projectile_attack
_snd_flickta_projectile_sewage_hit
_snd_flickta_projectile_sewage_flyby
_snd_flickta_projectile_lava_hit
_snd_flickta_projectile_lava_flyby
_snd_flickta_dying
_snd_macine_binder
_snd_macine_bookpress
_snd_machine_puncher
_snd_electric_hum
_snd_alarm
_snd_night_wind
_snd_surface_explosion
_snd_underground_explosion
_snd_sphtkr_attack
_snd_sphtkr_projectile_hit
_snd_sphtkr_projectile_flyby
_snd_sphtkr_hit
_snd_sphtkr_exploding
_snd_tick_chatter
_snd_tick_falling
_snd_tick_flapping
_snd_tick_exploding
_snd_ceiling_lamp_exploding
_snd_pfhor_platform_starting
_snd_pfhor_platform_stopping
_snd_pfhor_platform
_snd_pfhor_door_opening
_snd_pfhor_door_closing
_snd_pfhor_door_obstructed
_snd_pfhor_door
_snd_pfhor_switch_off
_snd_pfhor_switch_on
_snd_juggernaut_firing
_snd_juggernaut_warning
_snd_juggernaut_exploding
_snd_juggernaut_start_attack
_snd_enforcer_exploding
_snd_alien_noise_1
_snd_alien_noise_2
_snd_vacbob_wail
_snd_vacbob_scream
_snd_vacbob_hit
_snd_vacbob_chatter
_snd_assimilated_vacbob_chatter
_snd_vacbob_trash_talk
_snd_vacbob_apology
_snd_vacbob_activation
_snd_vacbob_clear
_snd_vacbob_angry
_snd_vacbob_secure
_snd_vacbob_kill_the_player


3.9 Refuel Panels
-----------------

_refuel_oxygen
_refuel_single_shield
_refuel_double_shield
_refuel_triple_shield


3.10 Compass Directions
-----------------------

_network_compass_all_off
_network_compass_nw
_network_compass_ne
_network_compass_sw
_network_compass_se
_network_compass_all_on
_network_compass_use_beacon


3.11 Projectile Types
---------------------

_projectile_rocket
_projectile_grenade
_projectile_pistol_bullet
_projectile_rifle_bullet
_projectile_shotgun_bullet
_projectile_staff
_projectile_staff_bolt
_projectile_flamethrower_burst
_projectile_compiler_bolt_minor
_projectile_compiler_bolt_major
_projectile_alien_weapon
_projectile_fusion_bolt_minor
_projectile_fusion_bolt_major
_projectile_hunter
_projectile_fist
_projectile_armageddon_sphere
_projectile_armageddon_electricity
_projectile_juggernaut_rocket
_projectile_trooper_bullet
_projectile_trooper_grenade
_projectile_minor_defender
_projectile_major_defender
_projectile_juggernaut_missile
_projectile_minor_energy_drain
_projectile_major_energy_drain
_projectile_oxygen_drain,
_projectile_minor_hummer
_projectile_major_hummer
_projectile_durandal_hummer
_projectile_minor_cyborg_ball
_projectile_major_cyborg_ball
_projectile_ball
_projectile_minor_fusion_dispersal
_projectile_major_fusion_dispersal
_projectile_overloaded_fusion_dispersal
_projectile_yeti
_projectile_sewage_yeti
_projectile_lava_yeti
_projectile_smg_bullet


3.12 Polygon Types
---------------------

_polygon_is_normal
_polygon_is_item_impassable
_polygon_is_monster_impassable
_polygon_is_hill
_polygon_is_base
_polygon_is_platform
_polygon_is_light_on_trigger
_polygon_is_platform_on_trigger
_polygon_is_light_off_trigger
_polygon_is_platform_off_trigger
_polygon_is_teleporter
_polygon_is_zone_border
_polygon_is_goal
_polygon_is_visible_monster_trigger
_polygon_is_invisible_monster_trigger
_polygon_is_dual_monster_trigger
_polygon_is_item_trigger
_polygon_must_be_explored
_polygon_is_automatic_exit
_polygon_is_minor_ouch
_polygon_is_major_ouch
_polygon_is_glue
_polygon_is_glue_trigger
_polygon_is_superglue


3.13 Powerup Types
---------------------

_powerup_invisibility
_powerup_invincibility
_powerup_infravision
_powerup_extravision


4 Dynamic Limits
----------------

Symbols referring to the game's dynamic limits on various things.


MAXIMUM_MONSTERS_PER_MAP

The first invalid monster index.


MAXIMUM_PROJECTILES_PER_MAP

The first invalid projectile index.


MAXIMUM_OBJECTS_PER_MAP

The first invalid object index.
NOTE: Object indices can correspond to valid item indices, but not always (an
object is not necessarily an item). So, to determine if a given index from 0
to MAXIMUM_OBJECTS_PER_MAP-1 corresponds to an actual item, you would have to
use the item_index_valid function on it.

