Halo Script is a scripting language that H1 map designers can use to have greater control over how their map works. It is primarily used in controlling the mission structure of single player maps, but can also be used to achieve certain effects in multiplayer, such as synchronizing workarounds.

Scripts are compiled into the scenario of a map using Sapien.

Compiling a script into a scenario

Sapien searches for scripts in the data version of your scenario's path. For example, if your scenario is tags\levels\test\tutorial\tutorial.scenario, you would place your script file in data\levels\test\tutorial\scripts\. Your script file can be named anything, but must have a .hsc file extension.

Open your scenario in Sapien, then under the file menu, click "Compile Scripts". If there are any compilation errors, Sapien will display them in the Game View screen.

Gotchas and limits

Using begin_random in startup scripts

The random number generator used for things like begin_random is seeded on the same tick that startup scripts run. This means the first expression selected by a begin_random block in a startup script will always be the same. Generally since the first expression will take a variable amount of time to complete evaluation, the following items will be random as expected.

Syntax nodes are limited

Syntax nodes are sections of memory that the game allocates to handle the structure of scripts when it compiles them. Syntax data is stuff like parentheses, function names, variable names... anything that has syntactic meaning for the script system.

The maximum number of syntax nodes that the game can allocate when compiling scripts is 19001 in legacy and 32767 (SHORT_MAX) in H1A.

If you exceed this limit, scripts will not compile. This limit is cumulative across both individual scenarios and child scenarios. So, even if the main scenario compiles, it might not work once you add its children (if its children have scripts of their own). If you hit this limit, your only choice is to remove some syntax data. It can come from anywhere, but something has to go. This can sometimes be a long and painful process.

Total scripts and globals are limited

In addition to syntax nodes, the total number of globals and scripts (startup, dormant, etc...) is also limited.

Type Legacy limit H1A limit
scripts 512 1024
globals 128 512
threads 256 -

Source file size is limited

The game will not compile scripts for a source file above a given size. Comments and whitespace are counted in this size! If you hit this limit, you can either remove stuff from the script, or move stuff from one source file into another source file. Comments and unnecessary whitespace are non-functional things that can be removed to reduce size, but only do this if you need to!

Comments and indentation are important for understanding your own scripts. Most projects will not be big enough to need to worry about exceeding source file size, so good coding conventions should be used until they can't be!

Tools like the Halo Script Preprocessor (see below) can strip comments and whitespace in the final script, while keeping them in your source file.

Number of source files is limited

A scenario's scripts can be split into multiple files, but the number of files you can have is limited to 8.

Sapien silently fails to load all of the files if there are more than 8. It loads the first 8 in some determined order ("asciibetical"?), then excludes the rest. No errors are thrown unless scripts fail to compile because of the excluded files.

Stack space is limited

If you've never heard of a stack in the context of computer programming before, skim through this. Halo allocates a certain amount of memory for each scripting thread in a scenario, called the "stack". Stack memory is used to hold results of invoking functions, parameters for script functions, and so on. Notably, nesting function calls will consume additional stack memory.

; Nested statements are statements like these, where many
; things happen that are "nested" within one another

(if ;; some condition
  (begin
    (if ;; some condition
      (begin
        ;; ... do something
      )
    )
    ;; ... do something else
  )
)

It is very, very easy to exceed the limits of this memory if you have enough nested statements. The maximum number of nested statements is somewhere between 10 and 16 levels deep, depending on if you're invoking static scripts, if you're invoking methods with parameters, and other things.

WARNING: The game DOES NOT guard against exceeding stack memory in release builds!! If you exceed a script's stack memory, it will overflow into other scripts' stack memory!

This means that one script can COMPLETELY break another script if it nests too deeply. If another script's memory is clobbered, it can end up doing arbitrary things. It might wake up when it's supposed to be asleep. It might switch to a new BSP for no reason. It might crash the game. It might make objects flicker randomly.

There is not currently a reliable way to exactly tell when stack memory has been exceeded in release builds, but play and lower optimization levels will crash with a problem occurred while executing the script <script name>: corrupted stack. (valid_thread(thread)). You can use the H1A standalone build or Sapien to detect overflows.

Console scripts

Things manually entered into the console ingame also share script space with the scenario's baked in scripts. In rare circumstances (e.g. you're just on the cusp of using too much memory), a console script's memory can overflow into a scenario script's memory, causing the above mentioned issues.

When to use short vs long

There are two integer variable types: short and long. Both hold whole numbers, but long variables can hold much larger numbers than short variables. It's worth noting both use the same amount of memory, so you should decide the type you use based on what range of values makes sense or the values the functions you call accept (avoids a cast).

If you need to optimize memory usage you can use the bitwise functions to implement a bitfield.

Extensions

The Halo Script Preprocessor is effectively a super-set of Halo Script that adds support for C-like #define pre-processor macros. The program takes a file with macros in it, then spits out a standard HSC file. This means this program is purely for making writing HSC easier. Scripts using the Halo Script Preprocessor are still subject to all of the above limits.

For example, the following block:

#define UNIT_IN_COMBAT (= 6 (ai_command_list_status my_unit))

(if UNIT_IN_COMBAT
  (sleep 30)
)

...becomes this:

(if (= 6 (ai_command_list_status my_unit))
  (sleep 30)
)

HSC reference

To learn more about HSC's general syntax and execution model, see our cross-game scripting page. There is also additional important script engine info below.

Script types

Type

Comments

Example

continuous

Runs every tick (simulation frame of the engine), at 30 ticks per second.

(script continuous kill_players_in_zone
  (if (volume_test_object kill_volume (list_get (players) 0))
    (unit_kill (unit (list_get (players) 0)))
  )
  (if (volume_test_object kill_volume (list_get (players) 1))
    (unit_kill (unit (list_get (players) 1)))
  )
)
dormant

Sleeps until started with wake, runs until there are no instructions left, then stops. Calling wake a second time will not restart the script.

(script dormant save_valley_canyon
  (sleep_until (= 0 (ai_living_count valley_canyon)) 10)
  (game_save_no_timeout)
)
startup

Begins executing when the level initially loads and would be used for setting up AI alliances, running intro cinematics, and orchestrating the overall mission structure. You can have multiple startup scripts in the scenario.

(script startup mission_a30
  (hud_show_motion_sensor false)
  (fade_out 0 0 0 0)
  (print "mission script is running")
  (ai_allegiance player human)
  ;...
)
static

Performed when called from another script.

(script static "unit" player0
  (unit (list_get (players) 0))
)
stub

A stub script by itself does nothing. It allows you to pre-declare a static script without providing a script body. This allows other scripts to invoke a static script without the full function body being declared yet.

The script you override a stub with must have the same "signature" ( i.e. name, parameters, and return type). A stub cannot be declared more than once. The full implementation of a stub may be placed in another script file.

If you're familiar with C function prototypes, this is very similar.

(script stub object player0)

Value types

Type

Details

Example

void

Nothing

N/A

passthrough

Anything, used by some control flow functions.

N/A

boolean

A value that is true or false

true
false
1
0

real

Floating point (decimal) value
Value Range: 3.4E +/- 38 (6 digits)

3.000000

short

16-bit short integer value, stored in two's complement.
Value Range: −32,768 to 32,767

2

long

32-bit long integer value, stored in two's complement.
Value Range: -2,147,483,648 to 2,147,483,647

2000000000

string

String of characters in double quotes
Max number of characters: 32

"This is a string."

trigger_volume

A "Trigger Volumes" value (a block in the scenario tag)

cutscene_flag

A "Cutscene Flags" value (a block in the scenario tag)

cutscene_camera_point

A "Cutscene Camera Points" value (a block in the scenario tag)

cutscene_title

A "Cutscene Titles" value (a block in the scenario tag)

cutscene_recording

A "Cutscene Recording" value that isn't in the public HaloCE scenario tag?

device_group

A "Device Groups" value (a block in the scenario tag)

ai

An "Encounters" value

ai_command_list

A "Command Lists" value (a block in the scenario tag)

starting_profile

A "Player Starting Profile" value (a block in the scenario tag)

conversation

A "AI Conversations" value (a block in the scenario tag)

navpoint
hud_message

HUD message text

object_list

An object list

sound

Sound

effect

Effect

damage

Damage Effect

looping_sound

Sound Looping

animation_graph

Model Animations

actor_variant

Actor variant

damage_effect

Damage Effect

object_definition
game_difficulty

easy
normal
hard
impossible

team

player
human
covenant
flood
sentinal

ai_default_state

none
sleeping
alert
moving
guarding
searching
fleeing

actor_type

ie, elite

hud_corner

top_left
top_right
bottom_left
bottom_right

object

Object

unit

Unit

vehicle

Vehicle

weapon

Weapon

device

Device

scenery

Scenery

object_name

An "Object Names" value (a block in the scenario tag)

unit_name

A "Bipeds" value (a block in the scenario tag)

vehicle_name

A "Vehicles" value (a block in the scenario tag)

weapon_name

A "Weapons" value (a block in the scenario tag)

device_name

A "Device" value (a block in the scenario tag)

scenery_name

A "Scenery" value (a block in the scenario tag)

Operators and keywords

Expression

Example

(+ <number_1> <number_2> [... <number_n>])

Returns the sum of all specified expressions.

(+ 5 6 7 8 9)
; returns: 35
(- <number_1> <number_2>)

Returns the difference of two expressions.

(- 10 5)
; returns: 5
(* <number_1> <number_2> [... <number_n>])

Returns the product of all specified expressions.

(* 5 5)
; returns: 25
(* 5.5 6)
; returns: 33
(/ <number_1> <number_2>)

Returns the quotient of two expressions.

(/ 10 5)
; returns: 2
(/ 2.5 2)
; returns: 1.25
(= <expression_1> <expression_2>)

Returns true if two expressions are equal.

(= (hud_get_timer_ticks) 0)
(!= <expression_1> <expression_2>)

Returns true if two expressions are not equal.

(!= (hud_get_timer_ticks) 0)
(> <number_1> <number_2>)

Returns true if number_1 is larger than number_2.

(> 10 5)
; returns: true
(> 5 10)
; returns: false
(< <number_1> <number_2>)

Returns true if number_1 is smaller than number_2.

(> 4 8)
; returns: true
(> 8 4)
; returns: false
(>= <number_1> <number_2>)

Returns true if number_1 is larger than or equal number_2.

(>= 10 10)
; returns: true
(>= 5 10)
; returns: false
(<= <number_1> <number_2>)

Returns true if number_1 is smaller than or equal number_2.

(>= 4 4)
; returns: true
(>= 8 4)
; returns: false
(and <boolean_1> <boolean_2> [... <boolean_n>])

Returns true if all specified expressions are true. This function is short circuiting, meaning it will not evaluate subsequent expressions if a a prior one evaluates to false.

(and (player_action_test_action) true)
(begin
  <expression_1>
  <expression_2>
  [... <expression_n>]
)

Returns the last expression in a sequence after evaluating the sequence in order

(begin
  something
  something_else
  20
)
; returns: 20
(begin_random
  <expression_1>
  <expression_2>
  [... <expression_n>]
)

Evaluates the sequence of expressions in random order and returns the last value evaluated. This function can contain up to 32 expressions.

(begin_random
  something
  something_else
  20
)
(cond
  (<boolean_1> <result_1>)
  [(<boolean_2> <result_2>) [...]]
)

Returns the value associated with the first true condition. Has no default value.

(cond
  (false_val 10)
  (true_val 20)
)
; returns: 20
(global <type> <name> <inital value>)

Makes a new global script variable.

(global boolean bsl_sucks true)
(if <boolean>
  <expression>
  [<else>]
)

Returns one of two values based on the value of a condition.

(if (bsl_sucks)
  (print "Stop whining.")
)
(inspect <expression>)

Prints the value of an expression to the screen for debugging purposes.

(inspect (+ 3 4))
; outputs: 7
(min <number_1> <number_2> [... <number_n>])

Returns the minimum of all specified expressions.

(min 60 5 10)
; returns: 5
(max <number_1> <number_2> [... <number_n>])

Returns the maximum of all specified expressions.

(max 60 5 10)
; returns: 60
(not <boolean>)

Returns the opposite of the expression.

(not bsl_sucks)
; returns: false
(or <boolean_1> <boolean_2> [... <boolean_n>])

Returns true if any specified expressions are true. This function is short circuiting, meaning it will not evaluate subsequent expressions if a a prior one evaluates to true.

(or (player_action_test_action) true)
; returns: true
(script <script type> [<return type>] <name>)

Defines a new script.

See above example

(set <variable name> <value>)

Sets the value of a defined global variable.

(set bsl_sucks true)
(sleep <short> [<script>])

Pauses execution of this script (or, optionally, another script) for the specified number of ticks (1 tick = 1/30 second)

(sleep 30 more_weapons)
(sleep_until <condition> [short_1] [short_2])

Pauses execution of this script until condition is true. By default, this checks once per second. If short_1 is specified, it checks every short_1 ticks instead. By default, this will await the condition indefinitely. short_2 can be used to timeout after a certain number of ticks, instead. After the timeout, the script will continue on as if condition became true.

(sleep_until false 5 600)
(wake <script name>)

Wakes a sleeping or dormant script in the next update.

(wake more_weapons)
(thread_sleep <long>)

Sleeps the calling thread for the specified number of ms.

(thread_sleep 20)
; returns: sleeps for 20ms

Functions

Function

(<long> abs_integer <long>)

return the absolute (non-negative) value of an integer

(<real> abs_real <real>)

return the absolute (non-negative) value of a real

