Difference between revisions of "Script.plist"

From Elite Wiki
m (Conditions: added mission_variables)
(Queriable states: organised and explained.)
Line 13: Line 13:
  
 
=== Queriable states ===
 
=== Queriable states ===
 +
States ending in '''_number''' return a floating point value, those ending in '''_bool''' return '''YES''' or '''NO''', '''_string''' return strings according to the query.
  
 +
==== Player States ====
 
  mission_string;
 
  mission_string;
 
  status_string;
 
  status_string;
 
  gui_screen_string;
 
  gui_screen_string;
 
galaxy_number;
 
planet_number;
 
 
  score_number;
 
  score_number;
 
  credits_number;
 
  credits_number;
 
  scriptTimer_number;
 
  scriptTimer_number;
 
  legalStatus_number;
 
  legalStatus_number;
 +
fuel_level_number; // returns the fuel level in LY
 +
dockedAtMainStation_bool;
  
 +
==== Search Results ====
 
  shipsFound_number;
 
  shipsFound_number;
 +
foundEquipment_bool;
  
 +
==== Random Numbers ====
 
  d100_number;
 
  d100_number;
 
  pseudoFixedD100_number;
 
  pseudoFixedD100_number;
  
 +
==== TIme ====
 
  clock_number; // returns the game time in seconds
 
  clock_number; // returns the game time in seconds
 
  clock_secs_number; // returns the game time in seconds
 
  clock_secs_number; // returns the game time in seconds
Line 36: Line 41:
 
  clock_days_number; // returns the game time in days
 
  clock_days_number; // returns the game time in days
  
fuel_level_number; // returns the fuel level in LY
+
==== System States ====
 
+
  galaxy_number;
  dockedAtMainStation_bool;
+
  planet_number;
  foundEquipment_bool;
 
 
 
 
  sunWillGoNova_bool; // returns whether the sun is going to go nova
 
  sunWillGoNova_bool; // returns whether the sun is going to go nova
 
  sunGoneNova_bool; // returns whether the sun has gone nova
 
  sunGoneNova_bool; // returns whether the sun has gone nova
 
missionChoice_string; // returns nil or the key for the chosen option
 
 
 
  dockedStationName_string; // returns 'NONE' if the player isn't docked, [station name] if it is, 'UNKNOWN' otherwise
 
  dockedStationName_string; // returns 'NONE' if the player isn't docked, [station name] if it is, 'UNKNOWN' otherwise
 
 
  systemGovernment_string;
 
  systemGovernment_string;
 
  systemGovernment_number;
 
  systemGovernment_number;
Line 54: Line 53:
 
  systemPopulation_number;
 
  systemPopulation_number;
 
  systemProductivity_number;
 
  systemProductivity_number;
 +
 +
==== Mission Choice Results ====
 +
missionChoice_string; // returns nil or the key for the chosen option
  
 
== Do ==
 
== Do ==

Revision as of 19:07, 20 January 2006

script.plist Used by missions and OXP's to check conditions and change scripted parameters accordingly. In OXP's it provides Oolite with additional information to generate and populate customised systems. Every condition is followed by a scripted action, a 'Do' or 'Else' entry, a 'do' entry can be nested (have conditions, followed by Do)

Conditions

Check whether the current status of one of a number of queriable states and mission_variables are equal, lessthan, morethan a given value or state, or oneof a list of space separated states.

example:

<key>conditions</key>
<dict> 
    <array>
        <string>shipsFound_number equal 0</string>
    </array>
</dict>

Queriable states

States ending in _number return a floating point value, those ending in _bool return YES or NO, _string return strings according to the query.

Player States

mission_string;
status_string;
gui_screen_string;
score_number;
credits_number;
scriptTimer_number;
legalStatus_number;
fuel_level_number;		// returns the fuel level in LY
dockedAtMainStation_bool;

Search Results

shipsFound_number;
foundEquipment_bool;

Random Numbers

d100_number;
pseudoFixedD100_number;

TIme

clock_number;			// returns the game time in seconds
clock_secs_number;		// returns the game time in seconds
clock_mins_number;		// returns the game time in minutes
clock_hours_number;		// returns the game time in hours
clock_days_number;		// returns the game time in days

System States

galaxy_number;
planet_number;
sunWillGoNova_bool;		// returns whether the sun is going to go nova
sunGoneNova_bool;		// returns whether the sun has gone nova
dockedStationName_string;	// returns 'NONE' if the player isn't docked, [station name] if it is, 'UNKNOWN' otherwise
systemGovernment_string;
systemGovernment_number;
systemEconomy_number;
systemTechLevel_number;
systemPopulation_number;
systemProductivity_number;

Mission Choice Results

missionChoice_string;	// returns nil or the key for the chosen option

Do

The actions to perform when conditions are met.

Example:

<key>do</key>
<dict>
    <array>
        <string>addShips: asp-cloaked 1</string>
        <string>addShips: pirate 12</string>
    </array>
</dict>

Else

Actions performed when conditions are not met. Same as "Do".


Just a small start. probably better to list the condition parameters, methods in their own Omnibus. A_H


This is a stubby stub.