From Elite Wiki
Revision as of 13:04, 14 September 2013 by Cim (talk | contribs) (Note legacy script is not recommended)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

script.plist Used by missions and OXP's to check conditions and perform scripted actions accordingly. The legacy scripting engine used by this is not recommended for use in new OXPs - use Javascript for scripted behaviour instead.

In OXP's it can provide Oolite with additional information to generate and populate customised systems.


script.plist's structure is a dictionary, each entry is a particular script with a unique key.

Each script is an array of actions and conditional statements that are executed or checked at regular intervals (every 10 seconds or so during flight or docking).

For increased performance of a script one needs to add nested structures within the script structure. see: Structured Legacy Scripts


An action is a simple string referring to a method

Conditional statements

Conditional statements consist of a dictionary with entries for the keys conditions and do (and optionally else.)


conditions consists of an array of tests to be performed. Each test checks whether the current status of one of a number of queriable states and mission_variables are equal, lessthan, greaterthan a given value or state, or oneof a list of comma separated states. Note: As of v1.69 also a notequal operator will be available for Legacy scripting.

Multiple conditions may be specified, a logical 'AND' is applied to determine whether the conditions are met or not.

If all the conditions are met then the do entry is executed, if any are not met then the else entry is executed (if it exists).


        <string>shipsFound_number equal 0</string>


do consists of an array of actions (and further conditional statements if required), executed if the conditions are met.


        <string>addShips: asp-cloaked 1</string>
        <string>addShips: pirate 12</string>


else consists of an array of actions (and further conditional statements if required), executed if the conditions are NOT met.


        <string>addShips: super-pirate 1</string>


A few simple rendezvous scripts, to make ships appear in space, can be found in here.

Missions are offered with special commands. How to do this so you won't disturb other OXP missions is seen here.