(<void> activate_nav_point_flag <navpoint> <unit> <cutscene_flag> <real>)

Activates a nav point type <string> attached to (local) player <unit> anchored to a flag with a vertical offset <real>. If the player is not local to the machine, this will fail.

(<void> activate_nav_point_object <navpoint> <unit> <object> <real>)

Activates a nav point type attached to (local) player anchored to an object with a vertical offset . If the player is not local to the machine, this will fail.

(<void> activate_team_nav_point_flag <navpoint> <team> <cutscene_flag> <real>)

Activates a nav point type attached to a team anchored to a flag with a vertical offset . If the player is not local to the machine, this will fail.

(<void> activate_team_nav_point_object <navpoint> <team> <object> <real>)

Activates a nav point type attached to a team anchored to an object with a vertical offset . If the player is not local to the machine, this will fail.

(<void> ai <boolean>)

turns all AI on or off.

(<object_list> ai_actors <ai>)

Converts an ai reference to an object list

(<void> ai_allegiance <team> <team>)

Creates an allegiance between two teams

(<boolean> ai_allegiance_broken <team> <team>)

Returns whether two teams have an allegiance that is currently broken by traitorous behavior

(<void> ai_allegiance_remove <team> <team>)

Destroys an allegiance between two teams

(<void> ai_allow_charge <ai> <boolean>)

Either enables or disables charging behavior for a group of actors

(<void> ai_allow_dormant <ai> <boolean>)

Either enables or disables automatic dormancy for a group of actors

(<void> ai_attach <unit> <ai>)

Attaches the specified unit to the specified encounter

(<void> ai_attach_free <unit> <actor_variant>)

Attaches a unit to a newly created free actor of the specified type

(<void> ai_attack <ai>)

Makes the specified platoon(s) go into the attacking state

(<void> ai_automatic_migration_target <ai> <boolean>)

Enables or disables a squad as being an automatic migration target

(<void> ai_berserk <ai> <boolean>)

Forces a group of actors to start or stop berserking

(<void> ai_braindead <ai> <boolean>)

Makes a group of actors braindead, or restores them to life (in their initial state)

(<void> ai_braindead_by_unit <object_list> <boolean>)

Makes a list of objects braindead, or restores them to life. If you pass in a vehicle index, it makes all actors in that vehicle braindead (including any built-in guns).

(<void> ai_command_list <ai> <ai_command_list>)

Tells a group of actors to begin executing the specified command list

(<void> ai_command_list_advance <ai>)

Tells a group of actors that are running a command list that they may advance further along the list (if they are waiting for a stimulus)

(<void> ai_command_list_advance_by_unit <unit>)

Just like ai_command_list_advance but operates upon a unit instead

(<void> ai_command_list_by_unit <unit> <ai_command_list>)

Tells a named unit to begin executing the specified command list

(<short> ai_command_list_status <object_list>)

Gets the status of a number of units running command lists: 0 = none, 1 = finished command list, 2 = waiting for stimulus, 3 = running command list

(<boolean> ai_conversation <conversation>)

Tries to add an entry to the list of conversations waiting to play. Returns FALSE if the required units could not be found to play the conversation, or if the player is too far away and the 'delay' flag is not set.

(<void> ai_conversation_advance <conversation>)

Tells a conversation that it may advance

(<short> ai_conversation_line <conversation>)

Returns which line the conversation is currently playing, or 999 if the conversation is not currently playing.

(<short> ai_conversation_status <conversation>)

Returns the status of a conversation (0=none, 1=trying to begin, 2=waiting for guys to get in position, 3=playing, 4=waiting to advance, 5=could not begin, 6=finished successfully, 7=aborted midway)

(<void> ai_conversation_stop <conversation>)

Stops a conversation from playing or trying to play

(<void> ai_debug_communication_focus <string(s)>)

Focuses (or stops focusing) a set of unit vocalization types

(<void> ai_debug_communication_ignore <string(s)>)

Ignores (or stops ignoring) a set of AI communication types when printing out communications

(<void> ai_debug_communication_suppress <string(s)>)

Suppresses (or stops suppressing) a set of AI communication types

(ai_debug_sound_point_set)

Drops the AI debugging sound point at the camera location

(ai_debug_speak <string>)
(ai_debug_speak "pain minor")

Makes the currently selected AI speak a vocalization

(ai_debug_speak_list <string>)
(ai_debug_speak_list "involuntary")

Makes the currently selected AI speak a list of vocalizations

(ai_debug_teleport_to <ai>)

Teleports all players to the specified encounter

(ai_debug_vocalize <string> <string>)

Makes the selected AI vocalize

(<void> ai_defend <ai>)

Makes the specified platoon(s) go into the defending state

(ai_deselect)

Clears the selected encounter

(<void> ai_detach <unit>)

Detaches the specified unit from all AI

(<void> ai_dialogue_triggers <boolean>)
(ai_dialogue_triggers true)
(ai_dialogue_triggers false)

Turns impromptu dialogue on or off

(<void> ai_disregard <object_list> <boolean>)
(ai_disregard (players) true)
(ai_disregard (players) false)

If true, forces all actors to completely disregard the specified units, otherwise lets them acknowledge the units again.

(<void> ai_erase <ai>)

Erases the specified encounter and/or squad

(<void> ai_erase_all)

Erases all AI

(<void> ai_exit_vehicle <ai>)

Tells a group of actors to get out of any vehicles that they are in

(<void> ai_follow_distance <ai> <real>)

Sets the distance threshold which will cause squads to migrate when following someone

(<void> ai_follow_target_ai <ai> <ai>)

Sets the follow target for an encounter to be a group of AI (encounter, squad or platoon)

(<void> ai_follow_target_disable <ai>)

Turns off following for an encounter

(<void> ai_follow_target_players <ai>)

Sets the follow target for an encounter to be the closest player. AI follow their target by moving to firing positions near their target with the same letter label.

(<void> ai_follow_target_unit <ai> <unit>)

Sets the follow target for an encounter to be a specific unit.

(<void> ai_force_active <ai> <boolean>)

Forces an encounter to remain active (i.e. not freeze in place) even if there are no players nearby

(<void> ai_force_active_by_unit <unit> <boolean>)

Forces a named actor that is NOT in an encounter to remain active (i.e. not freeze in place) even if there are no players nearby

(<void> ai_free <ai>)

Removes a group of actors from their encounter and sets them free

(<void> ai_free_units <object_list>)

Removes a set of units from their encounter (if any) and sets them free

(<short> ai_going_to_vehicle <unit>)

Return the number of actors that are still trying to get into the specified vehicle

(<void> ai_go_to_vehicle <ai> <unit> <string>)

Tells a group of actors to get into a vehicle, in the substring-specified seats (e.g. passenger for pelican). Does not interrupt any actors who are already going to vehicles.

(<void> ai_go_to_vehicle_override <ai> <unit> <string>)

Tells a group of actors to get into a vehicle, in the substring-specified seats (e.g. passenger for pelican). Any actors who are already going to vehicles will stop and go to this one instead!

(<void> ai_grenades <boolean>)

Turns grenade inventory on or off

(<boolean> ai_is_attacking <ai>)

Returns whether a platoon is in the attacking mode (or if an encounter is specified, returns whether any platoon in that encounter is attacking)

(<void> ai_kill <ai>)

Instantly kills the specified encounter and/or squad

(<void> ai_kill_silent <ai>)

Instantly and silently (no animation or sound played) kills the specified encounter and/or squad

(ai_lines)

Cycles through AI line-spray modes

(<short> ai_living_count <ai>)

Return the number of living actors in the specified encounter and/or squad

(<real> ai_living_fraction <ai>)

Return the fraction [0-1] of living actors in the specified encounter and/or squad

(<void> ai_look_at_object <unit> <object>)

Tells an actor to look at an object until further notice

(<void> ai_magically_see_encounter <ai> <ai>)

Makes one encounter magically aware of another

(<void> ai_magically_see_players <ai>)

Makes an encounter magically aware of nearby players

(<void> ai_magically_see_unit <ai> <unit>)

Makes an encounter magically aware of the specified unit

(<void> ai_maneuver <ai>)

Makes all squads in the specified platoon(s) maneuver to their designated maneuver squads

(<void> ai_maneuver_enable <ai> <boolean>)

Enables or disables the maneuver/retreat rule for an encounter or platoon. The rule will still trigger, but none of the actors will be given the order to change squads.

(<void> ai_migrate <ai> <ai>)

Makes all or part of an encounter move to another encounter

(<void> ai_migrate_and_speak <ai> <ai> <string>)

Makes all or part of an encounter move to another encounter, and say their advance or retreat speech lines.

(<void> ai_migrate_by_unit <object_list> <ai>)

Makes a named vehicle or group of units move to another encounter

(<short> ai_nonswarm_count <ai>)

Return the number of non-swarm actors in the specified encounter and/or squad

(<void> ai_place <ai>)

Places the specified encounter on the map

(<void> ai_playfight <ai> <boolean>)

Sets an encounter to be playfighting or not

(<void> ai_prefer_target <object_list> <boolean>)

If true, ALL enemies will prefer to attack the specified units. If false, removes the preference.

(<void> ai_reconnect)

Reconnects all AI information to the current structure bsp (use this after you create encounters or command lists in sapien, or place new firing points or command list points)

(<void> ai_renew <ai>)

Refreshes the health and grenade count of a group of actors, so they are as good as new

(<void> ai_retreat <ai>)

Makes all squads in the specified platoon(s) maneuver to their designated maneuver squads

(<void> ai_select <ai>)

Selects the specified encounter

(<void> ai_set_blind <ai> <boolean>)

Enables or disables sight for actors in the specified encounter

(<void> ai_set_current_state <ai> <ai_default_state>)

Sets the current state of a group of actors. WARNING: may have unpredictable results on actors that are in combat.

(<void> ai_set_deaf <ai> <boolean>)

Enables or disables hearing for actors in the specified encounter

(<void> ai_set_respawn <ai> <boolean>)

Enables or disables respawning in the specified encounter

(<void> ai_set_return_state <ai> <ai_default_state>)

Sets the state that a group of actors will return to when they have nothing to do

(<void> ai_set_team <ai> <team>)

Makes an encounter change to a new team

(<void> ai_spawn_actor <ai>)

Spawns a single actor in the specified encounter and/or squad

(<short> ai_status <ai>)

Returns the most severe combat status of a group of actors (0=inactive, 1=noncombat, 2=guarding, 3=search/suspicious, 4=definite enemy(heard or magic awareness), 5=visible enemy, 6=engaging in combat)

(<void> ai_stop_looking <unit>)

Tells an actor to stop looking at whatever it's looking at

(<real> ai_strength <ai>)

Return the current strength (average body vitality from 0-1) of the specified encounter and/or squad

(<short> ai_swarm_count <ai>)

Return the number of swarm actors in the specified encounter and/or squad

(<void> ai_teleport_to_starting_location <ai>)

Teleports a group of actors to the starting locations of their current squad(s)

(<void> ai_teleport_to_starting_location_if_unsupported <ai>)

Teleports a group of actors to the starting locations of their current squad(s), only if they are not supported by solid ground (i.e. if they are falling after switching BSPs).

(<void> ai_timer_expire <ai>)

makes a squad's delay timer expire and releases them to enter combat.

(<void> ai_timer_start <ai>)

makes a squad's delay timer start counting.

(<void> ai_try_to_fight <ai> <ai>)

Causes a group of actors to preferentially target another group of actors

(<void> ai_try_to_fight_nothing <ai>)

Removes the preferential target setting from a group of actors

(<void> ai_try_to_fight_player <ai>)

Causes a group of actors to preferentially target the player

(<void> ai_vehicle_encounter <unit> <ai>)

Sets a vehicle to "belong" to a particular encounter/squad. Any actors who get into the vehicle will be placed in this squad. Vehicles potentially drivable by multiple teams need their own encounter!

(<void> ai_vehicle_enterable_actors <unit> <ai>)

Sets a vehicle as being impulsively enterable for a certain encounter/squad of actors

(<void> ai_vehicle_enterable_actor_type <unit> <actor_type>)

Sets a vehicle as being impulsively enterable for actors of a certain type (grunt, elite, marine etc)

(<void> ai_vehicle_enterable_disable <unit>)

Disables actors from impulsively getting into a vehicle (this is the default state for newly placed vehicles)

(<void> ai_vehicle_enterable_distance <unit> <real>)

Sets a vehicle as being impulsively enterable for actors within a certain distance

(<void> ai_vehicle_enterable_team <unit> <team>)

Sets a vehicle as being impulsively enterable for actors on a certain team

(attract_mode_start)

N/A in pc

(<void> bind <string> <string> <string>)

Binds an input device/button combination to a game control

(<long> bitwise_and <long> <long>)
(bitwise_and 6 3) ;2 (0110 & 0011 = 0010)

Returns the bitwise AND of two numbers. If a bit is 1 in both of the inputs, it is 1 in the output and otherwise 0.

(<long> bitwise_flags_toggle <long> <long> <boolean>)
(bitwise_flags_toggle 13 3 true) ;15 (1101 => 1111)
(bitwise_flags_toggle 13 3 false) ;12 (1101 => 1100)

Uses the second argument as a mask to toggle bits on or off in the first argument.

(<long> bitwise_left_shift <long> <short>)
(bitwise_left_shift 1 4) ;16 (00001 << 4 = 10000)
(bitwise_left_shift 5 1) ;10 (00101 << 1 = 01010)

