Script Editor Instructions lists

the list of instructions available in the script editor is slightly different for X2 and X3. In general X3 has commands that are not available in X2, bowever there are a handfull of commands that have not been carried over from X2.

X2 Instruction Lists

The latest version of the MSCI for X2 is version 25.

The following lists are presented in the same order as the instructions can be found within the Script Editor.

Scripts written for X3 might contain commands that do not exist in X2 and therefore should not be used.

General Commands

The General Commands Menu contains instructions for handling scripts. From here you can bind scripts to command objects, create AL plugins, load text into the database, read text, or start other scripts.

Sub menus



Commands

Flow Controls

Flow controls are used to manage the flow of the code within a script

Script Calls

Scripts can call other scripts to run certain functions rather than duplicating code

Fly Commands

Trade Commands

Submenus


Commands

General Object Commands

X3 Instruction Lists

The latest version of the MSCI for X3 is version 32.
For TC v1.2 it is 41.

The following lists are presented in the same order as the instructions can be found within the Script Editor.

Scripts written for X2 might contain commands that do not exist in X3 and therefore should not be used.

General Commands

The General Commands Menu contains instructions for handling scripts. From here you can bind scripts to command objects, create AL plugins, load text into the database, read text, or start other scripts.

Sub menus




Commands


Script Calls

The instructions in this menu allow scripts to run other scripts that could proved extra functions.

Flow Controls

Flow controls are used to manage the flow of the code within a script

Fly Commands



<RetVar/IF> <RefObj> is in transporter range: ship= <Var/Ship>

Returns [TRUE] (1) if the distance between <RefObj> and <Var/Ship> is less than 5km. (unless modded)
Returns [FALSE] (0) if not.
This does not check if they are at these coordinates but in DIFFERENT sectors.

Trade Commands




Commands

For stations


General Object Commands



Universe and Sector Commands


X3:TC Instruction Lists

The latest version of the MSCI for X3: Terran Conflict is version 40.

