This page lists everything mods' scripts can use: the engine handlers, the packages, the fields
and methods of objects, the hooks with the fields each handler sees in e, and the names of
values. Scripting explains how to use them. openreliant hooks prints the list of
hooks, and openreliant hooks <name> one hook.
This page is generated from OpenReliant's code by make definitions, so don't change it by hand.
- Engine handlers
- Packages
- Objects
- Built-in interfaces
- The game's functions
- The order routines
- The mission's events
- The engine's events
- Tables
- Names of values
The functions a script returns in engine_handlers, which OpenReliant calls. Global scripts
include mission scripts.
| Handler | Scripts | When it's called |
|---|---|---|
on_init(data: any?) |
global, object, player and menu | When the script starts, with the data add_script gave it, or nil. |
on_save(): plain data |
global and player | When the game is saved, between missions, and as each mission of the campaign starts, for its restart point: what it returns, which must be plain data, is kept with it. Mission scripts aren't kept. |
on_load(saved: any?) |
global and player | In place of on_init, when a saved game is loaded or the game goes back to the restart point, with what the script's on_save returned then, or nil. A script that didn't run then, such as one of a mod added since, gets on_init instead. |
on_records_loaded() |
load | After every mod's load scripts have run. |
on_update(seconds: number) |
global and object | Each frame in which game time passes, after the ships' orders, with the seconds it covers. |
on_step() |
global and object | Each simulation step, 25 a second, after everything has moved. |
on_frame(seconds: number) |
player and menu | Each frame drawn, even while the game is paused, with the seconds of real time since the last. |
on_mission_start(mission: Mission) |
global, player and menu | When a mission has started and its first ships are there. |
on_mission_end(outcome: Outcome) |
global, player and menu | When the mission ends, for whatever reason. |
on_object_added(object: Object) |
global | When an object is added to the mission. |
on_object_removed(object: Object) |
global | When an object leaves the mission, such as once it has blown up. |
on_added() |
object | When the script's object is in the mission: as it's added, or at once if the script starts later. |
on_removed() |
object | When the script's object leaves the mission. |
on_key_press(key: Key) |
player and menu | When a key is pressed. A key held down is told once. |
on_key_release(key: Key) |
player and menu | When a key is released. |
on_action(action: string) |
player and menu | When the player uses the controls bound to an action, in flight. |
on_console_command(text: string) |
player and menu | When a line typed in the console isn't one of its commands, with the line. |
on_window_resized(width: number, height: number) |
player and menu | When the window changes size, with its new size in pixels. |
on_interface_override(base: { [any]: any }) |
global, object, player and menu | When the script's interface takes the place of one an earlier script offered under the same name, with that one. |
| `on_option_changed(key: string, value: boolean | number | string)` |
What require("openreliant.<name>") gives.
OpenReliant's version, events for the global scripts, and game modes. For load, global, object, player and menu scripts.
| Name | Type | What it is |
|---|---|---|
version |
string | The version of OpenReliant, such as 0.7.0. |
game_mode |
string, or nil | The qualified name of the game mode that runs, such as arena:arena; nil in the game's campaign, INSTANT ACTION and anywhere else. |
game_mode_mission |
GameModeMission, or nil | The mission the game mode that runs is at: the one flown, or between missions the one flown next. nil where no game mode runs. |
register_game_mode(definition: GameMode) |
string | Registers a game mode, which the main menu's GAME MODES lists. The mod's name qualifies its name, and the screen shows its label and description. missions lists the missions it flies in turn: each is the number of a standard .DTE file of the game's or a mod's, or a table that also gives the number the mission flies as, the names of its objectives, and its hologram and last_word in the briefing room. ship is the ship the player flies them in; without it, each mission gives the ship. With loop, the mode starts again after its last mission. A campaign shows the restart screen after a mission is lost or left, and carries on from the mission the player reached. briefing names the mod's registered screen that the front end shows before each mission. briefing_room, reliant or yamato, then briefs each mission in that game's briefing room, with the loadout. loadout_ships lists the ships that loadout offers, in order, starting on the first. wing_pilots lists the pilots of the player's wingmen, Alpha 2 to 6, in place of the campaign's wing, which the missions flown as the campaign's numbers give the wingmen: each a pilot of the game's by its number, or one a mod adds by its qualified name, and none keeps a place's pilot. With debriefing, the ITAC debriefs each mission that goes on to the next. ending names the mod's registered screen that the front end shows after the last mission. records names the mod's script that changes the records for the mode's missions alone: it runs as a load script before each of them, and its changes go back as the mission ends. Only load and menu scripts can use it, as OpenReliant starts. Returns the mode's qualified name. |
send_global_event(name: string, data: any) |
nothing | Sends the event name to the global and mission scripts, with data, which must be plain data. It arrives at the next update. |
The game's records: ships, guns, missiles, pilots, the pilots' faces, the text of the game and the ITAC, the campaign's missions in the order it flies them (campaign), what the campaign makes of each of them (missions), the KILLBOARD's pilots (killboard), the combat maneuvers (maneuvers), the planets (planets) and the colour of the planets' light (planet_light). Only load scripts can change them. For load, global, object, player and menu scripts.
Each of the campaign's missions, missions[n], is a CampaignMission with these fields:
| Field | Type | What it is |
|---|---|---|
hologram |
string, or nil | The movie on the briefing room's screen, a Bink file from the game or a mod, such as new_m01.bik; nil for none. |
speech |
string, or nil | Enriquez's briefing spoken over the briefing room, a speech file from the game or a mod; nil for none. The briefing ends when she finishes. While she speaks, the movie plays on the screen without its sound, and starts over if it ends first; set hologram to nil for an empty screen. |
last_word |
string, or nil | Enriquez's last word after the loadout, a speech file such as ms_speech\enrbr_tag01.ut; nil leaves her silent. |
carrier |
Carrier | The carrier the mission is flown from. The player sees its rooms, briefing room, loadout and hangar. |
objectives |
list of string | The names of the objectives, at most ten, which the mission's script numbers from 0 in SetObjective. Reading gives a new list; assign a list to change them, or nil for the names in the game's own table for the mission's number. |
date |
string, or nil | The date the launch shows, which is the game's text for the mission's number; nil for a mission the game has no date for. |
tier |
number, or nil | The loadout tier the campaign moves to when the mission ends, from 1 to 3; nil to leave the tier as it is. The tier and the pilot's rank decide which ships the loadout offers. The loadout before a mission uses the highest tier of the missions with lower numbers. |
chapter |
number, or nil | The chapter of the story the mission ends, from 1 to 5; nil if it ends none. The pilot gets the chapter's ribbon, the debriefing mentions it, and the chapter's movie plays after the landing. |
medal |
Medal, or nil | The medal the mission awards for a success with its bonus, unless a nanny ship picked the pilot up; nil for none. The medal's ceremony plays when the pilot gets it. After a mission with a medal, the crew in the rooms honour the pilot, even if the pilot didn't get it. |
induction |
boolean | Whether a new pilot sees the intro and the induction before the mission, when a campaign starts with it. |
lesson |
boolean | Whether the mission's loadout teaches the player, as mission 1's does: it starts on the Predator with the tier's missiles, plays loadout.ut and blinks its exit button. |
only_ship |
ShipType, or nil | The only ship the mission's loadout offers, as mission 23's offers the Shroud; nil for the ships the tier and the rank open. The loadout starts on it with the tier's missiles. |
television_report |
list of ReportPart | Enriquez's report on the rooms' television before the mission, as a list of parts that play one after another; an empty list for none. Reading gives a new list; assign a list to change it. |
debriefing |
Debriefing | Enriquez's debriefing of the mission in the ITAC: a list of paragraphs for each rating the mission's script can give. Reading gives a new table; assign a table to change it, and a rating left out has no paragraphs. |
news |
list of NewsItem | The news items that NEWS REPORTS in the ITAC adds in the rooms before the mission, and lists from then on. The news of how a mission went goes on the mission after it. Reading gives a new list; assign a list to change them. |
video_reports |
list of VideoReport | The video reports that VIDEO REPORTS in the ITAC adds in the rooms before the mission, and lists from then on. Reading gives a new list; assign a list to change them. |
landing_carrier |
Carrier | The carrier the landing plays on after the mission, which picks the chapter's disc and zoom too where the mission ends a chapter: the Yamato from mission 18 on, the Reliant before. |
yamato_visit |
YamatoVisit | Whether the ship lands on the Yamato after the mission with a failure's thread and bank, whatever the rating: never, always as after mission 7, or when_reliant_lost as after mission 8, where reliant_alive is clear. |
chapter_reports |
list of ChapterReport | The news reports that play after the chapter's movie, where the mission ends a chapter, at most eight. Each plays unless one of the game's variables in unless is 1, and then sets the variable sets to 1, if any. Reading gives a new list; assign a list to change them. |
alpha_5_pilot |
PilotNumber | The pilot who flies as Alpha 5 from the mission on, such as diceman; none leaves the pilot there as they are. |
alpha_6_pilot |
PilotNumber | The pilot who flies as Alpha 6 from the mission on, such as bandit_volunteers_leader; none leaves the pilot there as they are. |
wing_twins |
boolean | Whether the player's wing flies the t_ twins of the player's ships, as in missions 14 and later. |
flying_tigers |
boolean | Whether the 45th fly as the 45th Flying Tigers rather than the 45th Volunteers, in the radio's films and in Moose's remarks, as after mission 13. |
second_part |
boolean | Whether the mission has a second part, mission<number>1.dte, flown once the first part is won, as mission 25 has. The second part has no landing before it. |
kamov_wing |
boolean | Whether the player's wing flies Kamovs, in the first part where the mission has two, as in mission 25. The Kamov's schematic is then drawn mirrored. |
close_ion_cannons |
boolean | Whether the ion cannons' lock lets a player's ship come much closer before it breaks, as in mission 28. |
hurried_turrets |
boolean | Whether the missile turrets wait half as long between launches, as in mission 28. |
ripper_from_below |
boolean | Whether the Ripper lifts an object from below rather than from above, as in mission 26. |
wide_advanced_gate |
boolean | Whether the advanced warp gates' tunnels are as wide as the prototype's, as in mission 8. |
counts_kills |
boolean | Whether the player's kills count toward the mission's tally, as in missions 1 to 27. |
terminate_ends_well |
boolean | Whether the mission's script can end it with TerminateMission without the ending counting as the player's ship destroyed, as in mission 28. |
fort_bear_ending |
boolean | Whether, once the Yamato is lost (yamato_alive clear), no landing plays after the mission, and a total failure ends the pilot's career in the shuttle at Fort Bear, as in missions 25 and 27. |
cobras_inquiry |
boolean | Whether the ITAC's history of the 705 Cobras tells of the inquiry into their colonel, as from mission 7 on. |
fifty_first_listed |
boolean | Whether the ITAC's squadrons list the 51st Volunteers, as in missions 1 to 9. |
Each of the KILLBOARD's pilots, killboard[n], is a KillboardPilot with these fields:
| Field | Type | What it is |
|---|---|---|
name |
string | The pilot's name. |
squadron |
string | The line below the name: the pilot's squadron, in brackets. |
ship |
string, or nil | The pilot's ship; nil leaves the column empty. |
kills |
number | The kills the pilot starts a campaign with. |
mean |
number | The kills each mission adds on average. |
spread |
number | How far a mission's kills can stray from the mean: half the spread each way. |
portrait |
number | The shape of the pilot's portrait in inter\itac\kills.spr. |
in_45th |
boolean | Whether the pilot flies in the 45th: the portrait takes the 45th's palette, and the squadron shows as the 45th Flying Tigers in the missions whose flying_tigers rule is on. |
joins_at |
number, or nil | The first mission the pilot is on the board in, as Linc Stevenson joins at mission 6; nil for every mission. |
leaves_after |
number, or nil | The last mission the pilot is on the board in, as John McGann leaves after mission 5; nil for every mission. |
sits_out |
list of number | The missions in which the pilot adds no kills, as Klaus Steiner sits out missions 19 to 23. |
Each of the combat maneuvers, maneuvers[n], is a CombatManeuver with these fields:
| Field | Type | What it is |
|---|---|---|
name |
string | Its name, such as "loop the loop". |
mirror |
ManeuverMirror | The inputs it may mirror: each time it starts, a random choice among them. |
min_ticks |
number | The fewest ticks it runs, unless the Fight order gives a length of its own. |
max_ticks |
number | The most ticks it runs: Fight draws its length from min_ticks up to this. |
script |
list of string | Its script: a command of the maneuvers' language on each line. Setting it compiles it, and a line that doesn't compile is an error. |
Each of the planets, planets[n], is a Planet with these fields:
| Field | Type | What it is |
|---|---|---|
type |
ShipType | Its object type, such as neptune_hi or earth: OpenReliant's name or the type's number, or the qualified name of a type a mod adds. A type a mod adds uses its base type's entry unless the table has an entry for it. If a type has several entries, the first one counts. A planet added without a type has the marker's type, which is never made, until its type is set. |
spin |
number | How fast it turns about its north pole, in radians a second. Positive turns it eastward, as most planets turn, which is counter-clockwise seen from above its north pole. Negative turns it westward. Its north pole is its model's -Y, which is up on the screen when the planet isn't turned. The original turns the planets that have an atmosphere westward at -0.07, one turn every 90 seconds, and doesn't turn the others. |
tilt |
number | How far its north pole leans away from north, in radians. North is the up direction of the planet as the mission places it, which is the world's up if the mission doesn't turn the planet. |
tilt_toward |
number | Which way its north pole leans, as an angle in radians around north: 0 leans it toward +Z, and math.pi / 2 toward +X, both of the planet as the mission places it. |
atmosphere_color |
vector, or nil | The colour of its atmosphere, or nil for none. The atmosphere is a band that faces the camera and fades from this colour at its inner edge to nothing at its outer edge. It is added over the sky behind the planet, and is brighter toward the sun. In the original, Neptune, Uranus, Jupiter and Venus have one. |
atmosphere_inner |
number | Where its atmosphere's band starts, as a share of the planet's radius as the camera sees it: 0.85 in the original. With a surface function, its ring starts here, in the radii of the planet's sphere. |
atmosphere_outer |
number | Where its atmosphere's band ends, as a share of the planet's radius as the camera sees it: 0.95 for Neptune and Uranus, and 1.005 for Jupiter and Venus, in the original. The planet hides the band within its edge. With a surface function, its ring ends here, in the radii of the planet's sphere. |
atmosphere_surface |
string, or nil | The surface function that draws its atmosphere in place of the band, by the calling mod's own name or the qualified one, or nil. It draws on a ring that faces the camera through the middle of the planet's sphere, from atmosphere_inner to atmosphere_outer times the sphere's radius as the camera sees it, and its light is added over what lies behind it. The planet hides the ring within its edge. The function works in the planet's own frame, with the sphere's middle as the origin and its radius as the unit, so it can trace the line of sight through each pixel. Where no mod registers a function of that name, the planet keeps its band. The scripting guide shows one. |
atmosphere_parameters |
list of number | The numbers its atmosphere's surface function reads, up to four; those left out are 0. |
Handlers on the game's functions and events. For global and object scripts.
The mission's objects, the player's ship and the mission itself. For global scripts.
| Name | Type | What it is |
|---|---|---|
player |
object, or nil | The player's ship, while a mission runs; nil between missions. |
mission |
Mission, or nil | The mission that runs, with its number and its file's name; nil between missions. |
objects() |
list of objects | Every object in the mission, in the order of their slots. |
missiles() |
list of missile | Every missile in flight, newest first. |
set_player_target(target: Object, component: number?) |
boolean | Makes target, or its component number component, the player's target, as a mission's SetPlayerTarget does: the display shows it, and the player stops matching speeds. Returns whether it worked: false for a target the player can't aim at, such as a destroyed component, and between missions. |
set_primary_target(target: Object?, component: number?) |
boolean | Makes target, or its component number component, the mission's primary target, as a mission's SetPrimaryTarget does: the PRIMARY TARGET key selects it. Nil leaves the mission without one. Returns false between missions. |
set_objective(objective: number, state: ObjectiveState) |
boolean | Objective objective of the mission that runs, numbered from 0 to 9 as a mission's SetObjective numbers them, takes state, as SetObjective does: hidden, listed, or current, which the objectives window then shows. Returns whether it changed: false between missions, and in a mission whose objectives nothing names. |
The script's own object, as a handle: an object script's object, a missile script's missile, or the player's ship for a player script, nil between games. For object and player scripts.
The objects around the script's own object or missile. For object and player scripts.
| Name | Type | What it is |
|---|---|---|
objects(radius: number) |
list of objects | The objects within radius of the script's object or missile, or of the player's ship for a player script, nearest first, without it. |
What the order table says of each order, the orders each object has, and ending them. An object's give_order gives orders. For global and object scripts.
| Name | Type | What it is |
|---|---|---|
register(name: string, definition: {priority: number?, flags: OrderFlags?, init: ((ship: Object, target: Object?, seconds: number) -> ())?, update: (ship: Object, target: Object?, seconds: number) -> boolean?, exit: ((ship: Object, target: Object?, seconds: number) -> ())?}) |
string | Registers an order, which name qualified with the mod's name names. update runs each frame on each ship that follows it, and returns false to end the order; init runs as it starts, and exit as it ends. They can't give or end orders. Returns the qualified name, which give_order and orders.info take. The order goes away when the scripts that registered it stop. |
info(order: string | number) |
OrderInfo, or nil | The name, priority and flags of order: one of the game's, the calling mod's by its own name, or any mod's by the qualified one. Nil for an order that doesn't exist, or a mod's that failed. |
stack(object: Object) |
list of OrderEntry | The orders object has, the one it follows first, each with what it's aimed at. The ones below carry on as each ends. |
cancel(object: Object) |
boolean | Ends the order object follows, as an order ends itself: its exit runs, and the order below it carries on. Returns whether it had one. Global scripts can end any object's orders, and an object's scripts their own object's. |
clear(object: Object) |
boolean | Drops all of object's orders, as a mission's ClearAI does, where the one it follows gives way. Returns whether they were dropped. Global scripts can drop any object's orders, and an object's scripts their own object's. |
Lines said on the radio, as a mission's comms commands say them. For global and object scripts.
| Name | Type | What it is |
|---|---|---|
say(ship: Object, speech: string, line: RadioLine?) |
boolean | The ship ship says the speech file speech on the radio, a file of the game's or a mod's such as ms_dice22_001.ut, its pilot's face showing, as a mission's CommsFromShip does: at once, ending the line playing, unless line says otherwise. The line goes through the radio_say hook. A ship being destroyed, or a stand-in, says nothing. Returns whether the mission's radio took the line: false between missions. |
busy() |
boolean | Whether the radio is saying a line, or has lines waiting to be said: false between missions, and where nothing is heard. |
say_pilot(pilot: PilotNumber, speech: string, line: RadioLine?) |
boolean | Pilot pilot says the speech file speech on the radio, with its face, as a mission's CommsFromPilot does: at once, ending the line playing, unless line says otherwise. The pilot is one of the game's by its name or number, or one a mod adds by its qualified name. The line goes through the radio_say hook. Returns whether the mission's radio took the line: false between missions. |
Drawing over the flight display, while it's shown: text, lines and rectangles, in the window's pixels. For player scripts.
| Name | Type | What it is |
|---|---|---|
replaced |
list of HudInstrument | The game's instruments the mods' displays stand in for this frame, which aren't drawn (register_display). |
instruments_shown |
boolean | Whether the game's instruments show this frame: during a mission, in the view ahead from the cockpit. |
guns |
HudGuns, or nil | The player's guns as the gunnery window and the targeting cluster show them; nil outside a mission. |
missiles |
HudMissiles, or nil | The player's missiles as the missile window shows them; nil outside a mission. |
target |
Target, or nil | The target the display shows, with its subtarget as component; nil for none, or outside a mission. |
target_display |
HudTargetDisplay, or nil | What the target display shows of its target, in either form, whether or not its window is open; nil without a target or while the display hides it, and outside a mission. |
radar |
HudRadar, or nil | The radar: its range, and the contacts it shows; nil outside a mission. |
kills |
number, or nil | The kills the skull readout shows; nil outside a mission. |
fuel |
number, or nil | The seconds of afterburner fuel the fuel readout shows; nil outside a mission. |
countermeasures |
number, or nil | The countermeasures the coil readout shows; nil outside a mission. |
countermeasures_lit |
boolean | Whether the countermeasures readout was lit as the display last drew it: always in the view ahead from the cockpit, except while it's dark in a flash that ShowHudIcon sets; false outside the view ahead, and outside a mission. |
gauges |
HudGauges, or nil | The targeting cluster about the middle of the screen, as it shows the player's speed, throttle and guns; nil outside a mission. |
ship_status |
HudShipStatus, or nil | The ship status indicator, as it shows the player's shields and armour; nil for a ship without them, or outside a mission. |
lights |
list of HudLight | The status lights that show, steady or flashing, in the order the display packs them; none outside a mission. |
lights_lit |
list of HudLight | The status lights lit as the display last drew them, in the order it packs them: those of lights, but a flashing one only while it's lit. A warning that flashes keeps its place in the grid while it's dark; a light that ShowHudIcon flashes gives its place up. None outside the view ahead from the cockpit, where the display draws no lights, and outside a mission. |
charges |
HudCharges, or nil | The charges of the player's ECM, cloak and spectral shields, which their lights show as bars under them, each from 0 to 1, or nil where the ship doesn't carry the device; nil outside a mission. |
clock |
HudClock, or nil | The mission's clock as the display shows it: the countdown where the mission counts down, and the time played otherwise; nil outside a mission. |
view_name |
string, or nil | The view's name the display writes at the top of the screen, in the views it names; nil in the others, the view ahead from the cockpit among them, and outside a mission. |
caption |
string, or nil | The date the launch types out at the foot of the screen, as far as it has typed it; nil while it isn't shown, and outside a mission. |
damage |
HudDamage, or nil | The damage window, as it shows how well the player's weapons, engines and shields still work as the armour wears, each from 0 to 1, whether or not the window is open; nil outside a mission. |
power |
HudPower, or nil | The power window, as it shows the shields', guns' and engines' shares of the player's power, as the whole percentages it writes, whether or not the window is open; nil outside a mission. |
wingmen |
list of HudWingman | The ships of the player's wing the wing status window shows, the player's first, whether or not the window is open; none outside a mission. |
objectives |
HudObjectives, or nil | The objectives window: the mission's objectives it can show, and the one it shows, whether or not the window is open; nil outside a mission. |
comms |
list of string | The items of the radio's menu the comms window lists, in order, as the number keys pick them, whether or not the window is open; none outside a mission. |
messages |
list of string | The message lines the display shows, oldest first; none outside a mission. |
subtitle |
string, or nil | The line DisplaySubTitle shows near the foot of the screen in the director's view, whichever view it's in; nil for none, and outside a mission. |
speaker_name |
string, or nil | The name the radio's window writes over the speaker's face, while their line plays; nil while a line waits for the window, between lines, and outside a mission. |
key_prompt |
Action, or nil | The action whose key WaitForKey's prompt asks the player to press; nil while nothing waits, and outside a mission. |
jump_prompt |
HudJumpPrompt, or nil | The prompt that flashes in the view ahead for what the mission has ready: the warp's or the jump's; nil for none, and outside a mission. |
open_windows |
list of HudInstrument | The game's windows that are open, opening or closing (window_state); none outside a mission. |
shown |
boolean | Whether it's shown this frame, which is when what's drawn on it shows, and its other fields can be read. |
width |
number | The window's width, in pixels. |
height |
number | The window's height, in pixels. |
register_display(name: string, definition: {frame: (seconds: number) -> (), replaces: { HudInstrument }?, layout: { [HudInstrument]: HudLayout }?, parts: { [HudPart]: HudPartLayout }?}) |
string | Registers a display, which name qualified with the mod's name names. While the flight display shows, frame draws it with this package's functions each frame, until it's turned off with set_display_enabled. A failed frame turns off that display only. replaces lists the game's instruments it stands in for, which aren't drawn while it's on, layout moves and scales the instruments it names, and parts moves, scales, aligns, rewords or hides the parts of them it names; they keep working, and go back as they were as soon as it's turned off, fails or its mod stops. Returns the qualified name. |
set_display_enabled(name: string, enabled: boolean) |
boolean | Turns the display name on or off: the calling mod's by its own name, or any mod's by the qualified one. Returns whether it's registered. |
bounds(instrument: HudInstrument) |
HudBounds, or nil | Where the game's instrument instrument last drew, in the window's pixels, as the mods' displays place it, and even while one stands in for it; nil before it first draws, or outside a mission. |
part_bounds(part: HudPart) |
HudBounds, or nil | Where the part part of the game's instruments last drew, in the window's pixels, as the mods' displays place it, and even while one hides it; nil before it first draws, or outside a mission. |
window_state(instrument: HudInstrument) |
HudWindowState, or nil | How far the game's window that holds instrument has opened, and whether it's opening or closing, as the display last moved it on, which it does in every view; for the comms, the further open of its two windows. Nil for an instrument outside the windows, and outside a mission. |
picture(at: vector, file: string, size: vector?, style: FillStyle?) |
nothing | Draws a PNG from the calling mod at at, with size in window pixels (nil uses its native size), tinted by style. Files are cached for the script context; one that hasn't been drawn for 2 frames makes room for others when the cache is full. |
power_ball(at: vector, size: vector?, style: FillStyle?) |
nothing | Draws the power window's ball, turning with the player's power setting as the window's does, whether or not the window is open, with its top left corner at at and size in window pixels (nil for its size on the game's display), tinted by style. Unlike the window's, it doesn't shake when the ship is hit. Only during a mission. |
shape(at: vector, index: number, style: ShapeStyle?) |
nothing | Draws shape index of the game's sprite set for this layer (the flight display's, or the front end screen's), with its anchor at at, in window pixels. The style's scale multiplies its size in the game's pixels. |
text(at: vector, text: string, style: TextStyle?) |
nothing | Draws text at at, in pixels from the window's top left corner, in the game's font, as style says. |
line(from: vector, to: vector, style: LineStyle?) |
nothing | Draws a line from from to to, in pixels, as style says. |
rectangle(from: vector, to: vector, style: FillStyle?) |
nothing | Fills the rectangle between the corners from and to, in pixels, as style says. |
measure(text: string, style: (number | TextStyle)?) |
Size | The size of text in window pixels, as text draws it, and where its letters' pixels fall from the point it's drawn at: style is a text style, or just a number for its scale. |
Drawing over the menus, the front end's screens and the pause menu, while they're shown: text, lines and rectangles, in the window's pixels. For player and menu scripts.
| Name | Type | What it is |
|---|---|---|
pointer |
Pointer, or nil | Where the pointer is, in pixels from the window's top left corner, and whether its left button is down; nil before it has been over the window. |
shown |
boolean | Whether it's shown this frame, which is when what's drawn on it shows, and its other fields can be read. |
width |
number | The window's width, in pixels. |
height |
number | The window's height, in pixels. |
register_screen(name: string, definition: {frame: (seconds: number) -> (), key: ((key: Key, down: boolean) -> ())?}) |
string | Registers a screen, which name qualified with the mod's name names. While it's shown (show_screen), frame draws it with this package's functions each frame, and key gets each key as it goes down and up. Returns the qualified name. |
replace_screen(screen: FrontEndScreen, name: string?) |
boolean | Makes the calling mod's registered screen name stand in for the front end's own screen, such as "main_menu": while the front end shows screen, it runs and draws the mod's screen in its place, over its background. nil gives screen back to the front end. Only menu scripts can use it. Returns whether the screen is registered. |
go_to(screen: FrontEndScreen) |
nothing | Asks the front end to go to its screen screen, or to the mod's screen that stands in for it. Only menu scripts can use it. |
start_game_mode(name: string) |
boolean | Asks the front end to start the game mode name: the calling mod's by its own name, or any mod's by the qualified one. Only menu scripts can use it. Returns whether the mode is registered. |
launch_mission() |
nothing | From a game mode's briefing screen, asks the front end to fly the mode's next mission (core.game_mode_mission). Only menu scripts can use it. |
play_movie(name: string) |
nothing | Plays the movie name, a Bink file of the game folder's or a mod's such as "intro.bik", on a cleared screen, as the front end shows its next frame. Escape or the pointer's right button ends it. Only menu scripts can use it. |
quit() |
nothing | Asks the front end to quit the game. Only menu scripts can use it. |
show_screen(name: string?) |
boolean | Shows the screen name: the calling mod's by its own name, or any mod's by the qualified one. Nil closes the screen shown. Returns whether it's registered. |
picture(at: vector, file: string, size: vector?, style: FillStyle?) |
nothing | Draws a PNG from the calling mod at at, with size in window pixels (nil uses its native size), tinted by style. Files are cached for the script context; one that hasn't been drawn for 2 frames makes room for others when the cache is full. |
shape(at: vector, index: number, style: ShapeStyle?) |
nothing | Draws shape index of the game's sprite set for this layer (the flight display's, or the front end screen's), with its anchor at at, in window pixels. The style's scale multiplies its size in the game's pixels. |
text(at: vector, text: string, style: TextStyle?) |
nothing | Draws text at at, in pixels from the window's top left corner, in the game's font, as style says. |
line(from: vector, to: vector, style: LineStyle?) |
nothing | Draws a line from from to to, in pixels, as style says. |
rectangle(from: vector, to: vector, style: FillStyle?) |
nothing | Fills the rectangle between the corners from and to, in pixels, as style says. |
measure(text: string, style: (number | TextStyle)?) |
Size | The size of text in window pixels, as text draws it, and where its letters' pixels fall from the point it's drawn at: style is a text style, or just a number for its scale. |
Whether keys are held, and the controls bound to actions. For player and menu scripts.
| Name | Type | What it is |
|---|---|---|
register_action(name: string, definition: ActionDefinition) |
string | Registers an action, which name qualified with the mod's name names, and which the controls screen lists by its label for the player to bind. A default key or button that's already taken stays unbound. Returns the qualified name, which action_down and on_action use. Only menu scripts can use it. |
key_down(key: Key) |
boolean | Whether key is held down. |
action_down(action: string | number) |
boolean | Whether the controls bound to action are held: its key, or its joystick button. The action is one of the game's (Action), the calling mod's by its own name, or any mod's by the qualified one. |
The camera's view: which it is, switching it, and registering views of the mod's own. For player scripts.
| Name | Type | What it is |
|---|---|---|
view |
string | number, or nil | The view the camera shows: one of the game's (View), or a mod's by its qualified name; nil while no mission is shown. |
register_view(name: string, definition: {frame: (object: Object, seconds: number) -> {position: vector, orientation: Orientation}, letterbox: boolean?}) |
string | Registers a camera view, which name qualified with the mod's name names. frame gives the camera's position and orientation each frame; its axes must be unit length, at right angles and right-handed. A failed frame goes back to the cockpit view. Returns the qualified name. |
set_view(view: string | number, object: Object?) |
boolean | Switches to view, looking at object, or at the player's ship where it's nil. The view is one of the game's (View), the calling mod's by its own name, or any mod's by the qualified one. Returns whether it switched: a mission that holds the camera, or shows a cutaway, keeps it. |
Interface sounds, music and Betty's lines. For player and menu scripts.
| Name | Type | What it is |
|---|---|---|
play_sound(index: number, volume: number?) |
boolean | Plays sound index of the game's standard sounds, the menus' and the display's, at volume from 0 to 1, or at its loudest where it's nil. Returns whether it played. |
play_music(name: string) |
nothing | Plays the piece name from the game's music folder for ever, in place of the music playing. |
say(line: BettyLine) |
boolean | Betty says line. Returns whether she does. |
Post effects: GLSL fragment shaders from the mod, drawn over the whole frame, before the flight display or after it. For player scripts.
| Name | Type | What it is |
|---|---|---|
register(definition: Effect) |
string | Registers a post effect: a GLSL fragment shader from the calling mod's file shader, drawn over the whole frame. stage is "before_hud" (the default) or "after_hud", order sorts the effects of a stage, lower first, and parameters holds up to four numbers its shader reads. Returns the effect's name, qualified with the mod's. The file can include other files of the mod with #include. A shader that doesn't compile is an error, with its file and line. See the scripting guide for what the shader reads. |
set_enabled(name: string, enabled: boolean) |
boolean | Turns the calling mod's effect name on or off, by its own name or the qualified one. Returns whether the mod has it. |
set_parameters(name: string, parameters: { number }) |
boolean | Sets the numbers the calling mod's effect name reads, up to four; those left out are 0. Returns whether the mod has it. |
Surface and lighting functions: GLSL functions from the mod that change how surfaces are lit. For player scripts.
| Name | Type | What it is |
|---|---|---|
register_surface(definition: SurfaceFunction) |
string | Registers a surface function: a GLSL function surface from the calling mod's file shader, which changes a pixel before it is lit. It draws on the textures it names, on every lit surface without a function of its own where everywhere is true, and on the objects given it with object:set_surface. parameters holds up to four numbers it reads, and bloom, from 0 to 1, how much of its surfaces' light blooms. Returns the function's name, qualified with the mod's. The file can include other files of the mod with #include. A shader that doesn't compile is an error, with its file and line. See the scripting guide for what the function reads and sets. |
register_lighting(definition: LightingFunction) |
string | Registers a lighting function: a GLSL function lighting from the calling mod's file shader, which changes how much of each light reaches a pixel. One draws at a time: the enabled one registered last. parameters holds up to four numbers it reads. Returns the function's name, qualified with the mod's. The file can include other files of the mod with #include. A shader that doesn't compile is an error, with its file and line. |
set_enabled(name: string, enabled: boolean) |
boolean | Turns the calling mod's function name on or off, by its own name or the qualified one. Returns whether the mod has it. |
set_parameters(name: string, parameters: { number }) |
boolean | Sets the numbers the calling mod's function name reads on its textures and everywhere it draws, up to four; those left out are 0. Returns whether the mod has it. |
Sections of plain data for each mod: kept with the saved game, or in the game folder across every game. For load, global, object, player and menu scripts.
| Name | Type | What it is |
|---|---|---|
game_section(name: string) |
Section | The section name of the calling mod's storage that's kept with the saved game, and starts empty with each new game. Global and object scripts change it; other scripts read it. |
global_section(name: string) |
Section | The section name of the calling mod's storage that's kept in the game folder, across every game. Any script changes it. |
Timers, kept with the saved game: game time for global and object scripts, real time for player and menu scripts. For global, object, player and menu scripts.
| Name | Type | What it is |
|---|---|---|
register_timer(name: string, handler: (data: any) -> ()) |
nothing | Registers handler under name, for the timers of the mod's scripts of the same kind (and on the same object) to run. Register it as the script runs, so that a timer kept with a saved game finds it again after the game is loaded. |
after(seconds: number, name: string, data: any?) |
nothing | Runs the function registered under name once seconds have passed, with data, which must be plain data: seconds of game time for global and object scripts, and of real time for player and menu scripts. |
The interfaces other scripts offer, as I.<name>: those of the global scripts to global scripts, those of an object's scripts to the object's other scripts, and those of player and menu scripts to each other. Nil for one nobody offers. For global, object, player and menu scripts.
Orientations, turning points between the world and an object's own frame, and angles. Luau's vector library has the rest of the vector maths. For load, global, object, player and menu scripts.
| Name | Type | What it is |
|---|---|---|
to_world(position: vector, orientation: Orientation, point: vector) |
vector | The point of the world that point is in the frame of something at position turned as orientation: point's x to its right, y down and z forward of it. |
to_local(position: vector, orientation: Orientation, point: vector) |
vector | Where the point of the world point is in the frame of something at position turned as orientation: x to its right, y down and z forward of it. |
angle_off(position: vector, orientation: Orientation, point: vector) |
number | The angle in radians between the forward axis of something at position turned as orientation and the direction to point: 0 dead ahead, pi straight behind. |
look_at(direction: vector) |
Orientation | The orientation whose forward axis points along direction, turned about its Y axis, then its X axis, with no roll, as the game turns a ship to look at something. |
turn(orientation: Orientation, axis: Axis, angle: number) |
Orientation | orientation turned by angle radians about its own axis: right-handed, so about its Y axis, which points down, a positive angle turns its nose to the right. |
angles(orientation: Orientation) |
vector | The angles in radians that orientation is turned by from looking along the world's Z axis, as the game reads them: x the pitch, y the yaw and z the roll. |
from_angles(angles: vector) |
Orientation | The orientation turned by angles in radians from looking along the world's Z axis, as angles gives them: about X, then Y, then Z. |
normalize_angle(angle: number) |
number | angle in radians brought within half a turn either way, from -pi to pi. |
Reading the game's and the mods' files. For load, global, object, player and menu scripts.
| Name | Type | What it is |
|---|---|---|
read(name: string) |
string? | Reads the file name as a string of its bytes, the way the game does: a mod's copy (the latest mod's first), else the game folder's own file of that name, such as missions\mission1.dte, else the member of the game's resource.hog. Nil if there is none. |
read_mod(name: string) |
string? | Reads the calling mod's own file name as a string of its bytes. Nil if the mod doesn't have it. |
exists(name: string) |
boolean | Whether vfs.read would find the file name. |
The options a mod offers the player on the mods screen: declaring the page, and reading the values. For load, global, object, player and menu scripts.
| Name | Type | What it is |
|---|---|---|
register_page(page: Page) |
nothing | Declares the page of options the mod offers on the mods screen: a title and up to 64 options. Each option has a key that scripts read it by, a label, a kind and a default. A "toggle" has a boolean default. A "choice" has choices, each a value and a label, and a default among their values. A "number" has min, max and step, and a default in the range, and arrows step it. A "slider" is a number with a knob to drag, for a wide range. A "text" is a line the player types, of up to 24 characters, with a string default. A "heading" has only a label, and splits a long page. An option may have a description, which the screen writes under the list while the pointer is on it. Only load and menu scripts can use it, as OpenReliant starts, and a mod has one page. |
get(key: string) |
boolean | number | string | The value of the option key of the calling mod's page: what the player set, or the default. A toggle is a boolean, a number is a number, and a choice is the value of the choice set. |
set(key: string, value: boolean | number | string) |
nothing | Sets the option key of the calling mod's page to value, as the player does on the mods screen: a toggle to a boolean, a number to a number, which is held to its range, a choice to one of its values, and a text to a string of up to 24 characters. The value is kept, and menu scripts hear of the change (on_option_changed). |
Lines and text placed in the world, drawn over the flight display where the camera sees them, for debugging. For player scripts.
| Name | Type | What it is |
|---|---|---|
line(from: vector, to: vector, style: LineStyle?) |
nothing | Draws a line between the points from and to of the world, as style says, where the camera sees them. |
text(at: vector, text: string, style: TextStyle?) |
nothing | Draws text at the point at of the world, as style says, where the camera sees it. |
Scripts see objects through handles. A handle stays valid until its object is removed or its mission ends; reading a field of a handle that isn't valid is an error. Every script can read the fields; global scripts can change those marked changes on any object, and an object's own scripts on their object.
| Field | Type | What it is |
|---|---|---|
slot |
number | The slot it fills in the mission, from 0. |
type |
ShipType | Its type, such as predator. |
class |
ShipClass, or nil | Its class, such as fighter; nil for an object without stats, such as a nav point. |
pilot |
PilotNumber | Changes. The pilot flying it, whose record sets how it flies and fights: a pilot of the game's by its number, one a mod adds by its qualified name, or none. |
side |
Side | Changes. The side it's on. Setting it changes its side, as a mission's SetHostile does. |
position |
vector | Changes. Where it is. Setting it moves it there at once, as a mission's SnapToPoint does. |
orientation |
Orientation | Changes. Where its axes point: to its right, down and forward, out of its nose (openreliant.util). Setting it turns it at once, its axes made unit length and at right angles first, the forward one keeping its direction. |
velocity |
vector | Changes. How far it moves in a simulation step, of which there are 25 a second. Setting it pushes it, and its engines carry on from there. |
speed |
number | How fast it moves: the length of its velocity. |
radius |
number | How far its model reaches from its middle. |
is_player |
boolean | Whether it's the player's ship. |
order |
string | number, or nil | The order it's following: one of the game's (Order), or a mod's by its qualified name; nil for none. |
maneuver |
Maneuver, or nil | The combat maneuver it flies while it follows the Fight order: one of the game's by its name (Maneuver), or one a mod adds by its number (records.maneuvers); nil while it follows another order. |
target |
Target, or nil | What the order it's following is aimed at; nil while it follows none. |
last_attacker |
object, or nil | The object that last hit it; nil for none, or once that one has left the mission. |
throttle |
number | Changes. Its throttle: 1 is full, 2 the afterburner's and -1 reverse thrust's. Its order or its pilot usually sets it each frame. |
roll_input |
number | Changes. How hard it rolls, from -1 to 1. Its order or its pilot usually sets it each frame. |
pitch_input |
number | Changes. How hard it pitches, from -1 to 1. Its order or its pilot usually sets it each frame. |
yaw_input |
number | Changes. How hard it yaws, from -1 to 1. Its order or its pilot usually sets it each frame. |
afterburning |
boolean | Whether its afterburner burns. |
afterburner_fuel |
number | Changes. The afterburner's fuel left, in seconds of burning. Setting it fills or drains the tank, from 0 up. |
countermeasures |
number | Changes. How many countermeasures it has left. |
shields |
Quadrants | Changes. Its shields in each quadrant. Each can be set from 0 to what a whole ship of its type has; an object without stats has no shields to set. |
armor |
Quadrants | Changes. Its armour in each quadrant. Each can be set from 0 to what a whole ship of its type has, and its guns, speed and shields' recharge follow, as damage wears them; an object without stats has no armour to set. |
hull |
number, or nil | The share of its armour it has left, from about 1 as it's made down to 0: its weakest quadrant against a quadrant's full armour. Nil for an object without stats. |
invulnerable |
Invulnerability | Changes. What can harm it: anything for none, nothing for full, only a player's ship for player_can_hit, and anything for eject_before_exploding, though its pilot ejects first. Setting it is what a mission's SetInvulnerability does. |
exploding |
boolean | Whether it has started to explode. It takes no more orders. |
ejected |
boolean | Whether its pilot has ejected. It takes no more orders. |
cloaked |
boolean | Changes. Whether it's cloaked. Setting it cloaks or uncloaks it, as a mission's Cloak does, where its model can. |
targetable |
boolean | Changes. Whether ships can target it. Setting it is what a mission's SetTargetable does: a type that can't be targeted stays so. |
lights |
boolean | Changes. Whether its lights are on. Setting it is what a mission's DisableLights does. |
disabled |
boolean | Changes. Whether it's left out of the mission's work, as a mission's DisableObject leaves it. |
guns_disabled |
boolean | Changes. Whether its guns don't fire and its turrets rest, as a mission's DisableGuns sets. |
missiles_disabled |
boolean | Changes. Whether it can't launch missiles, as a mission's DisableMissiles sets. |
engines_disabled |
boolean | Changes. Whether its engines are off: its throttle held at 0, and no afterburner or reverse thrust, as a mission's DisableEngines sets. |
eject_disabled |
boolean | Changes. Whether the player can't eject from it, as a mission's DisableEject sets. |
do_not_disturb |
boolean | Changes. Whether it keeps to its orders: it doesn't retaliate, come to another's help, rise to a taunt or take the wingmen's commands, as a mission's DoNotDisturb sets. |
avoidance_disabled |
boolean | Changes. Whether it no longer keeps clear of other ships, as a mission's SetShipAvoidance sets. |
| Method | Returns | What it does |
|---|---|---|
is_valid() |
boolean | Whether the object is still in the mission. A handle stops being valid once its object is removed or its mission ends. |
give_order(order: string | number, target: Object?, component: number?) |
boolean | Gives it order, aimed at target or at nothing, as a mission's SetAI does: the order goes on top of its orders if the one it follows gives way. component aims it at one part of target instead of the whole ship, as a mission's orders can: for Launch, the carrier's launch gate, counting from 0; for Dock, the port. Returns whether it took. Global scripts can give any object orders, and an object's scripts their own object. |
start_launch() |
boolean | Starts its Launch, as a mission's StartLaunch does: the first Launch among its orders goes after the short random wait the game gives each ship. Returns whether it had a Launch to start. Global scripts can start any object's launch, and an object's scripts their own. |
send_event(name: string, data: any) |
nothing | Sends the event name to the object's scripts, with data, which must be plain data. It arrives at the next update. |
add_script(name: string, data: any?) |
boolean | Starts the script name of the calling mod on the object, as an object script, and passes data to its on_init. Returns whether it started. Only global scripts can add scripts. |
remove_script(name: string) |
boolean | Stops the script name of the calling mod on the object. Returns whether it ran there. Only global scripts can remove scripts. |
hook(name: ObjectHookName, handler: (e: any) -> boolean?, filter: (Filter | (e: any) -> boolean)?) |
HookHandle | hooks.add, for the calls that concern this object only: a handler for the hook name, with an optional filter. Returns the handler's handle. Global scripts can hook any object, and an object's scripts their own. |
set_surface(name: string?, parameters: { number }?) |
boolean | Draws the object with the surface function name, the calling mod's by its own name or any mod's by the qualified one, reading parameters; nil draws it with its textures' functions again. Returns false if no function of that name is registered. Only player scripts can set it. |
turrets() |
list of turret | Its turrets: its guns that turn to aim, spin their barrels or launch missiles, destroyed ones included, in the order of its guns. |
parts() |
list of ShipPart | Its parts, destroyed ones included, in the order the game numbers them: each part of its model, followed by the parts of the models that part carries, such as a turret's gun. Empty for an object without a model. |
attachments() |
list of ShipAttachment | The attachment points on its parts, such as engine glows and missile hardpoints, part by part in the order of object:parts(). |
destroy() |
boolean | Destroys it the same way running out of armour does: a ship that lists components, such as a capital ship, loses its hull components, and any other ship explodes, unless its pilot ejects first. Returns false for an object that takes no damage, such as a nav point, and for one that is already exploding or jumping. Global scripts can destroy any object, and an object's scripts their own. |
destroy_component(component: number) |
boolean | Destroys its component number component, counting from 0, the same way a hit that takes its last armour does: the component blows up and takes the rest of its assembly with it, its damaged model shows in its place, and losing a hull part ends the ship. Returns false if the component is already destroyed, or the object is exploding or jumping. Global scripts can destroy any object's components, and an object's scripts their own. |
Scripts see missiles in flight through handles too. A missile's handle stays valid until its flight ends or its mission ends. Every script can read the fields; global scripts can change those marked changes on any missile, and a missile's own scripts on their missile.
| Field | Type | What it is |
|---|---|---|
type |
MissileType | Its type, such as raptor, or the qualified name of one a mod adds. |
launcher |
object, or nil | The object that launched it, or let it fall; nil once that one has left the mission. |
target |
Target | Changes. What it flies at. Its guidance turns to a new target from the next frame. |
homes |
boolean | Changes. Whether it homes on its target and lights the target's missile warning, as the AI's missiles do; one that doesn't flies straight. As in the original, every missile homes but a player's Screamer outside a multiplayer game, unless a script sets it. |
side |
Side | The side it's on: its launcher's, as it was launched. |
position |
vector | Changes. Where it is. Setting it moves it there at once. |
orientation |
Orientation | Changes. Where its axes point: to its right, down and forward, out of its nose (openreliant.util). Setting it turns it at once, its axes made unit length and at right angles first, and its guidance turns on from there. |
velocity |
vector | Changes. How far it moves in a simulation step, of which there are 25 a second. Setting it pushes it, and its motor carries on from there. |
speed |
number | How fast it moves: the length of its velocity. |
| Method | Returns | What it does |
|---|---|---|
is_valid() |
boolean | Whether the missile is still in flight. A handle stops being valid once its flight ends or its mission ends. |
detonate() |
nothing | Ends its flight now, as it ends when its time runs out: it blows up where it is, with a shockwave for a Havoc or an Imp. Global scripts can set off any missile, and a missile's own scripts their missile. |
Scripts see an object's turrets through handles too: its guns that turn to aim, spin their barrels or launch missiles. A turret's handle stays valid while its object is in the mission. Every script can read the fields; global scripts can change those marked changes on any turret, and a turret's own scripts on their turret.
| Field | Type | What it is |
|---|---|---|
object |
object | The object it's on. |
kind |
TurretKind, or nil | What it is: aimed, which turns to aim at a target of its own; spinning, a gun whose barrels spin up while its object's trigger is held; or launcher, which launches missiles. Nil once it's destroyed. |
destroyed |
boolean | Whether it was destroyed with its base. It turns and fires no more. |
gun_type |
GunType, or nil | The type of the shots it fires; nil for a missile turret, or once it's destroyed. |
position |
vector, or nil | Where its base is; nil once it's destroyed. |
target |
Target, or nil | Changes. What it aims at: an aimed turret's and a missile turret's own target; nil for a spinning gun, which fires where its object points, or once it's destroyed. Setting it aims the turret, which turns to it, and nil leaves it to look for one. |
| Method | Returns | What it does |
|---|---|---|
is_valid() |
boolean | Whether its object is still in the mission. A handle stops being valid once its object is removed or its mission ends. |
require("openreliant.interfaces") gives these groups of the packages' functions, unless a mod offers an interface of the same name. A group a script's packages don't allow is nil.
| Member | Type or returns | Description |
|---|---|---|
to_world(position: vector, orientation: Orientation, point: vector) |
vector | The point of the world that point is in the frame of something at position turned as orientation: point's x to its right, y down and z forward of it. |
to_local(position: vector, orientation: Orientation, point: vector) |
vector | Where the point of the world point is in the frame of something at position turned as orientation: x to its right, y down and z forward of it. |
look_at(direction: vector) |
Orientation | The orientation whose forward axis points along direction, turned about its Y axis, then its X axis, with no roll, as the game turns a ship to look at something. |
angle_off(position: vector, orientation: Orientation, point: vector) |
number | The angle in radians between the forward axis of something at position turned as orientation and the direction to point: 0 dead ahead, pi straight behind. |
turn(orientation: Orientation, axis: Axis, angle: number) |
Orientation | orientation turned by angle radians about its own axis: right-handed, so about its Y axis, which points down, a positive angle turns its nose to the right. |
| Member | Type or returns | Description |
|---|---|---|
register(name: string, definition: {priority: number?, flags: OrderFlags?, init: ((ship: Object, target: Object?, seconds: number) -> ())?, update: (ship: Object, target: Object?, seconds: number) -> boolean?, exit: ((ship: Object, target: Object?, seconds: number) -> ())?}) |
string | Registers an order, which name qualified with the mod's name names. update runs each frame on each ship that follows it, and returns false to end the order; init runs as it starts, and exit as it ends. They can't give or end orders. Returns the qualified name, which give_order and orders.info take. The order goes away when the scripts that registered it stop. |
info(order: string | number) |
OrderInfo, or nil | The name, priority and flags of order: one of the game's, the calling mod's by its own name, or any mod's by the qualified one. Nil for an order that doesn't exist, or a mod's that failed. |
stack(object: Object) |
list of OrderEntry | The orders object has, the one it follows first, each with what it's aimed at. The ones below carry on as each ends. |
cancel(object: Object) |
boolean | Ends the order object follows, as an order ends itself: its exit runs, and the order below it carries on. Returns whether it had one. Global scripts can end any object's orders, and an object's scripts their own object's. |
clear(object: Object) |
boolean | Drops all of object's orders, as a mission's ClearAI does, where the one it follows gives way. Returns whether they were dropped. Global scripts can drop any object's orders, and an object's scripts their own object's. |
give_order(self: Object, order: string | number, target: Object?, component: number?) |
boolean | Gives it order, aimed at target or at nothing, as a mission's SetAI does: the order goes on top of its orders if the one it follows gives way. component aims it at one part of target instead of the whole ship, as a mission's orders can: for Launch, the carrier's launch gate, counting from 0; for Dock, the port. Returns whether it took. Global scripts can give any object orders, and an object's scripts their own object. |
| Member | Type or returns | Description |
|---|---|---|
add_hook |
HooksAdd | hooks.add: adds a handler to the hook name. |
after_hook |
HooksAfter | hooks.after: adds a handler that runs after the function name. |
| Member | Type or returns | Description |
|---|---|---|
give_order(self: Object, order: string | number, target: Object?, component: number?) |
boolean | Gives it order, aimed at target or at nothing, as a mission's SetAI does: the order goes on top of its orders if the one it follows gives way. component aims it at one part of target instead of the whole ship, as a mission's orders can: for Launch, the carrier's launch gate, counting from 0; for Dock, the port. Returns whether it took. Global scripts can give any object orders, and an object's scripts their own object. |
start_launch(self: Object) |
boolean | Starts its Launch, as a mission's StartLaunch does: the first Launch among its orders goes after the short random wait the game gives each ship. Returns whether it had a Launch to start. Global scripts can start any object's launch, and an object's scripts their own. |
add_hook |
HooksAdd | hooks.add: adds a handler to the hook name. |
after_hook |
HooksAfter | hooks.after: adds a handler that runs after the function name. |
| Member | Type or returns | Description |
|---|---|---|
view |
string | number, or nil | The view the camera shows: one of the game's (View), or a mod's by its qualified name; nil while no mission is shown. |
register_view(name: string, definition: {frame: (object: Object, seconds: number) -> {position: vector, orientation: Orientation}, letterbox: boolean?}) |
string | Registers a camera view, which name qualified with the mod's name names. frame gives the camera's position and orientation each frame; its axes must be unit length, at right angles and right-handed. A failed frame goes back to the cockpit view. Returns the qualified name. |
set_view(view: string | number, object: Object?) |
boolean | Switches to view, looking at object, or at the player's ship where it's nil. The view is one of the game's (View), the calling mod's by its own name, or any mod's by the qualified one. Returns whether it switched: a mission that holds the camera, or shows a cutaway, keeps it. |
| Member | Type or returns | Description |
|---|---|---|
register_action(name: string, definition: ActionDefinition) |
string | Registers an action, which name qualified with the mod's name names, and which the controls screen lists by its label for the player to bind. A default key or button that's already taken stays unbound. Returns the qualified name, which action_down and on_action use. Only menu scripts can use it. |
key_down(key: Key) |
boolean | Whether key is held down. |
action_down(action: string | number) |
boolean | Whether the controls bound to action are held: its key, or its joystick button. The action is one of the game's (Action), the calling mod's by its own name, or any mod's by the qualified one. |
| Member | Type or returns | Description |
|---|---|---|
replaced |
list of HudInstrument | The game's instruments the mods' displays stand in for this frame, which aren't drawn (register_display). |
instruments_shown |
boolean | Whether the game's instruments show this frame: during a mission, in the view ahead from the cockpit. |
guns |
HudGuns, or nil | The player's guns as the gunnery window and the targeting cluster show them; nil outside a mission. |
missiles |
HudMissiles, or nil | The player's missiles as the missile window shows them; nil outside a mission. |
target |
Target, or nil | The target the display shows, with its subtarget as component; nil for none, or outside a mission. |
target_display |
HudTargetDisplay, or nil | What the target display shows of its target, in either form, whether or not its window is open; nil without a target or while the display hides it, and outside a mission. |
radar |
HudRadar, or nil | The radar: its range, and the contacts it shows; nil outside a mission. |
kills |
number, or nil | The kills the skull readout shows; nil outside a mission. |
fuel |
number, or nil | The seconds of afterburner fuel the fuel readout shows; nil outside a mission. |
countermeasures |
number, or nil | The countermeasures the coil readout shows; nil outside a mission. |
countermeasures_lit |
boolean | Whether the countermeasures readout was lit as the display last drew it: always in the view ahead from the cockpit, except while it's dark in a flash that ShowHudIcon sets; false outside the view ahead, and outside a mission. |
gauges |
HudGauges, or nil | The targeting cluster about the middle of the screen, as it shows the player's speed, throttle and guns; nil outside a mission. |
ship_status |
HudShipStatus, or nil | The ship status indicator, as it shows the player's shields and armour; nil for a ship without them, or outside a mission. |
lights |
list of HudLight | The status lights that show, steady or flashing, in the order the display packs them; none outside a mission. |
lights_lit |
list of HudLight | The status lights lit as the display last drew them, in the order it packs them: those of lights, but a flashing one only while it's lit. A warning that flashes keeps its place in the grid while it's dark; a light that ShowHudIcon flashes gives its place up. None outside the view ahead from the cockpit, where the display draws no lights, and outside a mission. |
charges |
HudCharges, or nil | The charges of the player's ECM, cloak and spectral shields, which their lights show as bars under them, each from 0 to 1, or nil where the ship doesn't carry the device; nil outside a mission. |
clock |
HudClock, or nil | The mission's clock as the display shows it: the countdown where the mission counts down, and the time played otherwise; nil outside a mission. |
view_name |
string, or nil | The view's name the display writes at the top of the screen, in the views it names; nil in the others, the view ahead from the cockpit among them, and outside a mission. |
caption |
string, or nil | The date the launch types out at the foot of the screen, as far as it has typed it; nil while it isn't shown, and outside a mission. |
damage |
HudDamage, or nil | The damage window, as it shows how well the player's weapons, engines and shields still work as the armour wears, each from 0 to 1, whether or not the window is open; nil outside a mission. |
power |
HudPower, or nil | The power window, as it shows the shields', guns' and engines' shares of the player's power, as the whole percentages it writes, whether or not the window is open; nil outside a mission. |
wingmen |
list of HudWingman | The ships of the player's wing the wing status window shows, the player's first, whether or not the window is open; none outside a mission. |
objectives |
HudObjectives, or nil | The objectives window: the mission's objectives it can show, and the one it shows, whether or not the window is open; nil outside a mission. |
comms |
list of string | The items of the radio's menu the comms window lists, in order, as the number keys pick them, whether or not the window is open; none outside a mission. |
messages |
list of string | The message lines the display shows, oldest first; none outside a mission. |
subtitle |
string, or nil | The line DisplaySubTitle shows near the foot of the screen in the director's view, whichever view it's in; nil for none, and outside a mission. |
speaker_name |
string, or nil | The name the radio's window writes over the speaker's face, while their line plays; nil while a line waits for the window, between lines, and outside a mission. |
key_prompt |
Action, or nil | The action whose key WaitForKey's prompt asks the player to press; nil while nothing waits, and outside a mission. |
jump_prompt |
HudJumpPrompt, or nil | The prompt that flashes in the view ahead for what the mission has ready: the warp's or the jump's; nil for none, and outside a mission. |
open_windows |
list of HudInstrument | The game's windows that are open, opening or closing (window_state); none outside a mission. |
shown |
boolean | Whether it's shown this frame, which is when what's drawn on it shows, and its other fields can be read. |
width |
number | The window's width, in pixels. |
height |
number | The window's height, in pixels. |
register_display(name: string, definition: {frame: (seconds: number) -> (), replaces: { HudInstrument }?, layout: { [HudInstrument]: HudLayout }?, parts: { [HudPart]: HudPartLayout }?}) |
string | Registers a display, which name qualified with the mod's name names. While the flight display shows, frame draws it with this package's functions each frame, until it's turned off with set_display_enabled. A failed frame turns off that display only. replaces lists the game's instruments it stands in for, which aren't drawn while it's on, layout moves and scales the instruments it names, and parts moves, scales, aligns, rewords or hides the parts of them it names; they keep working, and go back as they were as soon as it's turned off, fails or its mod stops. Returns the qualified name. |
set_display_enabled(name: string, enabled: boolean) |
boolean | Turns the display name on or off: the calling mod's by its own name, or any mod's by the qualified one. Returns whether it's registered. |
bounds(instrument: HudInstrument) |
HudBounds, or nil | Where the game's instrument instrument last drew, in the window's pixels, as the mods' displays place it, and even while one stands in for it; nil before it first draws, or outside a mission. |
part_bounds(part: HudPart) |
HudBounds, or nil | Where the part part of the game's instruments last drew, in the window's pixels, as the mods' displays place it, and even while one hides it; nil before it first draws, or outside a mission. |
window_state(instrument: HudInstrument) |
HudWindowState, or nil | How far the game's window that holds instrument has opened, and whether it's opening or closing, as the display last moved it on, which it does in every view; for the comms, the further open of its two windows. Nil for an instrument outside the windows, and outside a mission. |
picture(at: vector, file: string, size: vector?, style: FillStyle?) |
nothing | Draws a PNG from the calling mod at at, with size in window pixels (nil uses its native size), tinted by style. Files are cached for the script context; one that hasn't been drawn for 2 frames makes room for others when the cache is full. |
power_ball(at: vector, size: vector?, style: FillStyle?) |
nothing | Draws the power window's ball, turning with the player's power setting as the window's does, whether or not the window is open, with its top left corner at at and size in window pixels (nil for its size on the game's display), tinted by style. Unlike the window's, it doesn't shake when the ship is hit. Only during a mission. |
shape(at: vector, index: number, style: ShapeStyle?) |
nothing | Draws shape index of the game's sprite set for this layer (the flight display's, or the front end screen's), with its anchor at at, in window pixels. The style's scale multiplies its size in the game's pixels. |
text(at: vector, text: string, style: TextStyle?) |
nothing | Draws text at at, in pixels from the window's top left corner, in the game's font, as style says. |
line(from: vector, to: vector, style: LineStyle?) |
nothing | Draws a line from from to to, in pixels, as style says. |
rectangle(from: vector, to: vector, style: FillStyle?) |
nothing | Fills the rectangle between the corners from and to, in pixels, as style says. |
measure(text: string, style: (number | TextStyle)?) |
Size | The size of text in window pixels, as text draws it, and where its letters' pixels fall from the point it's drawn at: style is a text style, or just a number for its scale. |
| Member | Type or returns | Description |
|---|---|---|
play_sound(index: number, volume: number?) |
boolean | Plays sound index of the game's standard sounds, the menus' and the display's, at volume from 0 to 1, or at its loudest where it's nil. Returns whether it played. |
play_music(name: string) |
nothing | Plays the piece name from the game's music folder for ever, in place of the music playing. |
say(line: BettyLine) |
boolean | Betty says line. Returns whether she does. |
| Member | Type or returns | Description |
|---|---|---|
player |
object, or nil | The player's ship, while a mission runs; nil between missions. |
mission |
Mission, or nil | The mission that runs, with its number and its file's name; nil between missions. |
objects() |
list of objects | Every object in the mission, in the order of their slots. |
missiles() |
list of missile | Every missile in flight, newest first. |
set_player_target(target: Object, component: number?) |
boolean | Makes target, or its component number component, the player's target, as a mission's SetPlayerTarget does: the display shows it, and the player stops matching speeds. Returns whether it worked: false for a target the player can't aim at, such as a destroyed component, and between missions. |
set_primary_target(target: Object?, component: number?) |
boolean | Makes target, or its component number component, the mission's primary target, as a mission's SetPrimaryTarget does: the PRIMARY TARGET key selects it. Nil leaves the mission without one. Returns false between missions. |
set_objective(objective: number, state: ObjectiveState) |
boolean | Objective objective of the mission that runs, numbered from 0 to 9 as a mission's SetObjective numbers them, takes state, as SetObjective does: hidden, listed, or current, which the objectives window then shows. Returns whether it changed: false between missions, and in a mission whose objectives nothing names. |
| Member | Type or returns | Description |
|---|---|---|
mission |
Mission, or nil | The mission that runs, with its number and its file's name; nil between missions. |
send_global_event(name: string, data: any) |
nothing | Sends the event name to the global and mission scripts, with data, which must be plain data. It arrives at the next update. |
| Member | Type or returns | Description |
|---|---|---|
pointer |
Pointer, or nil | Where the pointer is, in pixels from the window's top left corner, and whether its left button is down; nil before it has been over the window. |
shown |
boolean | Whether it's shown this frame, which is when what's drawn on it shows, and its other fields can be read. |
width |
number | The window's width, in pixels. |
height |
number | The window's height, in pixels. |
register_screen(name: string, definition: {frame: (seconds: number) -> (), key: ((key: Key, down: boolean) -> ())?}) |
string | Registers a screen, which name qualified with the mod's name names. While it's shown (show_screen), frame draws it with this package's functions each frame, and key gets each key as it goes down and up. Returns the qualified name. |
replace_screen(screen: FrontEndScreen, name: string?) |
boolean | Makes the calling mod's registered screen name stand in for the front end's own screen, such as "main_menu": while the front end shows screen, it runs and draws the mod's screen in its place, over its background. nil gives screen back to the front end. Only menu scripts can use it. Returns whether the screen is registered. |
go_to(screen: FrontEndScreen) |
nothing | Asks the front end to go to its screen screen, or to the mod's screen that stands in for it. Only menu scripts can use it. |
start_game_mode(name: string) |
boolean | Asks the front end to start the game mode name: the calling mod's by its own name, or any mod's by the qualified one. Only menu scripts can use it. Returns whether the mode is registered. |
launch_mission() |
nothing | From a game mode's briefing screen, asks the front end to fly the mode's next mission (core.game_mode_mission). Only menu scripts can use it. |
play_movie(name: string) |
nothing | Plays the movie name, a Bink file of the game folder's or a mod's such as "intro.bik", on a cleared screen, as the front end shows its next frame. Escape or the pointer's right button ends it. Only menu scripts can use it. |
quit() |
nothing | Asks the front end to quit the game. Only menu scripts can use it. |
show_screen(name: string?) |
boolean | Shows the screen name: the calling mod's by its own name, or any mod's by the qualified one. Nil closes the screen shown. Returns whether it's registered. |
picture(at: vector, file: string, size: vector?, style: FillStyle?) |
nothing | Draws a PNG from the calling mod at at, with size in window pixels (nil uses its native size), tinted by style. Files are cached for the script context; one that hasn't been drawn for 2 frames makes room for others when the cache is full. |
shape(at: vector, index: number, style: ShapeStyle?) |
nothing | Draws shape index of the game's sprite set for this layer (the flight display's, or the front end screen's), with its anchor at at, in window pixels. The style's scale multiplies its size in the game's pixels. |
text(at: vector, text: string, style: TextStyle?) |
nothing | Draws text at at, in pixels from the window's top left corner, in the game's font, as style says. |
line(from: vector, to: vector, style: LineStyle?) |
nothing | Draws a line from from to to, in pixels, as style says. |
rectangle(from: vector, to: vector, style: FillStyle?) |
nothing | Fills the rectangle between the corners from and to, in pixels, as style says. |
measure(text: string, style: (number | TextStyle)?) |
Size | The size of text in window pixels, as text draws it, and where its letters' pixels fall from the point it's drawn at: style is a text style, or just a number for its scale. |
Each is a function of the original game, under its name. hooks.add runs a handler before the
function, and hooks.after runs one after it. Changing a field of e changes what the function
does, and a handler that returns false stops it.
Damage to object from attacker. Its shield in quadrant takes value first. What gets through, times factor, damages its armour (object_armor_damage). kind says what dealt the damage.
| Field | Type |
|---|---|
object |
object |
quadrant |
Quadrant |
value |
number |
factor |
number |
attacker |
object |
kind |
DamageKind |
Damage to the armour of object in quadrant, once its shield there is down: value from attacker, of kind. Armour below zero destroys the object (object_destroyed).
| Field | Type |
|---|---|
object |
object |
quadrant |
Quadrant |
value |
number |
attacker |
object |
kind |
DamageKind |
Damage to one of the components of object, such as a capital ship's turret or engine: value from attacker, of kind.
| Field | Type |
|---|---|
object |
object |
value |
number |
attacker |
object |
kind |
DamageKind |
How hard damage of kind lands on object at the game's difficulty: the result is what value becomes.
| Field | Type |
|---|---|
object |
object |
kind |
DamageKind |
value |
number |
result |
number |
The end of object: its pilot ejects, or it explodes. With may_spin, it may spin out as it goes; with no_eject, the player's pilot doesn't eject.
| Field | Type |
|---|---|
object |
object |
may_spin |
boolean |
no_eject |
boolean |
owner fires a shot of gun_type from one of its guns. heard says whether the shot makes a sound.
| Field | Type |
|---|---|
owner |
object |
gun_type |
GunType |
heard |
boolean |
The radio says a line: the speech file speech, its speaker's face playing the film film, as mode has it, at once (now), queued, or queued unless the radio is busy (if_idle). A handler can change the names, to say another line, or stop it, so that nothing is said and what waits for it goes on.
| Field | Type |
|---|---|
speech |
string |
film |
string |
mode |
RadioMode |
launcher launches a missile from one of its racks at target.
| Field | Type |
|---|---|
launcher |
object |
target |
Target |
One of the missile turrets of launcher launches a Screamer at target.
| Field | Type |
|---|---|
launcher |
object |
target |
Target |
object is given order, aimed at target, on top of its orders. The result says whether it took: "taken", "refused" where the object refuses it, the order it runs doesn't give way or it has too many, or "conflict" where the order it runs can't give way. A handler that stops the push leaves "refused".
| Field | Type |
|---|---|
object |
object |
order |
Order |
target |
Target |
result |
OrderPushed |
object ends the order it runs, which its exit runs for where it has started, and the order below starts again. The result says whether it had one. The orders a mod registers that OpenReliant removes, as the mod's scripts close or the object goes, pop without this hook.
| Field | Type |
|---|---|
object |
object |
result |
boolean |
object, a ship under the Fight order, chooses its next combat maneuver, which starts on its next update. The result is the maneuver: one of the game's by its name (Maneuver), or one a mod adds by its number (records.maneuvers). A handler that stops it without setting the result leaves no maneuver, and Fight chooses again on the ship's next update.
| Field | Type |
|---|---|
object |
object |
result |
Maneuver |
object, a ship under the Fight order, flies its combat maneuver for a frame (object.maneuver): the commands of its script run until one waits. A handler that stops it can fly the ship itself.
| Field | Type |
|---|---|
object |
object |
object runs its current order, as it does each frame. Each order's routines have hooks of their own, such as order_fight.
| Field | Type |
|---|---|
object |
object |
The mission's script runs one of its commands, command, on arguments: as many as the command takes, the first first, and 0 past them. They're the script's own values: numbers, and the places of the mission's ships and texts in its file. To change them, set e.arguments to a new list. The result is what the command gives: "run_on" lets the script's thread go on, "wait" ends its run until it runs next, and a number is the command's value, which lets it go on too. A handler that stops the command leaves "run_on"; one that stops it and sets "hold" has the thread wait, and run the command again, on the same arguments and through this hook, the next time it runs.
| Field | Type |
|---|---|
command |
MissionCommand |
arguments |
{ number } |
result |
MissionCommandResult |
The restart screen, after a mission is lost or left. Its result is the player's choice: replay_from_briefing, replay_from_launch or main_menu. A handler that stops it chooses without the screen: main_menu, unless it sets e.result.
| Field | Type |
|---|---|
result |
RestartChoice |
object, a fighter, turns on whoever last hit it, once it has taken enough damage lately and its order allows it.
| Field | Type |
|---|---|
object |
object |
Steps that the original takes inside a larger function, which OpenReliant makes functions of its own so that scripts can hook them. Handlers change them as they change the game's functions.
A mission is lost or left, and movie plays before the restart screen. In the game's campaign, it is the pilot's funeral where ending is destroyed, the pilot in the enemy's hands where it is captured, the pilot's execution where it is friendly_fire, and none where the player left the mission. A game mode's mission plays none. rating is how the mission's script rated it, and mission is its number.
| Field | Type |
|---|---|
ending |
Ending |
rating |
Rating |
mission |
number |
movie |
string, or nil |
result |
string, or nil |
The pilot's career in the game's campaign ends after mission mission, and movie plays before the main menu: the pilot's transfer where ending is rescued, after too many pickups, and for a total failure (ending total_failure) the transfer or, after missions 25 and 27 without the Yamato, the shuttle at Fort Bear. rating is how the mission's script rated it.
| Field | Type |
|---|---|
ending |
Ending |
rating |
Rating |
mission |
number |
movie |
string, or nil |
result |
string, or nil |
Mission mission of the game's campaign awards the pilot medal, and movie, the medal's ceremony, plays.
| Field | Type |
|---|---|
medal |
Medal |
mission |
number |
movie |
string, or nil |
result |
string, or nil |
Each order an object follows, such as Fight or Run Away, runs routines of the original game:
an init as the order starts, an update each frame, and for a few an exit as it ends. Each
routine is a hook under its name. Its handlers see the object that runs the order as e.object,
and e.object.order is the order. Where OpenReliant doesn't run a routine yet, its handlers
still run, and the function does nothing.
| Hook | What it is |
|---|---|
order_do_nothing |
The update of order 0, Do Nothing, which object runs. |
order_fly_aimlessly_init |
The init of order 1, Fly Aimlessly, which object runs. |
order_fly_aimlessly |
The update of order 1, Fly Aimlessly, which object runs. |
order_launch_missile |
The update of order 2, Launch Missile, which object runs. |
order_launch_jack_hammer |
The update of order 3, which object runs. |
order_warp_in_init |
The init of order 4, Warp In, which object runs. |
order_warp_in |
The update of order 4, Warp In, which object runs. |
order_warp_out_init |
The init of order 5, Warp Out, which object runs. |
order_warp_out |
The update of order 5, Warp Out, which object runs. |
order_fly_init |
The init of order 6, Fly, which object runs. |
order_fly |
The update of order 6, Fly, which object runs. |
order_run_away |
The update of order 7, Run Away, which object runs. |
order_land_init |
The init of order 8, Land, which object runs. |
order_land |
The update of order 8, Land, which object runs. |
order_escort_init |
The init of order 9, Escort, which object runs. |
order_escort |
The update of order 9, Escort, which object runs. |
order_find_new_target |
The update of order 10, Find New Target, which object runs. |
order_explode_init |
The init of order 11, Explode, which object runs. |
order_explode |
The update of order 11, Explode, which object runs. |
order_ripper_grabs_target_object_init |
The init of order 12, Ripper grabs target object, which object runs. |
order_ripper_grabs_target_object |
The update of order 12, Ripper grabs target object, which object runs. |
order_ripper_grabs_target_object_exit |
The exit of order 12, Ripper grabs target object, which object runs. |
order_object_attach_init |
The init of order 13, Object Attach, which object runs. |
order_object_attach |
The update of order 13, Object Attach, which object runs. |
order_formation_regroup_init |
The init of order 14, Formation Regroup, which object runs. |
order_formation_regroup |
The update of order 14, Formation Regroup, which object runs. |
order_patrol_route_init |
The init of order 15, Patrol Route, which object runs. |
order_patrol_route |
The update of order 15, Patrol Route, which object runs. |
order_toggle_cloak |
The update of order 16, Toggle Cloak, which object runs. |
order_ship_follow_curve_init |
The init of order 17, Ship Follow Curve, which object runs. |
order_ship_follow_curve |
The update of order 17, Ship Follow Curve, which object runs. |
order_ship_follow_curve_exit |
The exit of order 17, Ship Follow Curve, which object runs. |
order_slow_rotate |
The update of order 18, Slow Rotate, which object runs. |
order_jump_in_init |
The init of order 19, Jump In, and of order 40, Jump In, which object runs. |
order_jump_in |
The update of order 19, Jump In, and of order 40, Jump In, which object runs. |
order_jump_out_init |
The init of order 20, Jump Out, and of order 41, Jump Out, which object runs. |
order_jump_out |
The update of order 20, Jump Out, and of order 41, Jump Out, which object runs. |
order_find_scoop_up |
The update of order 21, Find Scoop Up, which object runs. |
order_random_spin_slow_init |
The init of order 22, Random Spin Slow, which object runs. |
order_random_spin_medium_init |
The init of order 23, Random Spin Medium, which object runs. |
order_random_spin_fast_init |
The init of order 24, Random Spin Fast, which object runs. |
order_fixed_gate_jump_in_init |
The init of order 25, Fixed Gate Jump In, which object runs. |
order_fixed_gate_jump_in |
The update of order 25, Fixed Gate Jump In, which object runs. |
order_fixed_gate_jump_out_init |
The init of order 26, Fixed Gate Jump Out, which object runs. |
order_fixed_gate_jump_out |
The update of order 26, Fixed Gate Jump Out, which object runs. |
order_formation_init |
The init of order 27, Formation, which object runs. |
order_formation |
The update of order 27, Formation, which object runs. |
order_fixed_gate_open_init |
The init of order 28, Fixed Gate Open, which object runs. |
order_fixed_gate_open |
The update of order 28, Fixed Gate Open, which object runs. |
order_fixed_gate_close_init |
The init of order 29, Fixed Gate Close, which object runs. |
order_fixed_gate_close |
The update of order 29, Fixed Gate Close, which object runs. |
order_eject_init |
The init of order 30, Eject, which object runs. |
order_eject |
The update of order 30, Eject, which object runs. |
order_fixed_gate_collapse_init |
The init of order 31, Fixed Gate Collapse, which object runs. |
order_fixed_gate_collapse |
The update of order 31, Fixed Gate Collapse, which object runs. |
order_match_speed |
The update of order 32, Match Speed, which object runs. |
order_dark_reign_shoot |
The update of order 33, Dark Reign shoot, which object runs. |
order_move_to_spawn_pos |
The update of order 34, Move to spawn pos, which object runs. |
order_turns_object_lights_on_init |
The init of order 35, Turns object lights on, which object runs. |
order_turns_object_lights_on |
The update of order 35, Turns object lights on, which object runs. |
order_make_boridin_section_break_away_init |
The init of order 36, Make Boridin section break away, which object runs. |
order_rotate_boridin_breakaway_warp_projector_init |
The init of order 37, Rotate Boridin breakaway warp projector, which object runs. |
order_start_warp_projection_from_boridin_init |
The init of order 38, Start warp projection from Boridin, which object runs. |
order_start_warp_projection_from_boridin |
The update of order 38, Start warp projection from Boridin, which object runs. |
order_make_ripper_drop_what_its_carrying_init |
The init of order 39, Make ripper drop what it's carrying, which object runs. |
order_make_ripper_drop_what_its_carrying |
The update of order 39, Make ripper drop what it's carrying, which object runs. |
order_turns_object_lights_off |
The update of order 42, Turns object lights off, which object runs. |
order_huuuuuuuge_explosion |
The update of order 43, Huuuuuuuge explosion, which object runs. |
order_immediately_set_ship_to_zero_velocity_and_rotation |
The update of order 44, Immediately set ship to zero velocity and rotation, which object runs. |
order_fly_ship_backwards |
The update of order 45, Fly ship backwards, which object runs. |
player_controls |
The update of order 100, Player Control, which object runs. |
order_multiplayer_control |
The update of order 101, Multiplayer Control, which object runs. |
order_avoid_target_init |
The init of order 102, Avoid Target, which object runs. |
order_avoid_target |
The update of order 102, Avoid Target, which object runs. |
order_torpedo_init |
The init of order 103, Torpedo, which object runs. |
order_torpedo |
The update of order 103, Torpedo, which object runs. |
order_launch_init |
The init of order 104, Launch, which object runs. |
order_launch |
The update of order 104, Launch, which object runs. |
order_fight_init |
The init of order 105, Fight, which object runs. |
order_fight |
The update of order 105, Fight, which object runs. |
order_abandoned_init |
The init of order 106, Eject, which object runs. |
order_abandoned |
The update of order 106, Eject, which object runs. |
order_scoop_up_init |
The init of order 107, Scoop Up, which object runs. |
order_scoop_up |
The update of order 107, Scoop Up, which object runs. |
order_scoop_up_exit |
The exit of order 107, Scoop Up, which object runs. |
order_eject_spin_init |
The init of order 108, Eject Spin, which object runs. |
order_eject_spin |
The update of order 108, Eject Spin, which object runs. |
order_dock_init |
The init of order 109, Dock, which object runs. |
order_dock |
The update of order 109, Dock, which object runs. |
order_dock_exit |
The exit of order 109, Dock, which object runs. |
order_fire_ion_cannon_init |
The init of order 110, Dark reign shoot, which object runs. |
order_fire_ion_cannon |
The update of order 110, Dark reign shoot, which object runs. |
order_fire_ion_cannon_exit |
The exit of order 110, Dark reign shoot, which object runs. |
order_ripper_end_drop_object_init |
The init of order 111, Ripper end drop object, which object runs. |
order_ripper_end_drop_object |
The update of order 111, Ripper end drop object, which object runs. |
order_ripper_attach_cargo_pod_to_mammoth_init |
The init of order 112, Ripper attach cargo pod to Mammoth, which object runs. |
order_ripper_attach_cargo_pod_to_mammoth |
The update of order 112, Ripper attach cargo pod to Mammoth, which object runs. |
order_eject_fighter_attack |
The update of order 113, Eject fighter attack, which object runs. |
order_disrupted_init |
The init of order 114, Disrupted, which object runs. |
order_disrupted |
The update of order 114, Disrupted, which object runs. |
order_disrupted_exit |
The exit of order 114, Disrupted, which object runs. |
order_make_capship_list_left |
The update of order 115, Make capship list left, which object runs. |
order_make_capship_list_right |
The update of order 116, Make capship list right, which object runs. |
order_friendly_fire_init |
The init of order 117, Friendly Fire, which object runs. |
order_friendly_fire |
The update of order 117, Friendly Fire, which object runs. |
order_eject_player_init |
The init of order 118, Eject Player, which object runs. |
order_eject_player |
The update of order 118, Eject Player, which object runs. |
order_ship_follow_curve_backwards_init |
The init of order 119, Ship Follow Curve Backwards, which object runs. |
order_ship_follow_curve_backwards |
The update of order 119, Ship Follow Curve Backwards, which object runs. |
order_ship_follow_curve_backwards_exit |
The exit of order 119, Ship Follow Curve Backwards, which object runs. |
order_mill_init |
The init of order 120, Mill, which object runs. |
order_mill |
The update of order 120, Mill, which object runs. |
order_deathmatch_respawn_effect_init |
The init of order 121, Deathmatch Respawn Effect, which object runs. |
order_deathmatch_respawn_effect |
The update of order 121, Deathmatch Respawn Effect, which object runs. |
order_deathmatch_respawn_effect_exit |
The exit of order 121, Deathmatch Respawn Effect, which object runs. |
order_first_step_init |
The init of order 21, Find Scoop Up, and of order 115, Make capship list left, and of order 116, Make capship list right, which object runs. |
The events a mission's triggers can wait for, under the names of their conditions. Each comes
for the mission's ships, those its file lists, whether or not a trigger waits for it. Their
fields can only be read, and a handler that returns false stops the handlers after it.
attacker hits object: its component number component, or the object as a whole when component is nil.
| Field | Type |
|---|---|
object |
object |
attacker |
object |
component |
number, or nil |
object is destroyed, or its component number component. attacker is what last hit it. Each ship is destroyed once, though its components can be destroyed before it.
| Field | Type |
|---|---|
object |
object |
component |
number, or nil |
attacker |
object, or nil |
object has launched from its carrier.
| Field | Type |
|---|---|
object |
object |
reached_by has reached the mission's ship ship, a point on a curve it follows or the curve's end.
| Field | Type |
|---|---|
ship |
number |
reached_by |
object |
The director's camera has reached the mission's ship ship, a point on its curve or the curve's end.
| Field | Type |
|---|---|
ship |
number |
other stands close to object, within 20 times its radius: distance times it. The game looks once a second, and only while one of object's triggers waits for it.
| Field | Type |
|---|---|
object |
object |
other |
object |
distance |
number |
other stands within the distance that one of object's triggers names, counted in object's radius: distance times it. The game looks once a second, and only while such a trigger waits for it.
| Field | Type |
|---|---|
object |
object |
other |
object |
distance |
number |
object has taken scooped aboard with its tractor beam.
| Field | Type |
|---|---|
object |
object |
scooped |
object |
JUMP DRIVE took the jump the mission had ready for object, the player's ship.
| Field | Type |
|---|---|
object |
object |
object has jumped in.
| Field | Type |
|---|---|
object |
object |
object has come in through the fixed gate gate.
| Field | Type |
|---|---|
object |
object |
gate |
object |
JUMP DRIVE took the warp the mission had ready for object, the player's ship.
| Field | Type |
|---|---|
object |
object |
REQUEST BACKUP brought the mission's backup for object, the player's ship.
| Field | Type |
|---|---|
object |
object |
object, a Ripper, has grabbed aboard.
| Field | Type |
|---|---|
object |
object |
grabbed |
object |
object, a Ripper, has let go of dropped, or fitted it to a ship.
| Field | Type |
|---|---|
object |
object |
dropped |
object |
object cloaks.
| Field | Type |
|---|---|
object |
object |
object uncloaks.
| Field | Type |
|---|---|
object |
object |
object, the player's ship, has gone into a ship through one of its trigger polygons, as into the Stalag's duct.
| Field | Type |
|---|---|
object |
object |
object, the player's ship, has come out of a ship through one of its trigger polygons.
| Field | Type |
|---|---|
object |
object |
object has retrieved its limpet pod and left the docking port.
| Field | Type |
|---|---|
object |
object |
object has docked.
| Field | Type |
|---|---|
object |
object |
The explosion that object set off is over.
| Field | Type |
|---|---|
object |
object |
flown_by has flown through object, a training hoop, from behind it.
| Field | Type |
|---|---|
object |
object |
flown_by |
object |
Their fields can only be read, and a handler that returns false stops the handlers after it.
A mission has started: number number, from the file file. Its first ships are there.
| Field | Type |
|---|---|
number |
number |
file |
string |
The mission ends: ending says how it ended for the player, and rating how its script rated it.
| Field | Type |
|---|---|
ending |
Ending |
rating |
Rating |
object has been added to the mission.
| Field | Type |
|---|---|
object |
object |
object is leaving the mission: it has blown up, or its slot is being reset. Its handle stops being valid after this.
| Field | Type |
|---|---|
object |
object |
missile has been launched by launcher, or let fall from it. Its target is set.
| Field | Type |
|---|---|
missile |
missile |
launcher |
object, or nil |
The flight of missile, launched by launcher, ends: it has struck something or run out of time, and blows up. Its handle stops being valid after this. launcher is nil once it has left the mission.
| Field | Type |
|---|---|
missile |
missile |
launcher |
object, or nil |
object has started order, which has come to the top of its orders. One-shot orders, which run once and end straight away, don't start.
| Field | Type |
|---|---|
object |
object |
order |
Order |
object has ended order, which it had started, as the order was popped or replaced.
| Field | Type |
|---|---|
object |
object |
order |
Order |
The mission's trigger number trigger has fired on an event of condition. It's one of object's triggers, or a flight group's or a squad's when object is nil.
| Field | Type |
|---|---|
trigger |
number |
condition |
Condition |
object |
object, or nil |
Values given as tables of fields. Scripts can only read the ones OpenReliant gives them.
| Field | Type |
|---|---|
right |
vector |
down |
vector |
forward |
vector |
| Field | Type |
|---|---|
object |
object, or nil |
component |
number, or nil |
flight_group |
number, or nil |
squad |
number, or nil |
| Field | Type |
|---|---|
left |
number |
right |
number |
fore |
number |
aft |
number |
| Field | Type |
|---|---|
name |
string |
class |
PartClass, or nil |
parent |
number, or nil |
component |
number, or nil |
armor |
number, or nil |
full_armor |
number, or nil |
invulnerable |
Invulnerability, or nil |
destroyed |
boolean |
damaged |
boolean |
position |
vector, or nil |
| Field | Type |
|---|---|
part |
number |
kind |
AttachmentKind |
destroyed |
boolean |
position |
vector, or nil |
| Field | Type |
|---|---|
number |
number |
place |
number |
count |
number |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
name |
string | needed |
label |
string | needed |
description |
string | "" |
missions |
list of number | GameModeMissionTable | needed |
ship |
ShipType, or nil | nil |
loop |
boolean | false |
campaign |
boolean | false |
briefing |
string, or nil | nil |
briefing_room |
Carrier, or nil | nil |
loadout_ships |
list of ShipType, or nil | nil |
wing_pilots |
list of PilotNumber, or nil | nil |
debriefing |
boolean | false |
ending |
string, or nil | nil |
records |
string, or nil | nil |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
number |
number | needed |
as |
number, or nil | nil |
objectives |
list of string, or nil | nil |
hologram |
string, or nil | nil |
last_word |
string, or nil | nil |
| Field | Type |
|---|---|
number |
number |
file |
string |
| Field | Type |
|---|---|
name |
string |
priority |
number |
flags |
OrderFlags |
| Field | Type |
|---|---|
players |
boolean |
one_shot |
boolean |
retaliate |
boolean |
avoidance |
boolean |
send_flight |
boolean |
| Field | Type |
|---|---|
order |
string | number |
target |
Target |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
mode |
RadioMode | "now" |
face |
FaceFilm | "talking" |
once |
boolean | false |
| Field | Type |
|---|---|
group |
number |
groups |
number |
all |
boolean |
synchronized |
boolean |
gun |
GunType, or nil |
charge |
number |
full_charge |
number |
paired |
boolean |
rounds |
number, or nil |
| Field | Type |
|---|---|
armed |
MissileType, or nil |
left |
number |
ring |
list of HudMissile |
| Field | Type |
|---|---|
type |
MissileType |
left |
number |
place |
number |
| Field | Type |
|---|---|
form |
TargetForm |
name |
string, or nil |
pilot |
string, or nil |
range |
number |
speed |
number |
shields |
HudArcs, or nil |
armor |
HudArcs, or nil |
hits |
list of Quadrant |
subtarget_class |
PartClass, or nil |
subtarget |
string, or nil |
subtarget_armor |
number, or nil |
hull |
number, or nil |
| Field | Type |
|---|---|
left |
number |
right |
number |
fore |
number |
aft |
number |
| Field | Type |
|---|---|
range |
number |
reach |
number |
zooming |
boolean |
rings |
number |
contacts |
list of HudContact |
| Field | Type |
|---|---|
object |
object |
at |
vector |
height |
number |
look |
HudContactLook |
| Field | Type |
|---|---|
speed |
number |
asked |
number |
speed_share |
number |
throttle_share |
number |
throttle_brightness |
number, or nil |
charge |
number |
nova |
boolean |
| Field | Type |
|---|---|
shields |
HudArcs |
armor |
HudArcs |
reserve_fore |
number |
reserve_aft |
number |
hits |
list of Quadrant |
| Field | Type |
|---|---|
ecm |
number, or nil |
cloak |
number, or nil |
spectral_shields |
number, or nil |
| Field | Type |
|---|---|
minutes |
number |
seconds |
number |
| Field | Type |
|---|---|
weapons |
number |
engines |
number |
shields |
number |
| Field | Type |
|---|---|
shields |
number |
weapons |
number |
engines |
number |
| Field | Type |
|---|---|
object |
object |
number |
number |
armor |
number |
| Field | Type |
|---|---|
showing |
number, or nil |
list |
list of HudObjective |
| Field | Type |
|---|---|
number |
number |
name |
string, or nil |
current |
boolean |
| Field | Type |
|---|---|
left |
number |
top |
number |
right |
number |
bottom |
number |
| Field | Type |
|---|---|
phase |
HudWindowPhase |
opened |
number |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
color |
vector | vector.create(1, 1, 1) |
alpha |
number | 1 |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
color |
vector | vector.create(1, 1, 1) |
alpha |
number | 1 |
scale |
number | 1 |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
font |
string, or nil | nil |
base_font |
Font | "default" |
color |
vector | vector.create(1, 1, 1) |
alpha |
number | 1 |
scale |
number | 1 |
align |
Align | "left" |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
color |
vector | vector.create(1, 1, 1) |
alpha |
number | 1 |
width |
number | 1 |
| Field | Type |
|---|---|
width |
number |
height |
number |
ink |
HudBounds, or nil |
| Field | Type |
|---|---|
at |
vector |
down |
boolean |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
label |
string | needed |
key |
Key, or nil | nil |
modifier |
Modifier | "none" |
button |
number, or nil | nil |
gamepad_button |
GamepadButton, or nil | nil |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
name |
string | needed |
shader |
string | needed |
stage |
EffectStage | "before_hud" |
order |
number | 0 |
parameters |
list of number | none |
enabled |
boolean | true |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
name |
string | needed |
shader |
string | needed |
textures |
list of string | none |
everywhere |
boolean | false |
see_through |
boolean | false |
writes_depth |
boolean | true |
bloom |
number | 1 |
parameters |
list of number | none |
enabled |
boolean | true |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
name |
string | needed |
shader |
string | needed |
parameters |
list of number | none |
enabled |
boolean | true |
| Field | Type |
|---|---|
title |
string |
options |
list of Option |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
key |
string | "" |
label |
string | needed |
kind |
OptionKind | needed |
default |
boolean | number | string, or nil | nil |
description |
string | "" |
choices |
list of Choice | none |
min |
number, or nil | nil |
max |
number, or nil | nil |
step |
number, or nil | nil |
| Field | Type |
|---|---|
value |
boolean | number | string |
label |
string |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
scene |
string | needed |
movie |
string, or nil | nil |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
failure |
list of string | none |
partial_failure |
list of string | none |
partial_success |
list of string | none |
success |
list of string | none |
success_bonus |
list of string | none |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
title |
string | needed |
paragraphs |
list of string | none |
picture |
number | needed |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
title |
string | needed |
paragraphs |
list of string | none |
still |
number | needed |
movie |
string | needed |
carrier |
Carrier | needed |
A table a script gives, which may leave out a field with a default.
| Field | Type | Default |
|---|---|---|
movie |
string | needed |
unless |
list of GameVariable | none |
sets |
GameVariable, or nil | nil |
A table a script gives, which may leave out any field.
| Field | Type | Default |
|---|---|---|
yaw |
boolean | false |
pitch |
boolean | false |
roll |
boolean | false |
| Field | Type |
|---|---|
ending |
Ending |
rating |
Rating |
| Field | Type |
|---|---|
offset |
vector, or nil |
scale |
number, or nil |
| Field | Type |
|---|---|
offset |
vector, or nil |
scale |
number, or nil |
align |
Align, or nil |
hidden |
boolean, or nil |
text |
string, or nil |
A value that has a name in OpenReliant is given as a string: its name. One without a name is a number. A script can set a field to either.
predator, naginata, grendel, crusader, coyote, mirage, tempest, patriot, wolverine, reaper, shroud, phoenix, reliant, yamato, alsace, kestrel, falco, victorious, endeavour, mitchell, bremen, arc_ship, ulysses, sai, nanny, galahad, hades, mule, lonestar, limpet_car, prowler, ripper, lueneburg, mammoth, intruder, sentry, goodwill, stork, sky_hawk, haidar, karak, salin, azan, sabre, lagg, kamov, saracen, salamander, scimitar, basilisk, kossac, yao, ramases, kozlov, morzov, badanov, pukov, xia, riza, cyclops, kurgan, sharov, gurevich, berijev, kirov, loki, kalan_shuttle, saladin, darkreign, stalag, antanov, kronstadt, boridin, troop_car, torpedo, ulysses_back, ulysses_fin, escape_pod, debris, debris_1, debris_2, debris_3, debris_4, debris_5, debris_6, debris_7, debris_8, debris_9, crewman, crewman_1, crewman_2, crewman_3, russian_torpedo, mammoth_back, baxter, neptune_hi, triton_hi, uranus_hi, saturn_hi, titan_hi, jupiter_hi, europa_hi, ganymede_hi, io_hi, calisto_hi, venus_hi, earth, kronstadt_wreck, planet_placeholder_4, proto_gate, advanced_gate, proximity_mine, black_box, satellite, mammoth_wreck_front, mammoth_wreck_back, proto_gate_panel, badanov_wreck_back, badanov_wreck_front, kurgan_wreck, krasnaya, asteroid_1, asteroid_2, asteroid_3, asteroid_4, asteroid_5, asteroid_6, asteroid_7, research_station, latov, gurevich_wreck_back, training_hoop, czar_docked, turret_asteroid_1, turret_asteroid_2, turret_asteroid_3, turret_asteroid_4, turret_asteroid_5, turret_asteroid_6, turret_asteroid_7, powerup_random, dm_beacon_gate, dm_beacon, pukov_wreck_back, other_escape_pod, cargo_pod, other_cargo_pod, grazer_gun_sat, archer_missile_sat, kafelnikof, reliant_wreck_back, stalag_doors, stalag_duct_cover, yakob_shuttle, krasny, varyag, other_ramases, fort_carter, koenig, washington, other_mitchell, ufelsky, kresta, krasnaya_left_arm, krasnaya_right_arm, rogue_base, kronstadt_arm, boridin_gun_dome, boridin_breakaway, darkreign_wreck_hat, yamato_wreck_back, maintenance_droid, maintenance_astronaut, rogue_base_wreck_top, tank, training_target, zakov, shell, rock_chunk, rock_chunk_tiny_1, rock_chunk_tiny_2, rock_chunk_tiny_3, rock_chunk_tiny_4, latov_wreck_1, latov_wreck_2, czar, zakov_wreck_back, sharov_wreck_back, limpet_pod, stalag_wreck_1, stalag_wreck_2, saladin_wreck, gegarin, krelov, kiev, kiev_wreck_back, baxter_wreck_top, victorious_wreck_front, mitchell_wreck_back, fort_bear, fort_sherman, neptune_lo, triton_lo, uranus_lo, saturn_lo, titan_lo, jupiter_lo, europa_lo, ganymede_lo, io_lo, calisto_lo, venus_lo, yamato_hangar, yamato_landing_bay, reliant_hangar, comms_relay, saladin_link, varyag_wreck_front, churchill, bokov, bulatov, shinnik, kovtun, late_escape_pod, other_late_escape_pod, fuel_pod, yevstafiy, mammoth_gulliver, mammoth_santa_maria, mammoth_rosario, mammoth_larsons_pride, mammoth_brittania, mammoth_sierra_madre, mammoth_mayan_gold, mammoth_dawn_chorus, mammoth_calysto, mammoth_sundown, mammoth_krenna, mammoth_seabound, mammoth_crimson_sky, asteroid_with_hole_1, asteroid_with_hole_2, asteroid_with_hole_3, asteroid_with_hole_4, t_predator, t_naginata, t_grendel, t_crusader, t_coyote, t_mirage, t_tempest, t_patriot, t_wolverine, t_reaper, t_shroud, t_phoenix, sun_marker, nebula_marker, dm_sphere_centre, beacon_marker, spawn_player, spawn_powerup, marker, stand_in, the qualified name of one a mod adds, or a number.
fighter, capital, support, other, torpedo, debris, mine, planet, or a number.
bandit_tigers_leader, diceman_tigers_leader, moose_tigers, tigers, moose_volunteers, volunteers, bandit_volunteers_leader, viper, fifty_first, black_guard, black_sun_leader, black_sun, blades, black_eagle_leader, black_eagle, ivan_petrov, nicolai_petrov, black_aces, bremen_bridge_officer, buccaneer, cat_foster, cobra, couger, coalition_comms_officer, coalition_fighter, coalition_scientist, endeavour_bridge_officer, enriquez_reliant_bridge, enriquez_yamato_bridge, enriquez_cockpit, foster_dead, fort_bear_comms, fort_baxter_comms, fort_carter_comms, fort_sherman_comms, gamma_dead, gamma_leader, golden_warrior, hellcat_leader, hellcat, hornet, jackel_leader, jackel, jaguar, kestrel_command, koenig_bridge_officer, kestrel_bridge_officer, kurgen, lonestar, mauler, mcgann, mitchell_bridge_officer, nanny_leader, pirate_leader, pirate, prowler, pukov_captain, puma_leader, puma, raven, reliant_bridge_officer, ripper, ronin_leader, ronin, russian_bomber, sabre_leader, sabre, saracen, scorpion_leader, scorpion, saladin_captain, stahl_bridge, stahl_marines, steiner_ejected, stinger, stork, ulysses_captain, ulysses_captain_panicking, steiner_vampires_leader, vampire, varyag_captain, victorious_bridge_officer, virtual_flight_instructor, washington_bridge_officer, yamato_bridge_officer, frenchy, silky, mayday, trigger, vixen, cutter, claymore, skippy, juice, face, hawkeye, arrow, nero, rhino, stalker, flash, stretch, talon, butcher, snapper, banshee, wolf, reaper, worm, wildcat, siron, ferret, poker, blade, scarlet, rico, slick, irish, spider, ego, diceman, captain_mukai, cat_foster_prowler, coalition_torpedo_leader, general_reese_pod, kulov_borodin, kulov_pod, mammoth_1, mammoth_2, mammoth_3, mammoth_4, saracen_leader, stahl_ripper, golden_warrior_leader, hornet_leader, mammoth_5, mammoth_6, mammoth_7, bandit, marauder_leader, marauder, marine_leader, marine, jaguar_leader, buccaneer_leader, the qualified name of one a mod adds, or a number.
friendly, hostile, neutral, or a number.
defend_dodge1, defend_dodge2, defend_dodge3, out_of_action_sphere, defend_runaway, attack_pursue, attack_massive_object, attack_medium_fighter, loop_the_loop, run_to_ship, or a number.
none, player_can_hit, full, eject_before_exploding, or a number.
hull, cockpit, turret, engine, shield_generator, comms_transmitter, gravity_drive, laser_turret, missile_turret, power_core, satellite_dish, service_door, shaft, surface_building, twin_power_cores, vent_hatch, ion_cannon, armored_plate, cap_gun, warp_projector, fuel_pod, or a number.
missile, gun, engine_glow, gun_muzzle, light, pod, eject_point, case_ejector, launch_point, dock_point, or a number.
none, screamer, raptor, havoc, jack_hammer, bandit, vagabond, solomon, imp, hawk, torpedo, fuel_pod, the qualified name of one a mod adds, or a number.
aimed, spinning, launcher.
laser_cannon, pulse_cannon, messon_blaster, proton_cannon, gattling_lasers, tachyon_cannon, neutron_particle_gun, collapser_guns, gattling_plasma_cannon, vulcan_battery, nova_cannon, turret_flak, turret_lasers, allied_huge_gun, coalition_huge_gun, the qualified name of one a mod adds, or a number.
reliant, yamato.
hidden, listed, current, or a number.
now, queued, if_idle, or a number.
talking, laughing, squadron, dying, or a number.
caption, key_prompt, jump_prompt, target_markers, eject_marker, scanner, lights, view_name, subtitle, messages, nav_marker, fuel, kills, countermeasures, ship_status, gauges, radar, reticle, clock, radio, gunnery, missiles, target_display, damage, power, big_target_display, objectives, comms, wing_status.
small, large, or a number.
left, right, fore, aft.
other, hostile, speaker, target, nav_point.
match_speed, blind_fire, smart_targeting, enemy_lock, missile_incoming, ecm, cloak, spectral_shields, reverse_thrust.
cockpit_camera, left_view_camera, right_view_camera, rear_view_camera, flyby_camera, target_camera, external_camera, missile_camera, next_enemy_target, previous_enemy_target, next_friendly_target, previous_friendly_target, next_subtarget, previous_subtarget, target_under_reticule, target_nearest_enemy, target_nearest_friendly, target_torpedo, smart_target, primary_target, afterburners, afterburner_toggle, reverse_thrust, jump_drive, match_speed, accelerate, decelerate, zero_throttle, full_throttle, roll_ship_clockwise, roll_ship_anti_clockwise, nose_up, nose_down, rotate_clockwise, rotate_anti_clockwise, strafe_left, strafe_right, joystick_roll, fire_lasers, full_guns, gunnery_window, gunnery_window_locked, synchronise_guns, toggle_blindfire, launch_missile, missile_window, rotate_missiles_clockwise, rotate_missiles_anticlockwise, comms_window, powerball_window, powerball_window_locked, full_power_to_gunnery, full_power_to_engines, full_power_to_shields, equalize_power, objectives_window, wing_status_window, wing_status_window_locked, damage_window, damage_window_locked, radar_ranges, shield_balancing, countermeasures, eject, cloak_ship, ecm, spectral_shields, attack_my_target, back_off, help_me, permission_to_land, display_kills, send_comms_message, key_config.
jump, warp.
caption_text, caption_cursor, key_prompt_press, key_prompt_action, key_prompt_key, key_prompt_modifier, key_prompt_plus, view_name_text, subtitle_text, messages_text, fuel_figure, kills_figure, countermeasures_figure, gauges_speed, gauges_throttle, target_markers_range, clock_text, radio_speaker, radio_face, gunnery_gun, gunnery_rounds, missiles_count, missiles_name, target_display_name, target_display_pilot, target_display_range, target_display_speed, target_display_subtarget, damage_title, damage_names, power_title, power_figures, power_ball, objectives_title, objectives_heading, objectives_name, comms_title, comms_numbers, comms_items, wing_status_title, wing_status_numbers.
shut, opening, closing, open.
default, hud, menu_small, menu_large.
left, center, right.
main_menu, game_options, audio, briefing, landing_movie, pilot_roster, saved_games, connection, video, controls, mods, mod_options, game_modes, mode_briefing, mode_ending, mod_catalog, or a number.
escape, one, two, three, four, five, six, seven, eight, nine, zero, minus, equals, backspace, tab, q, w, e, r, t, y, u, i, o, p, left_bracket, right_bracket, enter, left_control, a, s, d, f, g, h, j, k, l, semicolon, apostrophe, grave, left_shift, backslash, z, x, c, v, b, n, m, comma, period, slash, right_shift, keypad_multiply, left_alt, space, caps_lock, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, num_lock, scroll_lock, keypad_7, keypad_8, keypad_9, keypad_minus, keypad_4, keypad_5, keypad_6, keypad_plus, keypad_1, keypad_2, keypad_3, keypad_0, keypad_period, non_us_backslash, f11, f12, keypad_enter, right_control, keypad_divide, print_screen, right_alt, pause, home, up, page_up, left, right, end, down, page_down, insert, delete, left_windows, right_windows, menu, or a number.
none, shift, control, alt, or a number.
south, east, west, north, back, guide, start, left_stick, right_stick, left_shoulder, right_shoulder, dpad_up, dpad_down, dpad_left, dpad_right, misc1, right_paddle1, left_paddle1, right_paddle2, left_paddle2, touchpad, misc2, misc3, misc4, misc5, misc6, left_trigger, right_trigger, right_stick_up, right_stick_down, right_stick_left, right_stick_right.
missiles_gone, armor_failing, screamer, havoc, jack_hammer, vagabond, imp, bandit, raptor, hawk, solomon, countermeasures_low, countermeasures_gone, cloak_on, cloak_off, blind_fire_on, blind_fire_off, spectral_shields_on, spectral_shields_off, or a number.
before_hud, after_hud.
x, y, z.
toggle, choice, number, slider, text, heading.
silver, black_eagle, valour, legion, navy_cross, medal_of_honour.
never, always, when_reliant_lost.
jump_ready, warp_ready, backup_available, player_missiles_left, mcgann_alive, nicolai_petrov_alive, ivan_petrov_alive, kulov_alive, mission_over, landing_cleared, al_rahan_alive, sharif_alive, steiner_alive, mission_success, players, krasnaya_alive, rameses_alive, kozah_alive, fixed_gate_alive, warp_gate_alive, last_success, objectives_met, czar_alive, ghost_alive, reliant_alive, countdown, chapter2_thread3_shown, red_dragon_alive, yamato_alive, ion_cannons_hold_lock, or a number.
playing, destroyed, rescued, captured, left, total_failure, friendly_fire, ejecting, or a number.
total_failure, failure, partial_failure, partial_success, success, success_bonus, or a number.
bullet, missile, collision, crash, screamer, or a number.
do_nothing, fly_aimlessly, launch_missile, launch_jack_hammer, warp_in, warp_out, fly, run_away, land, escort, find_new_target, explode, ripper_grabs_target_object, object_attach, formation_regroup, patrol_route, toggle_cloak, ship_follow_curve, slow_rotate, jump_in, jump_out, find_scoop_up, random_spin_slow, random_spin_medium, random_spin_fast, fixed_gate_jump_in, fixed_gate_jump_out, formation, fixed_gate_open, fixed_gate_close, eject, fixed_gate_collapse, match_speed, dark_reign_shoot, move_to_spawn_pos, turns_object_lights_on, make_boridin_section_break_away, rotate_boridin_breakaway_warp_projector, start_warp_projection_from_boridin, make_ripper_drop_what_its_carrying, jump_in_spread, jump_out_spread, turns_object_lights_off, huuuuuuuge_explosion, immediately_set_ship_to_zero_velocity_and_rotation, fly_ship_backwards, player_control, multiplayer_control, avoid_target, torpedo, launch, fight, abandoned, scoop_up, eject_spin, dock, fire_ion_cannon, ripper_end_drop_object, ripper_attach_cargo_pod_to_mammoth, eject_fighter_attack, disrupted, make_capship_list_left, make_capship_list_right, friendly_fire, eject_player, ship_follow_curve_backwards, mill, deathmatch_respawn_effect, deathmatch_dark_reign_target, or a number.
refused, taken, conflict.
print_ship_name, create_timer, destroy_timer, create_flight_group, destroy_flight_group, wait, play_speech, wait_for_speech, play_comms_movie, wait_for_movie, print_debug_message, set_ai, clear_ai, set_patrol_route, set_pilot, set_trigger_state, start_director_cam, start_ship_animation, ship_follow_curve, setup_launch, start_launch, display_sub_title, reset_code_priority, interrupt_trigger_code, comms_from_ship, comms_from_pilot, set_invulnerability, moving_ship_follow_curve, disable_object, position_relative, when_player_last_jumped, start_missile_cam, start_chase_cam, set_player_target, set_targetable, play_music, stop_director_cam, set_action_centre, dock, disable_taunts, fly, comms_from_ship_once, comms_from_pilot_once, disable_lights, set_environment_fx, multi_player_sync, disable_generic_comms, disable_guns, set_nav_point, set_escort_point, reset_after_burners, disable_missiles, disable_engines, disable_eject, set_hostile, reset_to_spawn_positions, update_environment_fx_state, set_primary_target, wait_for_jump_or_launch, do_not_disturb, set_environment_fx_nebula, start_ship_animation_reverse, snap_to_point, play_fosters_last_stand, open_instrument, close_instrument, destroy_sub_object, set_objective, set_rescue_probabilities, is_ship_this_player, set_flyback_marker, reset_flyback_marker, stop_ship_animation, set_ship_avoidance, match_speed, moving_ship_backup_curve, wait_for_key, terminate_mission, turret_set_target, set_any_trigger_state, wait_for_director_cam, kill_all_script_execution_execpt_me, stack_director_cam, scanner, replace_sub_object, fire, multiplayer_script_sync, friendly_fire, cloak, replenish_weapons, wills_blag, show_hud_icon, disable_listing, disable_object_at_next_jump, darrens_naughty_blag.
wait, run_on, hold, or a number.
replay_from_briefing, replay_from_launch, main_menu.
shot_at, destroyed, launched, camera_reached, ship_reached, proximity_close, proximity_general, object_scooped, player_ready_to_jump, jumped_in, fixed_gate_jumped_in, player_ready_to_warp, jumped_through_hoop, player_wants_backup, ripper_grabbed_object, ripper_dropped_object, cloaked, decloaked, targetted, player_l1_doubletap, player_l2_doubletap, player_r1_doubletap, player_r2_doubletap, player_l1_l2_r1_r2_pressed, player_l1_r1_pressed, game_timer_expired, tractor_beam_locked, tractor_beam_broken, inside_object, outside_object, docked, undocked, being_chased, call_reinforcements, explosion_ship, or a number.
level_0, level_1, level_2, or a number.
low, medium, high, or a number.
cockpit, cockpit_left, cockpit_right, cockpit_rear, chase, spectator, launch_bay, launch_below, launch_aside, landing_tube, landing_aside, jump_out, jump_in_close, jump_in_ahead, jump_in_aside, target, external, director, pull_back, missile, eject, pickup, pod_shot, watch, watch_marker, flyby, nanny_dock, warp_prepare, warp_depart, warp_arrive, landing_bay, landing_ship, yamato_beside, yamato_ahead, yamato_aside, or a number.