Performs a bitwise left shift of a value by the given bit count. All bits are moved to the left by a number of positions, with the rightmost bits filling with 0's. Returns 0 if the positions argument is negative. This has the effect of multiplying the argument by a power of 2.

(<long> bitwise_or <long> <long>)
(bitwise_or 6 3) ;7 (0110 | 0011 = 0111)

Returns the bitwise OR of two numbers. If a bit is 1 in either or both of the inputs, it is 1 in the output and otherwise 0.

(<long> bitwise_right_shift <long> <short>)
(bitwise_right_shift 13 2) ;3 (1101 >> 2 = 0011)
(bitwise_right_shift -1 1) ;2147483647

Performs an unsigned right shift (also called logical or zero filling shift) of a value by the given bit count. All bits are moved to the right by a number of positions, with the leftmost bits filling with 0's. Returns 0 if the positions argument is negative.

(<long> bitwise_xor <long> <long>)
(bitwise_xor 5 5) ;0 (0101 ^ 0101 = 0000)
(bitwise_xor 12 15) ;3 (1100 ^ 1111 = 0011)

Returns the bitwise XOR (exclusive or) of two numbers. If a bit differs in both inputs, it is 1 in the output and otherwise 0. In other words, one or the other bit must be 1 but not both.

(<long> bit_test <long> <short>)
(bit_test 2 1) ;1
(bit_test 2 0) ;0

Returns 1 or 0 for the bit at the given position.

(<long> bit_toggle <long> <short> <boolean>)
(bit_toggle 0 2 true) ;4 (0000 => 0100)
(bit_toggle 7 0 false) ;6 (0111 => 0110)

Sets the value's bit at the given position on or off.

(<void> breakable_surfaces_enable <boolean>)
(breakable_surfaces_enable false)

Enables or disables breakability of all breakable surfaces in the level

(<void> breakable_surfaces_reset)

Restores all breakable surfaces

(<void> camera_control <boolean>)
(camera_control true)
(camera_control false)

Toggles script control of the camera

(<void> camera_set <cutscene_camera_point> <short>)
(camera_set somewhere_point 100)

Moves the camera to the specified camera point over the specified number of ticks

(<void> camera_set_animation <animation_graph> <string>)

Begins a prerecorded camera animation

(<void> camera_set_dead <unit>)
(camera_set_dead (player0))

Makes the scripted camera zoom out around a unit as if it were dead

(<void> camera_set_first_person <unit>)
(camera_set_first_person (player0))

Makes the scripted camera follow a unit

(<void> camera_set_relative <cutscene_camera_point> <short> <object>)
(camera_set_relative somewhere_point 200 warthog_mp_1)

Moves the camera to the specified camera point over the specified number of ticks (position is relative to the specified object)

(<short> camera_time)

Returns the number of ticks remaining in the current camera interpolation

(<void> change_team <short>)
(change_team 0)
; changes you to red
(change_team 1)
; changes you to blue
(change_team 2)
; auto balance

Change your team (0=red, 1=blue, else=auto). Removed in H1A.

(<void> cheats_load)

Reloads the cheats.txt file

(<void> cheat_active_camouflage)

Gives the player active camouflage

(<void> cheat_active_camouflage_local_player <short>)
(cheat_active_camouflage_local_player 1)

Gives the player active camouflage

(<void> cheat_all_powerups)

Drops all powerups near player. The set of powerups is controlled by the globals tag.

(<void> cheat_all_vehicles)

Drops all vehicles on player

(<void> cheat_all_weapons)

Drops all weapons near player

(<void> cheat_spawn_warthog)

Drops a warthog near player

(<void> cheat_teleport_to_camera)

Teleports player to camera location

(<void> checkpoint_load <string>)

Load a saved checkpoint

(checkpoint_save)

Save last solo checkpoint

(<void> cinematic_abort)

Aborts a cinematic

(<void> cinematic_screen_effect_set_convolution <short> <short> <real> <real> <real>)

Sets the convolution effect

(<void> cinematic_screen_effect_set_filter <real> <real> <real> <real> <boolean> <real>)

Sets the filter effect

(<void> cinematic_screen_effect_set_filter_desaturation_tint <real> <real> <real>)

Sets the desaturation filter tint color

(<void> cinematic_screen_effect_set_video <short> <real>)

Sets the video effect: <noise intensity[0,1]>, <overbright: 0=none, 1=2x, 2=4x>

(<void> cinematic_screen_effect_start <boolean>)

Starts screen effect; pass true to clear

(<void> cinematic_screen_effect_stop)

Returns control of the screen effects to the rest of the game

(<void> cinematic_set_near_clip_distance <real>)
(<void> cinematic_set_title <cutscene_title>)

Activates the chapter title

(<void> cinematic_set_title_delayed <cutscene_title> <real>)

Activates the chapter title, delayed by seconds

(<void> cinematic_show_letterbox <boolean>)
(cinematic_show_letterbox true)
(cinematic_show_letterbox false)

Sets or removes the letterbox bars

(<void> cinematic_skip_start_internal)
(<void> cinematic_skip_stop_internal)
(<void> cinematic_start)

Initializes game to start a cinematic (interruptive) cutscene

(<void> cinematic_stop)

Initializes the game to end a cinematic (interruptive) cutscene

(<void> cinematic_suppress_bsp_object_creation <boolean>)
(cinematic_suppress_bsp_object_creation true)
(cinematic_suppress_bsp_object_creation false)

Suppresses or enables the automatic creation of objects during cutscenes due to a bsp switch

(<void> cls)

clears console text from the screen

(config_one_control <string>)

Test function to configure a single control

(connect <string> <string>)

Attempt to connect to server - use ip:port password as parameters

(<void> core_load)

loads debug game state from core\core.bin

(<void> core_load_at_startup)

loads debug game state from core\core.bin as soon as the map is initialized

(<void> core_load_name <string>)

loads debug game state from core<path>

(<void> core_load_name_at_startup <string>)

loads debug game state from core<path> as soon as the map is initialized

(<void> core_save)

saves debug game state to core\core.bin

(<boolean> core_save_name <string>)

Saves debug game state to core<path> in pre-H1A versions of the game. In H1A this function was hijacked for campaign segments.

(<void> crash <string>)
(crash "Something is wrong")

Crashes (for debugging)

(<boolean> custom_animation <unit> <animation_graph> <string> <boolean>)

Starts a custom animation playing on a unit (interpolates into animation if last parameter is true)

(<boolean> custom_animation_list <object_list> <animation_graph> <string> <boolean>)

Starts a custom animation playing on a unit list (interpolates into animation if last parameter is true)

(<void> damage_new <damage> <cutscene_flag>)
(damage_new "scenery\emitters\burning_flame\flame" enter_lava_flag)

Causes the specified damage at the specified flag

(<void> damage_object <damage> <object>)
(damage_object "weapons\assault rifle\bullet" (player0))

Causes the specified damage at the specified object

(<void> deactivate_nav_point_flag <unit> <cutscene_flag>)

Deactivates a nav point type attached to a player anchored to a flag

(<void> deactivate_nav_point_object <unit> <object>)

Deactivates a nav point type attached to a player anchored to an object

(<void> deactivate_team_nav_point_flag <team> <cutscene_flag>)

Deactivates a nav point type attached to a team anchored to a flag

(<void> deactivate_team_nav_point_object <team> <object>)

Deactivates a nav point type attached to a team anchored to an object

(<void> debug_camera_load)

Loads the saved camera position and facing

(<void> debug_camera_load_name <string>)

loads the camera position and facing from _.txt

(<void> debug_camera_load_simple_name <string>)

loads the camera position and facing from camera_.txt

(<void> debug_camera_load_text <string>)

loads the camera position and facing from a passed in string

(<void> debug_camera_save)

Saves the camera position and facing

(<void> debug_camera_save_name <string>)

saves the camera position and facing to _.txt

(<void> debug_camera_save_simple_name <string>)

saves the camera position and facing to camera_.txt

(debug_memory)

Dumps memory leaks

(debug_memory_by_file)

Dumps memory leaks by source file

(debug_memory_for_file <string>)
(debug_memory_for_file "\halopc\haloce\source\tag_files\tag_groups.c")

Dumps memory leaks from the specified source file

(<void> debug_pvs <boolean>)

displays the current pvs.

(debug_sounds_distances <string> <real> <real>)

Changes the minimum and maximum distances for all sound classes matching the substring

(<void> debug_sounds_enable <string> <boolean>)

Enables or disabled all sound classes matching the substring

(debug_sounds_wet <string> <real>)

Changes the reverb level for all sound classes matching the substring

(debug_tags)

Writes all memory being used by tag files into tag_dump.txt

(<void> debug_teleport_player <short> <short>)
(delete_save_game_files)

Delete all custom profile files

(device_get_position <device>)

Gets the current position of the given device (used for devices without explicit device groups)

(<real> device_get_position <device>)

Gets the current position of the given device (used for devices without explicit device groups)

(<real> device_get_power <device>)

Gets the current power of a named device

(<void> device_group_change_only_once_more_set <device_group> <boolean>)

true allows a device to change states only once

(<real> device_group_get <device_group>)

Returns the desired value of the specified device group

(<boolean> device_group_set <device_group> <real>)

Changes the desired value of the specified device group

(<void> device_group_set_immediate <device_group> <real>)

Instantaneously changes the value of the specified device group

(<void> device_one_sided_set <device> <boolean>)

true makes the given device one-sided (only able to be opened from one direction), false makes it two-sided

(<void> device_operates_automatically_set <device> <boolean>)

true makes the given device open automatically when any biped is nearby, false makes it not

(<void> device_set_never_appears_locked <device> <boolean>)

changes a machine's never_appears_locked flag, but only if paul is a bastard

(<boolean> device_set_position <device> <real>)
(device_set_position <device> 1.0)

Set the desired position of the given device (used for devices without explicit device groups)

(<void> device_set_position_immediate <device> <real>)
(device_set_position_immediate <device> 1.0)