The following lists are presented in the same order as the instructions can be found within the Script Editor (except that "Audio" and "General Commands" are swapped in the editor and there's a new category called "Other" at the bottom).

Scripts written for X2 or X3 will not work in X3: Terran Conflict.

General Commands

WIP: This is the X3 version and needs to be updated for X3TC.

The General Commands Menu contains instructions for handling scripts. From here you can bind scripts to command objects, load text into the database, read text, or start other scripts.

Sub menus




Commands




The instructions below no longer appear under "General Commands". They may have been deprecated or moved under other headings.

Commands/Signals

This menu is new to X3TC but it does contain instructions that existed in previous games but were listed in other menus


Flow Controls

Flow controls are used to manage the flow of the code within a script

Other

WIP: This is new to X3TC and is still in progress.

The Other Commands Menu contains instructions for miscellaneous commands. With these commands you can configure Custom Menu's, control AL Plugins


Sub menus








<RetVar/IF> <RefObj> -> get user input: type=<Script Reference Type>, title=<Var/String>

This instruction sends a dialogue box to the user. The script reference types are:
  • Integer
  • String
  • Ship
  • Ware
As well as a few more from a list of about 10

<RetVar/IF> open custom info menu: title=<Var/String> description=<Var/String> option array=<Var/Array> maxoptions=<Var/Number>

Sends a custom menu to the player. The return variable, returns the variable of the selected option. The additional maxoptions argument, restricts the number of selectable options in the menu. The purpose of this command is to allow scripters to specify how many lines of the menu are to be dedicated to selectable options, and how many are to be used for the info box.

Additional Notes:
  • The return variable does not have to be an integer, and could just as easily be an array or another data type
  • If a menu item has a return value of null, 0, or [FALSE], then it is not selectable
  • If the number of selectable options is not enough to fill the screen, then this argument has no effect.

<RetVar/IF> open custom menu: title=<Var/String> description=<Var/String> option array=<Var/Array>

Sends a custom menu to the player. The return variable, returns the variable of the selected option.

Additional Notes:
  • The return variable does not have to be an integer, and could just as easily be an array or another data type
  • If a menu item has a return value of null, 0, or [FALSE], then it is not selectable

<RetVar> = create custom menu array

Declares a menu array.

<RetVar> = create custom menu array, info lines=<Var/String>, <Var/String>, <Var/String>, <Var/String>, <Var/String>

Declares a menu array and adds text to the info box at the top of the menu.

Info lines can be used in conjunction with the <RetVar/IF> open custom info menu: title=<Var/String> description=<Var/String> option array=<Var/Array> maxoptions=<Var/Number> command to reserve specific amounts of space for the info box, or the selectable options.

This command is the same as using the <RetVar> = create custom menu array and the add custom menu info line to array <Value>: text=<Var/String> command.

<RetVar> = create custom menu array: heading=<Var/String>

Declares a menu array, and includes a heading into the body of the menu. A heading will only be displayed if there are selectable options under it and it uses exactly 2 lines of space.

This command is the same as using the <RetVar> = create custom menu array and the add custom menu heading to array <Value>: title=<Var/String> command.

add custom menu heading to array <Value>: title=<Var/String>

Adds a custom heading into a menu array. A heading will only be displayed if there are selectable options under it and it uses exactly 2 lines of space.

add custom menu info line to array <Value>: text=<Var/String>

Adds info lines to the top of the menu, inside the info box. Note: Info lines will ONLY appear in the info box, adding them in half way through a menu, will still result in them showing up in the info box.

Info lines can be used in conjunction with the <RetVar/IF> open custom info menu: title=<Var/String> description=<Var/String> option array=<Var/Array> maxoptions=<Var/Number> command to reserve specific amounts of space for the info box, or the selectable options.

add custom menu item to array <Value>: text=<Var/String> returnvalue=<Value>

Adds a selectable option into a menu array.

Additional Notes:
  • The return variable does not have to be an integer, and could just as easily be an array or another data type
  • If a menu item has a return value of null, 0, or [FALSE], then it is not selectable
  • If the number of selectable options is not enough to fill the screen, then this argument has no effect.
  • Menus can not use the [colour][/colour] colour tags. They can however user the \033Y \033X colour tags (for all colours)
  • Menus can not use format tags

capture screen

(Guess) Takes a screenshot and puts it in your screenshots folder

Other Commands - NPCs

WIP: This is new to X3TC and is still in progress.

The Other Commands - NPC Menu contains instructions for miscellaneous commands.

Sub menus








<RetVar> = get random NPC

(Guess) Returns a random NPC

set monitor mode and viewpoint: monitor=<Var/Number> cockpit=<Var/Number> mode=<Var/Number> alpha=<Var/Number> beta=<Var/Number>

(Guess) Sets the monitor (Presumably 0 = Main screen, 1/2 are monitors 1/2) to a cockpit (0 Is the "Front" view or the main cockpit, 1-6 are for the respective turret cockpits), with rotation alpha (yaw) and beta(pitch).

Fly Commands

WIP: This is the X3 version and needs to be updated for X3TC

Sub menus


Commands


The instructions below no longer appear under "Fly". They may have been deprecated or moved under other headings.

Wings

These instructions relate to the creation and operation of wings.


Trade Commands




Commands

For ships


For stations


Passengers

Trade commands dealing with passengers and marines

  • <RetVar/IF><RefObj> create passenger in ship: name=<Var/String> race=<Var/Race> voice=<Var/Number> face=<Var/?>
  • <RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/Boolean>
  • <RetVar/IF><RefObj> get passenger array
  • <RetVar/IF><RefObj> move passenger to ship <Var/Ship>: set passenger as pilot=<Var/Boolean>
  • <RetVar/IF><RefObj> eject passenger
  • <RetVar/IF><RefObj> enslave passenger
  • <RetVar/IF><RefObj> destroy passenger
  • <RefObj> train passenger to marine
  • <RefObj> create marine from passenger: fighting=<Var/Number> hacking=<Var/Number> mechanical=<Var/Number> engineering=<Var/Number>
  • <RefObj> set marine skill: fighting=<Var/Number>
  • <RefObj> set marine skill: hacking=<Var/Number>
  • <RefObj> set marine skill: mechanical=<Var/Number>
  • <RefObj> set marine skill: enginerring=<Var/Number>
  • <RetVar/IF> is marine: passenger/astronaut=<Var/Passenger>
  • <RetVar/IF><RefObj> can transport passenger: <Var/Passenger>
  • <RetVar/IF><RefObj> can launch marines
  • <RetVar/IF><RefObj> is ship boardable
  • <RetVar/IF><RefObj> get marines array
  • <RetVar/IF><RefObj> free space for marines
  • <RefObj> set passenger transport, destination=<Var/Station>, payment=<Var/Number>
  • <RetVar/IF><RefObj> is passenger to be transported
  • <RetVar/IF><RefObj> get passenger transport destiantion
  • <RetVar/IF><RefObj> get passenger transport payment
  • <RetVar/IF><RefObj> get marine buy price
  • <RetVar/IF><RefObj> get number of marines can board
  • <RetVar/IF><RefObj> get maximum number of marines
  • <RetVar/IF><RefObj> get number of marines attacking
  • <RetVar/IF><RefObj> get incoming marines
  • <RefObj> stop incoming marines

General Object Commands

WIP: This is the X3 version and needs to be updated for X3TC



The instructions below no longer appear under "General Object Commands". They may have been deprecated or moved under other headings.

<RetVar/IF><RefObj> find nearest military outpost

Finds the closest military outpost that is owned by the same race as the RefObj. Note that using PLAYERSHIP will return a NULL since the player doesn't own any military outposts.

Create Objects

These commands are used to create various types of objects and to specify their locations.

Pilots


  • <RetVar> = <RefObj> get pilot name
  • <RefObj> set pilot name to <Var/String>
  • <RetVar> = get random name: race=<Var/Race>
  • <RetVar> = get fight rank
  • <RetVar> = get trade rank
  • <RefObj> set pilot speaker: voice=<Value>, face=<Value>, Pirate subrace=<Value>, Argon female=<Value>
  • <RetVar> = <RefObj> get pilot fightskill
  • <RefObj> set pilot fightskill to <Var/Number>
  • <RetVar> = <RefObj> get pilot tradeskill
  • <RefObj> set pilot tradeskill to <Var/Number>
  • <RetVar> = <RefObj> get pilot morale
  • <RefObj> set pilot morale: <Var/Number>
  • <RetVar> = <RefObj> get pilot aggression
  • <RefObj> set pilot aggression: <Var/Number>
  • <RetVar/IF><RefObbj> pilot eject from ship
  • <RetVar/IF><RefObbj> move pilot to ship <Var/Ship>: disable=<Var/Boolean>
  • <RetVar> = get trade rank title: text=<Var/Boolean>
  • <RetVar> = get fight rank title: text=<Var/Boolean>
  • <RetVar> = get trade rank percentage
  • <RetVar> = get fight rank percentage
  • <RetVar> = <RefObj> get notoriety title to race <Var/Race>: text=<Var/Boolean>
  • <RetVar> = <RefObj> get notority percentage to race <Var/Race>
  • <RetVar/IF> get mission rank: name=<Var/String>
  • set mission rank: name=<Var/String> rank=<Var/Number>

Weapons Information

These are instructions that control weapons and provide armament details

Universe and Sector Commands

WIP: This is the X3 version and needs to be updated for X3TC


The instructions below no longer appear under "Universe and Sector Commands". They may have been deprecated or moved under other headings.