Reach's calls, and what doesn't play
Reach's own calls play in any source, as they do in Halo: Reach's game variants, which run through the same interpreter. A mode plays on every game's maps: what a map lacks, such as an object type, a label, a sound or a character, the mode goes without, and the host's log names it.
- Events:
pregameruns beforeinitas a round starts.localruns each tick once for each player, withhud_playerthat player, and the widgets it changes are theirs alone.host migrationanddouble host migrationare read too. - Players:
is_spartan,is_eliteandis_monitor(by the body's model),killer_type_is,get_spree_count,get_scoreboard_pos,assisted_kill_of,get_death_damage_type,get_fireteam,set_fireteam,is_fireteam_leader,get_armor_ability,set_loadout_palette,set_co_op_spawning,set_vehicle_spawning_enabled, the round card calls, and the propertiesfrag_grenadesandplasma_grenades, read and written. - Objects:
set_shapeandset_shape_visibility,set_pickup_permissions,set_spawn_location_permissions,set_progress_bar,set_waypoint_range,set_waypoint_timerandset_waypoint_text,push_upward,add_weaponandremove_weapon,get_orientation,is_out_of_bounds,is_in_use, and the device calls.kill(1), Reach's silent kill, is the same kill askill(0). - The game:
show_message_to,send_incident,play_sound_forandget_random_object; thegame.values such asgame.score_to_winandgame.current_round; and the timersgame.round_timer,game.sudden_death_timerandgame.grace_period_timer, which take a value,reset()andset_ratelike a script's own. A round timer the script writes is the round's clock, and the script ends the round. - Widgets: timer meters,
set_meter_params(timer, t), show a timer's seconds left. Widget text takes%n(a whole number),%s(a value as text; a timer as minutes and seconds),%p(a player),%t(a team's name, itsset_nameor its color's name, as in"You killed %t's VIP"withcurrent_player.team) and%%. Halo: Reach's own game variants write text by Reach's rule. - Round cards: a player's round card is sent to them only when it changes, so a script may write it on every tick.
- Flags: names joined by
|are one constant, as inkiller_type_is(kill | betrayal)or aplace_at_mewithnever_garbage_collect | suppress_effect. - First values: a declaration may start from a script option or one of the game's values as well as a constant:
declare object.timer[0] = script_option[3].
player.give_weapon(object)- The player's body takes that weapon object, as
add_weapongives one. With no player or no object, nothing happens. object.place_between_me_and(other, type, radius)- Makes an object of the type halfway between the two, lying along the line between them, with a cylinder shape of that radius (tenths) as long as the line. Without the other object it makes nothing. Test both first:
if a != no_object and b != no_object then x = a.place_between_me_and(b, type, radius) end. object.face_toward(target, x, y, z)- Turns the object about its own up until it faces the target's position, offset (tenths) along the target's own axes. An attached object, or a target at its own position or straight above or below it, stays as it is.
player.set_fireteam(n)- Puts the player in fireteam 0 to 7. A number outside what Reach takes, such as −1, leaves it as it is.
team.set_co_op_spawning(n),player.set_co_op_spawning(n)- The team's dead players, or that player, spawn beside a living teammate of their fireteam who has been out of combat for 5 seconds, taking a free seat when the teammate is in a vehicle. While they wait, their view follows the teammate they will spawn beside or looks at their spawn location, and the D-pad's up and down (Up and Down on the keyboard) step through their teammates and the spawn locations open to them. A chosen teammate in combat or in a full vehicle keeps them waiting.
object.set_progress_bar(set, timer)- A player in the set standing in the object's zone sees the timer's progress on their HUD, on every PC: Reach's arming meter on Reach's HUD, Halo 3's Assault arming meter on Halo 3's.
player.record_griefer_penalty(n)- Read, and changes nothing.
Reach's objectives and announcer on Halo 3 maps
On Halo 3 and ODST maps, Reach's area, stand and destination use Halo 3's corresponding objective markers. When a mode names Reach objects Halo 3 has none of, such as unsc_data_core and cov_power_module, the game brings the supported weapons, equipment, scenery, crates, vehicles and machines from Reach before the map loads. Where Halo 3 has a vehicle of the same name, such as the Warthog or the Ghost, it is Halo 3's; Reach's others, such as the Revenant, the Falcon and the Sabre, come with their own controls, seats and HUD. It brings the weapons the game type's loadouts and base traits arm players with that Halo 3 lacks too: Invasion's Elite spawns with its plasma repeater, not the plasma pistol alone. A weapon Halo 3 has of the same name stands for the rest.
An item a mode gives a team, such as Invasion's core or a flag or bomb played in its place, takes its team's color on every PC but keeps no owner team, so attackers can pick it up; who may take it is set_pickup_permissions' to decide. Reach's scenario interpolators come from one of Reach's Invasion maps, so set_scenario_interpolator_state plays and Invasion's alarms sound while a territory is being taken. Invasion's Covenant bomb comes from Breakpoint, so Elites on offense carry Reach's own bomb; a script that kills it with kill(0) sets off its blast, seen and heard on every PC, and Halo 3's Assault bomb blasts the same way. A core's carrier may ride in a Warthog's or a Mongoose's passenger seat, as Invasion's traits allow, but drops the core as they sit.
Halo 3's hills, territories, flag returns and bomb plant points keep their own zones in a Reach variant, and a player stands in one by their feet or a point of their body just above them, so a core carried onto a Forge flag return plate set a little above the floor is captured.
Invasion: Boneyard and Invasion: Spire ship with their Animate cinematic objects option on, which waits for their own maps' vault and lift. On a map without them, such as Halo 3's maps, the round plays that option as off, even when Game Options sets it: the core lies free by its marker and can be taken, and a bomb phase gets its bomb. Their own round cards and announcer lines still play at each phase. Reach's own Boneyard and Spire, and Forge maps that place the labeled platforms, keep the set pieces. The host's log says which way each round plays.
The host must have Reach installed and enable Other games' characters in Host Settings (other_game_characters on a server). Players joining also need Reach when the map uses its content. Bodies don't come through object names: use the character choices for them.
play_sound_for, show_message_to and incident calls use Halo 3's matching announcer lines where available. With Reach installed and its content enabled, the remaining lines use Reach's own audio, including Invasion's Spartan and Elite announcers. Without it, those lines are silent. A source's object and sound names count even in branches it never reaches.
Goals without labels. A Reach game type finds the map's goals by what they are, without each being labeled first: a hill answers to koth_hill, a flag stand to ctf_flag_return and as_bomb, and a VIP destination to hh_drop_point. On Reach's own maps the map's placements answer to their own labels alone, as in Reach. Goals Halo 3 has nothing of, such as Invasion's objectives (inv_objective) and core spawns (inv_obj_flag), are placed in Forge: its Objects tab has a Game mode objects category on every map, and a goal's Goal row makes it another game type's goal. Labels you gave in Forge still work. Reach's respawn-zone types and armor abilities are not supplied on Halo 3 maps.
How Reach's game variants play
Halo: Reach's own game variants (MCC's, the Workshop's and those ReachVariantTool writes) run through the same interpreter as a .rmeg, but where Reach's rules and Megalith's differ, a Reach variant plays by Reach's. A .rmeg or .rvt source keeps the rules on the rest of this page.
| In a Reach variant | What it does |
|---|---|
object.max_health, max_shields (written) | The object's own maximum in points, such as an objective's 20,000 shield points, not a percent of its own. =, +=, -=, *= and /= work on what it has, with no upper limit. The points left stay. With no maximum, shields are empty and an object with no health dies. Nothing changes on a dead object. |
object.health, shields (written) | Any number, kept between none and all of its health (none kills it) and between none and four times its shields. |
player.force_into_vehicle(object) | With no object, a seated player is put out of their vehicle at once. A seated player forced into another vehicle stays where they are. A player on foot takes the first free seat, the driver's first, of the vehicle or of one mounted on it. |
player.get_vehicle() | The outermost vehicle the body rides: a gunner's is the ship, not its gun. |
object.delete() of a vehicle | The first living player seated in the vehicle itself is put out of it first; whoever else rides it, and a gun on it, goes with it. |
game.end_round() | Ends the round with no winner named. A second call in the same tick, or one after the round is over, changes nothing, so a variant that ends a round from two places at once (Invasion: Spire) plays its next round with its objectives and loadouts. |
game.score_to_win, round_time_limit, respawn_time, lives_per_round and the other game options | The values the game is played with: the host's Game Options, a server's options and a playlist's written over the file's. A round set to 2 points says “2 points to win” on its card, and one set to 15 minutes ends at 15. round_time_limit is in seconds, as in Reach. Values no host can change, such as the sudden death and grace period times, are the file's. |
| Timers | Kept as Reach keeps them, at Reach's 60 ticks a second on every host, a 30 Hz one included. A timer copied into another keeps its rate. +=, -= and = count in seconds, while *= and /= multiply and divide its ticks, as Reach's do. |
| Division by zero | /= and %= by 0 give 0, where a .rmeg or .rvt source stops. ~= gives the value's complement. |
on object death | Runs for every unit's death: a player's body, a vehicle's, a giant's or an AI's, but not a weapon's or a crate's, and not for a silent kill or a delete. For a unit other than a player's body there is no current_player, and killer_player is the player Reach credits: the one whose hit destroyed it, or, when it blew up by itself or hit something, the last enemy to hit it in the six seconds before. It runs on the game's next pass after the hit, before the script sees the world again, so a ship that deletes itself as it dies is still the killed_object and scores. |
Widget text, values and meters naming hud_player outside a local event | Each player's widget takes the values with hud_player that player, so a panel such as Slipspace Whaling's “Friendly Vitality” shows each player their own team's number. |
player.is_not_respawning() | The player is in the game and hasn't left it, dead or alive. |
A gone object's team, a gone player's biped | None, where a number reads 0. |
Text codes in show_message_to, widgets and round cards | %n, %o, %p, %s and %t each mark the place of the next value, whatever the letter, and each value is written as what it is: a number whole, a timer as its seconds rounded up (0:07, 3:07, 1:03:07), a player as Player and their number, a team as nothing, an object as unknown and no object as none. A code past the values writes nothing. |
The loadout camera (game.loadout_cam_time) | For that many seconds from each round's start nobody gets a body, and a respawn countdown that would end sooner shows the camera's. The script and its timers run meanwhile, and each player sees the map's Initial Loadout Camera (on a map without one, their first spawn point from behind and above). The round's clock doesn't wait for it, as Reach's does. |
What doesn't play. A source that writes a player's or a team's money is refused, even in a part that never runs: mode-check names it, and the game type list leaves the mode out. rating always reads 0. A call the game doesn't know at all says Unsupported Megalith API. Halo 4 game variants (.mglo) and MegaloEdit's syntax aren't read. Campaign and Forge can't be scripted.
Like every game mode, a Megalith script can't reach files, the network or other programs.
ReachVariantTool's documentation describes Megalo, not Megalith: it helps with the calls the two share and with Reach's own variants, but these pages are the reference for what Project Reclaimer plays. ReachVariantTool doesn't read Megalith's additions, so it can't check a Megalith mode: mode-check is the check.