Instantaneously changes the position of the given device (used for devices without explicit device groups

(<void> device_set_power <device> <real>)
(device_set_power <device> 1.0)

Immediately sets the power of a named device to the given value

(disconnect)

Disconnect from a server

(<void> display_scenario_help <short>)
(display_scenario_help 1)

Display in-game help dialog

(<void> effect_new <effect> <cutscene_flag>)
(effect_new "effects\coop teleport" teleporting_flag)

Starts the specified effect at the specified flag

(<void> effect_new_on_object_marker <effect> <object> <string>)
(effect_new_on_object_marker "effects\burning large" warthog_mp "driver")

Starts the specified effect on the specified object at the specified marker

(<void> enable_hud_help_flash <boolean>)
(enable_hud_help_flash true)
(enable_hud_help_flash false)

Starts/stops the help text flashing

(<void> error_overflow_suppression <boolean>)
(error_overflow_suppression true)
(error_overflow_suppression false)

Enables or disables the suppression of error spamming

(<void> fade_in <real> <real> <real> <short>)
(fade_in 0.0 0.0 0.0 100)

Does a screen fade in from a particular color in the amount of ticks

(<void> fade_out <real> <real> <real> <short>)
(fade_out 1.0 1.0 1.0 100)

Does a screen fade out to a particular color in the amount of ticks

(fast_setup_network_server <string> <string> <boolean>)

Sets up a network server with the given map name, game variant, and true for remote connections, false for not

(<boolean> game_all_quiet)

Returns false if there are bad guys around, projectiles in the air, etc.

(<game_difficulty> game_difficulty_get)

Returns the current difficulty setting, but lies to you and will never return easy, instead returning normal

(<game_difficulty> game_difficulty_get_real)

Returns the actual current difficulty setting without lying

(<void> game_difficulty_set <game_difficulty>)
(game_difficulty_set easy)
(game_difficulty_set normal)
(game_difficulty_set hard)
(game_difficulty_set impossible)

Changes the difficulty setting for the next map to be loaded

(<boolean> game_is_authoritative)
(<boolean> game_is_cooperative)

Returns true if the game is cooperative

(<void> game_lost)

Causes the player to revert to their previous saved checkpoint. For example, this is used when Keyes dies in Truth and Reconciliation.

(<void> game_revert)

Reverts to last saved game, if any (for testing, the first bastard that does this to me gets it in the head)

(<boolean> game_reverted)

Don't use this for anything, you black-hearted bastards

(<boolean> game_safe_to_save)

Returns false if it would be a bad idea to save the player's game right now

(<boolean> game_safe_to_speak)

Returns false if it would be a bad idea to save the player's game right now

(<void> game_save)

Checks to see if it is safe to save game, then saves (gives up after 8 seconds)

(<void> game_save_cancel)

Cancels any pending game_save, timeout or not. This prevents a checkpoint from being created during a known loss situation.

(<void> game_save_no_timeout)

Checks to see if it is safe to save game, then saves (this version never gives up)

(<void> game_save_totally_unsafe)

Saves disregarding player's current situation

(<boolean> game_saving)

Checks to see if the game is trying to save a checkpoint

(<void> game_skip_ticks <short>)
(game_skip_ticks 5)

Skips amount of game ticks. ONLY USE IN CUTSCENES!!!

(<void> game_speed <real>)
(game_speed 0.5)

Changes the game speed

(<long> game_time)

Gets ticks elapsed since the start of the game

(<void> game_variant <string>)

set the game engine

(<void> game_won)

Causes the player to successfully finish the current level and move on to the next

(<void> garbage_collect_now)

Causes all garbage objects except those visible to a player to be collected immediately

(get_digital_forward_throttle <short>)

Gets the amount of forward throttle applied by digital device stimuli

(get_digital_pitch_increment <short>)

Gets the increment in pitch applied by digital device stimuli

(get_digital_strafe_throttle <short>)

Gets the amount of strafe throttle applied by digital device stimuli

(get_digital_yaw_increment <short>)

Gets the increment in yaw applied by digital device stimuli

(get_gamepad_forward_threshold <short>)

Gets the threshold beyond which gamepad movement is full forward throttle

(get_gamepad_pitch_scale <short>)

Gets the scale for gamepad control of pitch

(get_gamepad_strafe_threshold <short>)

Gets the threshold beyond which gamepad movement is full strafe throttle

(get_gamepad_yaw_scale <short>)

Gets the scale for gamepad control of yaw

(get_mouse_forward_threshold <short>)

Gets the threshold beyond which mouse movement is full forward throttle

(get_mouse_pitch_scale <short>)

Gets the scale for mouse control of pitch

(get_mouse_strafe_threshold <short>)

Gets the threshold beyond which mouse movement is full strafe throttle

(get_mouse_yaw_scale <short>)

Gets the scale for mouse control of yaw

(<real> get_pitch_rate <short>)

Gets the yaw rate for the given player number

(<real> get_yaw_rate <short>)

Gets the yaw rate for the given player number

(hammer_begin <string> <string> <long> <short> <short>)

Hammers the server by connecting and disconnecting repeatedly

(hammer_stop)

Stops hammering the server

(<void> help <string>)
(help cheats_load)

Prints a description of the named function

(<void> hud_clear_messages)

Clears all non-state messages on the hud

(<short> hud_get_timer_ticks)

Returns the ticks left on the hud timer

(<void> hud_help_flash_restart)

Resets the timer for the help text flashing

(<void> hud_set_help_text <hud_message>)

displays as the help text

(<void> hud_set_objective_text <hud_message>)

sets as the current objective

(<void> hud_set_timer_position <short> <short> <hud_corner>)

sets the timer upper left position to (x, y)=>(, )

(<void> hud_set_timer_time <short> <short>)

sets the time for the timer to minutes and seconds, and starts and displays timer

(<void> hud_set_timer_warning_time <short> <short>)

sets the warning time for the timer to minutes and seconds

(<void> hud_show_crosshair <boolean>)

hides/shows the weapon crosshair

(<void> hud_show_health <boolean>)

hides/shows the health panel

(<void> hud_show_motion_sensor <boolean>)

hides/shows the motion sensor panel

(<void> hud_show_shield <boolean>)

hides/shows the shield panel

(hud_team_background_set_pos <long> <long>)

shit

(hud_team_background_set_scale <real> <real>)

shit

(hud_team_icon_set_pos <long> <long>)

shit

(hud_team_icon_set_scale <real> <real>)

shit

(input_activate_joy <short> <short>)

Activates an enumerated joystick into a logical joystick slot

(input_deactivate_joy <short>)

Deactivates an enumerated joystick, freeing up the logical joystick slot

(input_find_default <string>)

Test function that looks up a default profile for a deviceid

(input_find_joystick <string>)

Test function to find a joystick by GUID (string representation)

(input_get_joy_count)

Test function to return the number of joysticks enumerated

(input_is_joy_active <short>)

Test function to determine if an enumerated joystick is activated or not

(input_show_joystick_info)

Test function to show the enumerated joystick information for all joystick

(<short> list_count <object_list>)
(list_count the_warthogs)

Returns the number of objects in a list

(<short> list_count_not_dead <object_list>)

returns the number of objects in a list that aren't dead

(<object> list_get <object_list> <short>)
(list_get the_warthogs 3)

Returns an item in an object list

(<object_list> local_players)

returns a list of the living player units on the local machine

(<void> log_print <string>)

prints a string to the hs log file.

(<void> magic_melee_attack)

Causes player's unit to start a melee attack

(<void> magic_seat_name <string>)

All units controlled by the player will assume the given seat name (valid values are 'asleep', 'alert', 'stand', 'crouch' and 'flee')

(<void> map_name <string>)
; in cache builds:
(map_name "a10")
; in tags builds:
(map_name "levels\a10\a10")

Loads a singleplayer map by scenario name. If using the H1A standalone build, which directly loads tags instead of cache files, use the scenario tag path instead.

(<void> map_reset)

Starts the map from the beginning

(<boolean> mcc_mission_segment <string>)
(mcc_mission_segment "03_escape") ;from a10
(mcc_mission_segment "04_first_shoot") ;from a10

Signals a mission segment being reached to MCC. Usually done at the same time as a checkpoint (game_save). H1A MCC only.

(message_metrics_clear)

Clears network messaging metrics

(message_metrics_dump <string>)
(message_metrics_dump "")

Dumps network messaging metrics to given file ("" for default)

(<void> multiplayer_map_name <string>)
(multiplayer_map_name "schwinnzno1_alpha01a")

Changes the name of the multiplayer map

(network_client_dump)

Dumps info on network client

(network_server_dump)

Dumps info on network server

(net_graph_clear)

Clears the net_graph

(net_graph_show <string> <string>)

Changes the net_graph display (bytes/packets, sent/received)

(<short> numeric_countdown_timer_get <short>)
(numeric_countdown_timer_get 1)
(numeric_countdown_timer_get -1)

<digit_index>

(<void> numeric_countdown_timer_restart)

Reset the timer

(<void> numeric_countdown_timer_set <long> <boolean>)
(numeric_countdown_timer_set 15500 false)
(numeric_countdown_timer_set 10000 false)

<milliseconds>, <auto_start>

(<void> numeric_countdown_timer_stop)

Stop the timer

(<void> objects_attach <object> <string> <object> <string>)
(objects_attach chief "right hand" ar1 "")

Attaches the second object to the first; both strings can be empty

(<boolean> objects_can_see_flag <object_list> <cutscene_flag> <real>)
(objects_can_see_flag the_warthogs tunnel_flag 45)

Returns true if any of the specified units are looking within the specified number of degrees of the flag

(<boolean> objects_can_see_object <object_list> <object> <real>)
(objects_can_see_object the_warthogs (player0) 90)

Returns true if any of the specified units are looking within the specified number of degrees of the object

(<void> objects_delete_by_definition <object_definition>)

Deletes all objects of type <definition>

(<void> objects_detach <object> <object>)
(objects_detach chief ar1)

Detaches from the given parent object the given child object

(<real> objects_distance_to_flag <object_list> <cutscene_flag>)

returns minimum distance from any of the specified objects to the specified flag. (returns -1 if there are no objects, or no flag, to check)

(<real> objects_distance_to_object <object_list> <object>)

returns minimum distance from any of the specified objects to the specified destination object. (returns -1 if either of the objects does not exist)

(<void> objects_dump_memory)

debugs object memory usage

(<void> objects_predict <object_list>)
(objects_predict the_bipeds)

Loads textures necessary to draw objects that are about to come on-screen, using the object's predicted resources.

(<void> object_beautify <object> <boolean>)
(object_beautify chief true)
(object_beautify chief false)

Makes an object use its highest quality LOD for the remainder of the levels' cutscenes.

(<void> object_cannot_take_damage <object_list>)
(object_cannot_take_damage (players))

Prevents an object from taking damage

(<void> object_can_take_damage <object_list>)
(object_can_take_damage (players))

Allows an object to take damage again

(<void> object_create <object_name>)
(object_create warthog_mp_1)

Creates an object from the scenario

(<void> object_create_anew <object_name>)
(object_create_anew banshee_mp_1)

Creates an object, destroying it first if it already exists

(<void> object_create_anew_containing <string>)
(object_create_anew_containing "pelican")

Creates anew all objects from the scenario whose names contain the given substring

(<void> object_create_containing <string>)
(object_create_containing "warthog")

Creates all objects from the scenario whose names contain the given substring

(<void> object_destroy <object>)

Destroys an object

(<void> object_destroy_all)

Destroys all non player objects

(<void> object_destroy_containing <string>)
(object_destroy_containing "pelican")

Destroys all objects from the scenario whose names contain the given substring

(<void> object_pvs_activate <object>)

Just another (old) name for object_pvs_set_object.

(<void> object_pvs_clear)

Removes the special place that activates everything it sees.

(<void> object_pvs_set_camera <cutscene_camera_point>)

Sets the specified cutscene camera point as the special place that activates everything it sees.

(<void> object_pvs_set_object <object>)

Sets the specified object as the special place that activates everything it sees.

(<void> object_set_collideable <object> <boolean>)
(object_set_collideable (player0) true)
(object_set_collideable (player0) false)

false prevents any object from colliding with the given object

(<void> object_set_facing <object> <cutscene_flag>)
(object_set_facing (player0) blue_base_flag)

Turns the specified object in the direction of the specified flag

(<void> object_set_melee_attack_inhibited <object> <boolean>)
(object_set_melee_attack_inhibited (player0) true)
(object_set_melee_attack_inhibited (player0) false)

false prevents object from using melee attack

(<void> object_set_permutation <object> <string> <string>)
(object_set_permutation (player0) "right arm" ~damaged)

Sets the desired region (use "" for all regions) to the permutation with the given name

(<void> object_set_ranged_attack_inhibited <object> <boolean>)
(object_set_ranged_attack_inhibited (player0) true)
(object_set_ranged_attack_inhibited (player0) false)

false prevents object from using ranged attack

(<void> object_set_scale <object> <real> <short>)
(object_set_scale (player0) 1.5 10)
(object_set_scale insertion_pelican 0.25 30)

sets the scale for a given object and interpolates over the given number of frames to achieve that scale

(<void> object_set_shield <object> <real>)
(object_set_shield (player0) 1.0)

Sets the shield vitality of the specified object (between 0 and 1)

(<void> object_teleport <object> <cutscene_flag>)
(object_teleport (player0) red_base_flag)

Moves the specified object to the specified flag

(<void> object_type_predict <object_definition>)

Loads textures necessary to draw an object that's about to come on-screen

(<void> pause_hud_timer <boolean>)
(pause_hud_timer true)
(pause_hud_timer false)

Pauses or unpauses the hud timer

(<void> physics_constants_reset)

Resets all physics constants to earthly values.

(<real> physics_get_gravity)

Get the current global gravity acceleration relative to Halo standard gravity.

(<void> physics_set_gravity <real>)

Set global gravity acceleration relative to Halo standard gravity. The change in gravity is NOT network synchronized.

(<void> playback)

Starts game in film playback mode

(<boolean> player0_joystick_set_is_normal)

Returns true if (player0) is using the normal joystick set

(<void> player0_look_invert_pitch <boolean>)

Invert player0's look

(<boolean> player0_look_pitch_is_inverted)

Returns true if (player0)'s look pitch is inverted

(<object_list> players)

returns a list of the players

(<object_list> players_on_multiplayer_team <short>)

returns a list of the living player units on the MP team

(<void> players_unzoom_all)

Resets zoom levels on all players

(<boolean> player_action_test_accept)

Returns true if any player has hit accept since the last call to (player_action_test_reset)

(<boolean> player_action_test_action)

Returns true if any player has hit the action key since the last call to (player_action_test_reset)

(<boolean> player_action_test_back)

Returns true if any player has hit the back key since the last call to (player_action_test_reset)

(<boolean> player_action_test_grenade_trigger)

Returns true if any player has used grenade trigger since the last call to (player_action_test_reset)

(<boolean> player_action_test_jump)

Returns true if any player has jumped since the last call to (player_action_test_reset)

(<boolean> player_action_test_look_relative_all_directions)

Returns true if any player has looked up, down, left, and right since the last call to (player_action_test_reset)

(<boolean> player_action_test_look_relative_down)

Returns true if any player has looked down since the last call to (player_action_test_reset)

(<boolean> player_action_test_look_relative_left)

Returns true if any player has looked left since the last call to (player_action_test_reset)

(<boolean> player_action_test_look_relative_right)

Returns true if any player has looked right since the last call to (player_action_test_reset)

(<boolean> player_action_test_look_relative_up)

Returns true if any player has looked up since the last call to (player_action_test_reset)

(<boolean> player_action_test_move_relative_all_directions)

Returns true if any player has moved forward, backward, left, and right since the last call to (player_action_test_reset)

(<boolean> player_action_test_primary_trigger)

Returns true if any player has used primary trigger since the last call to (player_action_test_reset)

(<void> player_action_test_reset)

Resets the player action test state so that all tests will return false

(<boolean> player_action_test_zoom)

Returns true if any player has hit the zoom button since the last call to (player_action_test_reset)

(<void> player_add_equipment <unit> <starting_profile> <boolean>)

Adds/resets the player's health, shield, and inventory (weapons and grenades) to the named profile. Resets if third parameter is true, adds if false.

(<boolean> player_camera_control <boolean>)
(player_camera_control true)
(player_camera_control false)

Enables/disables camera control globally

(<void> player_effect_set_max_rotation <real> <real> <real>)

<yaw> <pitch> <roll>

(<void> player_effect_set_max_rumble <real> <real>)

This is not a real HSC function, but rather a hard-coded alias for player_effect_set_max_vibrate present in pre-H1A season 7 versions of Halo.

(<void> player_effect_set_max_translation <real> <real> <real>)

<x> <y> <z>

(<void> player_effect_set_max_vibrate <real> <real>)

<left> <right>

(<void> player_effect_start <real> <real>)

<max_intensity> <attack time>

(<void> player_effect_stop <real>)

<decay>

(<void> player_enable_input <boolean>)
(player_enable_input true)
(player_enable_input false)

Toggle player input. The player can still free-look, but nothing else.

(play_update_history <long> <boolean>)

Playback client input history starting from the specified last completed update id

(<void> print <string>)
(print "50 dollars for this?!")

Prints a string to the console. Printed text will not appear in the console unless devmode is enabled (devmode 4). You can give a print call a format string in H1CE (e.g. "I have %d apples"), but cannot give it format arguments, meaning a format string can cause the function to read invalid memory and crash the game!. The string is no longer interpreted as a format string in H1A.

(<void> print_binds)

Prints a list of all input bindings

(<void> print_if <boolean> <string>)

prints a string to the console if the condition is true.

(profile_activate <string>)

Activates profile sections based on a substring

(profile_deactivate <string>)

Deactivates profile sections based on a substring

(profile_dump <string>)

Dumps profile based on a substring

(profile_graph_toggle <string>)

Enables or disables profile graph display of a particular value

(<void> profile_load <string>)
(profile_load "a hobo")
; loads the profile "a hobo"

Load any included builtin profiles and create profiles on disk

(profile_reset)

Resets profiling data

(profile_service_clear_timers)

Clears the timers that are present in the profiling service

(profile_service_dump_timers)

Dumps the profiling service timers

(profile_unlock_solo_levels)

Unlocks all the solo player levels for player 1's profile

(<void> quit)

Quits the game

(<void> radiosity_debug_point)

tests sun occlusion at a point.

(<void> radiosity_save)

saves radiosity solution.

(<void> radiosity_start)

starts radiosity computation.

(<short> random_range <short> <short>)

returns a random value in the range [lower bound, upper bound)

(<void> rasterizer_decals_flush)

Flush all decals

(<void> rasterizer_fixed_function_ambient <long>)
(rasterizer_fixed_function_ambient 200)

Set the ambient light value for fixed function. Removed in H1A since there is no longer a fixed function render pipeline.

(<void> rasterizer_fps_accumulate)

Average fps

(<void> rasterizer_lights_reset_for_new_map)
(<void> rasterizer_model_ambient_reflection_tint <real> <real> <real> <real>)
(<void> rasterizer_reload_effects)

Check for shader changes

(rcon [rcon password] [command])

Sends a command for server to execute at console. Use " to send quotes.

(<real> real_random_range <real> <real>)

returns a random value in the range [lower bound, upper bound)

(<void> recording_kill <unit>)
(recording_kill (player0))

Kill the specified unit's cutscene recording

(<boolean> recording_play <unit> <cutscene_recording>)

Make the specified unit run the specified cutscene recording

(<boolean> recording_play_and_delete <unit> <cutscene_recording>)

Make the specified unit run the specified cutscene recording, deletes the unit when the animation finishes

(<boolean> recording_play_and_hover <vehicle> <cutscene_recording>)

Make the specified vehicle run the specified cutscene recording, hovers the vehicle when the animation finishes

(<short> recording_time <unit>)
(recording_time (player0))

Return the time remaining in the specified unit's cutscene recording

(<void> reload_shader_transparent_chicago)
(remote_player_stats <string>)

Displays the prediction stats of the specified remote player.

(<void> render_effects <boolean>)
(render_effects true)
(render_effects false)

Render game effects if true

(<boolean> render_lights <boolean>)
(render_lights true)
(render_lights false)

Enables/disables dynamic lights

(<void> scenery_animation_start <scenery> <animation_graph> <string>)
(scenery_animation_start fighter_clouds "cinematics\animations\h_fighter\x70\x70" "x70_3")

Starts a custom animation playing on a piece of scenery.

(<void> scenery_animation_start_at_frame <scenery> <animation_graph> <string> <short>)
(scenery_animation_start_at_frame fighter_launch "cinematics\animations\h_fighter\x70\x70" "x70_2" 100)

Starts a custom animation playing on a piece of scenery at a specific frame.

(<short> scenery_get_animation_time <scenery>)
(scenery_get_animation_time fighter_launch)

Returns the number of ticks/frames remaining in a custom animation (or zero, if the animation is over). This function intentionally returns a value 2 frames lower than the actual remaining frame count so scripts waiting for the animation to end can do something before it's over.

(<void> script_doc)

Saves a file called hs_doc.txt with parameters for all script commands. In the H1A-EK this also includes external globals at the end of the file.

(<void> script_recompile)

Recompiles scripts

(<void> script_screen_effect_set_value <short> <real>)

Sets a screen effect script value

(set_digital_forward_throttle <short> <real>)

Sets the amount of forward throttle applied by digital device stimuli

(set_digital_pitch_increment <short> <real>)

Sets the increment in pitch applied by digital device stimuli

(set_digital_strafe_throttle <short> <real>)

Sets the amount of strafe throttle applied by digital device stimuli

(set_digital_yaw_increment <short> <real>)

Sets the increment in yaw applied by digital device stimuli

(set_gamepad_forward_threshold <short> <real>)

Sets the threshold beyond which gamepad movement is full forward throttle

(set_gamepad_pitch_scale <short> <real>)

Sets the scale for gamepad control of pitch

(set_gamepad_strafe_threshold <short> <real>)

Sets the threshold beyond which gamepad movement is full strafe throttle

(set_gamepad_yaw_scale <short> <real>)

Sets the scale for gamepad control of yaw

(<void> set_gamma <long>)
(set_gamma 200)

Set the gamma. Removed in H1A.

(set_mouse_forward_threshold <short> <real>)

Sets the threshold beyond which mouse movement is full forward throttle

(set_mouse_pitch_scale <short> <real>)

Sets the scale for mouse control of pitch

(set_mouse_strafe_threshold <short> <real>)

Sets the threshold beyond which mouse movement is full strafe throttle

(set_mouse_yaw_scale <short> <real>)

Sets the scale for mouse control of yaw

(<void> set_pitch_rate <short> <real>)

Sets the yaw rate for the given player number

(<void> set_yaw_rate <short> <real>)

Sets the yaw rate for the given player number

(<boolean> show_hud <boolean>)
(show_hud true)
(show_hud false)

Shows or hides the hud

(<boolean> show_hud_help_text <boolean>)
(show_hud_help_text true)
(show_hud_help_text false)

Shows or hides the hud help text

(<void> show_hud_timer <boolean>)
(show_hud_timer true)
(show_hud_timer false)

Displays the hud timer

(show_player_update_stats)

Shows update history playback stats

(<void> sound_cache_dump_to_file)
(<void> sound_cache_flush)
(<void> sound_class_set_gain <string> <real> <short>)

Changes the gain on the specified sound class(es) to the specified game over the specified number of ticks.

(<boolean> sound_eax_enabled)

Returns true if EAX extensions are enabled

(<void> sound_enable <boolean>)
(sound_enable true)
(sound_enable false)

Enables or disables all sound

(<void> sound_enable_eax <boolean>)
(sound_enable_eax true)
(sound_enable_eax false)

Enable or disable EAX extensions

(<void> sound_enable_hardware <boolean> <boolean>)

Enable or disable hardware sound buffers

(<real> sound_get_effects_gain)

Returns the game's effects gain

(<real> sound_get_gain <string>)

Absolutely do not use this either

(<real> sound_get_master_gain)

Returns the game's master gain

(<real> sound_get_music_gain)

Returns the game's music gain

(<short> sound_get_supplementary_buffers)

Get the amount of supplementary buffers

(<void> sound_impulse_predict <sound> <boolean>)
(sound_impulse_predict "sound\sfx\impulse\ting\ting" true)
(sound_impulse_predict "sound\sfx\impulse\ting\ting" false)

Loads an impulse sound into the sound cache ready for playback

(<void> sound_impulse_start <sound> <object> <real>)

Plays an impulse sound from the specified source object (or "none"), with the specified scale

(<void> sound_impulse_stop <sound>)

Stops the specified impulse sound

(<long> sound_impulse_time <sound>)

Returns the time remaining for the specified impulse sound

(<void> sound_looping_predict <looping_sound>)
(<void> sound_looping_set_alternate <looping_sound> <boolean>)

Enables or disables the alternate loop/alternate end for a looping sound

(<void> sound_looping_set_scale <looping_sound> <real>)

Changes the scale of the sound (which should affect the volume) within the range 0 to 1

(<void> sound_looping_start <looping_sound> <object> <real>)

Plays a looping sound from the specified source object (or "none"), with the specified scale

(<void> sound_looping_stop <looping_sound>)

Stops the specified looping sound

(<void> sound_set_effects_gain <real>)
(sound_set_effects_gain 2.0)

Set the game's effects gain

(<void> sound_set_env <short>)
(sound_set_env 1)

Change environment preset

(<void> sound_set_factor <real>)

Set the DSound factor value

(<void> sound_set_gain <string> <real>)

Absolutely do not use this

(<void> sound_set_master_gain <real>)
(sound_set_master_gain 0.5)

Set the game's master gain

(<void> sound_set_music_gain <real>)
(sound_set_music_gain 3.0)

Set the game's music gain

(<void> sound_set_rolloff <real>)

Set the DSound rolloff value

(<void> sound_set_supplementary_buffers <short> <boolean>)

Set the amount of supplementary buffers

(<short> structure_bsp_index)

Returns the current structure bsp index

(<void> structure_lens_flares_place)

Places lens flares in the structure bsp

(sv_ban <player index or name> [duration(m,h,d)])

(Server Only) The given player is kicked and added to banned.txt. Use sv_players to find the player's index. You can also specify an optional duration for timed ban. Use 0 to follow sv_ban_penalty rules.

(sv_banlist)

Print a list of banned players

(sv_banlist_file [alphanumeric banlist file suffix])

Sets and opens the file to be used for the player ban list.

(sv_ban [player # or name] opt:[duration (#)(m,h,d)])

Player is kicked and added to banned.txt. Use sv_players to find the index.Specify optional duration for timed ban. Use 0 to follow sv_ban_penalty rules.

(sv_ban_penalty [(#)(m,h,d), 0=infinite])

Specify up to 4 ban times for repeat ban/TK offenders.

(sv_end_game)

End the current game

(sv_friendly_fire ["0" = defaults, "1" = off, "2" = shields, "3" = on])

Use to provide a global override for the gametype friendly fire setting.

(sv_gamelist [substring])

Display a list of game types, matching an optional substring.

(sv_get_player_action_queue_length <string>)

Displays the action queue length for the specified player.

(sv_kick <player index or name>)
(sv_kick "Micro$oft")

(Server Only) Kicks the specified player from the server

(sv_log_echo_chat [preference])

Enables or disbles chat echo to the console. Set the preference to 0to disable chat echo, or 1 to enable chat echo.If the preference is not specified, displays the current preference.

(sv_log_enabled ["1" to enable, "0" to disable])

Enables or disables server logging. If 0/1 is not given, displays thecurrent logging status.

(sv_log_file [log file name])

Sets the server log file name. If no name is given, displays thecurrent log file name.

(sv_log_note <string>)

Leave a note in the server log

(sv_log_rotation_threshold [threshold in kilobytes])

Sets the log rotation threshold. When a log file's size (in kilobytes) exceedsthis number, it will be rotated. Set to 0 to disable log rotation.If the threshold is not specified, displays the current threshold.

(<void> sv_map <string> <string>)
(sv_map bloodgulch slayer)

(Server Only) Usage: sv_map <mapname> <variantname>
Aborts the current game and playlist, and starts the specified game mode on the specified map.

(sv_mapcycle)

Print the contents of the currently loaded mapcycle file

(sv_mapcycle_add <string> <string>)

Usage: sv_mapcycle_add <mapname> <variantname>
Add a new game to the end of the mapcycle file

(sv_mapcycle_begin)

Restart or begin playing the currently loaded mapcycle file

(sv_mapcycle_del <long>)

Usage: sv_mapcycle_del <index>
Removes the game at <index>. Will not affect running games.

(sv_maplist [substring])

Display a list of maps, matching an optional substring.

(sv_map_next)

(Server Only) Abort the current game and begin the next game in the playlist

(sv_map_reset)

(Server Only) Reset the current game

(sv_maxplayers [short])
(sv_maxplayers 10)

Sets the maximum number of players (between 1 and 16). If no value is given, displays the current value.

(sv_motd [motd file name])

Sets the server message of the day file name. If no name is given, displays thecurrent motd file name. Set to "" to turn motd off.

(sv_name [name])
(sv_name)
(sv_name "yousuck")

Sets the name of the server. If no name is given, displays the current name.

(sv_parameters_dump)

Dumps out the local parameter configuration to parameters.cfg file

(sv_parameters_reload)

(Server Only) Reloads the parameters.cfg file

(sv_password [password])
(sv_password)
(sv_password "1234")

Sets the server password. If no password is given, displays the current password.

(sv_players)

(Server Only) Prints (not returns) a list of players in the current game

(sv_rcon_password [remote console password])

Sets the server remote console password. If no password is given, displays thecurrent password. Enter "" to disable rcon.

(sv_say <string>)

Usage: "sv_say "Send a message to users

(sv_single_flag_force_reset [boolean])

Force the flag to reset in single flag CTF games when the timer expires, even if held by a player.If not specified, displays the current value.

(sv_status)

Shows status of the server

(sv_timelimit ["-1" = default, "0" = infinite, <time in minutes>])

Use to provide a global override for the gametype timelimit setting.

(sv_tk_cooldown [time (#)(s,m)])

Specify a TK point cooldown period, after which players lose a TK point.

(sv_tk_grace [time (#)(s,m)])

Specify the grace period for TK during which you don't get a TK point.

(sv_unban <long>)
(sv_unban 1)

(Server Only) Usage: sv_unban <index>
Removes player at index in the banlist. Use sv_banlist to find the index.

(<void> switch_bsp <short>)
(switch_bsp 0)

Switches to a different structure bsp

(<void> TestPrintBool <string> <boolean>)

Prints the specified boolean with the format <string> = <boolean> to the Shell. Currently this does not work.

(<void> TestPrintReal <string> <real>)

Prints the specified real with the format <string> = <real> to the Shell. Currently this does not work.

(texture_cache_flush)

Don't make me kick your ass

(thread_sleep <long>)

Sleeps the calling thread for the specified number of ms.

(<void> time_code_reset)

Resets the time code timer

(<void> time_code_show <boolean>)
(time_code_show true)
(time_code_show false)

Shows the time code timer

(<void> time_code_start <boolean>)
(time_code_start true)
(time_code_start false)

Starts/stops the time code timer

(track_remote_player_position_updates <string>)

Sets the name of the remote player whose position update are to be tracked.

(<void> ui_widget_show_path <boolean>)
(ui_widget_show_path true)
(ui_widget_show_path false)
(<void> unbind <string> <string>)

Unbinds an input device/button combination

(<unit> unit <object>)
(unit (list_get (players) 0))

Converts an object to a unit

(<void> units_set_current_vitality <object_list> <real> <real>)
(units_set_current_vitality (players) 75 75)

Sets a group of units' current body and shield vitality

(<void> units_set_desired_flashlight_state <object_list> <boolean>)
(units_set_desired_flashlight_state (players) true)
(units_set_desired_flashlight_state (players) false)

Sets the units' desired flashlight state

(<void> units_set_maximum_vitality <object_list> <real> <real>)
(units_set_maximum_vitality (players) 75 75)

Sets a group of units' maximum body and shield vitality

(<void> unit_aim_without_turning <unit> <boolean>)

Allows a unit to aim in place without turning

(<void> unit_close <unit>)

Closes the hatches on a given unit

(<boolean> unit_custom_animation_at_frame <unit> <animation_graph> <string> <boolean> <short>)

Starts a custom animation playing on a unit at a specific frame index (interpolates into animation if next to last parameter is true).

(<void> unit_doesnt_drop_items <object_list>)
(unit_doesnt_drop_items (players))

Prevents any of the given units from dropping weapons or grenades when they die

(<void> unit_enter_vehicle <unit> <vehicle> <string>)
(unit_enter_vehicle (player0) warthog_mp_2 "gunner")

Puts the specified unit in the specified vehicle (in the named seat)

(<void> unit_exit_vehicle <unit>)

Makes a unit exit its vehicle

(<boolean> unit_get_current_flashlight_state <unit>)
(unit_get_current_flashlight_state (player0))

Gets the unit's current flashlight state

(<short> unit_get_custom_animation_time <unit>)
(unit_get_custom_animation_time chief_insertion)

Returns the number of ticks remaining in a unit's custom animation (or zero, if the animation is over). This function intentionally returns a value 2 frames lower than the actual remaining frame count so scripts waiting for the animation to end can do something before it's over.

(<real> unit_get_health <unit>)
(unit_get_health (player0))

Returns the health of the given unit as a real between 0 and 1]. Returns -1 if the unit does not exist.

(<real> unit_get_shield <unit>)
(unit_get_shield (player0))

Returns the shield of the given unit as a real between 0 and 1. Returns -1 if the unit does not exist.

(<short> unit_get_total_grenade_count <unit>)
(unit_get_total_grenade_count (player0))

Returns the total number of grenades for the given unit, or 0 if the unit does not exist.

(<boolean> unit_has_weapon <unit> <object_definition>)
(unit_has_weapon (player0) plasma_cannon)

Returns true if the has as a weapon, false otherwise

(<boolean> unit_has_weapon_readied <unit> <object_definition>)
(unit_has_weapon_readied (player0) plasma_cannon)

Returns true if the has as the primary weapon, false otherwise

(<void> unit_impervious <object_list> <boolean>)
(unit_impervious (players) true)
(unit_impervious (players) false)

Prevents any of the given units from being knocked around or playing ping animations

(<boolean> unit_is_playing_custom_animation <unit>)

Returns true if the given unit is still playing a custom animation

(<void> unit_kill <unit>)

Kills a given unit, no saving throw. This will crash pre-H1A MCC versions of the game if the unit doesn't exist.

(<void> unit_kill_silent <unit>)

Kills a given unit silently (doesn't make them play their normal death animation or sound). This will crash pre-H1A MCC versions of the game if the unit doesn't exist.

(<void> unit_open <unit>)

Opens the hatches on the given unit

(<void> unit_set_current_vitality <unit> <real> <real>)

Sets a unit's current body and shield vitality

(<void> unit_set_desired_flashlight_state <unit> <boolean>)
(unit_set_desired_flashlight_state (player0) true)
(unit_set_desired_flashlight_state (player0) false)

Turns the unit's flashlight on or off

(<void> unit_set_emotion <unit> <short>)

Sets a unit's facial expression (-1 is none, other values depend on unit)

(<void> unit_set_emotion_animation <unit> <string>)

Sets the emotion animation to be used for the given unit

(<void> unit_set_enterable_by_player <unit> <boolean>)
(unit_set_enterable_by_player warthog_mp_3 true)
(unit_set_enterable_by_player warthog_mp_3 false)

Can be used to prevent the player from entering a vehicle

(<void> unit_set_maximum_vitality <unit> <real> <real>)

Sets a unit's maximum body and shield vitality

(<void> unit_set_seat <unit> <string>)
(unit_set_seat (player0) "driver")

This unit will assume the named seat

(<boolean> unit_solo_player_integrated_night_vision_is_active)

Returns whether the night-vision mode could be activated via the flashlight button

(<void> unit_stop_custom_animation <unit>)

Stops the custom animation running on the given unit

(<void> unit_suspended <unit> <boolean>)
(unit_suspended (player0) true)
(unit_suspended (player0) false)

Stops gravity from working on the given unit

(<unit> vehicle_driver <unit>)
(vehicle_driver the_ghost)

Returns the driver of a vehicle

(<unit> vehicle_gunner <unit>)
(vehicle_gunner the_warthog)

Returns the gunner of a vehicle

(<void> vehicle_hover <vehicle> <boolean>)
(vehicle_hover "vehicles\warthog\warthog" true)
(vehicle_hover "vehicles\warthog\warthog" false)

Stops the vehicle from running real physics and runs fake hovering physics instead

(<short> vehicle_load_magic <unit> <string> <object_list>)
(vehicle_load_magic pelican_1 "" (players))

Makes a list of units (named or by encounter) magically get into a vehicle, in the substring-specified seats (e.g. "CD-passenger". Empty string matches all seats).

(<object_list> vehicle_riders <unit>)
(vehicle_riders the_tanks)

Returns a list of all riders in a vehicle

(<boolean> vehicle_test_seat <vehicle> <string> <unit>)
(vehicle_test_seat banshee_mp_1 "driver" (player0))

Tests whether the named seat has a specified unit in it

(<boolean> vehicle_test_seat_list <vehicle> <string> <object_list>)
(vehicle_test_seat_list ghost_mp_2 "driver" (players))

Tests whether the named seat has an object in the object list

(<short> vehicle_unload <unit> <string>)
(vehicle_unload hog w-driver)

Makes units get out of a vehicle from the substring-specified seats (e.g. "CD-passenger". Empty string matches all seats).

(<void> version)

Prints the build version

(<void> volume_teleport_players_not_inside <trigger_volume> <cutscene_flag>)
(volume_teleport_players_not_inside hidden_trigger omgtelprot)

Moves all players outside a specified trigger volume to a specified flag

(<boolean> volume_test_object <trigger_volume> <object>)
(volume_test_object trig_volume1 (player0))

Returns true if the specified object is within the specified volume

(<boolean> volume_test_objects <trigger_volume> <object_list>)
(volume_test_objects trig_volume2 (players))

Returns true if any of the specified objects are within the specified volume

(<boolean> volume_test_objects_all <trigger_volume> <object_list>)
(volume_test_objects_all trig_volume2 (players))

Returns true if all of the specified objects are within the specified volume

External globals

Global

(ai_debug_ballistic_lineoffire_freeze)
(ai_debug_blind)
(ai_debug_communication_focus_enable)
(ai_debug_communication_random_disabled)
(ai_debug_communication_timeout_disabled)
(ai_debug_communication_unit_repeat_disabled)
(ai_debug_deaf)
(ai_debug_disable_wounded_sounds)
(ai_debug_evaluate_all_positions)
(ai_debug_fast_los)
(ai_debug_flee_always)
(ai_debug_force_all_active)
(ai_debug_force_crouch)
(ai_debug_force_vocalizations)
(ai_debug_ignore_player)
(ai_debug_invisible_player)
(ai_debug_oversteer_disable)
(ai_debug_path)
(ai_debug_path_accept_radius)
(ai_debug_path_attractor)
(ai_debug_path_attractor_radius)
(ai_debug_path_attractor_weight)
(ai_debug_path_disable_obstacle_avoidance)
(ai_debug_path_disable_smoothing)
(ai_debug_path_end_freeze)
(ai_debug_path_flood)
(ai_debug_path_maximum_radius)
(ai_debug_path_start_freeze)
(ai_fix_actor_variants)
(ai_fix_defending_guard_firing_positions)
(ai_print_acknowledgement)
(ai_print_allegiance)
(ai_print_automatic_migration)
(ai_print_bsp_transition)
(ai_print_command_lists)
(ai_print_communication)
(ai_print_communication_player)
(ai_print_conversations)
(ai_print_damage_modifiers [boolean])

When an encounter is selected, damage modifiers are logged at the bottom of the screen.

(ai_print_evaluation_statistics)
(ai_print_killing_sprees)
(ai_print_lost_speech)
(ai_print_major_upgrade)
(ai_print_migration)
(ai_print_oversteer)
(ai_print_placement)
(ai_print_pursuit_checks)
(ai_print_respawn)
(ai_print_rules)
(ai_print_rule_values)
(ai_print_scripting)
(ai_print_secondary_looking)
(ai_print_speech)
(ai_print_speech_timers)
(ai_print_surprise)
(ai_print_uncovering)
(ai_print_unfinished_paths)
(ai_print_vocalizations)
(ai_profile_disable)
(ai_profile_random)
(ai_render)
(ai_render_activation)
(ai_render_active_cover_seeking)
(ai_render_aiming_validity)
(ai_render_aiming_vectors)
(ai_render_all_actors)
(ai_render_audibility)
(ai_render_ballistic_lineoffire)
(ai_render_burst_geometry)
(ai_render_charge_decisions)
(ai_render_control)
(ai_render_current_state)
(ai_render_danger_zones)
(ai_render_detailed_state)
(ai_render_dialogue_variants)
(ai_render_emotions)
(ai_render_encounter_activeregion)
(ai_render_evaluations)
(ai_render_firing_positions)
(ai_render_grenade_decisions)
(ai_render_gun_positions)
(ai_render_idle_look)
(ai_render_inactive_actors)
(ai_render_lineoffire)
(ai_render_lineoffire_crouching)
(ai_render_lineofsight)
(ai_render_melee_check)
(ai_render_paths)
(ai_render_paths_avoidance_obstacles)
(ai_render_paths_avoidance_segment)
(ai_render_paths_avoided)
(ai_render_paths_current)
(ai_render_paths_destination)
(ai_render_paths_failed)
(ai_render_paths_nodes)
(ai_render_paths_nodes_all)
(ai_render_paths_nodes_closest)
(ai_render_paths_nodes_costs)
(ai_render_paths_nodes_polygons)
(ai_render_paths_raw)
(ai_render_paths_selected_only)
(ai_render_paths_smoothed)
(ai_render_player_aiming_blocked)
(ai_render_player_ratings)
(ai_render_postcombat)
(ai_render_projectile_aiming)
(ai_render_props)
(ai_render_props_no_friends)
(ai_render_props_target_weight)
(ai_render_props_unopposable)
(ai_render_props_unreachable)
(ai_render_props_web)
(ai_render_pursuit)
(ai_render_recent_damage)
(ai_render_secondary_looking)
(ai_render_shooting)
(ai_render_spatial_effects)
(ai_render_speech)
(ai_render_states)
(ai_render_support_surfaces)
(ai_render_targets)
(ai_render_targets_last_visible)
(ai_render_teams)
(ai_render_threats)
(ai_render_trigger)
(ai_render_vector_avoidance)
(ai_render_vector_avoidance_avoid_t)
(ai_render_vector_avoidance_clear_time)
(ai_render_vector_avoidance_intermediate)
(ai_render_vector_avoidance_objects)
(ai_render_vector_avoidance_rays)
(ai_render_vector_avoidance_sense_t)
(ai_render_vector_avoidance_weights)
(ai_render_vehicles_enterable)
(ai_render_vehicle_avoidance)
(ai_render_vision_cones)
(ai_render_vitality)
(ai_show)
(ai_show_actors)
(ai_show_line_of_sight)
(ai_show_paths)
(ai_show_prop_types)
(ai_show_sound_distance)
(ai_show_stats)
(ai_show_swarms)
(allow_client_side_weapon_projectiles)
(allow_out_of_sync)
(biped_incremental_rate [short])

Unknown purpose. Default value is 7.

(breakable_surfaces [boolean])

Enables or disables the breakable surfaces effect. If disabled, breakable surfaces will simply disappear rather than shatter.

(cheat_bottomless_clip [boolean])

Prevents player weapons from generating heat and depleting ammo rounds. Battery will still be depleted.

(cheat_bump_possession [boolean])

Allows the player to "possess" other characters by walking into them. The player will then be able to control the possessed character and see the world from its view.

(cheat_controller [boolean])

If enabled, the game loads a cheats.txt file which binds controller buttons to console commands. Known only to work in Halo beta versions.

(cheat_deathless_player [boolean])

Prevents players from being killed, including all multiplayer clients if enabled on the server. Although the players can still take damage, being reduced to 0 health or falling long distances will not kill them. This also prevents players from being killed with unit_kill.

(cheat_infinite_ammo [boolean])

Prevents weapons from depleting battery or reserve ammo. Weapons will still generate heat. Magazine-based weapons will still empty their current magazine, but reloading will not use up any reserve ammo.

(cheat_jetpack [boolean])

If enabled, players take no fall damage. In MCC, holding crouch while mid-air will also cause the player to hover and holding jump will cause you to fly.

(cheat_medusa [boolean])

Causes enemy AI to be killed instantly if they "look" at or become aware of the player. This does not include allies like Marines, even after allegiance has been broken by killing them. It is unknown if the command is hard-coded to kill certain AI types.

(cheat_omnipotent [boolean])

The player will instantly kill any unit they damage, including destroying vehicles. Even multiplayer vehicles can be "killed" and rendered inoperable.

(cheat_reflexive_damage_effects [boolean])

Any damage_effect applied to other characters, even dead ones, will appear on the player's screen regardless of who applied the damage. For example, if an Elite shoots a flood infection form, the player will see their screen flash blue and damage direction indicators appear. The player takes no actual damage. This can be helpful for testing visual effects.

(cheat_super_jump [boolean])

Players jump to an extreme height, and will die of fall damage if cheat_jetpack or cheat_deathless_player are not used. This can be used to quickly reach areas when testing maps.

(client_log_destination [long])

Unknown purpose.

(cls)

Clears the screen of developer console output and tab completions.

(cl_remote_player_action_queue_limit [long])

Unknown purpose. May be used to limit how many total actions from clients are allowed to be queued on the server. Defaults to 2.

(cl_remote_player_action_queue_tick_limit [long])

Unknown purpose. May be used to limit how long actions from clients are allowed to be queued on the server before they are ignored. Defaults to 6.

(collision_debug [boolean])

If enabled, the center of the view is used to test for collisions. A red normal-aligned marker will be shown where the ray from the center of view collides with a surface. The collision surface itself, whether BSP or model, will be outline in red. Information about the collision surface will be shown in the top left corner of the screen, including plane and surface indices from the BSP structure, material type, and how many degrees the surface's normal differs from vertical.

The types of surfaces which the test ray hits or ignores can be toggled with the collision_debug_flag_* commands. The maximum range of the ray is controlled with collision_debug_length.

(collision_debug_features [boolean])

Toggles the display of collision features near the camera, which can be spheres (red), cylinders (blue), or prisms (green). Collision size can be adjusted with collision_debug_width and collision_debug_height. The test point can be frozen in place using collision_debug_repeat.

(collision_debug_flag_back_facing_surfaces [boolean])

When collision_debug or collision_debug_spray are enabled, causes the test rays to collide with back-facing surfaces (those facing away from the camera). Defaults to false.

(collision_debug_flag_front_facing_surfaces [boolean])

When collision_debug or collision_debug_spray are enabled, causes the test rays to collide with front-facing surfaces (those facing towards the camera). Defaults to true. Disabling this will have no effect unless collision_debug_flag_back_facing_surfaces is also enabled.

(collision_debug_flag_ignore_breakable_surfaces [boolean])

Toggles if collision debug rays ignore breakable surfaces. Defaults to false.

(collision_debug_flag_ignore_invisible_surfaces [boolean])

Toggles if collision debug rays ignore invisible surfaces (e.g. collision-only player clipping). Defaults to true.

(collision_debug_flag_ignore_two_sided_surfaces [boolean])

Toggles if collision debug rays ignore two-sided surfaces. Defaults to false.

(collision_debug_flag_media [boolean])

Toggles if collision debug rays collide with water surfaces.

(collision_debug_flag_objects [boolean])

Toggles if collision debug rays collide with any class of object's collision geometry. This setting will be ignored if any more specific object flag is enabled, such as collision_debug_flag_objects_equipment.

(collision_debug_flag_objects_bipeds [boolean])

Toggles if collision debug rays collide with bipeds.

(collision_debug_flag_objects_controls [boolean])

Toggles if collision debug rays collide with device_control.

(collision_debug_flag_objects_equipment [boolean])

Toggles if collision debug rays collide with equipment.

(collision_debug_flag_objects_light_fixtures [boolean])

Toggles if collision debug rays collide with device_light_fixture.

(collision_debug_flag_objects_machines [boolean])

Toggles if collision debug rays collide with device_machine.

(collision_debug_flag_objects_placeholders [boolean])

Toggles if collision debug rays collide with placeholders. This would require a custom placeholder to have an effect, since the placeholder tags that come with the HEK have no collision model.

(collision_debug_flag_objects_projectiles [boolean])

Toggles if collision debug rays collide with projectiles. Note that most projectiles do not have a collision model.

(collision_debug_flag_objects_scenery [boolean])

Toggles if collision debug rays collide with scenery.

(collision_debug_flag_objects_vehicles [boolean])

Toggles if collision debug rays collide with vehicles.

(collision_debug_flag_objects_weapons [boolean])

Toggles if collision debug rays collide with weapons.

(collision_debug_flag_skip_passthrough_bipeds [boolean])

Unknown purpose. Does not seem to affect collision ray tests against bipeds.

(collision_debug_flag_structure [boolean])

Toggles if collision debug rays collide with the structure BSP. Collisions with model_collision_geometry BSPs are unaffected.

(collision_debug_flag_try_to_keep_location_valid [boolean])

Unknown purpose.

(collision_debug_flag_use_vehicle_physics [boolean])

If enabled, collision debug rays will collide with vehicle physics spheres rather than their model_collision_geometry.

(collision_debug_height <real>)

When and collision_debug_features is enabled, controls the height in world units of collision features. Defaults to 0.0.

(collision_debug_length [real])

Sets the maximum test ray length for collision_debug and collision_debug_spray in world units. When the ray reaches this maxmimum, a floating green marker will be shown for collision_debug while spray rays will simply not be shown. Defaults to 100.0.

(collision_debug_phantom_bsp [boolean])

Causes a floating pink cube and label "phantom bsp" to appear whenever a test ray from the center of the screen intersects with phantom BSP. It can be helpful to pair this with collision_debug_spray.

(collision_debug_point_x)
(collision_debug_point_y)
(collision_debug_point_z)
(collision_debug_repeat [boolean])

Setting this to true will freeze the test rays and points for collision_debug, collision_debug_phantom_bsp, collision_debug_spray, and collision_debug_features, allowing you to move and view the debug information from another angle.

(collision_debug_spray [boolean])

Setting this to true will cause collision ray tests to be performed in a dense grid from the viewport. This operates independently of the collision_debug setting, and only the destination hit markers are shown. Can be affected by collision flags, length, and frozen with collision_debug_repeat.

(collision_debug_vector_i)
(collision_debug_vector_j)
(collision_debug_vector_k)
(collision_debug_width [real])

When collision_debug and collision_debug_features are enabled, controls the width in world units of collision features. Defaults to 0.0.

(collision_log_detailed)
(collision_log_extended)
(collision_log_render)
(collision_log_time)
(collision_log_totals_only)
(console_dump_to_file)
(controls_enable_crouch [boolean])

No visible effect. May be related to controller input during development.

(controls_enable_doubled_spin [boolean])

No visible effect. May be related to controller input during development.

(controls_swapped [boolean])

No visible effect. May be related to controller input during development.

(controls_swap_doubled_spin_state [boolean])

No visible effect. May be related to controller input during development.

(debug_bink)
(debug_biped_limp_body_disable [boolean])

When set to true, pauses the biped limp body system, which is responsible for moving model nodes towards the ground when an eligible biped has died and has come to rest on the structure BSP. Bipeds will lay roughly at the right angle, but they will not conform to the shape of the surfaces below them. If set to false, the limp body system will take effect again even for existing dead bipeds.

(debug_biped_physics)
(debug_biped_skip_collision [boolean])

If true, disables collision checks for bipeds. They will be able to keep "walking" horizontally, but cannot jump or collide with any objects the BSP, and are unaffected by gravity. They will still be forced to stay crouched if crouching below or within a collideable surface.

(debug_biped_skip_update)
(debug_bsp [boolean])

Toggles the display of structure BSP node traversal for the camera location. At each level, the node and plane indices are shown as well as a + or - symbol indicating if the camera was on the front or back side of the plane.

(debug_camera [boolean])

Shows debug information about the camera in the top left corner, including:

  • 3D coordinates in world units
  • BSP leaf and cluster indices
  • Ground point coordinates and BSP surface index (point directly below the camera on the ground)
  • Facing direction (yaw angle)
  • Tag path of the shader pointed at by the camera. The surface must be collideable and this feature cannot be configured with collision debug flags.
(debug_collision_skip_objects [boolean])

Disables collision tests against objects. For example, projectiles will pass through scenery and bipeds through non-moving vehicles. Vehicle-to-vehicle collision still happens, as does moving vehicle against biped. Everything still collides with the BSP.

(debug_collision_skip_vectors [boolean])

Globally disables vector/ray collision tests, with the following observed effects:

  • Projectiles, particles and moving items will pass through everything, even the BSP.
  • Melees will have no effect.
  • Vehicle suspension, such as the Warthog's wheels, will hang.
  • Object lighting will be unable to determine if an object exists in direct sunlight from the sky, resulting in incorrect lighting and shadow direction when an object moves.
  • Sounds behind obstructions will not be muffled.
(debug_damage [boolean])

When enabled, looking at any collideable object and pressing Space will display the object's body and shield vitalities on the HUD.

(debug_damage_taken [boolean])

Logs damage to the player as messages at the bottom of the screen. Includes body and shield vitality and the damage source.

(debug_decals)
(debug_detail_objects [boolean])

When enabled, active detail object cells will be outlined in blue and individual detail objects are highlighted with red markers.

(debug_effects_nonviolent)
(debug_fog_planes [boolean])

Outlines the edges of fog plane volumes with white lines.

(debug_framerate [boolean])

No visible effect. Replaced with the Ctrl + F12 hotkey?

(debug_frustum [boolean])

Draws a series of red lines between corners and midpoints of the screen within the view frustrum. These can be seen to intersect with level geometry.

(debug_game_save)
(debug_inactive_objects)
(debug_input [boolean])

Displays a series of ticks at the top of the screen which do not seem to be affected by player input. May be a broken feature?

(debug_input_target)
(debug_leaf_index)
(debug_leaf_portals)
(debug_leaf_portal_index)
(debug_lights)
(debug_looping_sound [boolean])

Displays active sound_looping with cyan spheres for their maxmimum distance and blue spheres for their minimum.

(debug_material_effects)
(debug_motion_sensor_draw_all_units)
(debug_no_drawing [boolean])

If enabled, completely stops the game from rendering new frames. This includes preventing the rendering of the developer console itself, so disabling this feature can be tricky. If you think the console is still open, press Up to re-enter the previous command, then replace its final argument with true or 1 and press Enter to resume rendering.

(debug_no_frustum_clip)
(debug_objects [boolean])

When enabled, toggles if debug information is visible on objects (such as bounding sphere and collision models). Individual debug features can be toggled with the debug_objects_* commands.

(debug_objects_biped_autoaim_pills [boolean])

When debug_objects is enabled, displays biped autoaim pills in red.

(debug_objects_biped_messages)
(debug_objects_biped_physics_pills [boolean])

When debug_objects is enabled, displays biped physics pills in white.

(debug_objects_bounding_spheres [boolean])

When debug_objects is enabled, displays yellow spheres for object bounding radius. The sphere will be black when the object is inactive. This setting defaults to true in H1CE Sapien but not H1A Sapien.

(debug_objects_collision_models [boolean])

When debug_objects is enabled, displays green meshes for object collision models. This setting defaults to true in H1CE Sapien but not H1A Sapien.

(debug_objects_devices)
(debug_objects_equipment_messages)
(debug_objects_names [boolean])

Toggles the display of object names, for named objects. The names are shown in purple.

(debug_objects_pathfinding_spheres [boolean])

When debug_objects is enabled, displays object pathfinding spheres in blue.

(debug_objects_physics)
(debug_objects_position_velocity)
(debug_objects_projectile_messages)
(debug_objects_root_node)
(debug_objects_unit_mouth_apeture)
(debug_objects_unit_seats)
(debug_objects_unit_vectors)
(debug_objects_vehicle_messages)
(debug_objects_vehicle_powered_mass_points)
(debug_objects_weapon_messages)
(debug_object_garbage_collection)
(debug_object_lights)
(debug_obstacle_path)
(debug_obstacle_path_goal_point_x)
(debug_obstacle_path_goal_point_y)
(debug_obstacle_path_goal_surface_index)
(debug_obstacle_path_on_failure)
(debug_obstacle_path_start_point_x)
(debug_obstacle_path_start_point_y)
(debug_obstacle_path_start_surface_index)
(debug_permanent_decals)
(debug_physics_disable_penetration_freeze)
(debug_player)
(debug_player_color [short])

Sets the player's armour color in non-team games. The setting will take effect when the player respawns. The default value -1 causes the player's profile setting to be used.

(debug_player_teleport [boolean])

Displays a green physics pill where a co-op player would spawn if safe.

(debug_point_physics [boolean])

Renders green or red markers wherever point_physics are being simulated, except for the weather_particle_system. This includes flags, antenna, contrails, particles, and particle_systems. It can help to enable framerate_throttle for these markers to render consistently.

(debug_portals [boolean])

Draws structure BSP portals as red outlines.

(debug_pvs <boolean>)

Alias of debug_portals, but with a mandatory argument.

(debug_recording)
(debug_recording_newlines)
(debug_render_freeze [boolean])

Freezes the rendering viewport at the current camera location. The camera may still move after frozen, but all portal-based culling, skybox origin, FP models, and some debug overlays will still be based on the previously frozen camera location. This command is useful for inspecting portal behaviour where the camera cannot directly see.

(debug_score [long])

Unknown purpose. Does not affect the player's multiplayer score.

(debug_scripting [boolean])

Displays a table of active script threads, with their name, sleep time, and currently executing function.

(debug_sound [boolean])

Sound sources will be labeled in 3D with their tag path and a their minimum and maximum distances shown as red and yellow spheres, respectively.

(debug_sound_cache [boolean])

If enabled, sound cache statistics will be shown in the top left corner of the screen, including how full it is.

(debug_sound_cache_graph [boolean])

Shows a graph of sound cache slots at the top of the screen, similar to texture_cache_graph. Can be used in Sapien/debug builds.

(debug_sound_channels [boolean])

Displays the utilization of sound channel limits in the top left corner of the screen.

(debug_sound_channels_detail [boolean])

Displays two columns of number pairs while sounds play with an unknown meaning.

(debug_sound_environment [boolean])

If enabled, shows the tag path of the cluster's current sound_environment.

(debug_sound_hardware [boolean])

Unknown purpose.

(debug_sprites [boolean])

Renders 2D sprite effects like particles as simple white triangle outlines instead of with textures. This also displays some sprite statistics at the top of the screen.

(debug_structure [boolean])

When enbled, all scenario_structure_bsp collision surfaces will be rendered with green outlines.

(debug_texture_cache [boolean])

If enabled, causes red messages to appear in the HUD which are related to texture and/or sound cache events. Exact meaning unknown.

(debug_trigger_volumes [boolean])

Renders all scenario trigger volumes and their names.

(debug_unit_all_animations)
(debug_unit_animations)
(debug_unit_illumination)
(developer_mode)
(director_camera_switching)
(director_camera_switch_fast)
(disconnect)

Force-disconnects from the current multiplayer session and returns to the menu. This can be handy for quickly leaving a server after a game has ended without having to wait for the "Quit" option in the post-game lobby.

(display_framerate [boolean])

No visible effect.

(display_precache_progress)
(effects_corpse_nonviolent [boolean])

Toggles if shooting bodies produces additional blood effects.

(equipment_incremental_rate)
(error_suppress_all)
(f0)
(f1)
(f2)
(f3)
(f4)
(f5)
(find_all_fucked_up_shit)
(force_all_player_views_to_default_player)
(framerate_lock)
(framerate_throttle)
(freeze_flying_camera)
(global_connection_dont_timeout)
(help [string])

Prints help information for a function name.

(hud_filter [boolean])

Unknown purpose.

(leaf_to_leaf_latency [boolean])

If enabled, causes the game to perform server latency analysis. Periodically, 20 samples will be taken and statistics will appear on the screen.

(local_player_log_level)
(local_player_update_rate)
(local_player_vehicle_update_rate)
(log_server_player_update_history)
(loud_dialog_hack)
(model_animation_bullshit0)
(model_animation_bullshit1)
(model_animation_bullshit2)
(model_animation_bullshit3)
(model_animation_compression)
(model_animation_data_compressed_size)
(model_animation_data_compression_savings_in_bytes)
(model_animation_data_compression_savings_in_bytes_at_import)
(model_animation_data_compression_savings_in_percent)
(model_animation_data_uncompressed_size)
(mouse_acceleration [real])

Controls the amount of mouse input acceleration. Set to 0 for none. Defaults to 0.7.

(multiplayer_draw_teammates_names)
(multiplayer_hit_sound_volume [real])

Sets the gain of the hit sound heard when damage is dealt in multiplayer. Defaults to 0.2.

(network_connect_timeout)
(net_bandwidth)
(net_graph_enabled)
(net_graph_period)
(object_light_ambient_base)
(object_light_ambient_scale)
(object_light_interpolate)
(object_light_secondary_scale)
(object_prediction)
(oddball_baseline_rate)
(pad3)
(pad3_scale)
(player_autoaim)
(player_magnetism)
(player_spawn_count)
(profile_display)
(profile_dump_frames)
(profile_dump_lost_frames)
(profile_graph [boolean])

Broken feature -- causes a crash.

(profile_timebase_ticks)
(projectile_incremental_rate)
(rasterizer_active_camouflage)
(rasterizer_active_camouflage_multipass)
(rasterizer_bump_mapping)
(rasterizer_d3dlight_attenuation0)
(rasterizer_d3dlight_attenuation1)
(rasterizer_d3dlight_attenuation2)
(rasterizer_d3dlight_falloff)
(rasterizer_d3dlight_phi)
(rasterizer_d3dlight_theta)
(rasterizer_debug_geometry)
(rasterizer_debug_geometry_multipass)
(rasterizer_debug_meter_shader)
(rasterizer_debug_model_lod [short])

Forces certain object LODs to be used. A value of 4 is the highest quality, and 0 the worst. The default value -1 returns to automatic behaviour.

(rasterizer_debug_model_vertices)
(rasterizer_debug_transparents)
(rasterizer_detail_objects [boolean])

Toggles the rendering of detail objects.

(rasterizer_detail_objects_offset_multiplier [boolean])

Defaults to 0.4. No visible effect on detail objects when changed.

(rasterizer_draw_first_person_weapon_first [boolean])

No visible effect.

(rasterizer_DXTC_noise)
(rasterizer_dynamic_lit_geometry)
(rasterizer_dynamic_screen_geometry)
(rasterizer_dynamic_unlit_geometry)
(rasterizer_effects_level)
(rasterizer_environment)
(rasterizer_environment_alpha_testing)
(rasterizer_environment_decals)
(rasterizer_environment_diffuse_lights)
(rasterizer_environment_diffuse_textures [boolean])

Disables diffuse textures in the BSP, showing just the lightmap shading and specular components.

(rasterizer_environment_fog)

Toggles environmental sky fog and fog plane colors. Does not affect fog screen.

(rasterizer_environment_fog_screen [boolean])

Toggles the cloudy fog screen effect of fog planes, seen in the levels a30, c10, and c40.

(rasterizer_environment_lightmaps [boolean])

Toggles the rendering of structure BSP lightmaps. When disabled, the level will be completely invisible.

(rasterizer_environment_reflections)
(rasterizer_environment_reflection_lightmap_mask)
(rasterizer_environment_reflection_mirrors)
(rasterizer_environment_shadows)
(rasterizer_environment_specular_lightmaps)
(rasterizer_environment_specular_lights)
(rasterizer_environment_specular_mask)
(rasterizer_environment_transparents)
(rasterizer_far_clip_distance [real])

Sets the far clip distance, which is the maximum draw distance (world units). Defaults to 1024.0.

(rasterizer_filthy_decal_fog_hack)
(rasterizer_first_person_weapon_far_clip_distance [real])

Sets the far clip distance, for the first person arms and weapon. Defaults to 1024.0. The world clipping distance can be set with rasterizer_far_clip_distance.

(rasterizer_first_person_weapon_near_clip_distance [real])

Sets the near clip distance of the first person arms and weapon. Defaults to 0.011719.

(rasterizer_floating_point_zbuffer)
(rasterizer_fog_atmosphere)
(rasterizer_fog_plane [boolea])

Toggles the rendering of fog.

(rasterizer_fps)
(rasterizer_framerate_stabilization)
(rasterizer_framerate_throttle)
(rasterizer_frame_bounds_bottom)
(rasterizer_frame_bounds_left)
(rasterizer_frame_bounds_right)
(rasterizer_frame_bounds_top)
(rasterizer_frame_drop_ms)
(rasterizer_hud_motion_sensor)
(rasterizer_lens_flares)
(rasterizer_lens_flares_occlusion)
(rasterizer_lens_flares_occlusion_debug)
(rasterizer_lightmaps_filtering [boolean])

Enables or disables texture filtering for lightmaps. When disabled, lightmaps will appear blocky and jagged. Has no effect in H1A.

(rasterizer_lightmaps_incident_radiosity [boolean])

No visible effect.

(rasterizer_lightmap_ambient [real])

Defaults to 1.0. No visible effect when changed.

(rasterizer_lightmap_mode [short])

If the mode is 0, the default, BSP specular reflections will be multiplied by the lightmap. Any other value results in reflections being unaltered.

(rasterizer_mode)
(rasterizer_models)
(rasterizer_model_lighting_ambient)
(rasterizer_model_transparents)
(rasterizer_near_clip_distance [real])

Sets the near clip distance, which is the minimum draw distance (world units). Defaults to 0.0625. This does not appear to work fully, as the near clip distance will only be adjusted for one frame.

(rasterizer_plasma_energy)
(rasterizer_profile_log)
(rasterizer_profile_objectlock_time)
(rasterizer_profile_print_locks)
(rasterizer_ray_of_buddha [boolean])

Toggles the sky's sun effect.

(rasterizer_refresh_rate)
(rasterizer_safe_frame_bounds)
(rasterizer_screen_effects)
(rasterizer_screen_flashes)
(rasterizer_secondary_render_target_debug)
(rasterizer_shadows_convolution [boolean])

Toggles the blurring of dynamic object shadows. Defaults to true.

(rasterizer_shadows_debug [boolean])

When enabled, all dynamic object shadow maps will be rendered with a partially-shadowed background, making their rectangular boundaries visible. The size of this rectangle depends on the object's bounding radius.

(rasterizer_smart [boolean])

No visible effect.

(rasterizer_soft_filter [boolean])

No visible effect.

(rasterizer_splitscreen_VB_optimization)
(rasterizer_stats [boolean])

Displays framerate statistics on the screen, including average, min, max, and dropped.

(rasterizer_stencil_mask)
(rasterizer_transparent_pixel_counter)
(rasterizer_water)
(rasterizer_water_mipmapping)
(rasterizer_wireframe [boolean])

Toggles rendering in wireframe mode, which only draws pixels along triangle edges rather than filling trangles. This can be useful for troubleshooting portals.

(rasterizer_zbias)
(rasterizer_zoffset [real])

Controls how far away from surfaces new decals are generated, e.g. for projectile impacts. Defaults to 0.003906. The units are not world units.

(rasterizer_zsprites)
(recover_saved_games_hack)
(remote_player_action_baseline_update_rate)
(remote_player_action_update_rate)
(remote_player_log_level)
(remote_player_position_baseline_update_rate)
(remote_player_position_update_rate)
(remote_player_vehicle_baseline_update_rate)
(remote_player_vehicle_update_rate)
(render_contrails)
(render_model_index_counts)
(render_model_markers [boolean])

If enabled, all model markers will be rendered in 3D with their name and rotation axis.

(render_model_nodes [boolean])

If enabled, all model skeletons will be rendered. Nodes are shown as axis gizmos and connected to their parents by white lines.

(render_model_no_geometry)
(render_model_vertex_counts)
(render_particles)
(render_psystems)
(render_shadows)
(render_wsystems)
(rider_ejection [boolean])

Toggles if bipeds are ejected from overturned vehicles, including players and AI characters. Defaults to true.

(run_game_scripts)
(screenshot_count)
(screenshot_size)
(slow_server_startup_safety_zone_in_seconds)
(sound_cache_dump_to_file)

Writes the sound cache information from debug_sound_cache and a listing of currently cached sounds to sound_cache_dump.txt.

(sound_cache_size)
(sound_gain_under_dialog)
(sound_obstruction_ratio [real])

Controls how "muffled" sounds are when heard behind an obstruction like the BSP or an object with collision geometry. Defaults to 0.1. A value of 0 means "not muffled", while a value above about 6 effectively mutes them.

(speed_hack_detection)
(speed_hack_log_level)
(structures_use_pvs_for_vs)
(stun_enable)
(sv_client_action_queue_limit)
(sv_client_action_queue_tick_limit)
(sv_mapcycle_timeout)
(sv_public)
(sv_tk_ban)
(temporary_hud [boolean])

Renders a debug HUD with basic weapon information in text and line-drawn circular reticules representing the current error angle (yellow) and autoaim angle (blue, or red if autoaim active). Works in debug builds only.

(terminal_render)
(texture_cache_flush)

Clears all loaded textures from the texture cache. Works in debug builds only.

(texture_cache_graph [boolean])

Toggles a live representation of the texture cache in the top left corner of the screen, depicting which entries are being loaded and evicted. Works in debug builds only.

(texture_cache_list [boolean])

Shows a live list of all bitmap tag paths currently loaded in the texture cache. Works in debug builds only.

(transport_dumping)
(use_new_vehicle_update_scheme)
(use_super_remote_players_action_update)
(vehicle_incremental_rate)
(weapon_incremental_rate)
(weather [boolean])

Toggles the rendering of all weather_particle_system. Defaults to true.

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Ifafudafi (Script limits information)
  • kornman00 (Original Blam Scripting Language Bible, http://www.modacity.net/docs/bslbible/)
  • Mimickal (Additional background on scripting, edits for clarity and extra information)
  • t3h lag (Additional script information (limits, types, functionality, etc...))