<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alioth.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alnivel</id>
	<title>Elite Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alioth.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alnivel"/>
	<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php/Special:Contributions/Alnivel"/>
	<updated>2026-05-09T13:52:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Shipdata.plist&amp;diff=79839</id>
		<title>Shipdata.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Shipdata.plist&amp;diff=79839"/>
		<updated>2023-09-20T12:31:38Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* escape_pod_model */ Added escape_pod_role and note about using a &amp;quot;[shipkey]&amp;quot; role&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{QuoteText|Text=The shipdata.plist would be more accurately called objectdata nowadays - a &amp;quot;ship&amp;quot; in Oolite might be a ship, a station, a rock, basically any solid object smaller than a planet (or moon)|Source=([http://www.aegidian.org/bb/viewtopic.php?p=275475#p275475 Cim])}}&lt;br /&gt;
&lt;br /&gt;
= Format =&lt;br /&gt;
Shipdata.plist is in [[Property list]] format.&lt;br /&gt;
The shipdata document is a dictionary of ships. Example:&lt;br /&gt;
&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;rsvh_adder&amp;quot; = {&lt;br /&gt;
        like_ship = &amp;quot;adder&amp;quot;;&lt;br /&gt;
        is_external_dependency = yes;&lt;br /&gt;
        pilot = &amp;quot;oolite-hunter&amp;quot;;&lt;br /&gt;
        roles = &amp;quot;rrs-vicious-hunter(1)&amp;quot;;&lt;br /&gt;
        &amp;quot;missile_role&amp;quot; = &amp;quot;EQ_HARDENED_MISSILE&amp;quot;;&lt;br /&gt;
    	&amp;quot;script_info&amp;quot; = {&lt;br /&gt;
    		&amp;quot;randomshipnames&amp;quot; = &amp;quot;hunter&amp;quot;;&lt;br /&gt;
    		&amp;quot;skilled_npc_role&amp;quot; = &amp;quot;hunter&amp;quot;;&lt;br /&gt;
    	};&lt;br /&gt;
      };&lt;br /&gt;
    &lt;br /&gt;
      &amp;quot;rsvh_asp&amp;quot; = {&lt;br /&gt;
        like_ship = &amp;quot;asp&amp;quot;;&lt;br /&gt;
        is_external_dependency = yes;&lt;br /&gt;
        pilot = &amp;quot;oolite-hunter&amp;quot;;&lt;br /&gt;
        roles = &amp;quot;rrs-vicious-hunter(1)&amp;quot;;&lt;br /&gt;
        &amp;quot;aft_weapon_type&amp;quot; = &amp;quot;WEAPON_BEAM_LASER&amp;quot;;&lt;br /&gt;
    	&amp;quot;script_info&amp;quot; = {&lt;br /&gt;
    		&amp;quot;randomshipnames&amp;quot; = &amp;quot;hunter&amp;quot;;&lt;br /&gt;
    		&amp;quot;skilled_npc_role&amp;quot; = &amp;quot;hunter&amp;quot;;&lt;br /&gt;
    	};&lt;br /&gt;
      };&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
'''shipdata.[[plist]]''' will provide Oolite with all the definitions necessary to include it as an entity in the game, be it ship, station, freak object or sub-entity [[shipdata_structure|(extra)]]. The following (property) entries are, for order's sake, listed alphabetically:&lt;br /&gt;
&lt;br /&gt;
= Ship keys=&lt;br /&gt;
The following keys are used by all ships&lt;br /&gt;
==accuracy==&lt;br /&gt;
Used with missiles it has influence on tracking of target. Allowed values with missiles are between 0.0 and 10.0. When not defined, the system assigns to the missile the accuracy value of 0.0, which corresponds to the standard missile tracking behaviour.&lt;br /&gt;
&lt;br /&gt;
In 1.76 or earlier, when used with NPC ships it slightly enlarges the chance of shooting at greater distances, and makes a small improvement to their aim. Value with NPC ships is between -5 and 10 though all values between -5 and +1 will be increased to +1. When not defined, NPCs will be assigned a random value in the range +1 to +10.&lt;br /&gt;
&lt;br /&gt;
In 1.77 or later, when used with NPC ships it affects various aspects of the ship AI. Values can be assigned between -5 and +10. When not defined, a random value between -5 and +5 will be used. [[OXP_NPC_Combat_AI|NPC accuracy]] significantly affects the quality of the AI in combat.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;accuracy&amp;quot; = 8.3;&lt;br /&gt;
&lt;br /&gt;
== aft_eject_position ==&lt;br /&gt;
Determines the XYZ point on the model from which cargo is ejected.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;aft_eject_position&amp;quot; = &amp;quot;0.0 -4.5 -23.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== aft_weapon_type ==&lt;br /&gt;
Assigns the ship's aft laser. &lt;br /&gt;
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE). &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;aft_weapon_type&amp;quot; = &amp;quot;WEAPON_BEAM_LASER&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== ai_type ==&lt;br /&gt;
Assigns an AI to the entity. This may be a previously existing AI, or one custom made for the occasion.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ai_type&amp;quot; = &amp;quot;pirateAI.plist&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== auto_ai ==&lt;br /&gt;
This will autoswitch the ai to the appropriate one if a ship was added in one of its standard roles like trader or pirate. (true by default). See also the comment in the autoAIMap.plist inside Oolite. Defining auto_ai is only necessary when using one of the standard roles mentioned in the autoAIMap.plist for your ship. auto_ai does nothing for ships with custom roles.&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;auto_ai&amp;quot; = yes;&lt;br /&gt;
This auto_ai switch is also used for bounties. When auto_ai is false the ship will keep the bounty as defined for the ship but, when true and the ship is added in one of the populator roles, the ship will get the default bounty for that role.&lt;br /&gt;
&lt;br /&gt;
== auto_weapons ==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
This parameter if true (the default is false) indicates to the Oolite system populator (and potentially to OXPs) that they may change the weapons, missile load, equipment and other such parameters of this ship to make it better fit its role. This allows you to specify a single hull for multiple roles, and have the ship re-equipped to suit those roles. Ships intended for general addition to the spacelanes in standard roles and not intended to be significantly different in difficulty to the core ships should probably turn this on.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;auto_weapons&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
See [http://aegidian.org/bb/viewtopic.php?p=235800#p235800 here] for more detail&lt;br /&gt;
&lt;br /&gt;
== beacon ==&lt;br /&gt;
A special feature for beacons and navigation aids.&lt;br /&gt;
The string can be anything - the first letter was what was displayed in the advanced space compass before Oolite v.1.79. It is still the only display for the older [[HUD]]'s.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
 &amp;quot;beacon&amp;quot; = &amp;quot;X&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Characters that are known to be used as identifiers for '''stations and other fixed objects''' are found on the page for the [[Advanced_Space_Compass#List_of_Navigational_Buoys|Advanced Space Compass]]. Most letters have been used multiple times in various OXPs. &lt;br /&gt;
&lt;br /&gt;
Since v.1.79 the HUD also displays a longer label; before that several HUD OXPs were available to do something similar (see [[Advanced Space Compass]]).&lt;br /&gt;
&lt;br /&gt;
We can also use custom icons with the compass. For that you must define a key in descriptions.plist with the same name as the beacon definition.  Than define the icon in the same way as missile icons. (An array of x/y-coordinates that will be connected by lines). You can find more info at [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=9529 the Oolite BB].&amp;lt;br&amp;gt;&lt;br /&gt;
Example in shipdata:&lt;br /&gt;
 &amp;quot;beacon&amp;quot; = &amp;quot;fuelStation_location&amp;quot;;&lt;br /&gt;
Example in descriptions.plist&lt;br /&gt;
 &amp;quot;fuelStation_location&amp;quot; =  (1, 2, -3, 2, -3, -4, 3, -4, 3, 4,  -3, 4, -3, 3, 2, 3, 2, -3, 1, -3 );&lt;br /&gt;
Before 1.75 the ships primary role was used for defining the icon name in descriptions.plist, but since 1.75 the beacon name itself is used.&lt;br /&gt;
&lt;br /&gt;
There are several devices which detect things from great distance: the Vanilla game's [[Advanced Space Compass]], [[The Galactic Almanac OXZ]], [[Telescope]] and the [[Long Range Scanner]]. The last is a cheat OXP useful for programmers. See the [http://www.aegidian.org/bb/viewtopic.php?p=281279#p281279 HIMSN thread] for details of making things invisible to them.&lt;br /&gt;
&lt;br /&gt;
== beacon_label ==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
A full label for the beacon. If this is not set, it will default to be the same as &amp;lt;code&amp;gt;beacon&amp;lt;/code&amp;gt;, but it may be useful to have a beacon with a full label starting with a different letter than its code. The beacon label text will be expanded using the standard description rules&lt;br /&gt;
 &amp;quot;beacon_label&amp;quot; = &amp;quot;%H Station&amp;quot;; // Lave Station, Diso Station, etc.&lt;br /&gt;
&lt;br /&gt;
== bounty ==&lt;br /&gt;
Sets a Cr. reward on the NPC's head, and is bound to give it trouble with the law . This bounty setting is overruled when adding ships in one of the populator roles like pirate, trader etc. Pirates are default added with a small bounty and traders are added clean. However, like the player, also the npc bounty can raise when attacking other clean ships or police vessels.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;bounty&amp;quot; = 50;&lt;br /&gt;
&lt;br /&gt;
== cargo_carried ==&lt;br /&gt;
Determines the type of cargo carried as described in [[commodities]] and [[commodities.plist]].  Only one type can be specified. This key can be used for both ships and barrels.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cargo_carried&amp;quot; = &amp;quot;Gold&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
When used for barrels, it is also possible to add several units in a pod by preceding the commodity name with a space separated number. Adding more than a ton in a pod is not possible. Defining a quantity for ships is not possible this way.&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to define a mix of random cargo for ships by using the string &amp;quot;SCARCE_GOODS&amp;quot; or &amp;quot;PLENTIFUL_GOODS&amp;quot;, instead of a commodity name. The first selects random goods that are scarce at the main station, the second selects goods that are plentiful present at the main station. (Populator added traders heading toward the station always have scarce goods while traders heading from the main station always have plentiful goods on board. It would be wise to stick to this rule with custom ships.)&amp;lt;br&amp;gt;&lt;br /&gt;
To make cargo_carried working for ships, the cargo_type must be &amp;quot;CARGO_NOT_CARGO&amp;quot; to define the ship not being cargo itself. (see below)&lt;br /&gt;
&lt;br /&gt;
'''Note''': A bug introduced in 1.82 means that only commodity keys from the [[Trade-goods.plist]] are recognised here. That is &amp;quot;gold&amp;quot; will be recognised, whereas &amp;quot;Gold&amp;quot; will not. This bug is fixed in the 1.83/1.84 release.&lt;br /&gt;
&lt;br /&gt;
== [[cargo_type]] ==&lt;br /&gt;
Determines if object is indeed cargo (CARGO_RANDOM, CARGO_SLAVES, CARGO_THARGOID, CARGO_ALLOY, CARGO_MINERALS, CARGO_CARRIED) or a ship, as below, which is not cargo.  (CARGO_RANDOM is not fully random but means that a container can hold any kind of commodity.)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cargo_type&amp;quot; = &amp;quot;CARGO_RANDOM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Will create random cargo, often based on availability in the system. When you want fixed cargo you can use:&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cargo_type&amp;quot; = &amp;quot;CARGO_CARRIED&amp;quot;;&lt;br /&gt;
 &amp;quot;cargo_carried&amp;quot; = &amp;quot;4 Gold&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
You can also specify the cargo of a ship. use &amp;quot;cargo_type&amp;quot; = CARGO_NOT_CARGO  and define the contents of the barrels it will give with &amp;quot;cargo_carried&amp;quot;. In that case there must be no quantity defined, only the type of [[commodity]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cargo_type&amp;quot; =  &amp;quot;CARGO_NOT_CARGO&amp;quot;;&lt;br /&gt;
 &amp;quot;cargo_carried&amp;quot; = &amp;quot;Computers&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Another notable type of cargo is the scripted item CARGO_SCRIPTED_ITEM, as exemplified by the cloaking device. When CARGO_SCRIPTED_ITEM is defined, the barrels will trigger scooping events for the ship-scripts. Other barrels don't trigger scooping events.&amp;lt;br&amp;gt;&lt;br /&gt;
The cargo barrels are stored in the ships hold like normal barrels when a cargo was defined for them with the JS method &amp;quot;setCargo&amp;quot;. Without defined content, scripted barrels are removed after scooping. Scripted cargo works with any object that can be scooped. When you have scripted escape pods that must be preserved after scooping, fill it with one ton of Slaves.&lt;br /&gt;
&lt;br /&gt;
== cloak_automatic ==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
When false, the cloak of npc ships will never get activate automatic during combat, but is only activated by JS script commands. (True by default)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloak_automatic&amp;quot; = no;&lt;br /&gt;
&lt;br /&gt;
== cloak_passive ==&lt;br /&gt;
When true, any firing of laser will deactivate the cloak. (False by default in 1.76 or earlier, true by default in 1.77 or later) &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloak_passive&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
==conditions==&lt;br /&gt;
With this option you can include an array of extra conditions when to add a ship. When the conditions are not met, the ship does not appear in a selection list by role. Useful when you have a standard ship like a trader that should only be added in certain systems.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;conditions&amp;quot; = (&lt;br /&gt;
                 &amp;quot;systemGovernment_number equal 3&amp;quot;,&lt;br /&gt;
                 &amp;quot;systemEconomy_number lessthan 4&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
==condition_script==&lt;br /&gt;
''Available from Oolite 1.77 onwards''&lt;br /&gt;
&lt;br /&gt;
This option specifies a Javascript file which controls the addition of this ship. The &amp;lt;code&amp;gt;allowSpawnShip&amp;lt;/code&amp;gt; function in that [[Oolite_JavaScript_Reference:_Condition_scripts|condition script]] will then be tested before the ship is added. Several ships can share a condition script.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;condition_script&amp;quot; = &amp;quot;myoxp_conditions.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== counts_as_kill ==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
Killing this ship will not count as a kill by the player when set to false. (Default is true). Using this key prevents awarding kills to all kind of cargo, debris etc.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;counts_as_kill&amp;quot; = no;&lt;br /&gt;
&lt;br /&gt;
== custom_views==&lt;br /&gt;
Will add the ability to display custom POVs of the player ship, in game toggled by pressing '''v'''.  &lt;br /&gt;
&lt;br /&gt;
This is an array with any number of entries, one for each view, each with:&lt;br /&gt;
*a '''view_description''' - giving a textual description of the view. &lt;br /&gt;
*a '''view_position''' - relative to the origin of the ship model. &lt;br /&gt;
*a '''view_orientation''' - this is a [[Quaternions|quaternion]] expressing a rotation from directly forwards. &lt;br /&gt;
*a '''weapon_facing''' - FORWARD, AFT, PORT or STARBOARD. The weapon that will fire when that view is selected.&lt;br /&gt;
&lt;br /&gt;
The view_position is best chosen by selecting a facet, line or point in Wings and copying down the coordinates. &lt;br /&gt;
&lt;br /&gt;
For the view_orientation you will probably need a calculator but the basic method is to choose a unit vector (x y z) as the axis for a rotation then calculate the four values W X Y and Z for the quaternion as follows: &lt;br /&gt;
&lt;br /&gt;
W = the cosine of half the angle rotated about the axis xyz&amp;lt;br /&amp;gt;&lt;br /&gt;
X = the sine of half the angle rotated about xyz, multiplied by x&amp;lt;br /&amp;gt;&lt;br /&gt;
Y = the sine of half the angle rotated about xyz, multiplied by y &amp;lt;br /&amp;gt;&lt;br /&gt;
Z = the sine of half the angle rotated about xyz, multiplied by z &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Four decimal places are probably enough accuracy for these values.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  custom_views =&lt;br /&gt;
 (&lt;br /&gt;
     {&lt;br /&gt;
         view_description = &amp;quot;Front View&amp;quot;;&lt;br /&gt;
         view_orientation = &amp;quot;0.0 0.0 1.0 0.0&amp;quot;;&lt;br /&gt;
         view_position = &amp;quot;0.0 30.0 200.0&amp;quot;;&lt;br /&gt;
         weapon_facing = &amp;quot;FORWARD&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
== death_actions ==&lt;br /&gt;
Gives an opportunity to have a ship's death trigger one or a set of [[Shipdata.plist#script_actions|script_actions]]. It contains an array of legacy script expressions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;death_actions&amp;quot; = (&amp;quot;spawn: explosive_shrapnel 1&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
== debris_role ==&lt;br /&gt;
{{oolite-prop-added|1.74}}&lt;br /&gt;
&lt;br /&gt;
Specifies the kind of debris an asteroid or boulder generates. When not defined they default to generating 'ships' with role &amp;quot;boulder&amp;quot; or &amp;quot;splinter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;debris_role&amp;quot; = &amp;quot;my_boulder_foo&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
See the discussion here: [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=10061 (RELEASE) Icesteroids V2] (2011-12) - about role circularity and about the vanilla game code creating alloys whenever anything big explodes!&lt;br /&gt;
&lt;br /&gt;
== density ==&lt;br /&gt;
This real value is used to calculate a ships total mass. Default is 1.0. The mass of the ship is then 20 * density * volume.&lt;br /&gt;
&lt;br /&gt;
Ship's mass does not affect its flight under the non-inertial engines - see [[#thrust|thrust]]. It does affect:&lt;br /&gt;
* changes in momentum, and damage done, in a collision&lt;br /&gt;
* the minimum distance needed from this ship for another ship to open a witchspace wormhole (the blocking radius is the square root of a tenth of the mass)&lt;br /&gt;
* the length of time a witchspace wormhole opened by this ship will remain open, and the radius of that wormhole.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;density&amp;quot; = 1.5;&lt;br /&gt;
&lt;br /&gt;
• See Eric Walch's comment on vanilla-game Coriolis stations [http://aegidian.org/bb/viewtopic.php?p=118196#p118196 here] (2010)&lt;br /&gt;
&lt;br /&gt;
== display_name ==&lt;br /&gt;
States the model's name as it will be known to the ID computer. By default this is the same as &amp;quot;name&amp;quot;. Added for multilingual oolite.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;display_name&amp;quot; = &amp;quot;ExampleShip Mark IX&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== energy_recharge_rate ==&lt;br /&gt;
The rate at which energy is replenished.  Stations are at 100, Adders at 2. (Default value: 1)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;energy_recharge_rate&amp;quot; = &amp;quot;3.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
See [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12152 Energy rates and recharge] for more detail (2012)&lt;br /&gt;
&lt;br /&gt;
== escape_pod_model ==&lt;br /&gt;
With this entry ships can have custom escape pods. Defaults to &amp;quot;escape-capsule&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Since v1.65:''' You have to specify the '''role''' of your custom escape pod (not its entry-name).&lt;br /&gt;
&lt;br /&gt;
'''Since v1.77:''' Deprecated in favour of &amp;lt;code&amp;gt;escape_pod_role&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;escape_pod_model&amp;quot; = &amp;quot;custom_pod_role&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Each shipdata entry has an implicit unique role in the form of a shipdata key enclosed in square brackets - e.g. &amp;quot;[entry-name]&amp;quot;. It might be useful if you want to use a specific escape pod that has no unique role.&lt;br /&gt;
&lt;br /&gt;
== escape_pod_role ==&lt;br /&gt;
With this entry ships can have custom escape pods. It's almost the same as &amp;lt;code&amp;gt;escape_pod_model&amp;lt;/code&amp;gt;, but has a less ambiguous name. Added in v1.77.&lt;br /&gt;
&lt;br /&gt;
The game first tries to spawn a pod using &amp;lt;code&amp;gt;escape_pod_role&amp;lt;/code&amp;gt;, but if the property isn't set or a spawn fails, the game uses &amp;lt;code&amp;gt;escape_pod_model&amp;lt;/code&amp;gt;. If the latter fails too, the game tries the &amp;quot;escape-capsule&amp;quot; role.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;escape_pod_model&amp;quot; = &amp;quot;custom_pod_role&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== escorts ==&lt;br /&gt;
Determines how many escorts an NPC shall have. Maximum is 16.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;escorts&amp;quot; = 4;&lt;br /&gt;
Warning: Ships with scanClass = CLASS_POLICE should always have escorts set to zero. Oolite will set this value here and add wingmans instead of escorts. Without special scripting escorts won't escort a mother with CLASS_POLICE.&amp;lt;br&amp;gt;&lt;br /&gt;
For ships that are added in a trader role, the populator can decide to subtract escorts from the defined value when the system is estimated as safe. &lt;br /&gt;
&lt;br /&gt;
== escort_role ==&lt;br /&gt;
Assigns the specific ship type to be the escort, by the ship's role. (Before Oolite 1.74 only the name &amp;quot;escort-role&amp;quot; is accepted.)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;escort_role&amp;quot; = &amp;quot;my_custom_escort_role&amp;quot;;&lt;br /&gt;
Escort ships will use the escortAI.plist unless &amp;quot;auto_ai&amp;quot; is set to false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==escort_roles==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
This property overrules &amp;lt;code&amp;gt;escorts&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;escort_role&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;escort_ship&amp;lt;/code&amp;gt; to allow more flexible specification of a ship's escorts. It takes the form of a list of dictionaries, each containing a &amp;quot;role&amp;quot;, &amp;quot;min&amp;quot; and &amp;quot;max&amp;quot; key. The ship will then get between &amp;quot;min&amp;quot; and &amp;quot;max&amp;quot; of that role of escort ship (specific ships can be added using the &amp;quot;[dataKey]&amp;quot; style of role), with &amp;quot;max&amp;quot; more likely in Anarchy systems and &amp;quot;min&amp;quot; more likely in Corporate States.&lt;br /&gt;
&lt;br /&gt;
   escort_roles = (&lt;br /&gt;
      { role = &amp;quot;escort&amp;quot;; min = -2; max = 2; },&lt;br /&gt;
      { role = &amp;quot;escort-medium&amp;quot;; min = 0; max = 4; },&lt;br /&gt;
      { role = &amp;quot;escort-heavy&amp;quot;; min = -4; max = 2; },&lt;br /&gt;
      { role = &amp;quot;&amp;quot;; min = 0; max = 2; } // spare slots for wandering escorts&lt;br /&gt;
   );&lt;br /&gt;
&lt;br /&gt;
A negative number can be used for &amp;quot;min&amp;quot; - this makes it more likely that none of this type of escort will be used in safer systems, and makes the maximum number less likely in the more dangerous systems. In the example above, the ship will mainly be escorted by &amp;quot;escort-medium&amp;quot; ships, with a couple of &amp;quot;escort&amp;quot; ships likely in unsafe systems, and a small chance of &amp;quot;escort-heavy&amp;quot; ships also appearing in more dangerous systems.&lt;br /&gt;
&lt;br /&gt;
Leaving the role key blank allows the ship to have spare slots for escorts which are left unfilled when the ship is spawned. This can be used to simulate a willingness to hire additional escorts, or to indicate that the ship has already lost some of its escorts.&lt;br /&gt;
&lt;br /&gt;
The maximum number of escorts remains 16, and the list will be processed from top to bottom. Once 16 escorts are added no further entries will be considered.&lt;br /&gt;
&lt;br /&gt;
== escort_ship ==&lt;br /&gt;
Assigns the specific ship type to be the escort, by the ship's name. (Before Oolite 1.74 only the name &amp;quot;escort-ship&amp;quot; is accepted.)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;escort_ship&amp;quot; = &amp;quot;cobramk1&amp;quot;;&lt;br /&gt;
Escort ships will use the escortAI.plist unless &amp;quot;auto_ai&amp;quot; is set to false.&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.77 and later it is also possible to use &amp;lt;code&amp;gt;&amp;quot;escort_role&amp;quot; = &amp;quot;[cobramk1]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== exhaust ==&lt;br /&gt;
The XYZ position(s) of exhaust plume(s), and the XYZ of the plume shape, ergo&lt;br /&gt;
&lt;br /&gt;
 x y z width height length&lt;br /&gt;
&lt;br /&gt;
'''x y z''' is the position relative to the origin of the main model. &lt;br /&gt;
&lt;br /&gt;
'''width''' in meters, how far a plume extends on x axis, on each side of plume position. (x radius)&lt;br /&gt;
&lt;br /&gt;
'''height''' in meters, how far a plume extends on y axis, above and below of plume position. (y radius)&lt;br /&gt;
&lt;br /&gt;
'''length''' in meters, how long a plume is on z axis. (This value is in current Oolite versions ignored. Length is now derived from the ships speed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are 2 assigned plumes at coords 5, 0, -25 and -5, 0, -25, and each plume is 6 m wide and 4 m tall. (length info is ignored)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;exhaust&amp;quot; = (&lt;br /&gt;
     &amp;quot;5 0.0 -25 3.0 2.0 10.0&amp;quot;,&lt;br /&gt;
     &amp;quot;-5 0.0 -25 3.0 2.0 10.0&amp;quot;&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
== exhaust_emissive_color ==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
Determines the colour of the exhausts.&lt;br /&gt;
&lt;br /&gt;
For the colour you can use either a [[Materials in Oolite#Colour specifiers|colour specifier]] or a [[Materials in Oolite#Named colours|named colour]]. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;exhaust_emissive_color&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
or&lt;br /&gt;
 &amp;quot;exhaust_emissive_color&amp;quot; = &amp;quot;1 0 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== explosion_type ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A list of [[explosions.plist]] entries describing how the ship explodes if destroyed.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;explosion_type&amp;quot; = (&amp;quot;oolite-default-asteroid-explosion&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
== extra_cargo ==&lt;br /&gt;
Cargobay extension size can be customised. This is the amount the cargo capacity increases when an extra cargobay is installed. Default value is 15. It is only used with player ships.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;extra_cargo&amp;quot; = 25;&lt;br /&gt;
&lt;br /&gt;
== forward_weapon_type ==&lt;br /&gt;
Assigns the ship's forward laser. &lt;br /&gt;
Any weapon type from the [[equipment.plist]] can be used.&amp;lt;br&amp;gt; e.g.: WEAPON_PULSE_LASER, WEAPON_BEAM_LASER, WEAPON_MILITARY_LASER, WEAPON_MINING_LASER, WEAPON_PLASMA_CANNON, WEAPON_THARGOID_LASER and WEAPON_NONE. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;forward_weapon_type&amp;quot; = &amp;quot;WEAPON_BEAM_LASER&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== frangible ==&lt;br /&gt;
Determines if eventual sub-entities are &amp;quot;loose&amp;quot;. By default any given object is already frangible, so the use of this line must be to negate that. &lt;br /&gt;
If set to false, the object plus subentities will be regarded as a single object.&lt;br /&gt;
If set to true, sub entities can be destroyed seperately from the main object. Frangible sub-entities can have a max_energy and an energy_recharge_rate that is independently set from the main entity.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;frangible&amp;quot; = no;&lt;br /&gt;
 &lt;br /&gt;
== fragment_chance ==&lt;br /&gt;
Determines if a ship breaks apart into fragments and generates parts with role &amp;quot;wreckage&amp;quot;. By chance factor, or true/false. Default is 90% chance.&lt;br /&gt;
The amount of wreckage is based on the ships mass with a maximum of 3. Wreckage is scaled to match the ships size but is very short living. (0.25s -&amp;gt; 1.25s)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;fragment_chance&amp;quot; = no;&lt;br /&gt;
 &lt;br /&gt;
== fuel ==&lt;br /&gt;
Determines an NPC ship's fuel storage, which will affect how it uses its Fuel Injectors and how far it can jump. If unspecified the default is zero (though ships added via the system populator will often be given some fuel anyway)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;fuel&amp;quot; = 70;&lt;br /&gt;
&lt;br /&gt;
== has_cloaking_device ==&lt;br /&gt;
Determines if a ship has a cloacking device installed. By chance factor, or true/false.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_cloaking_device&amp;quot; = 0.5;&lt;br /&gt;
&lt;br /&gt;
== has_ecm ==&lt;br /&gt;
Determines if a ship has the E.C.M system installed. By chance factor, or true/false.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_ecm&amp;quot; = 0.5;&lt;br /&gt;
or&lt;br /&gt;
 &amp;quot;has_ecm&amp;quot; = no;&lt;br /&gt;
 &lt;br /&gt;
== has_energy_bomb ==&lt;br /&gt;
Determines if a ship has an energy bomb. If it has one, it might launch a mine with role &amp;quot;energy_bomb&amp;quot; as part of his fleeing behavior. currently the only build-in mine with this role is the q-bomb.&amp;lt;br&amp;gt;A ship will only deploy the bomb when it has also fuel-injectors and some fuel left to avoid getting killed by its own bomb. On average it will try to deploy the bomb once every 100 seconds during fleeing.&lt;br /&gt;
&lt;br /&gt;
Example:		&lt;br /&gt;
 &amp;quot;has_energy_bomb&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== has_escape_pod ==&lt;br /&gt;
Determines if a ship has an escape pod. Can be either a boolean value, or a number from 0 to 1 expressing the likelihood of the equipment being present. Starting with version 1.65 ships can have multiple escape pods. To specify more than one escape pod, '''has_escape_pod''' must be set to a numeric value corresponding to the escape pods present on board.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
 has_escape_pod = no;&lt;br /&gt;
 has_escape_pod = 0.75;&lt;br /&gt;
 has_escape_pod = 3;&lt;br /&gt;
&lt;br /&gt;
== has_fuel_injection ==&lt;br /&gt;
Determines if a ship has the witchdrive fuel injector.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_fuel_injection&amp;quot; = 0.99;&lt;br /&gt;
&lt;br /&gt;
==has_military_jammer==&lt;br /&gt;
Determines if a ship has a military jammer. Ships equipped with this item become invisible on the radar. &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_military_jammer&amp;quot; = 0.75;&lt;br /&gt;
&lt;br /&gt;
==has_military_scanner_filter==&lt;br /&gt;
Determines if a ship has a military jammer filter. Ships equipped with this item can see ships equipped with a military jammer on the radar. &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_military_scanner_filter&amp;quot; = 0.50;&lt;br /&gt;
&lt;br /&gt;
== has_scoop ==&lt;br /&gt;
Determines if a ship has a fuel/cargo scoop.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_scoop&amp;quot; = no;&lt;br /&gt;
&lt;br /&gt;
== has_scoop_message ==&lt;br /&gt;
A key for cargo. Determines if a barrel generates a default scoop message when scooped. Default is true, but setting it to false suppresses any messages, so a scripts can generate its custom messages on scooping. (Added with Oolite 1.74)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_scoop_message&amp;quot; = no;&lt;br /&gt;
&lt;br /&gt;
== has_shield_booster==&lt;br /&gt;
Determines if a ship has the shield booster. (enlarges max energy with 256)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_shield_booster&amp;quot; = 0.80;&lt;br /&gt;
&lt;br /&gt;
== has_shield_enhancer ==&lt;br /&gt;
Determines if a ship has the coveted shield enhancer. (enlarges max energy with 256 and raises energy recharge rate with 50%)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_shield_enhancer&amp;quot; = 0.45;&lt;br /&gt;
&lt;br /&gt;
== heat_insulation ==&lt;br /&gt;
This real number gives the amount of heat insulation of a ship. Default is 1.0 (2.0 for ships equipped with EQ_HEAT_SHIELD). Values below 0.125 will be increased to that minimum. This parameter is only for NPC ships and stations. Player ships ignore this and always start with 1.0 heat insulation and can add an additional 1.0 (for a total of 2.0) with the ship equipment EQ_HEAT_SHIELD. Heat insulation for NPCs is only a factor when close to the sun. Energy damage does not cause overheating (because otherwise it would be too easy to overheat NPC ships with missiles or lasers), but it can raise ships' temperature to the maximum safe level. Overheating occurs when a ship's temperature exceeds the safe level, which is determined by the heat insulation level. External temperature is determined by distance from the sun. Larger suns are hotter. Suns that are going nova are, unsurprisingly, even warmer. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;heat_insulation&amp;quot; = &amp;quot;2.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
NPC ships launched from stations are given the same heat insulation as the station if the station's is greater than the ship's. Courier ships generated by the core system populator are given a heat insulation level of 6.0. Escort ships (if any) receive at least the same heat insulation as the ship they are escorting. See [http://www.aegidian.org/bb/viewtopic.php?p=177357#p177357 BB Thread] (2012)&lt;br /&gt;
&lt;br /&gt;
Player ships use the same model as NPC ships for external temperature from the sun, but additionally simulate heat from air friction when inside planetary atmospheres, which is a factor that NPC ships ignore.&lt;br /&gt;
&lt;br /&gt;
== hud ==&lt;br /&gt;
Used for a playership, to assign another HUD than the default one. Note that small ships get the second default - the hud-small.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;hud&amp;quot; = &amp;quot;specialhud.plist&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== hyperspace_motor ==&lt;br /&gt;
If set to false / NO, it will stop ships from executing normal hyperspace jump (player ships will still be able to execute galactic jumps). Default = true / YES. (Planned for Oolite 1.75)&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
 &amp;quot;hyperspace_motor&amp;quot; = no;&lt;br /&gt;
&lt;br /&gt;
 hyperspace_motor=NO;&lt;br /&gt;
&lt;br /&gt;
== hyperspace_motor_spin_time ==&lt;br /&gt;
Used to modify jump countdown time. Default = 15.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
 &amp;quot;hyperspace_motor_spin_time&amp;quot; = &amp;quot;15&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==injector_burn_rate==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The default fuel burn rate of injectors on this ship, in deci-LY per second. The default is 0.25.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;injector_burn_rate&amp;quot; = 0.25;&lt;br /&gt;
&lt;br /&gt;
==injector_speed_factor==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The multiplier applied to the ship's maximum speed when it is using injectors. The default is 7.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;injector_speed_factor&amp;quot; = 7;&lt;br /&gt;
&lt;br /&gt;
==is_external_dependency==&lt;br /&gt;
This key should be added to ships that use like_ship references to ships in other oxps but don't depend on them. Normally will Oolite write errors in the log when it can't resolve a like_ship reference. When this key is set to YES, it will suppress the error generation.&amp;lt;br&amp;gt;WARNING: only set this key to YES when the model won't get added to the system without the other oxp installed or you will miss a valuable warning.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;is_external_dependency&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
==is_submunition==&lt;br /&gt;
Key added for missiles with multiple warheads. When this key is set and the entity is spawn or fired by a missile, it inherits its parent as owner. This key must be set so the player will be awarded for a kill by submunition.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;is_submunition&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
==is_template==&lt;br /&gt;
Set this to yes for ships which are only used through like_ships and are not intended to be used directly. If your (otherwise working) OXP generates warnings about ships with no roles or model attribute, you probably need this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;is_template&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== laser_color ==&lt;br /&gt;
Determines a ship's laser colour.&lt;br /&gt;
&lt;br /&gt;
As colour you can use a [[Materials in Oolite#Colour specifiers|colour specifier]] or a [[Materials in Oolite#Named colours|named colour]]. The game requires laser colours to be reasonably bright; if the brightest colour component is less than 0.5, the colour will be brightened.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;laser_color&amp;quot; = &amp;quot;cyanColor&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== launch_actions ==&lt;br /&gt;
Triggers a script on the entity just after setup, also when called by spawn and addShip methods.&lt;br /&gt;
Can be used to change to a custom AI, when a ship is generated by standard role. &lt;br /&gt;
[[Shipdata.plist#script_actions|script_actions]]&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
 &amp;quot;role = trader&amp;quot;;&lt;br /&gt;
 &amp;quot;launch_actions&amp;quot; = (&lt;br /&gt;
   &amp;quot;setAITo: pirateAI.plist&amp;quot;&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== like_ship ==&lt;br /&gt;
Allows a shipdata entry (of a ship with many matching characteristics to another) to be short and sweet. With '''like_ship''' you can reference to another existing shipdata entry, and then only specify the differences to the 'original'. It takes the unique '''entry-identifier''' as argument. Of course you have to make sure that the 'original' you are referring to actually exists, or Oolite won't be able to create your ship.&lt;br /&gt;
&lt;br /&gt;
Works well together with the [[#is_template|is_template]]-key.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;my_ship&amp;quot; = {&lt;br /&gt;
 &amp;quot;like_ship&amp;quot; = &amp;quot;adder&amp;quot;;&lt;br /&gt;
 &amp;quot;max_flight_speed&amp;quot; = &amp;quot;700&amp;quot;;&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;Freak Turbo Adder&amp;quot;;&lt;br /&gt;
 },&lt;br /&gt;
&lt;br /&gt;
== likely_cargo ==&lt;br /&gt;
This is only used for ships with role asteroid and pirate. With asteroids it gives the likely number of boulders it breaks into. With pirates added by the [[System Populator]]: when lower than 16 it is the cargo, when higher than 15, it is changed in a random value between 0 and 15. This value is overridden by the actual scooped cargo if the pirate had scooped something.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;likely_cargo&amp;quot; = &amp;quot;2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== materials ==&lt;br /&gt;
See [[Materials in Oolite]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== max_cargo ==&lt;br /&gt;
Sets the ship's cargo limit. On explosion of trader ships added by the [[System Populator]], 10% of this value is used as likely cargo. When the result is lower than 16 it is the cargo, when higher than 15, it is changed in a random value between 0 and 15.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_cargo&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== max_energy ==&lt;br /&gt;
Sets the ship's energy value. (Default value: 200)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_energy&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
See [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12152 Energy rates and recharge] for more detail (2012). Divide by 64 to get the rough number of energy banks.&lt;br /&gt;
&lt;br /&gt;
== max_flight_pitch ==&lt;br /&gt;
Sets pitch factor. Will usually range from a sluggish 0.6 to a very sensitive 3.0&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_flight_pitch&amp;quot; = &amp;quot;2.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== max_flight_roll ==&lt;br /&gt;
Sets roll factor. Will usually range from 0.8 to 4.6.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_flight_roll&amp;quot; = &amp;quot;4.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== max_flight_speed ==&lt;br /&gt;
Sets the model's top speed. Interceptors fly at 520 (0.52 LM), Shuttles at 80.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_flight_speed&amp;quot; = &amp;quot;320&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== max_flight_yaw ==&lt;br /&gt;
Sets yaw factor. Will usually range from a sluggish 0.6 to a very sensitive 3.0 When no value is defined it will use the same value as max_flight_pitch&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_flight_yaw&amp;quot; = &amp;quot;2.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== max_missiles ==&lt;br /&gt;
Sets a ship's missile limit. Maximum allowable value for the player is 16 and for npc ships 32. When not defined, the value with &amp;quot;missiles&amp;quot; is used as max_missiles. When defining more than a few missiles, it could be wise to also define value for &amp;quot;missile_load_time&amp;quot; to avoid massive missile launches. npc ships are more likely to fire missiles the more they carry.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_missiles&amp;quot; = &amp;quot;1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== missile_launch_position ==&lt;br /&gt;
Determines the XYZ point on the model from which a missile is launched.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;missile_launch_position&amp;quot; = &amp;quot;0.0 -2.25 10.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
This position should lie outside the bounding box of the core entity and not just outside of the ships mesh.  Default value: (0, -4, 1)&amp;lt;br&amp;gt;&lt;br /&gt;
If the position does lie inside the bounding box, the launch position is shifted along its direction until the launched missile lies outside the bounding box of the central entity. (Bounding boxes of subentities are ignored) The collision radius of the launched missile is taken into account. The collision radius for a plain missile is 4.52 meter.&lt;br /&gt;
&lt;br /&gt;
== missile_load_time ==&lt;br /&gt;
Defines the time in seconds before a new missile is ready to fire after one is fired. Mainly useful for npc ships that have many missiles.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;missile_load_time&amp;quot; = &amp;quot;2.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== missiles ==&lt;br /&gt;
Sets the number of missiles the ship is equipped with on ship creation. e.g. you can set this at zero and than use a dedicated script to fill up the bay with specific missiles.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;missiles&amp;quot; = &amp;quot;0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== missile_role ==&lt;br /&gt;
Defines the type of missiles (or mines) an NPC ship is provided with. Default is &amp;quot;EQ_MISSILE&amp;quot;. When missiles are loaded on ship creation, 90% will be of this type and 10% will be random, chosen from all possible NPC missiles and mines. Also affects the javascript [[Oolite_JavaScript_Reference:_Ship#selectNewMissile|selectNewMissile()]] command.&lt;br /&gt;
The string defined inside missile_role needs both to be defined inside [[equipment.plist]], and be inside the '''roles''' property of the missile/mine shipdata entry. &lt;br /&gt;
&lt;br /&gt;
To assign a specific missile type to a newly bought player ship, its dependancies must be defined inside [[shipyard.plist]].&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
 &amp;quot;missile_role&amp;quot; = &amp;quot;EQ_THARGON&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== model ==&lt;br /&gt;
Assigns the entity's corresponding '''.dat''' file that will be found with the exact same name in the ''Models'' folder.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;model&amp;quot; = &amp;quot;example_ship.dat&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== model_scale_factor ==&lt;br /&gt;
1.81 or later only.&lt;br /&gt;
&lt;br /&gt;
If this is set, the model specified in the &amp;lt;code&amp;gt;model&amp;lt;/code&amp;gt; property will be scaled by this factor (the default is 1.0, of course). Additionally, all subentities will have both their positions and sizes scaled (recursively if necessary), and the weapon positions will also be multiplied by the scale factor.&lt;br /&gt;
&lt;br /&gt;
Player ships will also have their internal and external view positions multiplied by the scale factor.&lt;br /&gt;
&lt;br /&gt;
model_scale_factors on subentities will be ignored - the value for the main entity will be used instead.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;model_scale_factor&amp;quot; = 2.0;&lt;br /&gt;
&lt;br /&gt;
== name ==&lt;br /&gt;
States the model's name as it will be known to the ID computer.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;ExampleShip Mark IX&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== no_boulders ==&lt;br /&gt;
With older versions, scripted asteroids had no boulders by default. Starting with 1.70 all asteroids produce boulders when hit by a mining laser. no_boulders can overwrite this to emulate the old situation. By chance factor, or true/false.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;no_boulders&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== pilot ==&lt;br /&gt;
Gives the ship a predefined pilot, defined in [[characters.plist]]. Can eject in pod, if available, and be captured.&amp;lt;BR&amp;gt;&lt;br /&gt;
By default every object starts with a pilot except buoys, missiles, cargo and rocks. By defining a specific pilot,  any default pilot is replaced or a pilot is added to previously unpiloted objects.&lt;br /&gt;
  &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;pilot&amp;quot; = &amp;quot;constrictor-mission-thief&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
When no pilot is defined, Oolite will create a random pilot based on the ships role. For custom roles this means that Oolite has no clue and the pilot might have other bounties/insurances than desired. For this reason contains Oolite, starting with v 1.75, some predefined pilots: &amp;quot;oolite-trader&amp;quot;, &amp;quot;oolite-pirate&amp;quot;, &amp;quot;oolite-hunter&amp;quot;, &amp;quot;oolite-police&amp;quot;, &amp;quot;oolite-miner&amp;quot;, &amp;quot;oolite-passenger&amp;quot; and &amp;quot;oolite-slave&amp;quot;. When using one of these pilots, a random bounty/insurance will be set appropriate for this pilot role. Pilot bounty is different as ship bounty but on ejecting the pilot inherits the highest of both values. (actually a bitwise OR of both values)&lt;br /&gt;
&lt;br /&gt;
== port_weapon_type ==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Assigns the ship's port laser. &lt;br /&gt;
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE). &lt;br /&gt;
&lt;br /&gt;
While not essential, you should generally assign the same weapon to [[#starboard_weapon_type|starboard_weapon_type]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;port_weapon_type&amp;quot; = &amp;quot;WEAPON_BEAM_LASER&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== reaction_time ==&lt;br /&gt;
Sets the reaction time of the pilot of this ship. The default is 1.5 seconds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;reaction_time&amp;quot; = 1.0; // this pilot is superhuman! or a cat&lt;br /&gt;
&lt;br /&gt;
== roles ==&lt;br /&gt;
Assigns which [[role]](s) the entity should have, that can correspond to one specific, exclusive use, or several.&lt;br /&gt;
&lt;br /&gt;
The game engine constantly calls for generic roles to populate the universe.  In the example below the ship in question will be considered twice as often (2.0) when a trader is called for, only one quarter as often (0.25) when looking for a hunter, and as often as any other pirate ships when looking for a pirate. Multiple roles are space separated. An explanation of the generic roles available in Oolite 1.79 or later is at [[Oolite_Ship_Roles]].&lt;br /&gt;
&lt;br /&gt;
'''NB:''' If the ship cannot be docked to, extra care should be taken to avoid using the words '''station''' or '''carrier''' as part of any of the ship's role names. When either of these words are inside the roles key, the ship is automatically given station attributes. Other ships might even fruitless try to dock with it, and it will affect how some ships / entities are shown on the scanner.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;roles&amp;quot; = &amp;quot;hunter(0.25) trader(2.0) pirate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
or an exclusive role, simply:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;roles&amp;quot; = &amp;quot;uniquely_named_role&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
This has the benefit of being the only ship to be selected when a [[Script.plist|script]] calls for the ''uniquely_named_role'' ship.&lt;br /&gt;
&lt;br /&gt;
An item from the [[commodities]] can also be named as a role, for when that commodity is floating in space and called upon, to be represented by a particular model.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;roles&amp;quot; = &amp;quot;Gold&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Some roles are used by the game engine to populate systems, detect and define properties. (see also the [[System Populator]])&lt;br /&gt;
Such roles include 'thargoid', 'missile' and 'energybomb'.&lt;br /&gt;
Externally used equipment also needs specific mention of role, for example EQ_*_MINE and EQ_*_MISSILE.&lt;br /&gt;
&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?p=98050#p98050 1 1/2 pages of discussion of station population percentages] (2010)&lt;br /&gt;
&lt;br /&gt;
== rotational_velocity ==&lt;br /&gt;
May be applied to a sub-entity, like the following entry to the [[Shipdata.plist#subentities|subentity]] spines of the [[Weeviloid Hunter]].&lt;br /&gt;
Takes the form of [[Quaternions|quaternions]]. The following example enables rotation around the Z-axis.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = &amp;quot;0.707 0.0 0.0 0.707&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
An explaining example taken from the Oolite Bulletin board.&lt;br /&gt;
&lt;br /&gt;
The rotational velocity key is rotation per second. For instance, if you want to rotate once per 20 seconds around the Z axis:&lt;br /&gt;
 &lt;br /&gt;
a = 360 ° / 20 = 18 °&lt;br /&gt;
&lt;br /&gt;
[x, y, z] = [0, 0, 1]&lt;br /&gt;
 &lt;br /&gt;
sin a ˜ 0.30902&lt;br /&gt;
 &lt;br /&gt;
cos a ˜ 0.95106&lt;br /&gt;
 &lt;br /&gt;
Q = (0.95106, 0, 0, 0.30902)&lt;br /&gt;
&lt;br /&gt;
'''shipdata.plist entry:'''&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot;=&amp;quot;0.95106 0.0 0.0 0.30902&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In practical terms, one can therefore use &lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot;=&amp;quot;3 0 0 1&amp;quot;&lt;br /&gt;
To alter the speed of rotation increase number 3, for slower rotations, decrease for higher speed. For opposite rotational direction, change 1 to -1.[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6899&amp;amp;p=93038&amp;amp;hilit=rotational+velocity+key#p93038 (ref: Arhuman BB 1/11-09)]&lt;br /&gt;
&lt;br /&gt;
== scan_class ==&lt;br /&gt;
Will alter the model's appearance on the [[IFF system]].  If this line is omitted, it will usually become by default a standard ship entity (CLASS_NEUTRAL), appearing as a yellow flag on the radar (red if hostile to the player), but may be given a different scan class if added with other roles.  There are other options.&lt;br /&gt;
* CLASS_BUOY - green/yellow on scanner, will rotate in idle state, does not masslock&lt;br /&gt;
* CLASS_CARGO - white on scanner, can be scooped, does not masslock&lt;br /&gt;
* CLASS_MILITARY - purple on scanner, better pilots, will not attack other military ships, flashes purple/magenta if hostile to player&lt;br /&gt;
* CLASS_MISSILE - cyan on scanner, will not avoid collisions&lt;br /&gt;
* CLASS_POLICE - purple on scanner, will not attack other police ships, legal penalties for attacking, never has bounty, flashes purple/magenta if hostile to player&lt;br /&gt;
* CLASS_ROCK - white on scanner, launched defense ships do not inherit scan class, does not masslock&lt;br /&gt;
* CLASS_STATION - green on scanner, launched defense ships do not inherit scan class&lt;br /&gt;
* CLASS_THARGOID - green/red on scanner, considered hostile to any non-thargoid ship&lt;br /&gt;
* CLASS_NO_DRAW - invisible on scanner, cannot be targeted by missiles, does not masslock&lt;br /&gt;
* CLASS_MINE - red/yellow on scanner, automatically set on mines launched by player to override existing scan class, does not masslock&lt;br /&gt;
(This property was called &amp;quot;scanClass&amp;quot; before Oolite 1.74.)&lt;br /&gt;
Scan classes marked as &amp;quot;does not masslock&amp;quot; will masslock the player anyway if they are hostile to the player (as condition will be Red)&lt;br /&gt;
&lt;br /&gt;
Scripts can define custom colours for ships on the [[IFF system]] so ships may have a scanner appearance different to the default for their scan class.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scan_class&amp;quot; = &amp;quot;CLASS_ROCK&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==== Developer Note ====&lt;br /&gt;
Oolite uses scan_class internally to determine the behaviour of some ships (particularly with regard to who may shoot whom without incurring legal penalties). Bear this in mind and don't allocate CLASS_POLICE or CLASS_THARGOID to ships lightly!&lt;br /&gt;
&lt;br /&gt;
== scan_description ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The description of the ship's legal status on the [[Scanner Targeting Enhancement]]. If this is absent, the default text for the scan class will be used.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;scan_description&amp;quot; = &amp;quot;Unclaimed rock&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== scanner_display_color1 ==&lt;br /&gt;
Overrides the color that would normally be set by scanClass.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scanner_display_color1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== scanner_display_color2 ==&lt;br /&gt;
Overrides the color that would normally be set by scanClass. If this is set, the ship will flash between the two colours.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scanner_display_color2&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== scanner_hostile_display_color1 ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the color that would normally be set by scanClass when the ship is hostile and targeting the player.&lt;br /&gt;
&lt;br /&gt;
If no hostile colours are set, but normal colours are set, then the normal colours, not the scan class colours, will be used for a hostile ship.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scanner_hostile_display_color1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== scanner_hostile_display_color2 ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the color that would normally be set by scanClass when the ship is hostile and targeting the player. If this is set, the ship will flash between the two colours.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scanner_hostile_display_color2&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== scanner_range ==&lt;br /&gt;
Sets a custom scanner range. Standard is 25.6 km, thargoids have 50 km. Only applies to NPCs. However, at least since oolite 1.65 all defined scanner ranges are limited to 25.6 km, even for thargoids. This means it only makes sense defining shorter ranges than the maximum range.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scanner_range&amp;quot; = &amp;quot;25600&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== scoop_position ==&lt;br /&gt;
Determines the XYZ point on the model from which cargo is scooped. (default is 0,0,0)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;scoop_position&amp;quot; = &amp;quot;0.0 -4.5 -23.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Scooping for a player ship starts when the cargo collides with the front half of the bottom of the ship. Any other place of first contact leads to smashing the cargo in pieces. A good y-value for the position would therefor be half the size of the lowest body part of this area of the ship. For the z-value a point in the back side would be better.&lt;br /&gt;
&lt;br /&gt;
== script ==&lt;br /&gt;
Specifies a [[Scripting Oolite with JavaScript|JavaScript script]] (through it's filename) to attach to the ship. Ship scripts are the preferred approach for scripting ships in current Oolite.&lt;br /&gt;
&lt;br /&gt;
== script_info ==&lt;br /&gt;
A property list whose contents are available to JavaScript scripts, for whatever use they desire. It is exposed to JavaScript as the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Ship#scriptInfo|scriptInfo]]&amp;lt;/code&amp;gt; property of &amp;lt;code&amp;gt;Ship&amp;lt;/code&amp;gt; objects.&amp;lt;br&amp;gt;&lt;br /&gt;
Take note that when using an ascii plist, the JS engine will read in all entries as strings. When you need an entry as number, you might need to explicit convert it to a number. This is specially true for booleans as a &amp;quot;NO&amp;quot; string will be read as true. For all normal keys its Oolite that does the conversion for you.&lt;br /&gt;
&lt;br /&gt;
A short overview about used [[OXP_scriptInfo|script_info keys in OXPs]].&lt;br /&gt;
&lt;br /&gt;
== script_actions ==&lt;br /&gt;
Gives an oportunity to insert events such as in [[script.plist]], to involve a specific shipdata entity.  As seen in the following example, this particular object checks if Player has a cloaking device, and if not, will award it.  Should Player already have it, the gift will be in gold. See also [[scripts within shipdata]] for more detailled info.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;testForEquipment: EQ_CLOAKING_DEVICE&amp;quot;,&lt;br /&gt;
     {&lt;br /&gt;
        &amp;quot;conditions&amp;quot;&lt;br /&gt;
        (&lt;br /&gt;
           &amp;quot;foundEquipment_bool equal NO&amp;quot;&lt;br /&gt;
        )&lt;br /&gt;
        &amp;quot;do&amp;quot;&lt;br /&gt;
        (&lt;br /&gt;
           &amp;quot;awardEquipment: EQ_CLOAKING_DEVICE&amp;quot;&lt;br /&gt;
        )&lt;br /&gt;
        &amp;quot;else&amp;quot;&lt;br /&gt;
        (&lt;br /&gt;
           &amp;quot;awardCargo: 100 Gold&amp;quot;&lt;br /&gt;
        )&lt;br /&gt;
     }&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
== setup_actions ==&lt;br /&gt;
Arranges a process that may be necessary for some objects, like ball turrets.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;setup_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
    &amp;quot;initialiseTurret&amp;quot;&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== shaders ==&lt;br /&gt;
The ''shaders'' dictionary has the same structure as the ''[[#materials|materials]]'' dictionary. When [[Shaders in Oolite|shaders]] are available, the contents of the ''shaders'' dictionary are used in preference to those in ''materials''. If shaders are not available, the ''shaders'' dictionary is ignored.&lt;br /&gt;
&lt;br /&gt;
== ship_name ==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The name of this individual ship (e.g. Pride of Lave), which is placed in [[Oolite_JavaScript_Reference:_Ship#shipUniqueName|ship.shipUniqueName]]. It rarely makes sense to set this property in &amp;lt;code&amp;gt;shipdata.plist&amp;lt;/code&amp;gt;, except perhaps for a unique mission ship.&lt;br /&gt;
&lt;br /&gt;
== ship_class_name ==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The name of this ship's class (e.g. Sidewinder), which is placed in [[Oolite_JavaScript_Reference:_Ship#shipClassName|ship.shipClassName]]. If this is not set, it will default to [[#name|name]], which is usually suitable.&lt;br /&gt;
&lt;br /&gt;
== show_damage ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Whether to show sparks and other damage effects when this ship is hit.&lt;br /&gt;
&lt;br /&gt;
Defaults to on if energy recharge rate is greater than zero, off otherwise, for compatibility with previous hard-coded behaviour.&lt;br /&gt;
&lt;br /&gt;
== smooth ==&lt;br /&gt;
Determines if the model will use glLightModel(GL_FLAT) or glLightModel(GL_SMOOTH).&lt;br /&gt;
&lt;br /&gt;
If true, then lighting effects will be interpolated across the polygons of the model, giving a more 'rounded' effect.&lt;br /&gt;
&lt;br /&gt;
Asteroids, Boulders and Splinters use this effect as do some other models.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;smooth&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== spawn ==&lt;br /&gt;
The spawn directory is only used when a ship is added with the command: &amp;quot;spawnShip: shipname&amp;quot;.  This command only allows to add one ship by name (not role!). The position and orientation are taken from a spawn directory that describes the position it is placed and the position it is looking at.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;spawn&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
       &amp;quot;facing_position&amp;quot; = &amp;quot;spu 0 0 0&amp;quot;;&lt;br /&gt;
       &amp;quot;position&amp;quot; = &amp;quot;wpu 0 0 0.2&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== starboard_weapon_type ==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Assigns the ship's starboard laser. &lt;br /&gt;
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE). &lt;br /&gt;
&lt;br /&gt;
While not essential, you should generally assign the same weapon to [[#port_weapon_type|port_weapon_type]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;starboard_weapon_type&amp;quot; = &amp;quot;WEAPON_BEAM_LASER&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== subentities ==&lt;br /&gt;
An array of ''subentity definitions''. A ''subentity'' is an object attached to your ship. There are several types of subentity:&lt;br /&gt;
* ''Static subentities'', the default type, are simply extra models. They are defined as separate shipdata.plist entries, so technically they’re ships, but they don’t have a mind of their own. If the main ship is [[#frangible|frangible]], static subentities can take damage and blow up separately from the main ship. They can also be individually exploded or removed by scripts.&lt;br /&gt;
* ''Docks'' are recognized when setting up a station or carrier, and used to determine the station’s docking port parameters. After set-up, they work just like normal static subentities. The string &amp;quot;dock&amp;quot; in lowercase must be part of the old style name in order to get recognised as the dock subEntity.&lt;br /&gt;
* ''Ball turrets'' turn to track the ship’s current target, and shoot plasma balls if the target is within range (6000 metres). A ball turret’s field of fire is a 157 ° cone centred on its original facing. Currently, ball turrets make no effort not to shoot their own ship, so it is up to the designer to ensure this field of fire is clear. Like a static subentity, a ball turret is based on a shipdata.plist entry so its appearance can be customized. Oolite provides a built-in shipdata entry for ball turrets called, imaginatively, '''ballturret'''. &lt;br /&gt;
: For discussion on the effective range (before the reduction from the original 7500 to 7200) see [http://www.aegidian.org/bb/viewtopic.php?p=198854#p198854 here].&lt;br /&gt;
:Note that the [[Vortex]] turrets can be switched off. This involved special scripting (basically removing and restoring the turrets by script). Needs a little fancy footwork when docked though or else if you dock with removed sub-entities (even deliberately removed ones) you'll get a maintenance overhaul offered which will put them back if purchased.&lt;br /&gt;
* ''Flashers'' are blobs which glow with a pulsating light. From Oolite 1.74 onwards, constant light will also be an option. Note that while flashers appear luminous – they are unaffected by shadows – they do not cast light on other objects.&lt;br /&gt;
* Random number of Subentities (''eg'' Cargo pods): see [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18743 Can the number of entities a ship be randomized?] (2017)&lt;br /&gt;
&lt;br /&gt;
=== New-style subentity definition ===&lt;br /&gt;
Oolite 1.73 introduced a more flexible, dictionary-based way of specifying subentities. A new-style subentity is a dictionary using the following keys:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|+ Subentity definition properties&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''type''' || string || One of: “'''standard'''”, “'''ball_turret'''”, “'''flasher'''”. If not specified, “standard” is assumed.&lt;br /&gt;
|-&lt;br /&gt;
| '''subentity_key''' || string || The key of a ''shipdata.plist'' entry. Required for '''standard''' and '''ball_turret''' subentities, ignored for flashers.&lt;br /&gt;
|-&lt;br /&gt;
| '''position''' || vector || The position of the subentity relative to its parent. (This can be specified as a string with three numbers in it, or an array of three numbers, or a dictionary with '''x''', '''y''' and '''z''' entries.) Default: (0, 0, 0).&lt;br /&gt;
|-&lt;br /&gt;
| '''orientation''' || [[quaternion]] || The orientation of the subentity. Ignored for flashers. (This can be specified as a string with four numbers in it, or an array of four numbers, or a dictionary with '''w''', '''x''', '''y''' and '''z''' entries.) Default: (1, 0, 0, 0), which corresponds to no rotation.&lt;br /&gt;
|-&lt;br /&gt;
| '''is_dock''' || boolean || True if the subentity is a dock; false by default. Only applies to '''standard''' subentities. '''Note:''' this is ''not'' implied by having “dock” in the '''subentity_key''', as it is for old-style subentity definitions. In Oolite 1.76 or earlier a station may only have at most one dock subentity.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|+ Subentity definition properties for dock subentities (1.77 or later)&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''allow_docking''' || boolean || ''In Oolite 1.77 or later'', whether the dock allows docking. Defaults to true. (and always true in 1.76). Ignored for non-docks.&lt;br /&gt;
|-&lt;br /&gt;
| '''allow_launching''' || boolean || ''In Oolite 1.77 or later'', whether the dock allows launching. Defaults to true. (and always true in 1.76).  Ignored for non-docks.&lt;br /&gt;
|-&lt;br /&gt;
| '''disallowed_docking_collides''' || boolean || ''In Oolite 1.77 or later'', if this is true, ships attempting to dock here will collide with the dock if &amp;lt;code&amp;gt;allow_docking&amp;lt;/code&amp;gt; is false. If it is false, ships attempting to dock here will be docked with the station anyway. Defaults to false. (and always false in 1.76).  Ignored for non-docks.&lt;br /&gt;
|-&lt;br /&gt;
| '''dock_label''' || string || ''In Oolite 1.77 or later'', the name given to the dock by traffic control (overrides the display_name of the dock subentity). Defaults to &amp;quot;the docking bay&amp;quot;, and ignored for non-docks. In Oolite 1.76 or earlier the concept of dock names is meaningless.&lt;br /&gt;
|}&lt;br /&gt;
See [[Multiple Docks]] for more information on dock subentities and stations with more than one dock in Oolite 1.77 or later.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|+ Subentity definition properties for ball turrets&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''fire_rate''' || number || Interval between shots in seconds, for '''ball_turret''' subentities. Default: 0.5; minimum: 0.25.&lt;br /&gt;
|-&lt;br /&gt;
| '''weapon_range''' || number || Range for '''ball_turret''' subentities. Default: 6000; maximum 7200.&lt;br /&gt;
|-&lt;br /&gt;
| '''weapon_energy''' || number || Weapon energy for '''ball_turret''' subentities. Default: 25; maximum 100.&lt;br /&gt;
|}&lt;br /&gt;
See [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12085 New range of turrets] for more information on turret subentities (2012 discussion about modelling, quaternions, ''etc'').&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|+ Subentity definition properties for flashers&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| '''color''' || [[Materials in Oolite#Colour specifiers|colour specifier]] || Single colour for a flasher. Ignored for non-flashers. Default value: '''redColor'''.&lt;br /&gt;
|-&lt;br /&gt;
| '''colors''' || array || Array of colour specifiers for a flasher. Ignored for non-flashers. Before 1.74, only the first entry was used. If not present, see '''color'''. '''Note:''' like [[#laser_color|laser_color]], flasher colours must be “reasonably bright”.&lt;br /&gt;
|-&lt;br /&gt;
| '''frequency''' || number || Pulse rate for flashers, in cycles per second. Ignored for non-flashers. If 0, the flasher will have full intensity all the time in Oolite 1.74 and later, but half intensity in earlier releases. Default: 2.&lt;br /&gt;
|-&lt;br /&gt;
| '''initially_on''' || boolean || Specifiers whether a flasher is turned on when created. Ignored for non-flashers. Default: yes.&lt;br /&gt;
|-&lt;br /&gt;
| '''phase''' || number || Pulse phase offset for flashers, in seconds. Ignored for non-flashers. (This value is simply added to the time to get the pulse parameter.) Default: 0.&lt;br /&gt;
|-&lt;br /&gt;
| '''size''' || positive number || Diameter of a flasher in metres. Ignored for non-flashers. Default: 8. (Why 8? I don’t remember.)&lt;br /&gt;
|-&lt;br /&gt;
| '''bright_fraction''' || number || ''In Oolite 1.77 or later'', a number between 0 and 1 defining the proportion of the flasher's cycle that the flasher is bright for. Ignored for non-flashers. The default (which mimics the behaviour of all flashers in 1.76 or earlier) is 0.5.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Old-style subentity definition ===&lt;br /&gt;
Prior to Oolite 1.73, this was the the only way to specify a subentity.&lt;br /&gt;
&lt;br /&gt;
An old-style subentity definition is a string with eight items separated by spaces. In the description below, words in bold correspond to keys in [[#New-style subentity definition|new-style definitions]]. There are two variants:&lt;br /&gt;
&lt;br /&gt;
==== Flashers ====&lt;br /&gt;
For a flasher, the entry takes the form:&lt;br /&gt;
 *FLASHER* x y z hue frequency phase size&lt;br /&gt;
''*FLASHER*'' must be precisely the string “*FLASHER*”, in capitals.&lt;br /&gt;
&lt;br /&gt;
''x'', ''y'' and ''z'' form the '''position'''.&lt;br /&gt;
&lt;br /&gt;
''hue'' specifies the [http://en.wikipedia.org/wiki/HSL_and_HSV HSV] hue component (in degrees) of '''color'''. Saturation and value are always 1.&lt;br /&gt;
&lt;br /&gt;
'''frequency''', '''phase''' and '''size''' are the same as in the new-style format.&lt;br /&gt;
&lt;br /&gt;
'''initially_on''' is false.&lt;br /&gt;
&lt;br /&gt;
==== Other subentities ====&lt;br /&gt;
For a non-flasher, the entry takes the form:&lt;br /&gt;
 key x y z qw qx qy qz&lt;br /&gt;
''key'' corresponds to '''subentity_key'''.&lt;br /&gt;
&lt;br /&gt;
''x'', ''y'' and ''z'' form the '''position'''.&lt;br /&gt;
&lt;br /&gt;
''qw'', ''qx'', ''qy'' and ''qz'' form the '''orientation'''.&lt;br /&gt;
&lt;br /&gt;
'''type''' is ''standard'' unless the command ''initialiseTurret'' is present in the [[#setup_actions|setup_actions]] of the subentity, in which case it is ''ball_turret''. Note that the ''initialiseTurret'' no longer does anything when executed in a script; its presence is only used as an indicator to set the ''is_turret'' property when old-style definitions are translated. If ''initialiseTurret'' is inside a condition, it will be ignored. The ''initialiseTurret'' command is not required or useful for turrets which are only referenced using new-style subentity definitions.&lt;br /&gt;
&lt;br /&gt;
'''is_dock''' is implied by having the string “dock” (in lowercase) in the ''key''.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=3&amp;amp;t=19091 How are subentity scripts supposed to work ?] (2017)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=11716 Ball turrets] (2012)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=7222 Docking bay problems] (2009) - covers a range of issues&lt;br /&gt;
*Some OXP's with subentities: &lt;br /&gt;
:Thargoids: [[Stellar Serpents OXP]] (2010), [[Animated Ships]]/Butterflies (2011), [[Aquatics]] (2011: Hammerhead bulk carrier &amp;amp; the Aqualina stations), [[WildShips OXP]] (2012-14: moving elevators inside station struts)&lt;br /&gt;
:[[Z GrOovy HPC pack]] (2014 - bought equipment is visible on ship!); [[Scrub]] (2022 - rotating rings)&lt;br /&gt;
&lt;br /&gt;
== sun_glare_filter ==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The default strength of the sun glare filter on this ship. A number between 0 and 1, with the default being 0 (no filter)&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;sun_glare_filter&amp;quot; = 0.3;&lt;br /&gt;
&lt;br /&gt;
== track_contacts ==&lt;br /&gt;
Tracks the movement of the ship and sends a &amp;quot;CLOSE CONTACT&amp;quot; message to other ship AI's. It uses a time consuming tracking, so only set to true when actually used.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;track_contacts&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== throw_sparks ==&lt;br /&gt;
{{oolite-prop-added|1.73}}&lt;br /&gt;
&lt;br /&gt;
Each new ship should start in seemingly good operating condition, unless specifically told not to. (false by default)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;throw_sparks&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== thrust ==&lt;br /&gt;
Gives the entity an 'inertia' value, telling how fast it can increase or reduce speed (in m/s^2). 0 for rocks and cargo, 50 for a very fast ship, 100 for a station. When used with turrets it defines the turn rate in revolutions per second (with 1 being an average value). &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;thrust&amp;quot; = &amp;quot;25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== unpiloted ==&lt;br /&gt;
Used to designate items that will never have a pilot, thus never turn aggressive and never eject a pod. By chance factor, or true/false.&amp;lt;br&amp;gt;&lt;br /&gt;
It will not add a pilot when set to false, but will remove any existing pilot when set to true.&lt;br /&gt;
commsMessages can only be broadcasted by piloted ships. Ships are by default piloted.  cargo , rocks, missiles etc. are not piloted by default.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;unpiloted&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== view_position_.. ==&lt;br /&gt;
Sets the ship's 4 point-of-view positions in XYZ relative to the model.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;view_position_aft&amp;quot; = &amp;quot;0.0 5.0 -20.0&amp;quot;;&lt;br /&gt;
 &amp;quot;view_position_forward&amp;quot; = &amp;quot;0.0 1.9375 5.0&amp;quot;;&lt;br /&gt;
 &amp;quot;view_position_port&amp;quot; = &amp;quot;-11.85 2.825 -3.5&amp;quot;;&lt;br /&gt;
 &amp;quot;view_position_starboard&amp;quot; = &amp;quot;11.85 2.825 -3.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== weapon_energy ==&lt;br /&gt;
This setting works differently depending on the type of entity it's used for:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Missiles.&amp;lt;/b&amp;gt; Changes the damage inflicted by the missile. Any value accepted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NPC ships.&amp;lt;/b&amp;gt; Changes the forward weapon damage to a value different to the default one. Values higher than 50 will be clamped to 50. Does not change the value for aft weapons or subEntity weapons.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;N.B.&amp;lt;/b&amp;gt; It does not have any effect on player ships.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;turrets.&amp;lt;/b&amp;gt; Unused for turrets. Set the turret weapon_energy in its [[Shipdata.plist#New-style_subentity_definition|subEntity directory]].&lt;br /&gt;
&lt;br /&gt;
Default values are: WEAPON_PLASMA_CANNON = 6.0; WEAPON_PULSE_LASER = 15.0; WEAPON_BEAM_LASER = 15.0; WEAPON_MINING_LASER = 50.0; WEAPON_THARGOID_LASER = 12.5; WEAPON_MILITARY_LASER = 23.0&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;weapon_energy&amp;quot; = &amp;quot;17&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== weapon_facings ==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
What weapon mounts are available on the ship. This is a bit-mask, so pick the mounts and add the numbers:&lt;br /&gt;
&lt;br /&gt;
1 - Forward&amp;lt;br /&amp;gt;&lt;br /&gt;
2 - Aft&amp;lt;br /&amp;gt;&lt;br /&gt;
4 - Port&amp;lt;br /&amp;gt;&lt;br /&gt;
8 - Starboard&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;br /&amp;gt;&lt;br /&gt;
Fore and aft weapon mounts only.&lt;br /&gt;
  &amp;lt;key&amp;gt;weapon_facings&amp;lt;/key&amp;gt;&lt;br /&gt;
  &amp;lt;integer&amp;gt;3&amp;lt;/integer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If omitted, defaults to 15 (all mounts). If a player ship has this specified, and the same property specified in shipyard.plist, the shipyard.plist property takes precedence.&lt;br /&gt;
&lt;br /&gt;
Weapons assigned to a mount that the ship does not have will be ignored. Scripting cannot be used to add weapons to these mounts later, either.&lt;br /&gt;
&lt;br /&gt;
== weapon_mount_mode ==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
This controls how multiple weapon mount points work. It has three possible values:&lt;br /&gt;
* '''&amp;quot;single&amp;quot;''': this is the default, and replicates 1.82 and previous behaviour. In this mode, &amp;lt;code&amp;gt;weapon_position_*&amp;lt;/code&amp;gt; properties are simple vector expressions, and there is exactly one mount per facing.&lt;br /&gt;
* '''&amp;quot;split&amp;quot;''': In this mode, &amp;lt;code&amp;gt;weapon_position_*&amp;lt;/code&amp;gt; properties are an array of vector expressions. A weapon fitted to this facing has the same heat and energy cost as a single standard weapon, and the damage output is divided equally between all mount points. (in other words, the distinction is mainly cosmetic)&lt;br /&gt;
* '''&amp;quot;multiply&amp;quot;''': In this mode, &amp;lt;code&amp;gt;weapon_position_*&amp;lt;/code&amp;gt; properties are an array of vector expressions. A weapon fitted to this facing has N times the heat and energy cost as a single standard weapon, and each mount point does normal damage. (in other words, the weapon is fitted N times at once)&lt;br /&gt;
&lt;br /&gt;
For best results with AI and the &amp;quot;target reticle sensitive&amp;quot; feature, if there are several weapon positions in a (rough) line, the middle one should be listed first.&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/OoliteProject/oolite/pull/161 this comment] or [[Multiple Lasers]] for examples.&lt;br /&gt;
&lt;br /&gt;
== weapon_offset ==&lt;br /&gt;
Removed after version 1.65 (it was used to change the offsetpoint of a plasma cannon.)&lt;br /&gt;
&lt;br /&gt;
== weapon_position_.. ==&lt;br /&gt;
Plots the 'gunmouth' points of the model's 4 potential lasers.&lt;br /&gt;
&lt;br /&gt;
In 1.82 and earlier, and in 1.83 and later in the &amp;quot;single&amp;quot; &amp;lt;code&amp;gt;weapon_mount_mode&amp;lt;/code&amp;gt;, these are vector expressions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;weapon_position_aft&amp;quot; = &amp;quot;0.0 -5.0 -20.0&amp;quot;;&lt;br /&gt;
 &amp;quot;weapon_position_forward&amp;quot; = &amp;quot;0.0 0.0417 16.6667&amp;quot;;&lt;br /&gt;
 &amp;quot;weapon_position_port&amp;quot; = &amp;quot;-13.75 -2.0625 -1.875&amp;quot;;&lt;br /&gt;
 &amp;quot;weapon_position_starboard&amp;quot; = &amp;quot;13.75 -2.0625 -1.875&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In 1.83 and later, with &amp;quot;split&amp;quot; or &amp;quot;multiply&amp;quot; &amp;lt;code&amp;gt;weapon_mount_mode&amp;lt;/code&amp;gt;, these values are specified as arrays of vector expressions. For example:&lt;br /&gt;
 &amp;quot;weapon_position_forward&amp;quot; = ( &amp;quot;0.0 3.0 32.0&amp;quot; , &amp;quot;-15.0 0.0 32.0&amp;quot; , &amp;quot;15.0 0.0 32.0&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
= Station keys=&lt;br /&gt;
The following keys are only used by stations or carriers.&lt;br /&gt;
&lt;br /&gt;
== allegiance ==&lt;br /&gt;
An advisory flag that informs AIs how they should expect to be treated near or when attempting to dock with this station. See [[Oolite_JavaScript_Reference:_Station#allegiance|station.allegiance]] for the allowable values. If this is not set, the game will guess based on other station properties.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 allegiance = &amp;quot;neutral&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== allows_auto_docking ==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
When set false for a station, this station will not allow the use of a docking computer. Default value in &amp;quot;yes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 allows_auto_docking = &amp;quot;no&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
== allows_fast_docking ==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
When set true for a station, this station will allow fast docking with the docking computer. Default value in &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 allows_fast_docking = &amp;quot;yes&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
== defense_ship ==&lt;br /&gt;
Gives an oportunity to designate a particular ship by name that will defend a station/carrier. See also [[Shipdata.plist#defense_ship_role|defense_ship_role]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 defense_ship&amp;quot; = &amp;quot;my_defender&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== defense_ship_role ==&lt;br /&gt;
Gives an oportunity to designate a particular (group of) ships that will defend a station/carrier. This has to be specified in the [[Shipdata.plist#roles|roles]] of the ship(s) that are assigned to defend. When launched from a carrier the scan_class becomes that of the carrier. Default role is &amp;quot;police&amp;quot;/&amp;quot;interceptor&amp;quot; for normal stations and &amp;quot;hermit-ship&amp;quot; for stations of CLASS_ROCK. Defense ships with scanclass police or with a hermit-ship role launch with a policeInterceptAI.plist. All other ships use the ai_type as defined in shipdata.plist. After launch, all primary roles are changed into: &amp;quot;defense_ship&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;defense_ship_role&amp;quot; = &amp;quot; carrier_defenders&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== equipment_price_factor ==&lt;br /&gt;
Equipment price mask for dockables.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;equipment_price_factor&amp;quot; = &amp;quot;4.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== equivalent_tech_level ==&lt;br /&gt;
Sets shipyard tech level for dockables, different to the local system tech_level. Default value is the system tech_level.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;equivalent_tech_level&amp;quot; = 1;&lt;br /&gt;
&lt;br /&gt;
== has_npc_traffic ==&lt;br /&gt;
Determines if a station launches NPC traffic. Default is &amp;quot;yes&amp;quot; for stationary stations, and &amp;quot;no&amp;quot; for stations with a non-zero maximum speed. When set to &amp;quot;no&amp;quot; the station will not launch random ships as part of the main Oolite system repopulator (though OXP scripts may still launch ships from it).&lt;br /&gt;
&lt;br /&gt;
The type of traffic launched depends on the [[#allegiance|allegiance]] property of the station (which also determines what, if any, ships may try to dock at it).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_npc_traffic&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== has_patrol_ships ==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
Determines if a station launches periodic patrol ships. Default is &amp;quot;no&amp;quot;. Main stations always have patrol ships.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_patrol_ships&amp;quot; = yes;&lt;br /&gt;
 &lt;br /&gt;
== has_shipyard ==&lt;br /&gt;
Determines if a station or carrier has a shipyard. By chance factor as number between 0 and 1, but it can also be an array of conditions. Default is &amp;quot;no&amp;quot;, but for main stations has_shipyard is always &amp;quot;yes&amp;quot;. (Name is valid starting with Oolite 1.74. Before it was called &amp;quot;hasShipyard&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_shipyard&amp;quot; = &amp;quot;0.75&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;has_shipyard&amp;quot; = (&lt;br /&gt;
                   &amp;quot;systemGovernment_number morethan 3&amp;quot;,&lt;br /&gt;
                   &amp;quot;systemEconomy_number lessthan 4&amp;quot;&lt;br /&gt;
                  )&lt;br /&gt;
&lt;br /&gt;
== interstellar_undocking ==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
When set true for a station, this station will allow interstellar docking and undocking in interstellar space. When set to &amp;quot;no&amp;quot; the player docks in nearby normal space. Default value in &amp;quot;no&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 interstellar_undocking = &amp;quot;yes&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
==is_carrier==&lt;br /&gt;
Added as a tag for making the model be considered a carrier or station.  An alternative to including ''carrier'' or ''station'' among the [[Shipdata.plist#roles|roles]]. When present this key even overrules station/carrier settings with roles. (Name is valid starting with Oolite 1.74. Before it was called &amp;quot;isCarrier&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;is_carrier&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== market ==&lt;br /&gt;
Key that sets the market for stations and carriers. The name defines the key in [[commodities.plist]] that will be used as local market. Without a market key, the stations primaryRole is used as market.  Added with test release 1.74 and no longer used in 1.81 or later, where it is replaced by the market_* properties below.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;none&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== market_broadcast ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
If this is enabled the station's market will appear on the F8 screen if the player is in flight and has the station targeted. The default is enabled. This is ignored (and always true) if the station is the main station.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_broadcast&amp;quot; = no;&lt;br /&gt;
&lt;br /&gt;
== market_capacity ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The capacity in units per trade good of the station market. If omitted, the default market capacity of 127 units will be used. This is ignored if the station is the main station as it will use the system market, not its own.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_capacity&amp;quot; = 31;&lt;br /&gt;
&lt;br /&gt;
== market_definition ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
An array of [[trade-goods.plist#Secondary_Market_Definitions|secondary market rules]] which modify some or all of the price, quantity, capacity and legal status of a good relative to the primary system market. This is ignored if the station is the main station as it will use the system market, not its own.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_definition&amp;quot; = (&lt;br /&gt;
 	{&lt;br /&gt;
 		// export cheap clothes&lt;br /&gt;
 		&amp;quot;type&amp;quot; = &amp;quot;class&amp;quot;;&lt;br /&gt;
 		&amp;quot;name&amp;quot; = &amp;quot;oolite-wearable&amp;quot;;&lt;br /&gt;
 		&amp;quot;price_multiplier&amp;quot; = 0.8;&lt;br /&gt;
 		&amp;quot;price_randomiser&amp;quot; = 0.1;&lt;br /&gt;
 		&amp;quot;quantity_multiplier&amp;quot; = 3.5;&lt;br /&gt;
 		&amp;quot;quantity_randomiser&amp;quot; = 3.0;&lt;br /&gt;
 	}, 			&lt;br /&gt;
 	{&lt;br /&gt;
 		// not really interested in other goods&lt;br /&gt;
 		&amp;quot;type&amp;quot; = &amp;quot;default&amp;quot;;&lt;br /&gt;
 		&amp;quot;price_multiplier&amp;quot; = 0.55;&lt;br /&gt;
 		&amp;quot;price_randomiser&amp;quot; = 0.25;&lt;br /&gt;
 		&amp;quot;quantity_multiplier&amp;quot; = 0.0;&lt;br /&gt;
 		&amp;quot;capacity&amp;quot; = 3;&lt;br /&gt;
 	}&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
If the capacity set by a rule is larger than the market_capacity of the station, the market_capacity of the station is used instead.&lt;br /&gt;
&lt;br /&gt;
A blank array&lt;br /&gt;
 &amp;quot;market_definition&amp;quot; = ();&lt;br /&gt;
will give a market identical to the primary system market.&lt;br /&gt;
&lt;br /&gt;
If this key is omitted, the station will have no market. This is roughly equivalent to&lt;br /&gt;
 &amp;quot;market_definition&amp;quot; = (&lt;br /&gt;
 	{&lt;br /&gt;
 		&amp;quot;type&amp;quot; = &amp;quot;default&amp;quot;;&lt;br /&gt;
 		&amp;quot;price_multiplier&amp;quot; = 0;&lt;br /&gt;
 		&amp;quot;quantity_multiplier&amp;quot; = 0;&lt;br /&gt;
 		&amp;quot;capacity&amp;quot; = 0;&lt;br /&gt;
 	}&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
== market_monitored ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
If this is true, the market is subject to Cooperative law for the import and export of trade goods, and the player will gain the usual bounties for smuggling contraband. The default value is no. This is ignored (and effectively always true) if the station is the main station.&lt;br /&gt;
&lt;br /&gt;
 market_monitored = yes;&lt;br /&gt;
&lt;br /&gt;
== market_script ==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Allows a [[Oolite Market Scripts|market script]] to be used to modify trade prices. This overrides market_definition, if it is present.&lt;br /&gt;
&lt;br /&gt;
 market_script = &amp;quot;myoxp_marketchanges.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== max_defense_ships ==&lt;br /&gt;
Designates how many ships a dockable entity (station, carrier) can launch in defense. Default value is 3. See also [[Station Ships]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_defense_ships&amp;quot; = &amp;quot;10&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== max_police ==&lt;br /&gt;
Designates how many police or patrol ships a dockable entity (station, carrier) can launch.  Default value is 8. See also [[Station Ships]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_police &amp;quot; = &amp;quot;10&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== max_scavengers ==&lt;br /&gt;
Designates how many scavengers or miners a dockable entity (station, carrier) can launch. Default value is 3. See also [[Station Ships]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;max_scavengers&amp;quot; = &amp;quot;10&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== port_dimensions ==&lt;br /&gt;
Defines the size of the docking port and takes 3 numbers, separated by &amp;quot;x&amp;quot;. This key is generally of little use and can be skipped as it becomes overwritten by the actual size of the bounding box of the dock subentity when a correct dock subentity is defined.&lt;br /&gt;
  &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;port_dimensions&amp;quot; = &amp;quot;65x30x500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Size of Oolites main-station dock is: 64.00 x 192.00 x 250.00  while the dimension of a rock-hermit dock is: 138.001 x 138.001 x 250.12 (W x H x L)&amp;lt;br&amp;gt;&lt;br /&gt;
These sizes may be relevant for ship dimensions as since Oolite 1.75 ships must fit in these docks to be allowed docking or launching.&lt;br /&gt;
&lt;br /&gt;
== port_radius ==&lt;br /&gt;
Defines the size of the docking port radius. Or more precise, this is the distance from the station centre to the port location. Default value is 500. This key is generally of little use and can be skipped as it will be overwritten by the real position of the dock subentity.&lt;br /&gt;
  &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;port_radius&amp;quot; = &amp;quot;500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== requires_docking_clearance ==&lt;br /&gt;
Sets the requirement for docking clearance. Default is &amp;quot;no&amp;quot;. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|DockingClearance]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;requires_docking_clearance&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
==rotating==&lt;br /&gt;
Given to a station when rotation is desired. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotating&amp;quot; = yes;&lt;br /&gt;
&lt;br /&gt;
== station_roll ==&lt;br /&gt;
{{oolite-prop-added|1.74.2}}&lt;br /&gt;
&lt;br /&gt;
Determines the rotation speed of a station. Default value is determined by the systemwide station_roll in planetInfo.plist. If that is not defined, the default is 0.4. Negative values are also possible for a rotation in the other direction.&lt;br /&gt;
&lt;br /&gt;
'''Note''': unlike the other turn rate properties, for historical reasons &amp;lt;code&amp;gt;station_roll&amp;lt;/code&amp;gt; is measured in right-angles/second, ''not'' radians/second.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;-1.5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==tunnel_corners==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
Defines the number of corners in the docking tunnel. Ranges from 4 to 128. Default is &amp;quot;4&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;tunnel_corners&amp;quot; = 6;&lt;br /&gt;
&lt;br /&gt;
==tunnel_start_angle==&lt;br /&gt;
{{oolite-prop-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
Defines the position of the first corner of the docking tunnel in degrees. 0 means the first corner is straight up. Default is &amp;quot;45&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;tunnel_start_angle&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
==tunnel_aspect_ratio==&lt;br /&gt;
Defines the proportion of the tunnel’s width to its height. Default is &amp;quot;2.67&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;tunnel_aspect_ratio&amp;quot; = 1;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
= Links =&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3355 Orientation Issues] (Asteroid turns 180°, and want it to face planet, 2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty System] (Removing stations and rock hermits from a system, 2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=6&amp;amp;t=4729 Changing compass values of ships (from white to red)] (Hiding ships on the scanner, 2008)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Misc_plists&amp;diff=79838</id>
		<title>Misc plists</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Misc_plists&amp;diff=79838"/>
		<updated>2023-09-20T11:05:10Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* world-scripts.plist */ Fixed one more &amp;quot;worldScripts&amp;quot;, added quotes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
=crosshairs.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
The file is organized as a dictionary of crosshairs with the weapon name as its key. The key 'OTHER' can be used for weapons not otherwise defined by the crosshairs dictionary. Each weapon crosshair itself consists of an array of line segments. Each line segment is represented by an array of 6 numbers.&lt;br /&gt;
Example of a line segment:&lt;br /&gt;
 (W1, X1, Y1,    W2, X2, Y2)&lt;br /&gt;
The line will start at X1,Y1 with a relative width W1 and ends at X2, Y2 with relative width W2.&lt;br /&gt;
All coordinates must lie between -1 and +1, while the widths are between 0 and 1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 WEAPON_NONE =&lt;br /&gt;
 (&lt;br /&gt;
 	(0.25, 0.75, 0.0,		0.75, 0.50, 0.0),&lt;br /&gt;
 	(0.25, -0.75, 0.0,		0.75, -0.50, 0.0)&lt;br /&gt;
 );&lt;br /&gt;
The crosshairs.plist is not intended to be changed by an OXP. For custom crosshairs it is intended to add a &amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt; entry in the custom HUD definition itself. This will then override the default crosshairs for that HUD. (See [[hud.plist]]).&lt;br /&gt;
&lt;br /&gt;
In 1.77 or later, custom crosshairs files may be defined. These have the same syntax as crosshairs.plist, but should have a different unique name (e.g. &amp;lt;code&amp;gt;oxpname_crosshairs1.plist&amp;lt;/code&amp;gt;). Crosshairs may be included by a HUD definition, or switched in and out by [[Oolite_JavaScript_Reference:_PlayerShip#crosshairs|scripting]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=descriptions.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
The file is organized as a dictionary with pairs of key and value (string or array).&lt;br /&gt;
It has the same structure as the [[missiontext.plist]] and it also resides in the config folder inside the OXP.&lt;br /&gt;
&lt;br /&gt;
Example XML:&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
    &amp;lt;key&amp;gt;parcelnumbers&amp;lt;/key&amp;gt;&lt;br /&gt;
    &amp;lt;array&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;two&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;three&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;four&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;five&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;six&amp;lt;/string&amp;gt;&lt;br /&gt;
    &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 {&lt;br /&gt;
   parcelnumbers = (&amp;quot;two&amp;quot;, &amp;quot;three&amp;quot;, &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Use  ==&lt;br /&gt;
&lt;br /&gt;
Its use must be seen as a kind of variable. The key part is the variable name and the string part is the content of the variable. If you use an array of strings the variable will return a random choice of one of the strings. And this is the main use of the descriptions.plist: creation of text with variable content. See also [[string expansion]]. Note that for compatibility, the random number used to determine which choice to use from an array is only 1 byte long. Therefore if the array has more than 256 entries there will be some entries which can never be picked, and if it has a number of entries which is not a power of two the entries will not have equal chances of being picked (though if the number of entries is small, the difference in chances is not significant)&lt;br /&gt;
&lt;br /&gt;
The text itself is invoked by using the key-word between square brackets, like: &lt;br /&gt;
&lt;br /&gt;
 You have to pick up [parcelnumbers] parcels.&lt;br /&gt;
&lt;br /&gt;
Whenever Oolite reads in a scriptline, missiontext or description, it first looks for something between brackets. If it finds something it looks to see if it is a mission_variable. If yes, it replaces the name of the variable with its content. Then it looks in the descriptions.plist. If it finds a key, it replaces the name with the string content. If it is an array it picks at random one of the strings.&lt;br /&gt;
&lt;br /&gt;
Be aware that Oolite reads in all descriptions.plist lines on startup in one big file. This means that you can use keywords from other OXPs or from Oolite itself. If there are some keys with duplicate names, it uses the last. This means that you must use [[OXP Distribution#General|unique keywords]].&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
First adding categories to the Ship Library/View Ship specifications screen; ''then'' adding a missile icon; and ''finally'' adding mission text: this is the entire descriptions.plist&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 	&amp;quot;oolite-ship-library-category-black_mamba&amp;quot;		= &amp;quot;Black Mamba&amp;quot;;&lt;br /&gt;
 	&amp;quot;oolite-ship-library-category-plural-black_mamba&amp;quot;	= &amp;quot;Black Mambas&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;EQ_X_SWORD_MISSILE&amp;quot; =&lt;br /&gt;
          (&lt;br /&gt;
                  2,  2,&lt;br /&gt;
 	         2,  1,                                 &lt;br /&gt;
                  1,  0,&lt;br /&gt;
 		 2, -1,	&lt;br /&gt;
                  2, -2,                             &lt;br /&gt;
                  1, -2,&lt;br /&gt;
                  0,  0,&lt;br /&gt;
                 -1, -2,&lt;br /&gt;
                 -2, -2,&lt;br /&gt;
                 -2, -1,&lt;br /&gt;
                 -1,  0,&lt;br /&gt;
                 -2,  1,&lt;br /&gt;
                 -2,  2,&lt;br /&gt;
                 -1,  2,&lt;br /&gt;
                  0,  0,&lt;br /&gt;
                  1,  2       &lt;br /&gt;
 	);&lt;br /&gt;
    &amp;quot;XS_MI_STAGE_245&amp;quot; = &amp;quot;The Murderer is at Digebiti.&amp;quot;;&lt;br /&gt;
    &amp;quot;XS_MI_STAGE_G7_1&amp;quot; = &amp;quot;Just in time, Commander. I could use a little help here!&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=demoships.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
In 1.79 and following this is superseded by [[Shiplibrary.plist]] and should no longer be used for OXPs. It was used to project the ship on the new commander screen at game start. Its replacement adds the ship/station ''etc'' to the ship information on the &amp;quot;View Ship Library&amp;quot; page when Oolite starts up (and to the &amp;quot;View ship specifications&amp;quot; page on the docked F4 screen)&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array. Every entry consists of a string, with the name of a ship. The shipname must correspond with a key inside the [[shipdata.plist]]. It resides in the config folder inside the OXP.&lt;br /&gt;
&lt;br /&gt;
Example XML:&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_ship1&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_ship2&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;my_ship1&amp;quot;,&lt;br /&gt;
   &amp;quot;my_ship2&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Its function is to select which ships to show on the startup screen when a new commander is chosen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=illegal_goods.[[plist]]=&lt;br /&gt;
'''Note: The commodities.plist file is no longer used from Oolite 1.82 and following.''' It has been superseded by the [[Trade-goods.plist]]&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as a dictionary. Every entry consists of a key and a number. The key says which goods are illegal, and the number how illegal the goods are.&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 {&lt;br /&gt;
    Firearms = 1;&lt;br /&gt;
    Narcotics = 2;&lt;br /&gt;
    Slaves = 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Better never use this as it might change the game to much.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=info.[[plist]]=&lt;br /&gt;
This does not actually seem to do anything other than give the human being reading it some information! [[Galactic Navy OXP]] has one, as do ''inter alia'' [[User:Mandoman|Mandoman]]'s many oxps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=pirate-victim-roles.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
In 1.79 this is superseded by [[role-categories.plist]] and should no longer be used for new OXPs. Existing files will continue to have the effect documented below.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array. Every entry consists of a string, with the name of a shiprole. This plist is introduced with Oolite version 1.70&lt;br /&gt;
&lt;br /&gt;
Example XML:&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_shiprole1&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_shiprole2&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;my_shiprole1&amp;quot;,&lt;br /&gt;
   &amp;quot;my_shiprole2&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Pirates use the function '''scanForNearestMerchantman''' and '''scanForRandomMerchantman'''. With pre 1.70 versions this function only finds ships with role '''trader''' and '''player'''. Starting with 1.70 these two functions finds all ships that are included in the pirate-victim-roles.plist. This makes it possible to add ships in their own role that are recognized by pirates as traders. Ship designers are encouraged to use this pirate-victim-roles.plist and add all private roles that should act trader like for better interaction with pirate groups. &lt;br /&gt;
&lt;br /&gt;
[[Media:pirate-victim-roles.zip|''Download a custom pirate-victim-roles.plist'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=OXPMessages.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array of strings. When the plist is present, the content of the strings is written to the log on start-up and the player sees a message on the start-up screen that the oxp &amp;quot;foo&amp;quot; contains a message. This plist is introduced with Oolite version 1.74. It should be placed directly in the main directory level of the oxp where the 'requires.plist' is also situated.&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;This is a copy of my own test version of the oxp: &amp;quot;foo&amp;quot;. This oxp is intended for personal use only, don't spread.&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Only useful for test versions to make the user constantly aware that he is using a test version of the oxp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=world-scripts.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array. Every entry consists of a string, with the name of a script. The name must correspond with a file inside the Scripts folder inside the OXP.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;my_script1.js&amp;quot;,&lt;br /&gt;
   &amp;quot;my_script2.js&amp;quot;,&lt;br /&gt;
   &amp;quot;my_script3.plist&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Content==&lt;br /&gt;
To know what to put into such a world script, see [[Oolite_JavaScript_Reference:_World_script_event_handlers|the list of world script event handlers]].&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Its function is to attach more than one worldscript to an oxp. On startup, Oolite looks first if there is a &amp;quot;world-scripts.plist&amp;quot; file. When present the scripts inside are used as world scripts. These scripts can be both js script files or legacy script plist files. Even a mix is allowed. Only when the &amp;quot;world-scripts.plist&amp;quot; is not present, Oolite looks for a file with the name &amp;quot;script.js&amp;quot; in the Config folder. And when that is not present it looks for the file &amp;quot;script.plist&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
There are two ways of storing a JS worldscript:&lt;br /&gt;
&lt;br /&gt;
1)    Old: You can name it &amp;quot;script.js&amp;quot; and put it into the Config folder. That's what cim did in his [[Galactic Misjump OXP]]. It's a leftover of &amp;quot;legacy&amp;quot; plist scripting, where the script had to be named &amp;quot;script.plist&amp;quot; and reside in the Config folder. This way was especially useful in the time when we had Oolite 1.65 as official release, and the growing number of test releases. In those times you could have both a &amp;quot;script.plist&amp;quot; and a &amp;quot;script.js&amp;quot; alongside each other in the Confic folder. Oolite 1.65 would use the plist script, and the later versions would ignore the plist and use the JS script instead. This functionality is not particularly useful anymore, but it still exists.&amp;lt;br&amp;gt;&lt;br /&gt;
2)    New: You can name it whatever you want (but perhaps not &amp;quot;script.js&amp;quot;) and put it into the Script folder. Then you have to create another plist in the Config folder named &amp;quot;world-scripts.plist&amp;quot; and write the name of your script into that plist. This method has the advantage that you can have more than one worldscript in an OXP, which is of course not possible with the first method, because there can only be one file named &amp;quot;script.js&amp;quot; in a Config folder. [http://www.aegidian.org/bb/viewtopic.php?p=170774#p170774 Commander McLane (2012)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=whitelist.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as a dictionary of keys with the values being themselves either arrays of strings or dictionaries of key-value pairs.&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
The file is included with Oolite.  OXPs are restricted from using legacy features that are not included in the whitelist. As of Oolite 1.89, the file starts with the following comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*	Methods that may be used from old-style script actions or conditions.&lt;br /&gt;
	&lt;br /&gt;
	This plist cannot be extended or overriden by OXPs.&lt;br /&gt;
	&lt;br /&gt;
	action_methods			Commands permitted in world scripts.&lt;br /&gt;
	ai_methods			Commands permitted in AIs.&lt;br /&gt;
	ai_and_action_methods		Commands permitted in world scripts and AIs.&lt;br /&gt;
	query_methods			Values that may be queried in script conditions.&lt;br /&gt;
	action_method_aliases		Mappings from script commands (left) to internal names (right).&lt;br /&gt;
	ai_method_aliases		Mappings from AI commands (left) to internal names (right).&lt;br /&gt;
	query_method_aliases		Mappings from script queries (left) to internal names (right).&lt;br /&gt;
	shader_*_binding_methods	Values that may be queried through shader bindings.&lt;br /&gt;
	&lt;br /&gt;
	Most other types of legacy script - ship actions, character scripts,&lt;br /&gt;
	scriptActionOnTarget: - can use both action_methods and ai_methods. The exception is&lt;br /&gt;
	systeminfo scripts, which can't use ai_methods as they aren't run with a ship target.&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=See also=&lt;br /&gt;
* [[OXP howto]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_World_script_event_handlers&amp;diff=79837</id>
		<title>Oolite JavaScript Reference: World script event handlers</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_World_script_event_handlers&amp;diff=79837"/>
		<updated>2023-09-20T10:55:33Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Replaced worldScript.plist by world-scripts.plist, added links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a list of event handlers which can be implemented inside world scripts [[Scripting Oolite with JavaScript|JavaScript scripts for Oolite]]. Additionally, [[Oolite_JavaScript_Reference:_Ship_script_event_handlers|ship script handlers]] called on the player's ship will cause an equivalent world script event.&lt;br /&gt;
&lt;br /&gt;
Most event handlers can be used both in world scripts and in ship scripts. Generally speaking, handlers starting with &amp;quot;ship&amp;quot; can be used for both scripts and those starting with &amp;quot;player&amp;quot; are meant only for the player (= can only be used in a world script). Exceptions on this rule are mentioned with the individual handlers below. &lt;br /&gt;
&lt;br /&gt;
World scripts can be either found inside Config\script.js, or be distinctly named .js files inside the Scripts directory - in the latter case, the [[world-scripts.plist]] will list the active world scripts.&lt;br /&gt;
&lt;br /&gt;
World scripts are always active.&lt;br /&gt;
&lt;br /&gt;
The list of event handlers will change from version to version (usually additions of extra handlers). For this reason, any variables or functions you create as &amp;lt;code&amp;gt;this.variable&amp;lt;/code&amp;gt; should have a name beginning with '_' or '$' - e.g. &amp;lt;code&amp;gt;this._variable&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;this.$variable&amp;lt;/code&amp;gt; - to avoid potential conflicts with future event handlers (which will never start with '_' or '$').&lt;br /&gt;
&lt;br /&gt;
=== Game State ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;gamePaused&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This event is called when the game is paused. This is mainly useful for pausing sound playback which should not continue while the game is paused.&lt;br /&gt;
&lt;br /&gt;
 this.gamePaused = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;gameResumed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This event is called when the game is resumed from pause. This is mainly useful for resuming sound playback paused in a &amp;lt;code&amp;gt;gamePaused&amp;lt;/code&amp;gt; handler.&lt;br /&gt;
&lt;br /&gt;
 this.gameResumed = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillSaveGame&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillSaveGame&amp;lt;/code&amp;gt; handler is called whenever the player saves a game. The transferred message is one of the following strings: &amp;lt;code&amp;gt;&amp;quot;STANDARD_SAVE&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;AUTO_SAVE&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;QUICK_SAVE&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillSaveGame = function(message)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Using this event is useful for storing temporary variables in &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Global#missionVariables|missionVariables]]&amp;lt;/code&amp;gt;, just before the game gets saved. &amp;lt;code&amp;gt;missionVariables&amp;lt;/code&amp;gt; are slow in use compared to normal JS variables, therefore their use should be minimised for efficient code. The main benefit of using &amp;lt;code&amp;gt;missionVariables&amp;lt;/code&amp;gt; is that they are saved in a saved game. See also [[Mission variable]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt; handler is called after all OXPs have been loaded. This also means that it is called every time the player loads a game, begins a new game or presses space after dying. It can be used to do one-off initialisation such as copying mission variables into &amp;lt;code&amp;gt;this.*&amp;lt;/code&amp;gt; properties for efficiency or setting up data arrays to be used by the script in other handlers. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.startUp = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that from Oolite 1.79 onwards the player is in the main station while this handler runs but may be moved to another station soon after.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt; handler is run at game startup after the initial population of the system has been complete, and after the player has been moved to the station recorded in their save game. The order of world events at game start is therefore:&lt;br /&gt;
* &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;systemWillPopulate&amp;lt;/code&amp;gt; (or an alternative handler specified by the system info)&lt;br /&gt;
* &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Docking ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; handler is called at the beginning of the docking tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillDockWithStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == null&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == true&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_DOCKING&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; handler is called at the end of the docking tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipDockedWithStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == station&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == true&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_DOCKED&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guiScreen&amp;lt;/code&amp;gt; is either &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_REPORT&amp;quot;&amp;lt;/code&amp;gt;. However, any identical handler from an other oxp could have changed those values. Never count on it but double check when important.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; handler is called at the beginning of the launch tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillLaunchFromStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == station&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == false&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_LAUNCHING&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLaunchedFromStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLaunchedFromStation&amp;lt;/code&amp;gt; handler is called at the end of the launch tunnel effect. The handler's argument is the station which launched the ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipLaunchedFromStation = function(stationLaunchedFrom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == null&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == false&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_IN_FLIGHT&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerStartedAutoPilot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerStartedAutoPilot&amp;lt;/code&amp;gt; handler is called when the player starts autopilot docking. It is not called for the instantaneous dock command. The handler is called with an argument containing the station entity that is the docking target.&lt;br /&gt;
&lt;br /&gt;
 this.playerStartedAutoPilot = function(stationForDocking)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCancelledAutoPilot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCancelledAutoPilot&amp;lt;/code&amp;gt; handler is called when the player cancels autopilot docking.&lt;br /&gt;
&lt;br /&gt;
 this.playerCancelledAutoPilot = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceCancelled&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceCancelled&amp;lt;/code&amp;gt; handler is called when the player withdraws their request to dock at a station. &lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceCancelled = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceExpired&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceExpired&amp;lt;/code&amp;gt; handler is called when the player exceeds the two minute window without requesting an extension&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceExpired = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceGranted&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceGranted&amp;lt;/code&amp;gt; handler is called when the player is given permission to dock at a station. If the player is given immediate clearance to dock, this event will be called immediately after the &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; event. If, however, the station is unable to give immediate clearance, then there will be some delay between the request to dock and permission being granted. This event will be called when the station actually gives docking clearance.&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceGranted = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingRefused&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingRefused&amp;lt;/code&amp;gt; handler is called when a station refuses to provide autopilot docking instructions.&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingRefused = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; handler is called when a station answers on a docking request of the player by targeting the station and pressing L (shift-l).&lt;br /&gt;
&lt;br /&gt;
 this.playerRequestedDockingClearance = function(message)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Message is a string and can take the values: &amp;quot;DOCKING_CLEARANCE_GRANTED&amp;quot;, &amp;quot;DOCKING_CLEARANCE_DENIED_TRAFFIC_OUTBOUND&amp;quot;, &amp;quot;DOCKING_CLEARANCE_DENIED_TRAFFIC_INBOUND&amp;quot;,  &amp;quot;DOCKING_CLEARANCE_DENIED_SHIP_FUGITIVE&amp;quot;, &amp;quot;DOCKING_CLEARANCE_NOT_REQUIRED&amp;quot;, &amp;quot;DOCKING_CLEARANCE_EXTENDED&amp;quot; or &amp;quot;DOCKING_CLEARANCE_CANCELLED&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRescuedEscapePod&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerRescuedEscapePod&amp;lt;/code&amp;gt; handler is called when the player rescues an escape pod which does not have scripted content (all consequences of scripted content escape pods are assumed to be dealt with by the specified script instead). It has three parameters:&lt;br /&gt;
# the rescue fee, in decicredits&lt;br /&gt;
# the fee reason, which can be &amp;quot;insurance&amp;quot;, &amp;quot;bounty&amp;quot; or &amp;quot;slave&amp;quot; (in the latter case, the fee will always be zero)&lt;br /&gt;
# a dictionary like those in the &amp;lt;code&amp;gt;ship.crew&amp;lt;/code&amp;gt; property describing the pod occupant&lt;br /&gt;
&lt;br /&gt;
 this.playerRescuedEscapePod = function(fee, reason, occupant)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called after the escape pod has been processed, but slightly before the arrival report screen giving the results of the processing is displayed to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCompletedContract&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCompletedContract&amp;lt;/code&amp;gt; handler is called when a passenger, parcel or cargo contract ends, either successfully or by defaulting on it. It is not called when all contracts are cancelled on a galactic jump. It has four parameters:&lt;br /&gt;
# The type of contract, which can be &amp;quot;cargo&amp;quot;, &amp;quot;parcel&amp;quot; or &amp;quot;passenger&amp;quot;&lt;br /&gt;
# The result of the contract, which can be &amp;quot;success&amp;quot;, &amp;quot;late&amp;quot;, &amp;quot;failed&amp;quot;, or for cargo contracts only &amp;quot;short&amp;quot;&lt;br /&gt;
# The fee paid for the contract in decicredits&lt;br /&gt;
# The contract information dictionary&lt;br /&gt;
Note that the fee actually paid for the contract will often ''not'' match the originally agreed fee in the contract information dictionary, as penalties for late delivery or bonuses for good service are included in the fee parameter.&lt;br /&gt;
&lt;br /&gt;
 this.playerCompletedContract = function(type, result, fee, contract)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called after the contract has been processed, but slightly before the arrival report screen giving the results of the processing is displayed to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerEnteredContract&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerEnteredContract&amp;lt;/code&amp;gt; handler is called when a passenger, parcel or cargo contract starts, just after the items have been transferred to the player ship. It has two parameters:&lt;br /&gt;
# The type of contract, which can be &amp;quot;cargo&amp;quot;, &amp;quot;parcel&amp;quot; or &amp;quot;passenger&amp;quot;&lt;br /&gt;
# The contract information dictionary&lt;br /&gt;
&lt;br /&gt;
 this.playerEnteredContract = function(type, contract)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Witchspace Jumps ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerStartedJumpCountdown&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerStartedJumpCountdown&amp;lt;/code&amp;gt; handler is called when the user starts a witchspace or galactic witchspace jump countdown. The &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter is a string specifying which type of jump is occuring; currently, the possible values are “standard” and “galactic”. Other values may be added in future. The &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; parameter is a number specifying the number of seconds the countdown is running for.&lt;br /&gt;
&lt;br /&gt;
 this.playerStartedJumpCountdown = function(type, seconds)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCancelledJumpCountdown&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCancelledJumpCountdown&amp;lt;/code&amp;gt; handler is called when the user cancels a witchspace or galactic witchspace jump countdown.&lt;br /&gt;
&lt;br /&gt;
 this.playerCancelledJumpCountdown = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerJumpFailed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerJumpFailed&amp;lt;/code&amp;gt; handler is called at the end of a witchspace or galactic witchspace countdown, if the jump is not possible. The &amp;lt;code&amp;gt;reason&amp;lt;/code&amp;gt; parameter is a string specifying why the jump failed. The current values are:&lt;br /&gt;
* '''&amp;quot;insufficient fuel&amp;quot;''' - the ship no longer has enough fuel to make the jump (e.g. injector use or fuel leak).&lt;br /&gt;
* '''&amp;quot;blocked&amp;quot;''' - a heavy ship is near the player (specifically &amp;lt;code&amp;gt;object mass&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;object distance&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; &amp;gt;= 10.0, and &amp;lt;code&amp;gt;object distance&amp;lt;/code&amp;gt; &amp;lt;= scanner range).&lt;br /&gt;
* '''&amp;quot;malfunction&amp;quot;''' - the jump malfunctioned in a way that leaves the player ship in the current system.&lt;br /&gt;
* '''&amp;quot;malfunction&amp;quot;''' - the Galactic Hyperdrive is damaged or removed during a galactic jump countdown.&lt;br /&gt;
&lt;br /&gt;
Also theoretically possible but unlikely in current Oolite:&lt;br /&gt;
* '''&amp;quot;too far&amp;quot;''' - the jump destination is outside the 7LY range (but wasn't when the countdown started).&lt;br /&gt;
* '''&amp;quot;no target&amp;quot;''' - the jump destination is the current location (but wasn't when the countdown started).&lt;br /&gt;
&lt;br /&gt;
 this.playerJumpFailed = function(reason)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt; handler is called immediately before a witchspace jump, while the player is still in the starting system. The &amp;lt;code&amp;gt;cause&amp;lt;/code&amp;gt; parameter is a string specifying what sort of jump is occurring; currently, the possible values are &amp;lt;code&amp;gt;&amp;quot;standard jump&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;galactic jump&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;wormhole&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;carried&amp;quot;&amp;lt;/code&amp;gt;. Other values may be added in future.&lt;br /&gt;
&lt;br /&gt;
 // 1.80 or earlier&lt;br /&gt;
 this.shipWillEnterWitchspace = function(cause)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In 1.81 or later the handler gains a second parameter, describing the jump destination. For standard and wormhole jumps, this will be the system ID of the destination system. For galactic jumps, this will be the galaxy ID of the destination galaxy. (As [[Oolite JavaScript Reference: PlayerShip#galacticHyperspaceBehaviour|player.ship.galacticHyperspaceBehaviour]] may be changed during &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt;, it is not possible to predict in advance of a galactic jump being made what the resulting system ID in the destination galaxy will be)&lt;br /&gt;
&lt;br /&gt;
 // 1.81 or later&lt;br /&gt;
 this.shipWillEnterWitchspace = function(cause, destination)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the &amp;lt;code&amp;gt;cause&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;quot;carried&amp;quot;&amp;lt;/code&amp;gt; the &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt; parameter is &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt;. This behaviour is presumably a bug.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; handler is called as a witchspace jump concludes. When it is called, the player is (from a program perspective) in the destination system, but the tunnel effect has not yet been shown. Use this event to set up elements which need to be present in-system after the player exits witchspace.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillExitWitchspace = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedWitchspace&amp;lt;/code&amp;gt; handler is called after a witchspace jump has concluded and the tunnel effect has been shown.&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedWitchspace = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerEnteredNewGalaxy&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerEnteredNewGalaxy&amp;lt;/code&amp;gt; handler is called just before shipWillExitWitchspace.&lt;br /&gt;
&lt;br /&gt;
the sequence of events for a player jumping to a different galaxy is as follows:&lt;br /&gt;
&lt;br /&gt;
shipWillEnterWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
playerWillEnterWitchspace (NPC ship event)&amp;lt;br&amp;gt;&lt;br /&gt;
playerEnteredNewGalaxy (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
shipWillExitWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
shipExitedWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 this.playerEnteredNewGalaxy = function(galaxyNumber)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18392 Order of JS events when galactic jumping] (2016)&lt;br /&gt;
&lt;br /&gt;
=== Enter/Exit Aegis ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipEnteredStationAegis&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipEnteredStationAegis&amp;lt;/code&amp;gt; handler is called when the player enters the aegis of the main-station (2x scanner range from main-station). Other stations than the main-station don't give aegis messages.&lt;br /&gt;
&lt;br /&gt;
 this.shipEnteredStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedStationAegis&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedStationAegis&amp;lt;/code&amp;gt; handler is called when the player leaves the aegis of the main-station (2x scanner range from main-station).&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipEnteredPlanetaryVicinity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipEnteredPlanetaryVicinity&amp;lt;/code&amp;gt; handler is called when the player enters the planet aegis (3x planet radius).&lt;br /&gt;
&lt;br /&gt;
 this.shipEnteredPlanetaryVicinity = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedPlanetaryVicinity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedPlanetaryVicinity&amp;lt;/code&amp;gt; handler is called when the player leaves the planet aegis (3x planet radius).&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedPlanetaryVicinity = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipApproachingPlanetSurface&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipApproachingPlanetSurface&amp;lt;/code&amp;gt; handler is called when the player is very close to the planet (crosses a border ± 500 meter above the surface).&lt;br /&gt;
&lt;br /&gt;
 this.shipApproachingPlanetSurface = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLeavingPlanetSurface&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLeavingPlanetSurface&amp;lt;/code&amp;gt; handler is called when the player leaves the planet (crosses a border ± 500 meter above the surface).&lt;br /&gt;
&lt;br /&gt;
 this.shipLeavingPlanetSurface = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Combat ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;alertConditionChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;alertConditionChanged&amp;lt;/code&amp;gt; handler is called when the player’s alert status (&amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Player#alertCondition|player.alertCondition]]&amp;lt;/code&amp;gt;) changes. Only the player and stations have an alert condition. (world script and station scripts)&lt;br /&gt;
&lt;br /&gt;
 this.alertConditionChanged = function(newCondition, oldCondition)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerTargetedMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerTargetedMissile&amp;lt;/code&amp;gt; handler is called when the player targets the nearest missile by pressing &amp;quot;T&amp;quot; (shift-t).&lt;br /&gt;
&lt;br /&gt;
 this.playerTargetedMissile = function(missile)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipAttackedOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipAttackedOther&amp;lt;/code&amp;gt; handler is called when the player hits another with a laser shot. &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt; is the identity of the ship being hit.&lt;br /&gt;
&lt;br /&gt;
 this.shipAttackedOther = function(other)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipAttackedWithMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipAttackedWithMissile&amp;lt;/code&amp;gt; handler is called when a missile is fired. &amp;lt;code&amp;gt;missile&amp;lt;/code&amp;gt; contains the missile entity and &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that launched the missile.&lt;br /&gt;
&lt;br /&gt;
 this.shipAttackedWithMissile = function(missile, whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipBeingAttacked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipBeingAttacked&amp;lt;/code&amp;gt; handler is called when a laser shot  hits. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that attacked.&lt;br /&gt;
&lt;br /&gt;
 this.shipBeingAttacked = function(whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTakingDamage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
Not yet documented - seen in [[Auto eject OXP]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipBeingAttackedByCloaked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipBeingAttackedByCloaked&amp;lt;/code&amp;gt; handler is called when a laser shot from a cloaked ship hits. Guess what, there is no parameter because he is cloaked!&lt;br /&gt;
&lt;br /&gt;
 this.shipBeingAttackedByCloaked = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipKilledOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipKilledOther&amp;lt;/code&amp;gt; handler is called when a ship kills an other ship. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that was killed. &amp;lt;code&amp;gt;damageType&amp;lt;/code&amp;gt; is the type of damage.&lt;br /&gt;
&lt;br /&gt;
 this.shipKilledOther = function(whom : ship, damageType : string)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipReleasedEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipReleasedEquipment&amp;lt;/code&amp;gt; handler is called when a ship launches a mine (a pylon-mounted equipment item whose key ends with &amp;quot;_MINE&amp;quot;). &amp;lt;code&amp;gt;mine&amp;lt;/code&amp;gt; contains the launched mine entity.&lt;br /&gt;
&lt;br /&gt;
 this.shipReleasedEquipment = function(mine)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetDestroyed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetDestroyed&amp;lt;/code&amp;gt; handler is called when the target gets destroyed by the player. &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; contains the destroyed target entity. This command is always preceded by the &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; handler.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetDestroyed = function(target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipDied&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipDied&amp;lt;/code&amp;gt; handler is called when the ship or player dies. Expect a &amp;lt;code&amp;gt;reset()&amp;lt;/code&amp;gt; shortly when it is the player ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipDied = function(whom, why)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
'''whom''' contains the entity that caused the kill. '''why''' is the cause written as string and is one of: &amp;quot;removed&amp;quot;, &amp;quot;hit a planet&amp;quot;, &amp;quot;energy damage&amp;quot;, &amp;quot;scrape damage&amp;quot;, &amp;quot;heat damage&amp;quot;, &amp;quot;cascade weapon&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
(&amp;quot;cascade weapon&amp;quot; is new in 1.74 and  &amp;quot;removed&amp;quot; / &amp;quot;energy damage&amp;quot; were accidentally switched in 1.73)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipFiredMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipFiredMissile&amp;lt;/code&amp;gt; handler is called when a missile is fired. &amp;lt;code&amp;gt;missile&amp;lt;/code&amp;gt; contains the missile entity and &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; the identity of the target. The handler is send to the ship that launched the missile.&lt;br /&gt;
&lt;br /&gt;
 this.shipFiredMissile = function(missile, target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; handler is called when the target gets lost. &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; contains the lost target entity.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetLost = function(target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetCloaked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetCloaked&amp;lt;/code&amp;gt; handler is called when the target cloakes.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetCloaked = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;weaponsSystemsToggled&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;weaponsSystemsToggled&amp;lt;/code&amp;gt; handler is called whenever the player toggles their weapons systems on or off. The &amp;lt;code&amp;gt;state&amp;lt;/code&amp;gt; parameter contains the new state of the weapons systems&lt;br /&gt;
&lt;br /&gt;
 this.weaponsSystemsToggled = function(state : boolean)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Equipment and Cargo ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentAdded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentAdded&amp;lt;/code&amp;gt; handler is called whenever the player ship gains an item of equipment. This includes &amp;quot;gaining&amp;quot; of &amp;lt;code&amp;gt;EQ_SOMETHING_DAMAGED&amp;lt;/code&amp;gt; when an &amp;lt;code&amp;gt;EQ_SOMETHING&amp;lt;/code&amp;gt; is damaged. This event will fire regardless of the reason for the equipment being added to the ship.&lt;br /&gt;
&lt;br /&gt;
 this.equipmentAdded = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
       // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is often more convenient than monitoring both &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt;, and will also detect equipment addition by script.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentDamaged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentDamaged&amp;lt;/code&amp;gt; handler is called when equipment gets damaged. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentDamaged = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentRemoved&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentRemoved&amp;lt;/code&amp;gt; handler is called whenever the player ship loses an item of equipment. This includes &amp;quot;losing&amp;quot; of &amp;lt;code&amp;gt;EQ_SOMETHING_DAMAGED&amp;lt;/code&amp;gt; when an &amp;lt;code&amp;gt;EQ_SOMETHING&amp;lt;/code&amp;gt; is repaired. This event will fire regardless of the reason for the equipment being removed from the ship.&lt;br /&gt;
&lt;br /&gt;
 this.equipmentRemoved = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
       // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; handler is called when equipment gets repaired. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentRepaired = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtCargo&amp;lt;/code&amp;gt; handler is called when cargo is bought at the market screen. &amp;lt;code&amp;gt;commodity&amp;lt;/code&amp;gt; contains the non-localised name for the cargo. You can get the localised name using &amp;lt;code&amp;gt;expandDescription(&amp;quot;[commodity-name &amp;quot;+commodity+&amp;quot;]&amp;quot;);&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is price per unit in tenths of a credit.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtCargo = function(commodity, units, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt; handler is called when equipment is bought at the outfit screen.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtEquipment = function(equipment, paid)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The 'paid' parameter is added from 1.89 onwards. This is the amount of credits the player paid for the equipment, including any refunds that might have been applied during the purchase (eg when purchasing a laser and installing it in a position where a laser is already fitted, the cost of the current laser will be refunded to the player during the purchase).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; handler is called when a new ship is bought. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtNewShip = function(ship, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The 'price' parameter is added from 1.81 onwards. It is the cost of the ship (not counting any trade-in value of the player's old ship) in credits, or zero for changes using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' In a future release of Oolite, &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; will no longer be fired when the ship is replaced using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]. Instead, the &amp;lt;code&amp;gt;[[#playerReplacedShip|playerReplacedShip]]&amp;lt;/code&amp;gt; event should be used. At the moment, both events (&amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt;) will fire.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerWillBuyNewShip|playerWillBuyNewShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerChangedPrimedEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerChangedPrimedEquipment&amp;lt;/code&amp;gt; handler is called whenever the player changes the currently primed equipment (either with shift-n or ctrl-shift-n). The equipment key of the newly primed equipment will be passed as an argument.&lt;br /&gt;
&lt;br /&gt;
 this.playerChangedPrimedEquipment = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt; handler is called when the player ship is replaced via the JS method [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip&amp;lt;/code&amp;gt;]]. May be needed to re-evaluate the old equipment as replacing a ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerReplacedShip = function(ship)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerWillReplaceShip|playerWillReplaceShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerSoldCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerSoldCargo&amp;lt;/code&amp;gt; handler is called when cargo is sold at the market screen. &amp;lt;code&amp;gt;commodity&amp;lt;/code&amp;gt; contains the non-localised name for the cargo. You can get the localised name using &amp;lt;code&amp;gt;expandDescription(&amp;quot;[commodity-name &amp;quot;+commodity+&amp;quot;]&amp;quot;);&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is price per unit in tenths of a credit.&lt;br /&gt;
&lt;br /&gt;
 this.playerSoldCargo = function(commodity, units, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipScoopedFuel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipScoopedFuel&amp;lt;/code&amp;gt; handler is called whenever the player's ship transfers 0.1LY of fuel from the scoops to the tank.&lt;br /&gt;
&lt;br /&gt;
 this.shipScoopedFuel = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipScoopedOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipScoopedOther&amp;lt;/code&amp;gt; handler is called when a ship scoops cargo. The scooped item is transferred as argument.&amp;lt;br&amp;gt;If the cargo is scripted cargo, but not otherwise, then the scooped cargo itself gets the handler &amp;lt;code&amp;gt;shipWasScooped&amp;lt;/code&amp;gt; with the scooper as argument.&lt;br /&gt;
&lt;br /&gt;
 this.shipScoopedOther = function(whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillBuyNewShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillBuyNewShip&amp;lt;/code&amp;gt; handler is called just before a new ship is bought. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillBuyNewShip = function(dataKey, shipyard, price, tradeIn)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; is the shipdata.plist &amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; for the ship being purchased.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;shipyard&amp;lt;/code&amp;gt; is a dictionary object containing details about the ship being purchased, with information similar to the following:&lt;br /&gt;
 {&lt;br /&gt;
    short_description: &amp;quot;Python: Plus Galactic Hyperdrive. Extra Energy Unit. Docking Computers. E.C.M. System. Forward weapon upgraded to military laser. Price 215 000 ₢.&amp;quot;,&lt;br /&gt;
    shipdata_key: &amp;quot;python-player&amp;quot;,&lt;br /&gt;
    id: &amp;quot;675b6b-c60a74&amp;quot;,&lt;br /&gt;
    price: 215000,&lt;br /&gt;
    ship: {&lt;br /&gt;
      ...''[[shipdata.plist]]'' details of ship...&lt;br /&gt;
    },&lt;br /&gt;
    personality: 9807,&lt;br /&gt;
    extras: [&amp;quot;EQ_GAL_DRIVE&amp;quot;, &amp;quot;EQ_FUEL_SCOOPS&amp;quot;, &amp;quot;EQ_ENERGY_UNIT&amp;quot;, &amp;quot;EQ_FUEL_INJECTION&amp;quot;, &amp;quot;EQ_DOCK_COMP&amp;quot;, &amp;quot;EQ_ECM&amp;quot;]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is the amount being paid the for ship.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tradeIn&amp;lt;/code&amp;gt; is the trade in value of the current ship.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerBoughtNewShip|playerBoughtNewShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillReplaceShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillReplaceShip&amp;lt;/code&amp;gt; handler is called just before a ship is replaced using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillReplaceShip = function(dataKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; is the shipdata.plist &amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; for the ship being purchased.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerReplacedShip|playerReplacedShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;chartHightlightModeChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.87}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;chartHighlightModeChanged&amp;lt;/code&amp;gt; handler is called whenever the highlight mode of the galactic chart is changed either manually (from player input) or programmatically (by setting the mode with &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: PlayerShip#chartHighlightMode|player.ship.chartHightlightMode]]&amp;lt;/code&amp;gt;). The &amp;quot;newMode&amp;quot; parameter will be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_SUNCOLOR&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_ECONOMY&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_GOVERNMENT&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_TECHLEVEL&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 this.chartHightlightModeChanged = function(newMode)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;compassTargetChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;compassTargetChanged&amp;lt;/code&amp;gt; handler is called when a new target is selected. Mode can be any of the following:&lt;br /&gt;
&lt;br /&gt;
 COMPASS_MODE_BASIC&lt;br /&gt;
 COMPASS_MODE_PLANET&lt;br /&gt;
 COMPASS_MODE_STATION&lt;br /&gt;
 COMPASS_MODE_SUN&lt;br /&gt;
 COMPASS_MODE_TARGET&lt;br /&gt;
 COMPASS_MODE_BEACONS&lt;br /&gt;
&lt;br /&gt;
script example &lt;br /&gt;
&lt;br /&gt;
 this.compassTargetChanged = function(whom, mode)&lt;br /&gt;
 {&lt;br /&gt;
      log(' Now targeting ' + whom);&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;dayChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;dayChanged&amp;lt;/code&amp;gt; handler is called each time a new day starts. At very low frame rates while the clock is updating, it is possible for this handler to be called twice in the same frame. Therefore, clock.days will not be correct for one of the calls. Use the day number (newday parameter) passed to the handler instead.&lt;br /&gt;
&lt;br /&gt;
 this.dayChanged = function(newday)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; handler is called at the end of the escape pod sequence, after the &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; event and just prior to the &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; events. &lt;br /&gt;
&lt;br /&gt;
Use this handler if you need to override the destination for the escape pod with [[Oolite_JavaScript_Reference:_Player#setEscapePodDestination|&amp;lt;code&amp;gt;player.setEscapePodDestination()&amp;lt;/code&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
 this.escapePodSequenceOver = function() &lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;guiScreenChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;guiScreenChanged&amp;lt;/code&amp;gt; handler is called when the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; changes. The ''from'' parameter is the screen it is leaving and ''to'' is the screen initially being switched to. Note that the screen can have changed again in the meantime by the action of other oxps. Therefore, it is generally better to test the global &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; to see which page is really on display instead of using the ''to'' parameter. (world script only)&lt;br /&gt;
&lt;br /&gt;
This handler will only fire when switched to/from any of the following:&lt;br /&gt;
&lt;br /&gt;
1.76: &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MAIN&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt;(F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MANIFEST&amp;quot;&amp;lt;/code&amp;gt;(F5F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;&amp;lt;/code&amp;gt;(F7), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_OPTIONS&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_EQUIP_SHIP&amp;quot;&amp;lt;/code&amp;gt;(F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHIPYARD&amp;quot;&amp;lt;/code&amp;gt;(F3F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;&amp;lt;/code&amp;gt;(F6), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_LONG_RANGE_CHART&amp;quot;&amp;lt;/code&amp;gt;(F6F6), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKET&amp;quot;&amp;lt;/code&amp;gt;(F8), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_CONTRACTS&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_REPORT&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.77: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_INTERFACES&amp;quot;&amp;lt;/code&amp;gt;(F4) and removes &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_CONTRACTS&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.81: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKETINFO&amp;quot;&amp;lt;/code&amp;gt;(F8F8)&lt;br /&gt;
&lt;br /&gt;
 this.guiScreenChanged = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;guiScreenWillChange&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;guiScreenWillChange&amp;lt;/code&amp;gt; handler is called when the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; is about to change.  On these screens, a script could change the content of the page to be displayed. (world script only)&lt;br /&gt;
&lt;br /&gt;
This handler will only fire when switching to/from any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_EQUIP_SHIP&amp;quot;&amp;lt;/code&amp;gt;(F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MANIFEST&amp;quot;&amp;lt;/code&amp;gt;(F5F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKET&amp;quot;&amp;lt;/code&amp;gt;(F8), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHIPYARD&amp;quot;&amp;lt;/code&amp;gt;(F3F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;&amp;lt;/code&amp;gt;(F7)&lt;br /&gt;
&lt;br /&gt;
1.77: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_INTERFACES&amp;quot;&amp;lt;/code&amp;gt;(F4), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt;(F5)&lt;br /&gt;
&lt;br /&gt;
1.81: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKETINFO&amp;quot;&amp;lt;/code&amp;gt;(F8F8)&lt;br /&gt;
&lt;br /&gt;
 this.guiScreenWillChange = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;infoSystemChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;infoSystemChanged&amp;lt;/code&amp;gt; handler is called when the system displayed in F7 is changed, e.g. by moving the small blue cursor along the planned route in the chart.&lt;br /&gt;
&lt;br /&gt;
 this.infoSystemChanged = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;infoSystemWillChange&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;infoSystemWChange&amp;lt;/code&amp;gt; handler is called just before the system displayed in F7 is updated, e.g. by moving the small blue cursor along the planned route in the chart.&lt;br /&gt;
&lt;br /&gt;
 this.infoSystemWillChange = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;mfdKeyChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mfdKeyChanged&amp;lt;/code&amp;gt; handler is called whenever the player changes the content of an MFD slot. The &amp;lt;code&amp;gt;activeMFD&amp;lt;/code&amp;gt; parameter identifies which MFD slot is being changed, and the &amp;lt;code&amp;gt;mfdKey&amp;lt;/code&amp;gt; specifies the key code now in use in this slot.&lt;br /&gt;
&lt;br /&gt;
 this.mfdKeyChanged = function(activeMFD : integer, mfdKey : string)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: PlayerShip#setMultiFunctionDisplay|PlayerShip.setMultiFunctionDisplay()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionChoiceWasReset&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionChoiceWasReset&amp;lt;/code&amp;gt; handler is called when the mission choice is set to &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; via script (either using the legacy script method resetMissionChice or using &amp;lt;code&amp;gt;mission.runScreen ({choices: null})&amp;lt;/code&amp;gt; in javascript)&lt;br /&gt;
&lt;br /&gt;
 this.missionChoiceWasReset= function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionScreenEnded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionScreenEnded&amp;lt;/code&amp;gt; handler is called when a mission screen ends. Note that another script may have put up a new mission screen in the meantime. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.missionScreenEnded = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; handler is called if there are no mission/report screens active and the player's ship is docked. It gets fired at game startup, upon docking and after an arrival report or previous mission screen has ended.  (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.missionScreenOpportunity= function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This handler works a bit different from other handlers. It fires for every installed OXP/OXZ until one creates a mission screen during this handler, and then it stops. When the mission screen ends and there is no callback function that creates a new mission screen, the &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; is sent again to all installed OXPs/OXZs starting with the one that created the last mission screen. All this means is that when this handler fires, it is safe to show a mission screen and no further tests are needed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reportScreenEnded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;reportScreenEnded&amp;lt;/code&amp;gt; handler is called when the last arrival-report  screen ends. This is a screen that should not be written by a missionscreen. The code should wait until this eventhandler fires. Note that an other script may have put up a new missionscreen in the meantime. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.reportScreenEnded = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;selectedMFDChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;selectedMFDChanged&amp;lt;/code&amp;gt; handler is send whenever the player selects a new MFD slot (normally using the default keypress &amp;quot;;&amp;quot;). The &amp;lt;code&amp;gt;activeMFD&amp;lt;/code&amp;gt; paramater is the index of the MFD which is now active.&lt;br /&gt;
&lt;br /&gt;
 this.selectedMFDChanged = function(activeMFD : integer)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipCollided&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipCollided&amp;lt;/code&amp;gt; handler is send after a collision with otherShip.&lt;br /&gt;
&lt;br /&gt;
 this.shipCollided = function(otherShip)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipSpawned&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipSpawned&amp;lt;/code&amp;gt; handler is called after an NPC ship has been added to the system. After a witchspace jump it means that first all ships are added to the system, then all the relevant shipSpawned events are triggered.&amp;lt;br&amp;gt;&lt;br /&gt;
This handler for the worldScript is new since Oolite 1.74. After the event is sent to the shipScript, it is now also send to the worldScript with the added entity as argument.&lt;br /&gt;
&lt;br /&gt;
 this.shipSpawned = function(ship)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; handler is called when the player bails out. This will be followed by the &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; event, and then a &amp;lt;code&amp;gt;shipWillDockWithStation()&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;shipDockedWithStation()&amp;lt;/code&amp;gt; pair after a few seconds.&lt;br /&gt;
&lt;br /&gt;
 this.shipLaunchedEscapePod = function(escapepod)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;systemInformationChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;systemInformationChanged&amp;lt;/code&amp;gt; handler is called when system information is modified. It is passed the galaxy and system ID which were changed, and the key and new value in the SystemInfo object.&lt;br /&gt;
&lt;br /&gt;
To avoid problems with recursion, attempting to change the value of any system information property from within this handler will fail and log an error. Also note that changes which take place while Oolite is not running (from OXP planetinfo.plist files) will not cause this handler to be called when the game is reloaded.&lt;br /&gt;
&lt;br /&gt;
 this.systemInformationChanged = function(galaxy,system,key,newValue)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;viewDirectionChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;viewDirectionChanged&amp;lt;/code&amp;gt; handler is called when the player view changes, with a string to indicate which view the player is facing. Amongst its possible values are &amp;quot;VIEW_FORWARD&amp;quot;, &amp;quot;VIEW_AFT&amp;quot;, &amp;quot;VIEW_PORT&amp;quot;, &amp;quot;VIEW_STARBOARD&amp;quot;,&lt;br /&gt;
&amp;quot;VIEW_CUSTOM&amp;quot;,&lt;br /&gt;
&amp;quot;VIEW_GUI_DISPLAY&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 this.viewDirectionChanged = function(viewString)&lt;br /&gt;
 {&lt;br /&gt;
   if (viewString == &amp;quot;VIEW_PORT&amp;quot;)&lt;br /&gt;
   {&lt;br /&gt;
      // Your code here&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== System population ===&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.79 and later, functions are called to populate and repopulate the system. These functions do not have fixed names, as they depend on the system, but otherwise act like normal worldscript functions. [[Oolite System Populator|The populator page]] has more documentation on these functions.&lt;br /&gt;
&lt;br /&gt;
=== Defunct ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentDestroyed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
''Handler no longer exists in current stable version 1.80''&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentDestroyed&amp;lt;/code&amp;gt; handler is called when equipment gets destroyed completely beyond repair. (in strict mode, 1.77 or earlier only)  (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentDestroyed = function(equipment)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;tickle&amp;lt;/code&amp;gt; (removed in 1.77) ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tickle&amp;lt;/code&amp;gt; handler is called periodically-ish, whenever the old [[property list|plist]] scripts are updated. &amp;lt;code&amp;gt;tickle()&amp;lt;/code&amp;gt; is deprecated. In new code, use appropriate event handlers or [[Oolite JavaScript Reference: Timer|timers]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Missing Events ===&lt;br /&gt;
&lt;br /&gt;
All the initially planned events have been implemented in 1.74.&lt;br /&gt;
&lt;br /&gt;
If there are other events you would like to be able to respond to, please write a request [http://www.aegidian.org/bb/viewtopic.php?t=3296 on the forum].&lt;br /&gt;
&lt;br /&gt;
'''See also:''' [[Oolite JavaScript Reference: Ship script event handlers|ship script event handlers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=OXP_howto&amp;diff=79836</id>
		<title>OXP howto</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=OXP_howto&amp;diff=79836"/>
		<updated>2023-09-20T10:46:53Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Config */ Replaced worldScripts.plist by world-scripts.plist&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Shortcut: EW:OXP and EW:HOWDS redirect here''&amp;lt;/br&amp;gt;&lt;br /&gt;
[[Image:oolite-oxp-icon.png|100px|right|OXP icon]]&lt;br /&gt;
==Overview==&lt;br /&gt;
An '''Oolite Expansion Pack''' can cause many big changes or additions to Oolite's gameplay, or it may represent just a small, subtle alteration. By first appearances, there is no way to tell what is inside, as it's merely a folder with the added extension '''.oxp'''.&lt;br /&gt;
Oolite Version 1.79 onwards supports also compressed files in ZIP format with extension '''.oxz'''. &lt;br /&gt;
&lt;br /&gt;
To learn starting with a non-compressed version have a look at [[OXP_tutorial]].&lt;br /&gt;
&lt;br /&gt;
{{QuoteText|Text=It's worth saying I think that compared with a lot of game addon architectures, the OXP architecture as designed by Giles is already very good at avoiding conflicts compared with a lot of other games&lt;br /&gt;
- you can save your game, add, remove and upgrade lots of OXPs, load your game, and have it work&lt;br /&gt;
- you can do this repeatedly, while incrementally upgrading the core game, for years&lt;br /&gt;
- as a player you basically never have to care about load order; as an OXP developer, rarely&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that a lot of types of OXP conflicts are inevitable due to resource conflicts - a planet can only have one diffuse map, a ship can only have one AI - or due to conceptual conflicts - OXP A removes all stations from a system; OXP B expects the player to dock there.|Source=([http://aegidian.org/bb/viewtopic.php?p=241733#p241733 Cim (3rd Lead Developer)])}}&lt;br /&gt;
&lt;br /&gt;
=== Oolite TR version ===&lt;br /&gt;
The Oolite Developer Release/Test Release version is specially developed for testing out OXPs. It comes with a [[Debug OXP]]/Debug Console allowing one to spawn ships/station on demand, award oneself a test ship, detect the mass of another ship ''etc''.&lt;br /&gt;
&lt;br /&gt;
It is downloaded from the main Oolite website - currently http://www.oolite.space/download/&lt;br /&gt;
&lt;br /&gt;
== OXZ ==&lt;br /&gt;
The new OXZ distribution format is strongly recommended. It makes version control and distribution just so much easier.&lt;br /&gt;
&lt;br /&gt;
To make an OXZ file, use a ZIP program to compress the contents of the OXP folder, so that the [[manifest.plist]] file is in the root of the ZIP file, and the folders (AI, Config, etc) are folders in the ZIP file. Then, rename the ZIP file so that its extension is '''.oxz'''. To inspect an OXZ file, open it with your ZIP program.&lt;br /&gt;
&lt;br /&gt;
Here is a sample: [[Media:X.0.1.oxz]] - just rename all &amp;quot;X&amp;quot; within to the title of your idea and put your name into the author fields. &lt;br /&gt;
&lt;br /&gt;
You can use [http://www.ghisler.com/download.htm Total Commander] or [http://en.wikipedia.org/wiki/Krusader Krusader] to edit files within '''.oxz''' directly, without unpacking.&lt;br /&gt;
&lt;br /&gt;
For more details read [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=16688 The All-in-One Guide to OXZ Packaging and Distribution].&lt;br /&gt;
&lt;br /&gt;
=== Creating an .oxz on an AppleMac ===&lt;br /&gt;
When you compress the files/folders on the AppleMac to create the .oxz ''do not'' select them with your mouse! This way lies misery!&lt;br /&gt;
&lt;br /&gt;
Rather, ensure the relevant files/folders are inside one overall folder. Then, use '''command-a''' to select all the ''contents'' of this overall folder and then select '''compress''' from the file menu on the finder's menu bar. Finally, rename your newly-created .zip file as an .oxz&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
Inside the '''.oxp''' folder, or the '''.oxz''' file, it will at least contain a folder (Config, AIs, Models, Textures, etc...) that holds scripts, plists or other things like textures or models. It is down to the goal of the [[OXP]], which ways to combine elements to the OXP's contents. To get a feeling for it, simply take a look in other oxps. (If they are in .oxz format, any normal unzip program can inspect their contents - many will even let you edit the contents without having to unzip and rezip the file)&lt;br /&gt;
&lt;br /&gt;
The structure for OXPs:&lt;br /&gt;
 AddOns (folder)&lt;br /&gt;
 -.oxp (folder) - Holds requires.plist, manifest.plist and the other folders&lt;br /&gt;
 --&amp;gt; AIs (folder) - Holds AI plists&lt;br /&gt;
 --&amp;gt; Config (folder) - Holds all other plists&lt;br /&gt;
 --&amp;gt; Images (folder) - Holds background images&lt;br /&gt;
 --&amp;gt; Models (folder) - Holds the .dat files&lt;br /&gt;
 --&amp;gt; Music (folder) - Surprise - holds music files&lt;br /&gt;
 --&amp;gt; Scenarios (folder) - Holds new game scenarios (v1.79)&lt;br /&gt;
 --&amp;gt; Scripts (folder) - Holds scripts (worldScripts and shipScripts)&lt;br /&gt;
 --&amp;gt; Shaders (folder) - Holds Vertex and Fragment shaders (v1.69)&lt;br /&gt;
 --&amp;gt; Sounds (folder) - Holds sound files&lt;br /&gt;
 --&amp;gt; Textures (folder) - Holds models textures&lt;br /&gt;
 --&amp;gt; [[info.plist]] (file)&lt;br /&gt;
 --&amp;gt; [[manifest.plist]] (file) &lt;br /&gt;
&lt;br /&gt;
If the OXP is in the uncompressed OXP folder format, the .oxp folder must contain a [[requires.plist]] file. If it is in the compressed OXZ single-file format, it must contain a [[manifest.plist]] file.&lt;br /&gt;
&lt;br /&gt;
===AIs===&lt;br /&gt;
The folder named AIs contains any AI.plist additions the OXP might use. &lt;br /&gt;
&lt;br /&gt;
* [[OXP howto AI|Making Oolite AI]]&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.79 AIs may be written in Javascript using .js files in this folder. A helper library is provided to make writing complex JS AIs simpler.&lt;br /&gt;
&lt;br /&gt;
* [[Oolite PriorityAI Documentation]]&lt;br /&gt;
* [[Oolite PriorityAI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
===Config===&lt;br /&gt;
All plist files except for those introducing new AIs, ''[[requires.plist]]'', ''[[manifest.plist]]'' or ''[[info.plist]]'', belong in Config.&lt;br /&gt;
&lt;br /&gt;
In its simplest form, an OXP could contain only a Config with an altering ''script.plist'' or ''planetinfo.plist''.  An OXP that adds a new ship needs a ''shipdata.plist'' entry, and unless it is based entirely on existing Oolite data, would include a model and texture. &lt;br /&gt;
&lt;br /&gt;
* [[OXP howto plist|Making Oolite plists]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This folder contains [[Property lists]] such as:&lt;br /&gt;
&lt;br /&gt;
* ''[[characters.plist]]'' that adds non-player characters to Oolite.&lt;br /&gt;
* ''[[commodities.plist]]'' that contains information for each commodity in a market in 1.80 or earlier&lt;br /&gt;
* ''[[crosshairs.plist]]'' that contains the look for your weapons (v1.73).&lt;br /&gt;
* ''[[customsounds.plist]]'' that contains references to ingame used sounds.&lt;br /&gt;
* ''[[descriptions.plist]]'' that adds vocabulary to Oolite texts.&lt;br /&gt;
* ''[[effectdata.plist]]'' defines custom visual effects (v1.77).&lt;br /&gt;
* ''[[equipment.plist]]'' lists upgrades available from the Shipyard.&lt;br /&gt;
* ''[[explosions.plist]]'' customises things blowing up (v1.81)&lt;br /&gt;
* ''[[global-settings.plist]]'' sets a few miscellaneous universal settings (v1.81)&lt;br /&gt;
* ''[[gui-settings.plist]]'' settings for reformatting the GUI screens (v1.81)&lt;br /&gt;
* ''[[hud.plist]]'' and ''[[hud.plist|hud-small.plist]]'' that allows for changes or a radically new ''Head-Up Display''.&lt;br /&gt;
* ''[[illegal_goods.plist]]'' that contains a list of banned/forbidden items in 1.80 or earlier. GalCop has an eye on that.&lt;br /&gt;
* ''[[Oolite_Keyboard_Controls|keyconfig.plist]]'' that allows for changes of the keymapping.&lt;br /&gt;
* ''[[missiontext.plist]]'' contains texts for the mission screens.&lt;br /&gt;
* ''[[OXPMessages.plist]]'' adds warnings to testversions of an oxp.&lt;br /&gt;
* ''[[pirate-victim-roles.plist]]'' that defines which roles should act as traders. (deprecated in v1.79)&lt;br /&gt;
* ''[[planetinfo.plist]]'' that plots system specific changes from the default. May also contain ''script actions''.&lt;br /&gt;
* ''[[role-categories.plist]]'' for specifying groups of roles with similar properties (v1.79)&lt;br /&gt;
* ''[[scenarios.plist]]'' lists the starting scenarios in the Scenarios folder (v1.79).&lt;br /&gt;
* ''[[screenbackgrounds.plist]]'' that contains references to background images (v1.74).&lt;br /&gt;
* ''[[Scripting Oolite with JavaScript|script.js]]'' is the successor of [[script.plist]] in JavaScript. It will be loaded in preference to script.plist if both exist and offers more flexibility and improved possibilities.&lt;br /&gt;
* ''[[shipdata.plist]]'' that introduces any new entity (ships, stations, objects etc.) to Oolite.&lt;br /&gt;
* ''[[shipdata-overrides.plist]]'' that selectively can replace shipentries in other shipdata.plists&lt;br /&gt;
* ''[[shiplibrary.plist]]'' that gives information for the ship description library viewable from the startup screen (v1.79)&lt;br /&gt;
* ''[[shipyard.plist]]'' that introduces new ships available for player purchase.&lt;br /&gt;
* ''[[shipyard-overrides.plist]]'' that selectively can replace shipentries in other shipyard.plists&lt;br /&gt;
* ''[[speech_pronunciation_guide.plist]]'' is another of the other custom methods.&lt;br /&gt;
* ''[[trade-goods.plist]]'' defines trade goods in 1.81 and later&lt;br /&gt;
* ''[[world-scripts.plist]]'' that contains a list of scripts (if more than one worldScript should be used).&lt;br /&gt;
&lt;br /&gt;
Deprecated:&lt;br /&gt;
* ''[[demoships.plist]]'' that selects demoships to show on startup (replaced - approximately - by shiplibrary.plist in 1.79 and later)&lt;br /&gt;
* ''[[script.plist]]'' to handle conditional ''script actions''. (deprecated)&lt;br /&gt;
* ''[[script.oos]]'' was briefly introduced during 1.70 development but is now deprecated in favour of JS.)&lt;br /&gt;
&lt;br /&gt;
=== Models===&lt;br /&gt;
Oolite models need to be in an Oolite specific format using the the '''.dat''' file extension. There are utilities available that convert models made in Wings 3D (.obj) and Meshwork (.mesh) into this. A .dat file can be opened in a plain text editor to view the object's assigned texture names and see that they correspond with the actual file names in the Textures folder. The .dat file must be named exactly as it is referenced in the shipdata ''model'' entry - case sensitive!!!&lt;br /&gt;
&lt;br /&gt;
* [[OXP howto model|Making Oolite models]] - tutorials for Wings3D &amp;amp; Blender, notes on sub-entities, links ''etc''.&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12165 Model Converter utilities] (2012-17)&lt;br /&gt;
* Video: [http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=16123 From scratch to Mamba in under an hour] ([[Dertien]], 2013)&lt;br /&gt;
&lt;br /&gt;
===Scripts===&lt;br /&gt;
Scripts are in text format. In this folder you can put both js scripts as well as legacy scripts. New OXPs should only use Javascript here.&lt;br /&gt;
* [[Scripting_Oolite_with_JavaScript|Scripting Oolite with Javascript]]&lt;br /&gt;
* [[Oolite_JavaScript_object_model|Scripting reference]]&lt;br /&gt;
&lt;br /&gt;
===Textures===&lt;br /&gt;
&lt;br /&gt;
Oolite's textures are in the '''.png''' format, usually at a standard 512x512 size, and must be named exactly as they are named in the .dat file. &lt;br /&gt;
&lt;br /&gt;
* [[OXP howto texture|Making Oolite textures]]&lt;br /&gt;
&lt;br /&gt;
* [[Smivs'_texture_tutorial|Smivs' guide to making Oolite textures]]&lt;br /&gt;
&lt;br /&gt;
* [[Texturing tips and tricks by Theta Seven]]&lt;br /&gt;
&lt;br /&gt;
Viewing a specific texture and / or model in Oolite.&lt;br /&gt;
&amp;quot;I made one. How do I proof it?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [[Viewing a Texture or Model]]&lt;br /&gt;
&lt;br /&gt;
==OXP Verifier==&lt;br /&gt;
&lt;br /&gt;
Oolite has what amounts to a spell checker for shipdata.plist and some other plists, called the OXP verifier. It does not work with OXZ's. The verifier detects unknown keys or wrong use of keys ''etc''. It can currently only be invoked from the command line. &lt;br /&gt;
&lt;br /&gt;
On Windows or Linux: &lt;br /&gt;
Code: &lt;br /&gt;
'''oolite.app/oolite --verify-oxp &amp;lt;path to OXP&amp;gt; '''&lt;br /&gt;
&lt;br /&gt;
On Mac OS X: &lt;br /&gt;
Code: &lt;br /&gt;
'''Oolite.app/Contents/MacOS/Oolite --verify-oxp &amp;lt;path to OXP&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Most Mac users will not be familiar with using the command line. Look inside your application folder for a '''utilities folder'''. Inside that you will find a program called [https://en.wikipedia.org/wiki/Terminal_(macOS) Terminal]. &amp;lt;br&amp;gt;&lt;br /&gt;
Run it to open a terminal window. Now drop the oolite application on that window. That will generate the path to oolite on the command line. Delete the trailing space and paste the following text - including the trailing space- behind it: &amp;quot;/Contents/MacOS/Oolite --verify-oxp &amp;quot;.  Now drop the oxp you want to verify on the window. That will again create the path to the oxp behind the last entry. &amp;lt;br&amp;gt;&lt;br /&gt;
When you select the window and hit the &amp;lt;return&amp;gt; key, the verification will start. It should now open the Console program, showing the results. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Console''' is a log viewer developed by Apple Inc. and included with macOS, also in the utilities folder. It allows users to search through all of the system's logged messages, and can alert the user when certain types of messages are logged. The Console is generally used for troubleshooting when there is a problem with the computer. MacOS itself, as well as any applications that are used, send a constant stream of messages to the system in the form of log files. The console allows you to read the system logs, help find certain ones, monitor them, and filter their contents. See [[Debug OXP]] for more information.&lt;br /&gt;
&lt;br /&gt;
There is a lengthy file - '''OXP verifier design.txt''' tucked inside your Oolite installation with more information about it&lt;br /&gt;
&lt;br /&gt;
Note that it is possible to [http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=21443 obtain graphical output] from Graphviz for OXP Verifier.&lt;br /&gt;
&lt;br /&gt;
=== BB thread ===&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=8&amp;amp;t=13400 plist Editor Pro for Windows] (2013 - full of relevant Red Herrings)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=21359 OXP Develoopment and Plist files] (2023 - quick introduction)&lt;br /&gt;
&lt;br /&gt;
=== Correcting with plutil (Apple Macintosh Terminal utility) ===&lt;br /&gt;
Since a very small mistake is enough to stop a .plist from being accepted, it's important to be exact about every letter and sign. The Mac Terminal utility has a very practical tool for catching parser errors. After opening Terminal, simply type plutil, add one space, and drag and drop the plist in question onto the Terminal window. This will cause the 'address' of the plist to be shown. Hit return, and Terminal will reveal whether or not the plist is OK. If it's not, you might be given a clue to what is wrong, and the line number of the error - or just a general note that &amp;quot;Unexpected character { at line 1&amp;quot;!&lt;br /&gt;
&lt;br /&gt;
==Unique names==&lt;br /&gt;
On loading the oxps, Oolite will add all files in the AIs, Models, Sound and Scripts folders in one big folder for its own use. That means that all files need unique names or one file will overwrite another with the same name. Files in Textures are not pre-loaded, but when looking for a specific texture Oolite looks in all Texture folders until it finds a texture file with a matching name. If another oxp contains a texture with identical name, Oolite could use that texture.&lt;br /&gt;
&lt;br /&gt;
For the Config folder something similar happens. Here the plists all have the same name, but the content  of all oxp plists is loaded per type in one big plist. e.g. all individual shipData.plist go in one big shipData.plist file. And within a single plist, all keys must be unique. When two plists use the same key, the later loading key will overwrite the former.&lt;br /&gt;
&lt;br /&gt;
Generally it is a good habit to precede your chosen filenames and keys with the name of the oxp, or another unique prefix, to make sure the names stay unique and no other oxp will use the same names.&lt;br /&gt;
&lt;br /&gt;
==Scripting with JavaScript==&lt;br /&gt;
Older OXPs (from [[User:Aegidian|Aegidian]]'s day were written in Legacy Script: see [[Methods]]. Modern OXPs are written in JavaScript. Specifically oolite.jsVersion 185, an Oolite specific variant of '''ECMAv5'''. It is the same Spidermonkey version that Firefox 4 shipped with many years ago, but it is a special build for Oolite. This is the version that we have almost always had and it has not changed between versions of the game. [http://aegidian.org/bb/viewtopic.php?p=256623#p256623 It is unlikely to change] in the future.&lt;br /&gt;
&lt;br /&gt;
JavaScript is the preferred scripting interface for worldScripts and shipScripts. The legacy scripting interface (see [[script.plist]]) still works, but is not supported. See [[Scripting Oolite with JavaScript]] for more information.&lt;br /&gt;
&lt;br /&gt;
Note that most of the [[Legacy Scripting]] still works perfectly well (XML &amp;amp; OpenStep)!&lt;br /&gt;
&lt;br /&gt;
==Hidden settings==&lt;br /&gt;
There are several [[Hidden_Settings_in_Oolite]] that make life for an oxp creator easier. One of them is the setting '''always-flush-cache'''. It makes every startup a bit slower, but it prevents Oolite working with cached data instead of your newly changed file. For someone that only does occasional oxp changes it will be enough to flush the cache by holding the shift key when starting Oolite but if you are writing oxps, this is the way to prevent frustrations.&lt;br /&gt;
&lt;br /&gt;
==Cookbook==&lt;br /&gt;
* How to add dials to a HUD: http://aegidian.org/bb/viewtopic.php?p=290352#p290352&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
*'''Context''': [http://www.aegidian.org/bb/viewtopic.php?p=275434#p275434 What can OXP's ''not'' change?] (2021)&lt;br /&gt;
*It is often helpful to dip one's toes (claws?) in the water by experimenting with tweaking oxp's first: see [[How to tweak OXZ's]]&lt;br /&gt;
*[[:Category:Oolite scripting]]&lt;br /&gt;
*[[Javascript Operators]]&lt;br /&gt;
*[[:Category:Oolite JavaScript Reference‎]]&lt;br /&gt;
*[[:Category:Oolite Development]]&lt;br /&gt;
*[[User:Montana05|Montana05]] recommends https://www.w3schools.com/js/js_array_sort.asp for better knowledge of the js on Oolite.&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12149 OXP Development Best Practices] (2012-7)&lt;br /&gt;
*Some older oxp's are written in [[Legacy Scripting]]&lt;br /&gt;
*[https://github.com/OoliteProject/oolite/find/master Github] vanilla game code repository - the resources section at the bottom of the page contains possibly useful parts of vanilla game coding, with occasional annotations.&lt;br /&gt;
=== Tools ===&lt;br /&gt;
*[[List of software]] that is helpful for creating OXPs (eg. editorial packages for javascript or 3D model creators)&lt;br /&gt;
*[[List of Planets used in OXPs]] for planets already used by other OXPs. Helps authors avoid overlapping with or breaking other OXPs.&lt;br /&gt;
*[[OXP_howto_Game_Balance|OXP howto Game Balance]] to avoid conflicts from accidental gameplay changes.&lt;br /&gt;
*[[Long Range Scanner]] is an OXP which allows you to jump around the star system to objects you have placed there - or to jump around within the galaxy. A &amp;quot;cheat&amp;quot; for players, but a useful tool for some OXP designers.&lt;br /&gt;
&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=13422 What Tools Are Good For Windows OXP Programming?] (2013)&lt;br /&gt;
&lt;br /&gt;
==== Tutorials for Tools ====&lt;br /&gt;
*[https://web.archive.org/web/20050317033938/http://oolite.aegidian.org/cyoship/ Oolite Tutorial - Meshwork Shipbuilding (OSX only)] via WayBack Machine&lt;br /&gt;
*[https://web.archive.org/web/20060621211940/http://oolite.aegidian.org/cyoship2/ Oolite Tutorial - Wings 3D Shipbuilding (Cross-platform)] via WayBack Machine&lt;br /&gt;
&lt;br /&gt;
=== OXP tutorials ===&lt;br /&gt;
Oolite changes affecting different varieties of OXPs happened with v.1.76 (2011), v.1.80 (2014) &amp;amp; v1.82 (2015).&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20937 MasterClass: How to OXP (updating SoThisTC)] by [[User:Spara|Spara]] who teaches computing in Helsinki! (2021)&lt;br /&gt;
*[https://archive.org/details/GettingStartedWithOoliteOXZDevelopment Getting started with OXZ Development] ''An .odt for Open Office'': By Bugbear (2012). 2 example OXPs: a pirate-ridden solar systems warning tool &amp;amp; Witchspace Blockades [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=17731 BB Thread (2015)]&lt;br /&gt;
*[[OXP_tutorial|OXP Tutorial]] creating a new spaceship - and then tweaking it in different ways (2007-13)&lt;br /&gt;
*[[OXP howto dockable stations|Creating a dockable station]] (2009-10)&lt;br /&gt;
*[[User:Shipbuilder|Shipbuilder]] wrote a Shaders tutorial with resource packs (2013)&lt;br /&gt;
&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18837 OXP Performance] BB thread (mostly 2017-8): improving your OXP (speed, ''etc'')&lt;br /&gt;
&lt;br /&gt;
*[https://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18284 The bare minimum for a game-recognizable ship OXP] (thread: 2016)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=14135 How to make a simple OXP?] (thread: 2013) 3 OXPs - pop-up message at docking, set only Pythons for sale at Lave shipyard, create a new ship. &lt;br /&gt;
&lt;br /&gt;
*[[Escape Pod Locator OXP]] has notes on programming on the bottom of the page regarding beacon transmission &amp;amp; location&lt;br /&gt;
&lt;br /&gt;
=== Helpful OXPs for your OXP===&lt;br /&gt;
There are a number of OXPs which have been specifically written to allow your OXP to use them:&lt;br /&gt;
*[[Library OXP|Library]]: a collection of useful snippets and helpers. Its main purpose is to simplify or unify some common tasks used by OXPers. &lt;br /&gt;
:*It can add dynamic maps, music &amp;amp; animation. &lt;br /&gt;
:*It adds a Personal Assistant Device for the player with details of people met, medals awarded, Guild rankings, ''etc''.&lt;br /&gt;
:*It allows in-game configuration of an oxp by the player.&lt;br /&gt;
:*Add-on modules allows inspection of models and materials for creation of ship &amp;amp; station oxps.&lt;br /&gt;
*[[GalCop Missions]] introduces many new pieces of equipment with wide varieties of use (Cargo Stoppers, Ejection Dampers, Range Finders, Solar Radiation Disrupter Missiles, Seismic Resonance Scanners, Patient Transport Modules ''etc''). It can also help with managing missions.&lt;br /&gt;
*[[Diplomancy]] can be used to make states of war impact personally on the player&lt;br /&gt;
*[[System Data Config]] helps re-organise the F7 screen to squeeze more information onto it&lt;br /&gt;
&lt;br /&gt;
==== While docked/stations ====&lt;br /&gt;
*[[HD Backgrounds]] can provide a High Definition screenshot of a station lobby or other such for interaction with the player&lt;br /&gt;
*[[BGS]] can help organise a customised docking or launching sequence (see the [[Riredi OXP]] or the [[Kiota Stations]]).&lt;br /&gt;
*[[GNN]] can broadcast your news alerts (see how [[Diplomancy]] uses it for war &amp;amp; peace declarations). GNN also contains '''PhraseGen''' which can be used for randomizing text descriptions.&lt;br /&gt;
*[[Station Validator]] will remember that a station has been destroyed and stop Oolite automatically replacing it on the next visit to the system&lt;br /&gt;
*[[Station Dock Control]] can help interraction with other ships docked at the station&lt;br /&gt;
*[[Bulletin Board System]] can help manage interractions at the station&lt;br /&gt;
*[[Email System OXP]] can also help manage interractions at the station&lt;br /&gt;
*[[Ship Storage Helper]] allows storage of the player's ship whilst doing other things (such as flying another ship!)&lt;br /&gt;
*[[Equipment Storage OXP]]  allows storage of equipment/goods whilst doing other things&lt;br /&gt;
*[[Ship's Library]] allows reading documents with illustrations while docked (see the included Ship's Manual)&lt;br /&gt;
*[[Station Options]] allows complex configurations of equipment, but could potentially also be used for managing dialogue with NPCs&lt;br /&gt;
*[[Life in the Frontier]] was being expanded to cover more stations (Dodo/Ico/Rock Hermits and potentially OXP stations), but is currently mothballed. &lt;br /&gt;
&lt;br /&gt;
==== In-flight ====&lt;br /&gt;
*[[MFD - Broadcast Comms]] can be used for in-flight interaction with NPC's&lt;br /&gt;
*[[Bigships]] can be used to help with the AI for massive space ships which cannot dock at orbital stations&lt;br /&gt;
*[[Montanas Resource Pack 01]] contains a number of resources for use (treasures, containers, escape/survival equipment)&lt;br /&gt;
*[[Star System Lane Indicator]] - the older version contains a very graphical dynamic display (does not function properly, but boy! does it look good!)&lt;br /&gt;
*[[SOTL Exploration]] contains exploration equipment and a non-automatic hyperspace jump&lt;br /&gt;
*[[SOTL Altmap]] contains different politics, markets and NPCs with Torus Drives.&lt;br /&gt;
*[[Resistance Commander]] &amp;amp; [[EscortDeck]] contain mechanisms for &amp;quot;managing&amp;quot; allied ships.&lt;br /&gt;
&lt;br /&gt;
==== Planet Surfaces ====&lt;br /&gt;
*[[Planetfall OXP]] allows landing on the planet (used by [[Feudal States]] for access to the Royal Court, and by [[Astronaut]] for space-jumping)&lt;br /&gt;
*[[Lave is Earth 8k]] contains night-time city lighting&lt;br /&gt;
&lt;br /&gt;
=== Packaging and distribution ===&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=16688 The All-in-One Guide to OXZ Packaging and Distribution].&lt;br /&gt;
::And see [http://aegidian.org/bb/viewtopic.php?p=279034#p279034 this post] for AppleMac issues with the above.&lt;br /&gt;
*[[OXP Distribution]] The All-in-One Guide to OXP Packaging and Distribution (and [[OXP_standards]] for advice on which ways of doing things are supported and which are not).&lt;br /&gt;
&lt;br /&gt;
*[[Gameplay_and_Balance_Indicator|Gameplay Balance Indicator]] and [[OXP_Levelindicators|Difficulty Indicator]]. Add these to your wiki page to show effects on Game Balance and the Difficulty Level of your OXP/OXZ. The '''first''' indicates the impact on play (equipment making the game easier/more difficult), the '''second''' indicates the suggested [[Elite Rating]] needed to attempt the mission/defeat the ship ''etc''.&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Illegal_goods.plist&amp;diff=79835</id>
		<title>Illegal goods.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Illegal_goods.plist&amp;diff=79835"/>
		<updated>2023-09-20T10:44:53Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Tweaked to redirect to the section directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Misc_plists#illegal_goods.plist]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Misc_plists&amp;diff=79834</id>
		<title>Misc plists</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Misc_plists&amp;diff=79834"/>
		<updated>2023-09-20T10:41:10Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* world-scripts.plist */ Replaced worldScripts.plist by world-scripts.plist, tweaked text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
=crosshairs.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
The file is organized as a dictionary of crosshairs with the weapon name as its key. The key 'OTHER' can be used for weapons not otherwise defined by the crosshairs dictionary. Each weapon crosshair itself consists of an array of line segments. Each line segment is represented by an array of 6 numbers.&lt;br /&gt;
Example of a line segment:&lt;br /&gt;
 (W1, X1, Y1,    W2, X2, Y2)&lt;br /&gt;
The line will start at X1,Y1 with a relative width W1 and ends at X2, Y2 with relative width W2.&lt;br /&gt;
All coordinates must lie between -1 and +1, while the widths are between 0 and 1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 WEAPON_NONE =&lt;br /&gt;
 (&lt;br /&gt;
 	(0.25, 0.75, 0.0,		0.75, 0.50, 0.0),&lt;br /&gt;
 	(0.25, -0.75, 0.0,		0.75, -0.50, 0.0)&lt;br /&gt;
 );&lt;br /&gt;
The crosshairs.plist is not intended to be changed by an OXP. For custom crosshairs it is intended to add a &amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt; entry in the custom HUD definition itself. This will then override the default crosshairs for that HUD. (See [[hud.plist]]).&lt;br /&gt;
&lt;br /&gt;
In 1.77 or later, custom crosshairs files may be defined. These have the same syntax as crosshairs.plist, but should have a different unique name (e.g. &amp;lt;code&amp;gt;oxpname_crosshairs1.plist&amp;lt;/code&amp;gt;). Crosshairs may be included by a HUD definition, or switched in and out by [[Oolite_JavaScript_Reference:_PlayerShip#crosshairs|scripting]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=descriptions.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
The file is organized as a dictionary with pairs of key and value (string or array).&lt;br /&gt;
It has the same structure as the [[missiontext.plist]] and it also resides in the config folder inside the OXP.&lt;br /&gt;
&lt;br /&gt;
Example XML:&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
    &amp;lt;key&amp;gt;parcelnumbers&amp;lt;/key&amp;gt;&lt;br /&gt;
    &amp;lt;array&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;two&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;three&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;four&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;five&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;six&amp;lt;/string&amp;gt;&lt;br /&gt;
    &amp;lt;/array&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 {&lt;br /&gt;
   parcelnumbers = (&amp;quot;two&amp;quot;, &amp;quot;three&amp;quot;, &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;, &amp;quot;six&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Use  ==&lt;br /&gt;
&lt;br /&gt;
Its use must be seen as a kind of variable. The key part is the variable name and the string part is the content of the variable. If you use an array of strings the variable will return a random choice of one of the strings. And this is the main use of the descriptions.plist: creation of text with variable content. See also [[string expansion]]. Note that for compatibility, the random number used to determine which choice to use from an array is only 1 byte long. Therefore if the array has more than 256 entries there will be some entries which can never be picked, and if it has a number of entries which is not a power of two the entries will not have equal chances of being picked (though if the number of entries is small, the difference in chances is not significant)&lt;br /&gt;
&lt;br /&gt;
The text itself is invoked by using the key-word between square brackets, like: &lt;br /&gt;
&lt;br /&gt;
 You have to pick up [parcelnumbers] parcels.&lt;br /&gt;
&lt;br /&gt;
Whenever Oolite reads in a scriptline, missiontext or description, it first looks for something between brackets. If it finds something it looks to see if it is a mission_variable. If yes, it replaces the name of the variable with its content. Then it looks in the descriptions.plist. If it finds a key, it replaces the name with the string content. If it is an array it picks at random one of the strings.&lt;br /&gt;
&lt;br /&gt;
Be aware that Oolite reads in all descriptions.plist lines on startup in one big file. This means that you can use keywords from other OXPs or from Oolite itself. If there are some keys with duplicate names, it uses the last. This means that you must use [[OXP Distribution#General|unique keywords]].&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
First adding categories to the Ship Library/View Ship specifications screen; ''then'' adding a missile icon; and ''finally'' adding mission text: this is the entire descriptions.plist&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 	&amp;quot;oolite-ship-library-category-black_mamba&amp;quot;		= &amp;quot;Black Mamba&amp;quot;;&lt;br /&gt;
 	&amp;quot;oolite-ship-library-category-plural-black_mamba&amp;quot;	= &amp;quot;Black Mambas&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;EQ_X_SWORD_MISSILE&amp;quot; =&lt;br /&gt;
          (&lt;br /&gt;
                  2,  2,&lt;br /&gt;
 	         2,  1,                                 &lt;br /&gt;
                  1,  0,&lt;br /&gt;
 		 2, -1,	&lt;br /&gt;
                  2, -2,                             &lt;br /&gt;
                  1, -2,&lt;br /&gt;
                  0,  0,&lt;br /&gt;
                 -1, -2,&lt;br /&gt;
                 -2, -2,&lt;br /&gt;
                 -2, -1,&lt;br /&gt;
                 -1,  0,&lt;br /&gt;
                 -2,  1,&lt;br /&gt;
                 -2,  2,&lt;br /&gt;
                 -1,  2,&lt;br /&gt;
                  0,  0,&lt;br /&gt;
                  1,  2       &lt;br /&gt;
 	);&lt;br /&gt;
    &amp;quot;XS_MI_STAGE_245&amp;quot; = &amp;quot;The Murderer is at Digebiti.&amp;quot;;&lt;br /&gt;
    &amp;quot;XS_MI_STAGE_G7_1&amp;quot; = &amp;quot;Just in time, Commander. I could use a little help here!&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=demoships.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
In 1.79 and following this is superseded by [[Shiplibrary.plist]] and should no longer be used for OXPs. It was used to project the ship on the new commander screen at game start. Its replacement adds the ship/station ''etc'' to the ship information on the &amp;quot;View Ship Library&amp;quot; page when Oolite starts up (and to the &amp;quot;View ship specifications&amp;quot; page on the docked F4 screen)&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array. Every entry consists of a string, with the name of a ship. The shipname must correspond with a key inside the [[shipdata.plist]]. It resides in the config folder inside the OXP.&lt;br /&gt;
&lt;br /&gt;
Example XML:&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_ship1&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_ship2&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;my_ship1&amp;quot;,&lt;br /&gt;
   &amp;quot;my_ship2&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Its function is to select which ships to show on the startup screen when a new commander is chosen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=illegal_goods.[[plist]]=&lt;br /&gt;
'''Note: The commodities.plist file is no longer used from Oolite 1.82 and following.''' It has been superseded by the [[Trade-goods.plist]]&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as a dictionary. Every entry consists of a key and a number. The key says which goods are illegal, and the number how illegal the goods are.&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 {&lt;br /&gt;
    Firearms = 1;&lt;br /&gt;
    Narcotics = 2;&lt;br /&gt;
    Slaves = 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Better never use this as it might change the game to much.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=info.[[plist]]=&lt;br /&gt;
This does not actually seem to do anything other than give the human being reading it some information! [[Galactic Navy OXP]] has one, as do ''inter alia'' [[User:Mandoman|Mandoman]]'s many oxps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=pirate-victim-roles.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
In 1.79 this is superseded by [[role-categories.plist]] and should no longer be used for new OXPs. Existing files will continue to have the effect documented below.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array. Every entry consists of a string, with the name of a shiprole. This plist is introduced with Oolite version 1.70&lt;br /&gt;
&lt;br /&gt;
Example XML:&lt;br /&gt;
 &amp;lt;array&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_shiprole1&amp;lt;/string&amp;gt;&lt;br /&gt;
        &amp;lt;string&amp;gt;my_shiprole2&amp;lt;/string&amp;gt;&lt;br /&gt;
 &amp;lt;/array&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;my_shiprole1&amp;quot;,&lt;br /&gt;
   &amp;quot;my_shiprole2&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Pirates use the function '''scanForNearestMerchantman''' and '''scanForRandomMerchantman'''. With pre 1.70 versions this function only finds ships with role '''trader''' and '''player'''. Starting with 1.70 these two functions finds all ships that are included in the pirate-victim-roles.plist. This makes it possible to add ships in their own role that are recognized by pirates as traders. Ship designers are encouraged to use this pirate-victim-roles.plist and add all private roles that should act trader like for better interaction with pirate groups. &lt;br /&gt;
&lt;br /&gt;
[[Media:pirate-victim-roles.zip|''Download a custom pirate-victim-roles.plist'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=OXPMessages.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array of strings. When the plist is present, the content of the strings is written to the log on start-up and the player sees a message on the start-up screen that the oxp &amp;quot;foo&amp;quot; contains a message. This plist is introduced with Oolite version 1.74. It should be placed directly in the main directory level of the oxp where the 'requires.plist' is also situated.&lt;br /&gt;
&lt;br /&gt;
Example OpenStep:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;This is a copy of my own test version of the oxp: &amp;quot;foo&amp;quot;. This oxp is intended for personal use only, don't spread.&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Only useful for test versions to make the user constantly aware that he is using a test version of the oxp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=world-scripts.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as an array. Every entry consists of a string, with the name of a script. The name must correspond with a file inside the Scripts folder inside the OXP.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 (&lt;br /&gt;
   &amp;quot;my_script1.js&amp;quot;,&lt;br /&gt;
   &amp;quot;my_script2.js&amp;quot;,&lt;br /&gt;
   &amp;quot;my_script3.plist&amp;quot;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
==Content==&lt;br /&gt;
To know what to put into such a world script, see [[Oolite_JavaScript_Reference:_World_script_event_handlers|the list of world script event handlers]].&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
Its function is to attach more than one worldscript to an oxp. On startup, Oolite looks first if there is a world-scripts.plist file. When present the scripts inside are used as world scripts. These scripts can be both js script files or legacy script plist files. Even a mix is allowed. Only when the worldScripts.plist is not present, Oolite looks for a file with the name &amp;quot;script.js&amp;quot; in the Config folder. And when that is not present it looks for the file &amp;quot;script.plist&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
There are two ways of storing a JS worldscript:&lt;br /&gt;
&lt;br /&gt;
1)    Old: You can name it &amp;quot;script.js&amp;quot; and put it into the Config folder. That's what cim did in his [[Galactic Misjump OXP]]. It's a leftover of &amp;quot;legacy&amp;quot; plist scripting, where the script had to be named &amp;quot;script.plist&amp;quot; and reside in the Config folder. This way was especially useful in the time when we had Oolite 1.65 as official release, and the growing number of test releases. In those times you could have both a &amp;quot;script.plist&amp;quot; and a &amp;quot;script.js&amp;quot; alongside each other in the Confic folder. Oolite 1.65 would use the plist script, and the later versions would ignore the plist and use the JS script instead. This functionality is not particularly useful anymore, but it still exists.&amp;lt;br&amp;gt;&lt;br /&gt;
2)    New: You can name it whatever you want (but perhaps not &amp;quot;script.js&amp;quot;) and put it into the Script folder. Then you have to create another plist in the Config folder named &amp;quot;world-scripts.plist&amp;quot; and write the name of your script into that plist. This method has the advantage that you can have more than one worldscript in an OXP, which is of course not possible with the first method, because there can only be one file named &amp;quot;script.js&amp;quot; in a Config folder. [http://www.aegidian.org/bb/viewtopic.php?p=170774#p170774 Commander McLane (2012)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=whitelist.[[plist]]=&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The file is organized as a dictionary of keys with the values being themselves either arrays of strings or dictionaries of key-value pairs.&lt;br /&gt;
&lt;br /&gt;
==Use==&lt;br /&gt;
The file is included with Oolite.  OXPs are restricted from using legacy features that are not included in the whitelist. As of Oolite 1.89, the file starts with the following comment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*	Methods that may be used from old-style script actions or conditions.&lt;br /&gt;
	&lt;br /&gt;
	This plist cannot be extended or overriden by OXPs.&lt;br /&gt;
	&lt;br /&gt;
	action_methods			Commands permitted in world scripts.&lt;br /&gt;
	ai_methods			Commands permitted in AIs.&lt;br /&gt;
	ai_and_action_methods		Commands permitted in world scripts and AIs.&lt;br /&gt;
	query_methods			Values that may be queried in script conditions.&lt;br /&gt;
	action_method_aliases		Mappings from script commands (left) to internal names (right).&lt;br /&gt;
	ai_method_aliases		Mappings from AI commands (left) to internal names (right).&lt;br /&gt;
	query_method_aliases		Mappings from script queries (left) to internal names (right).&lt;br /&gt;
	shader_*_binding_methods	Values that may be queried through shader bindings.&lt;br /&gt;
	&lt;br /&gt;
	Most other types of legacy script - ship actions, character scripts,&lt;br /&gt;
	scriptActionOnTarget: - can use both action_methods and ai_methods. The exception is&lt;br /&gt;
	systeminfo scripts, which can't use ai_methods as they aren't run with a ship target.&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=See also=&lt;br /&gt;
* [[OXP howto]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Pirate-victim-roles.plist&amp;diff=79833</id>
		<title>Pirate-victim-roles.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Pirate-victim-roles.plist&amp;diff=79833"/>
		<updated>2023-09-20T10:24:46Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Tweaked to redirect to the section directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Misc_plists#pirate-victim-roles.plist]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Crosshairs.plist&amp;diff=79832</id>
		<title>Crosshairs.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Crosshairs.plist&amp;diff=79832"/>
		<updated>2023-09-20T10:24:06Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Tweaked to redirect to the section directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Misc_plists#crosshairs.plist]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Demoships.plist&amp;diff=79831</id>
		<title>Demoships.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Demoships.plist&amp;diff=79831"/>
		<updated>2023-09-20T10:23:04Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Tweaked to redirect to the section directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Misc_plists#demoships.plist]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=WorldScripts.plist&amp;diff=79830</id>
		<title>WorldScripts.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=WorldScripts.plist&amp;diff=79830"/>
		<updated>2023-09-20T10:22:12Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Tweaked to redirect to the section directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Misc_plists#world-scripts.plist]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=OXPMessages.plist&amp;diff=79829</id>
		<title>OXPMessages.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=OXPMessages.plist&amp;diff=79829"/>
		<updated>2023-09-20T10:19:36Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Tweaked to redirect to the section directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Misc_plists#OXPMessages.plist]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=79338</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=79338"/>
		<updated>2023-06-21T19:58:24Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Government */ Fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0: default, all information visible&lt;br /&gt;
* 100 or more: F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more: system name is not shown&lt;br /&gt;
* 300 or more: system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 7 indicating the government type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;government&amp;quot; = &amp;quot;7&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Anarchy&lt;br /&gt;
: 1: Feudal&lt;br /&gt;
: 2: Multi-Governmental&lt;br /&gt;
: 3: Dictatorship&lt;br /&gt;
: 4: Communist&lt;br /&gt;
: 5: Confederacy&lt;br /&gt;
: 6: Democracy&lt;br /&gt;
: 7: Corporate State&lt;br /&gt;
&lt;br /&gt;
==Economy==&lt;br /&gt;
An integer between 0 and 7 indicating the economy type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;economy&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Rich Industrial&lt;br /&gt;
: 1: Average Industrial&lt;br /&gt;
: 2: Poor Industrial&lt;br /&gt;
: 3: Mainly Industrial&lt;br /&gt;
: 4: Mainly Agricultural&lt;br /&gt;
: 5: Rich Agricultural&lt;br /&gt;
: 6: Average Agricultural&lt;br /&gt;
: 7: Poor Agricultural&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Air Color==&lt;br /&gt;
A colour specifier determining the color of the planet's sky, as well as the atmosphere scatter color.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Air Color Mix Ratio==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The amount of air color that be mixed in the overall atmosphere color. A number from 0.0 to 1.0 (default 0.5).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color_mix_ratio&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Air Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A number clamped in range from 0.0 to 1.0 describing the density of the planet's atmosphere. All planets in the core use 0.75 as default.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_density&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Illumination Color==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A colour specifier determining the colour of the planet's illumination such as cities light. Illumination is inserted as a grayscale map in the alpha channel of the planet's diffuse texture. You can specify this key even if no illumination map is defined, but it won't have any effect - without an illumination map the dark side of the planet remains dark in all cases.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;illumination_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance from the centre of the main planet to the witchpoint.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;planet_distance_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Terminator Threshold Vector==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
This property gives control over the color of the planet's terminator. The way the property works is not entirely straightforward, so see [http://aegidian.org/bb/viewtopic.php?p=271058#p271058 this post on BB] for more information.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;terminator_threshold_vector&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
By default the terminator vector is &amp;quot;0.105 0.18 0.28&amp;quot; - which results in a reddish orange colour.&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also define your own custom planets and moons:&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--They also can be added through script_actions, but it's deprecated and even commented out on this page--&amp;gt;&lt;br /&gt;
To add them to the system, use JS methods &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addPlanet]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addMoon]]&amp;lt;/code&amp;gt;. For the example above, the &amp;lt;code&amp;gt;planetInfoKey&amp;lt;/code&amp;gt; will be &amp;lt;code&amp;gt;&amp;quot;LavesPurpleMoon&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Position==&lt;br /&gt;
Position of the planet in space. The first parameter is 3-character code of the coordinate system, other three is x, y and z components of position vector.&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
You can omit the coordinate system parameter, then the absolute coordinate system will be used:&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See [[Oolite coordinate systems]] for more info about it.&lt;br /&gt;
&lt;br /&gt;
==Orientation==&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Other keys==&lt;br /&gt;
&lt;br /&gt;
You can use other keys from the [[#Properties_of_the_Planet| Properties of the Planet]] section for your planets and moons.&lt;br /&gt;
&lt;br /&gt;
Here are some of the keys you may want to use:&lt;br /&gt;
* &amp;quot;radius&amp;quot;: Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
* &amp;quot;rotational_velocity&amp;quot;: Rotation of the planet in rotations per second.&lt;br /&gt;
* &amp;quot;texture&amp;quot;: The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
* &amp;quot;seed&amp;quot;: Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=217053#p217053 Tweaking your skies] (Tricky, 2014)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=79337</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=79337"/>
		<updated>2023-06-21T19:53:58Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Added the missing planet_distance_multiplier&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0: default, all information visible&lt;br /&gt;
* 100 or more: F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more: system name is not shown&lt;br /&gt;
* 300 or more: system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 7 indicating the government type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;goverment&amp;quot; = &amp;quot;7&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Anarchy&lt;br /&gt;
: 1: Feudal&lt;br /&gt;
: 2: Multi-Governmental&lt;br /&gt;
: 3: Dictatorship&lt;br /&gt;
: 4: Communist&lt;br /&gt;
: 5: Confederacy&lt;br /&gt;
: 6: Democracy&lt;br /&gt;
: 7: Corporate State&lt;br /&gt;
&lt;br /&gt;
==Economy==&lt;br /&gt;
An integer between 0 and 7 indicating the economy type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;economy&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Rich Industrial&lt;br /&gt;
: 1: Average Industrial&lt;br /&gt;
: 2: Poor Industrial&lt;br /&gt;
: 3: Mainly Industrial&lt;br /&gt;
: 4: Mainly Agricultural&lt;br /&gt;
: 5: Rich Agricultural&lt;br /&gt;
: 6: Average Agricultural&lt;br /&gt;
: 7: Poor Agricultural&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Air Color==&lt;br /&gt;
A colour specifier determining the color of the planet's sky, as well as the atmosphere scatter color.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Air Color Mix Ratio==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The amount of air color that be mixed in the overall atmosphere color. A number from 0.0 to 1.0 (default 0.5).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color_mix_ratio&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Air Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A number clamped in range from 0.0 to 1.0 describing the density of the planet's atmosphere. All planets in the core use 0.75 as default.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_density&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Illumination Color==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A colour specifier determining the colour of the planet's illumination such as cities light. Illumination is inserted as a grayscale map in the alpha channel of the planet's diffuse texture. You can specify this key even if no illumination map is defined, but it won't have any effect - without an illumination map the dark side of the planet remains dark in all cases.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;illumination_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance from the centre of the main planet to the witchpoint.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;planet_distance_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Terminator Threshold Vector==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
This property gives control over the color of the planet's terminator. The way the property works is not entirely straightforward, so see [http://aegidian.org/bb/viewtopic.php?p=271058#p271058 this post on BB] for more information.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;terminator_threshold_vector&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
By default the terminator vector is &amp;quot;0.105 0.18 0.28&amp;quot; - which results in a reddish orange colour.&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also define your own custom planets and moons:&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--They also can be added through script_actions, but it's deprecated and even commented out on this page--&amp;gt;&lt;br /&gt;
To add them to the system, use JS methods &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addPlanet]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addMoon]]&amp;lt;/code&amp;gt;. For the example above, the &amp;lt;code&amp;gt;planetInfoKey&amp;lt;/code&amp;gt; will be &amp;lt;code&amp;gt;&amp;quot;LavesPurpleMoon&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Position==&lt;br /&gt;
Position of the planet in space. The first parameter is 3-character code of the coordinate system, other three is x, y and z components of position vector.&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
You can omit the coordinate system parameter, then the absolute coordinate system will be used:&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See [[Oolite coordinate systems]] for more info about it.&lt;br /&gt;
&lt;br /&gt;
==Orientation==&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Other keys==&lt;br /&gt;
&lt;br /&gt;
You can use other keys from the [[#Properties_of_the_Planet| Properties of the Planet]] section for your planets and moons.&lt;br /&gt;
&lt;br /&gt;
Here are some of the keys you may want to use:&lt;br /&gt;
* &amp;quot;radius&amp;quot;: Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
* &amp;quot;rotational_velocity&amp;quot;: Rotation of the planet in rotations per second.&lt;br /&gt;
* &amp;quot;texture&amp;quot;: The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
* &amp;quot;seed&amp;quot;: Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=217053#p217053 Tweaking your skies] (Tricky, 2014)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_World_script_event_handlers&amp;diff=79336</id>
		<title>Oolite JavaScript Reference: World script event handlers</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_World_script_event_handlers&amp;diff=79336"/>
		<updated>2023-06-21T16:57:40Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* shipWillEnterWitchspace */ Added missing possible value for the &amp;quot;cause&amp;quot; parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a list of event handlers which can be implemented inside world scripts [[Scripting Oolite with JavaScript|JavaScript scripts for Oolite]]. Additionally, ship script handlers called on the player's ship will cause an equivalent world script event.&lt;br /&gt;
&lt;br /&gt;
Most event handlers can be used both in world scripts and in ship scripts. Generally speaking, handlers starting with &amp;quot;ship&amp;quot; can be used for both scripts and those starting with &amp;quot;player&amp;quot; are meant only for the player (= can only be used in a world script). Exceptions on this rule are mentioned with the individual handlers below. &lt;br /&gt;
&lt;br /&gt;
World scripts can be either found inside Config\script.js, or be distinctly named .js files inside the Scripts directory - in the latter case, the worldScript.plist will list the active world scripts.&lt;br /&gt;
&lt;br /&gt;
World scripts are always active.&lt;br /&gt;
&lt;br /&gt;
The list of event handlers will change from version to version (usually additions of extra handlers). For this reason, any variables or functions you create as &amp;lt;code&amp;gt;this.variable&amp;lt;/code&amp;gt; should have a name beginning with '_' or '$' - e.g. &amp;lt;code&amp;gt;this._variable&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;this.$variable&amp;lt;/code&amp;gt; - to avoid potential conflicts with future event handlers (which will never start with '_' or '$').&lt;br /&gt;
&lt;br /&gt;
=== Game State ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;gamePaused&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This event is called when the game is paused. This is mainly useful for pausing sound playback which should not continue while the game is paused.&lt;br /&gt;
&lt;br /&gt;
 this.gamePaused = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;gameResumed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This event is called when the game is resumed from pause. This is mainly useful for resuming sound playback paused in a &amp;lt;code&amp;gt;gamePaused&amp;lt;/code&amp;gt; handler.&lt;br /&gt;
&lt;br /&gt;
 this.gameResumed = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillSaveGame&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillSaveGame&amp;lt;/code&amp;gt; handler is called whenever the player saves a game. The transferred message is one of the following strings: &amp;lt;code&amp;gt;&amp;quot;STANDARD_SAVE&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;AUTO_SAVE&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;QUICK_SAVE&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillSaveGame = function(message)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Using this event is useful for storing temporary variables in &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Global#missionVariables|missionVariables]]&amp;lt;/code&amp;gt;, just before the game gets saved. &amp;lt;code&amp;gt;missionVariables&amp;lt;/code&amp;gt; are slow in use compared to normal JS variables, therefore their use should be minimised for efficient code. The main benefit of using &amp;lt;code&amp;gt;missionVariables&amp;lt;/code&amp;gt; is that they are saved in a saved game. See also [[Mission variable]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt; handler is called after all OXPs have been loaded. This also means that it is called every time the player loads a game, begins a new game or presses space after dying. It can be used to do one-off initialisation such as copying mission variables into &amp;lt;code&amp;gt;this.*&amp;lt;/code&amp;gt; properties for efficiency or setting up data arrays to be used by the script in other handlers. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.startUp = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that from Oolite 1.79 onwards the player is in the main station while this handler runs but may be moved to another station soon after.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt; handler is run at game startup after the initial population of the system has been complete, and after the player has been moved to the station recorded in their save game. The order of world events at game start is therefore:&lt;br /&gt;
* &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;systemWillPopulate&amp;lt;/code&amp;gt; (or an alternative handler specified by the system info)&lt;br /&gt;
* &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Docking ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; handler is called at the beginning of the docking tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillDockWithStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == null&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == true&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_DOCKING&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; handler is called at the end of the docking tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipDockedWithStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == station&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == true&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_DOCKED&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guiScreen&amp;lt;/code&amp;gt; is either &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_REPORT&amp;quot;&amp;lt;/code&amp;gt;. However, any identical handler from an other oxp could have changed those values. Never count on it but double check when important.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; handler is called at the beginning of the launch tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillLaunchFromStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == station&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == false&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_LAUNCHING&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLaunchedFromStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLaunchedFromStation&amp;lt;/code&amp;gt; handler is called at the end of the launch tunnel effect. The handler's argument is the station which launched the ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipLaunchedFromStation = function(stationLaunchedFrom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == null&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == false&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_IN_FLIGHT&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerStartedAutoPilot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerStartedAutoPilot&amp;lt;/code&amp;gt; handler is called when the player starts autopilot docking. It is not called for the instantaneous dock command. The handler is called with an argument containing the station entity that is the docking target.&lt;br /&gt;
&lt;br /&gt;
 this.playerStartedAutoPilot = function(stationForDocking)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCancelledAutoPilot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCancelledAutoPilot&amp;lt;/code&amp;gt; handler is called when the player cancels autopilot docking.&lt;br /&gt;
&lt;br /&gt;
 this.playerCancelledAutoPilot = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceCancelled&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceCancelled&amp;lt;/code&amp;gt; handler is called when the player withdraws their request to dock at a station. &lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceCancelled = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceExpired&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceExpired&amp;lt;/code&amp;gt; handler is called when the player exceeds the two minute window without requesting an extension&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceExpired = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceGranted&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceGranted&amp;lt;/code&amp;gt; handler is called when the player is given permission to dock at a station. If the player is given immediate clearance to dock, this event will be called immediately after the &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; event. If, however, the station is unable to give immediate clearance, then there will be some delay between the request to dock and permission being granted. This event will be called when the station actually gives docking clearance.&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceGranted = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingRefused&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingRefused&amp;lt;/code&amp;gt; handler is called when a station refuses to provide autopilot docking instructions.&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingRefused = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; handler is called when a station answers on a docking request of the player by targeting the station and pressing L (shift-l).&lt;br /&gt;
&lt;br /&gt;
 this.playerRequestedDockingClearance = function(message)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Message is a string and can take the values: &amp;quot;DOCKING_CLEARANCE_GRANTED&amp;quot;, &amp;quot;DOCKING_CLEARANCE_DENIED_TRAFFIC_OUTBOUND&amp;quot;, &amp;quot;DOCKING_CLEARANCE_DENIED_TRAFFIC_INBOUND&amp;quot;,  &amp;quot;DOCKING_CLEARANCE_DENIED_SHIP_FUGITIVE&amp;quot;, &amp;quot;DOCKING_CLEARANCE_NOT_REQUIRED&amp;quot;, &amp;quot;DOCKING_CLEARANCE_EXTENDED&amp;quot; or &amp;quot;DOCKING_CLEARANCE_CANCELLED&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRescuedEscapePod&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerRescuedEscapePod&amp;lt;/code&amp;gt; handler is called when the player rescues an escape pod which does not have scripted content (all consequences of scripted content escape pods are assumed to be dealt with by the specified script instead). It has three parameters:&lt;br /&gt;
# the rescue fee, in decicredits&lt;br /&gt;
# the fee reason, which can be &amp;quot;insurance&amp;quot;, &amp;quot;bounty&amp;quot; or &amp;quot;slave&amp;quot; (in the latter case, the fee will always be zero)&lt;br /&gt;
# a dictionary like those in the &amp;lt;code&amp;gt;ship.crew&amp;lt;/code&amp;gt; property describing the pod occupant&lt;br /&gt;
&lt;br /&gt;
 this.playerRescuedEscapePod = function(fee, reason, occupant)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called after the escape pod has been processed, but slightly before the arrival report screen giving the results of the processing is displayed to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCompletedContract&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCompletedContract&amp;lt;/code&amp;gt; handler is called when a passenger, parcel or cargo contract ends, either successfully or by defaulting on it. It is not called when all contracts are cancelled on a galactic jump. It has four parameters:&lt;br /&gt;
# The type of contract, which can be &amp;quot;cargo&amp;quot;, &amp;quot;parcel&amp;quot; or &amp;quot;passenger&amp;quot;&lt;br /&gt;
# The result of the contract, which can be &amp;quot;success&amp;quot;, &amp;quot;late&amp;quot;, &amp;quot;failed&amp;quot;, or for cargo contracts only &amp;quot;short&amp;quot;&lt;br /&gt;
# The fee paid for the contract in decicredits&lt;br /&gt;
# The contract information dictionary&lt;br /&gt;
Note that the fee actually paid for the contract will often ''not'' match the originally agreed fee in the contract information dictionary, as penalties for late delivery or bonuses for good service are included in the fee parameter.&lt;br /&gt;
&lt;br /&gt;
 this.playerCompletedContract = function(type, result, fee, contract)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called after the contract has been processed, but slightly before the arrival report screen giving the results of the processing is displayed to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerEnteredContract&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerEnteredContract&amp;lt;/code&amp;gt; handler is called when a passenger, parcel or cargo contract starts, just after the items have been transferred to the player ship. It has two parameters:&lt;br /&gt;
# The type of contract, which can be &amp;quot;cargo&amp;quot;, &amp;quot;parcel&amp;quot; or &amp;quot;passenger&amp;quot;&lt;br /&gt;
# The contract information dictionary&lt;br /&gt;
&lt;br /&gt;
 this.playerEnteredContract = function(type, contract)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Witchspace Jumps ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerStartedJumpCountdown&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerStartedJumpCountdown&amp;lt;/code&amp;gt; handler is called when the user starts a witchspace or galactic witchspace jump countdown. The &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter is a string specifying which type of jump is occuring; currently, the possible values are “standard” and “galactic”. Other values may be added in future. The &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; parameter is a number specifying the number of seconds the countdown is running for.&lt;br /&gt;
&lt;br /&gt;
 this.playerStartedJumpCountdown = function(type, seconds)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCancelledJumpCountdown&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCancelledJumpCountdown&amp;lt;/code&amp;gt; handler is called when the user cancels a witchspace or galactic witchspace jump countdown.&lt;br /&gt;
&lt;br /&gt;
 this.playerCancelledJumpCountdown = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerJumpFailed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerJumpFailed&amp;lt;/code&amp;gt; handler is called at the end of a witchspace or galactic witchspace countdown, if the jump is not possible. The &amp;lt;code&amp;gt;reason&amp;lt;/code&amp;gt; parameter is a string specifying why the jump failed. The current values are:&lt;br /&gt;
* '''&amp;quot;insufficient fuel&amp;quot;''' - the ship no longer has enough fuel to make the jump (e.g. injector use or fuel leak).&lt;br /&gt;
* '''&amp;quot;blocked&amp;quot;''' - a heavy ship is near the player (specifically &amp;lt;code&amp;gt;object mass&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;object distance&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; &amp;gt;= 10.0, and &amp;lt;code&amp;gt;object distance&amp;lt;/code&amp;gt; &amp;lt;= scanner range).&lt;br /&gt;
* '''&amp;quot;malfunction&amp;quot;''' - the jump malfunctioned in a way that leaves the player ship in the current system.&lt;br /&gt;
* '''&amp;quot;malfunction&amp;quot;''' - the Galactic Hyperdrive is damaged or removed during a galactic jump countdown.&lt;br /&gt;
&lt;br /&gt;
Also theoretically possible but unlikely in current Oolite:&lt;br /&gt;
* '''&amp;quot;too far&amp;quot;''' - the jump destination is outside the 7LY range (but wasn't when the countdown started).&lt;br /&gt;
* '''&amp;quot;no target&amp;quot;''' - the jump destination is the current location (but wasn't when the countdown started).&lt;br /&gt;
&lt;br /&gt;
 this.playerJumpFailed = function(reason)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt; handler is called immediately before a witchspace jump, while the player is still in the starting system. The &amp;lt;code&amp;gt;cause&amp;lt;/code&amp;gt; parameter is a string specifying what sort of jump is occurring; currently, the possible values are &amp;lt;code&amp;gt;&amp;quot;standard jump&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;galactic jump&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;wormhole&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;carried&amp;quot;&amp;lt;/code&amp;gt;. Other values may be added in future.&lt;br /&gt;
&lt;br /&gt;
 // 1.80 or earlier&lt;br /&gt;
 this.shipWillEnterWitchspace = function(cause)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In 1.81 or later the handler gains a second parameter, describing the jump destination. For standard and wormhole jumps, this will be the system ID of the destination system. For galactic jumps, this will be the galaxy ID of the destination galaxy. (As [[Oolite JavaScript Reference: PlayerShip#galacticHyperspaceBehaviour|player.ship.galacticHyperspaceBehaviour]] may be changed during &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt;, it is not possible to predict in advance of a galactic jump being made what the resulting system ID in the destination galaxy will be)&lt;br /&gt;
&lt;br /&gt;
 // 1.81 or later&lt;br /&gt;
 this.shipWillEnterWitchspace = function(cause, destination)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the &amp;lt;code&amp;gt;cause&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;quot;carried&amp;quot;&amp;lt;/code&amp;gt; the &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt; parameter is &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt;. This behaviour is presumably a bug.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; handler is called as a witchspace jump concludes. When it is called, the player is (from a program perspective) in the destination system, but the tunnel effect has not yet been shown. Use this event to set up elements which need to be present in-system after the player exits witchspace.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillExitWitchspace = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedWitchspace&amp;lt;/code&amp;gt; handler is called after a witchspace jump has concluded and the tunnel effect has been shown.&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedWitchspace = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerEnteredNewGalaxy&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerEnteredNewGalaxy&amp;lt;/code&amp;gt; handler is called just before shipWillExitWitchspace.&lt;br /&gt;
&lt;br /&gt;
the sequence of events for a player jumping to a different galaxy is as follows:&lt;br /&gt;
&lt;br /&gt;
shipWillEnterWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
playerWillEnterWitchspace (NPC ship event)&amp;lt;br&amp;gt;&lt;br /&gt;
playerEnteredNewGalaxy (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
shipWillExitWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
shipExitedWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 this.playerEnteredNewGalaxy = function(galaxyNumber)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18392 Order of JS events when galactic jumping] (2016)&lt;br /&gt;
&lt;br /&gt;
=== Enter/Exit Aegis ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipEnteredStationAegis&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipEnteredStationAegis&amp;lt;/code&amp;gt; handler is called when the player enters the aegis of the main-station (2x scanner range from main-station). Other stations than the main-station don't give aegis messages.&lt;br /&gt;
&lt;br /&gt;
 this.shipEnteredStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedStationAegis&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedStationAegis&amp;lt;/code&amp;gt; handler is called when the player leaves the aegis of the main-station (2x scanner range from main-station).&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipEnteredPlanetaryVicinity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipEnteredPlanetaryVicinity&amp;lt;/code&amp;gt; handler is called when the player enters the planet aegis (3x planet radius).&lt;br /&gt;
&lt;br /&gt;
 this.shipEnteredPlanetaryVicinity = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedPlanetaryVicinity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedPlanetaryVicinity&amp;lt;/code&amp;gt; handler is called when the player leaves the planet aegis (3x planet radius).&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedPlanetaryVicinity = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipApproachingPlanetSurface&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipApproachingPlanetSurface&amp;lt;/code&amp;gt; handler is called when the player is very close to the planet (crosses a border ± 500 meter above the surface).&lt;br /&gt;
&lt;br /&gt;
 this.shipApproachingPlanetSurface = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLeavingPlanetSurface&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLeavingPlanetSurface&amp;lt;/code&amp;gt; handler is called when the player leaves the planet (crosses a border ± 500 meter above the surface).&lt;br /&gt;
&lt;br /&gt;
 this.shipLeavingPlanetSurface = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Combat ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;alertConditionChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;alertConditionChanged&amp;lt;/code&amp;gt; handler is called when the player’s alert status (&amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Player#alertCondition|player.alertCondition]]&amp;lt;/code&amp;gt;) changes. Only the player and stations have an alert condition. (world script and station scripts)&lt;br /&gt;
&lt;br /&gt;
 this.alertConditionChanged = function(newCondition, oldCondition)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerTargetedMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerTargetedMissile&amp;lt;/code&amp;gt; handler is called when the player targets the nearest missile by pressing &amp;quot;T&amp;quot; (shift-t).&lt;br /&gt;
&lt;br /&gt;
 this.playerTargetedMissile = function(missile)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipAttackedOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipAttackedOther&amp;lt;/code&amp;gt; handler is called when the player hits another with a laser shot. &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt; is the identity of the ship being hit.&lt;br /&gt;
&lt;br /&gt;
 this.shipAttackedOther = function(other)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipAttackedWithMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipAttackedWithMissile&amp;lt;/code&amp;gt; handler is called when a missile is fired. &amp;lt;code&amp;gt;missile&amp;lt;/code&amp;gt; contains the missile entity and &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that launched the missile.&lt;br /&gt;
&lt;br /&gt;
 this.shipAttackedWithMissile = function(missile, whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipBeingAttacked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipBeingAttacked&amp;lt;/code&amp;gt; handler is called when a laser shot  hits. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that attacked.&lt;br /&gt;
&lt;br /&gt;
 this.shipBeingAttacked = function(whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipBeingAttackedByCloaked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipBeingAttackedByCloaked&amp;lt;/code&amp;gt; handler is called when a laser shot from a cloaked ship hits. Guess what, there is no parameter because he is cloaked!&lt;br /&gt;
&lt;br /&gt;
 this.shipBeingAttackedByCloaked = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipKilledOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipKilledOther&amp;lt;/code&amp;gt; handler is called when a ship kills an other ship. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that was killed. &amp;lt;code&amp;gt;damageType&amp;lt;/code&amp;gt; is the type of damage.&lt;br /&gt;
&lt;br /&gt;
 this.shipKilledOther = function(whom : ship, damageType : string)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipReleasedEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipReleasedEquipment&amp;lt;/code&amp;gt; handler is called when a ship launches a mine (a pylon-mounted equipment item whose key ends with &amp;quot;_MINE&amp;quot;). &amp;lt;code&amp;gt;mine&amp;lt;/code&amp;gt; contains the launched mine entity.&lt;br /&gt;
&lt;br /&gt;
 this.shipReleasedEquipment = function(mine)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetDestroyed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetDestroyed&amp;lt;/code&amp;gt; handler is called when the target gets destroyed by the player. &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; contains the destroyed target entity. This command is always preceded by the &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; handler.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetDestroyed = function(target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipDied&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipDied&amp;lt;/code&amp;gt; handler is called when the ship or player dies. Expect a &amp;lt;code&amp;gt;reset()&amp;lt;/code&amp;gt; shortly when it is the player ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipDied = function(whom, why)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
'''whom''' contains the entity that caused the kill. '''why''' is the cause written as string and is one of: &amp;quot;removed&amp;quot;, &amp;quot;hit a planet&amp;quot;, &amp;quot;energy damage&amp;quot;, &amp;quot;scrape damage&amp;quot;, &amp;quot;heat damage&amp;quot;, &amp;quot;cascade weapon&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
(&amp;quot;cascade weapon&amp;quot; is new in 1.74 and  &amp;quot;removed&amp;quot; / &amp;quot;energy damage&amp;quot; were accidentally switched in 1.73)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipFiredMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipFiredMissile&amp;lt;/code&amp;gt; handler is called when a missile is fired. &amp;lt;code&amp;gt;missile&amp;lt;/code&amp;gt; contains the missile entity and &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; the identity of the target. The handler is send to the ship that launched the missile.&lt;br /&gt;
&lt;br /&gt;
 this.shipFiredMissile = function(missile, target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; handler is called when the target gets lost. &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; contains the lost target entity.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetLost = function(target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetCloaked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetCloaked&amp;lt;/code&amp;gt; handler is called when the target cloakes.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetCloaked = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;weaponsSystemsToggled&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;weaponsSystemsToggled&amp;lt;/code&amp;gt; handler is called whenever the player toggles their weapons systems on or off. The &amp;lt;code&amp;gt;state&amp;lt;/code&amp;gt; parameter contains the new state of the weapons systems&lt;br /&gt;
&lt;br /&gt;
 this.weaponsSystemsToggled = function(state : boolean)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Equipment and Cargo ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentAdded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentAdded&amp;lt;/code&amp;gt; handler is called whenever the player ship gains an item of equipment. This includes &amp;quot;gaining&amp;quot; of &amp;lt;code&amp;gt;EQ_SOMETHING_DAMAGED&amp;lt;/code&amp;gt; when an &amp;lt;code&amp;gt;EQ_SOMETHING&amp;lt;/code&amp;gt; is damaged. This event will fire regardless of the reason for the equipment being added to the ship.&lt;br /&gt;
&lt;br /&gt;
 this.equipmentAdded = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
       // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is often more convenient than monitoring both &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt;, and will also detect equipment addition by script.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentDamaged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentDamaged&amp;lt;/code&amp;gt; handler is called when equipment gets damaged. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentDamaged = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentRemoved&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentRemoved&amp;lt;/code&amp;gt; handler is called whenever the player ship loses an item of equipment. This includes &amp;quot;losing&amp;quot; of &amp;lt;code&amp;gt;EQ_SOMETHING_DAMAGED&amp;lt;/code&amp;gt; when an &amp;lt;code&amp;gt;EQ_SOMETHING&amp;lt;/code&amp;gt; is repaired. This event will fire regardless of the reason for the equipment being removed from the ship.&lt;br /&gt;
&lt;br /&gt;
 this.equipmentRemoved = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
       // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; handler is called when equipment gets repaired. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentRepaired = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtCargo&amp;lt;/code&amp;gt; handler is called when cargo is bought at the market screen. &amp;lt;code&amp;gt;commodity&amp;lt;/code&amp;gt; contains the non-localised name for the cargo. You can get the localised name using &amp;lt;code&amp;gt;expandDescription(&amp;quot;[commodity-name &amp;quot;+commodity+&amp;quot;]&amp;quot;);&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is price per unit in tenths of a credit.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtCargo = function(commodity, units, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt; handler is called when equipment is bought at the outfit screen.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtEquipment = function(equipment, paid)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The 'paid' parameter is added from 1.89 onwards. This is the amount of credits the player paid for the equipment, including any refunds that might have been applied during the purchase (eg when purchasing a laser and installing it in a position where a laser is already fitted, the cost of the current laser will be refunded to the player during the purchase).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; handler is called when a new ship is bought. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtNewShip = function(ship, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The 'price' parameter is added from 1.81 onwards. It is the cost of the ship (not counting any trade-in value of the player's old ship) in credits, or zero for changes using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' In a future release of Oolite, &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; will no longer be fired when the ship is replaced using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]. Instead, the &amp;lt;code&amp;gt;[[#playerReplacedShip|playerReplacedShip]]&amp;lt;/code&amp;gt; event should be used. At the moment, both events (&amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt;) will fire.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerWillBuyNewShip|playerWillBuyNewShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerChangedPrimedEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerChangedPrimedEquipment&amp;lt;/code&amp;gt; handler is called whenever the player changes the currently primed equipment (either with shift-n or ctrl-shift-n). The equipment key of the newly primed equipment will be passed as an argument.&lt;br /&gt;
&lt;br /&gt;
 this.playerChangedPrimedEquipment = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt; handler is called when the player ship is replaced via the JS method [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip&amp;lt;/code&amp;gt;]]. May be needed to re-evaluate the old equipment as replacing a ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerReplacedShip = function(ship)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerWillReplaceShip|playerWillReplaceShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerSoldCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerSoldCargo&amp;lt;/code&amp;gt; handler is called when cargo is sold at the market screen. &amp;lt;code&amp;gt;commodity&amp;lt;/code&amp;gt; contains the non-localised name for the cargo. You can get the localised name using &amp;lt;code&amp;gt;expandDescription(&amp;quot;[commodity-name &amp;quot;+commodity+&amp;quot;]&amp;quot;);&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is price per unit in tenths of a credit.&lt;br /&gt;
&lt;br /&gt;
 this.playerSoldCargo = function(commodity, units, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipScoopedFuel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipScoopedFuel&amp;lt;/code&amp;gt; handler is called whenever the player's ship transfers 0.1LY of fuel from the scoops to the tank.&lt;br /&gt;
&lt;br /&gt;
 this.shipScoopedFuel = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipScoopedOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipScoopedOther&amp;lt;/code&amp;gt; handler is called when a ship scoops cargo. The scooped item is transferred as argument.&amp;lt;br&amp;gt;If the cargo is scripted cargo, but not otherwise, then the scooped cargo itself gets the handler &amp;lt;code&amp;gt;shipWasScooped&amp;lt;/code&amp;gt; with the scooper as argument.&lt;br /&gt;
&lt;br /&gt;
 this.shipScoopedOther = function(whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillBuyNewShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillBuyNewShip&amp;lt;/code&amp;gt; handler is called just before a new ship is bought. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillBuyNewShip = function(dataKey, shipyard, price, tradeIn)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; is the shipdata.plist &amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; for the ship being purchased.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;shipyard&amp;lt;/code&amp;gt; is a dictionary object containing details about the ship being purchased, with information similar to the following:&lt;br /&gt;
 {&lt;br /&gt;
    short_description: &amp;quot;Python: Plus Galactic Hyperdrive. Extra Energy Unit. Docking Computers. E.C.M. System. Forward weapon upgraded to military laser. Price 215 000 ₢.&amp;quot;,&lt;br /&gt;
    shipdata_key: &amp;quot;python-player&amp;quot;,&lt;br /&gt;
    id: &amp;quot;675b6b-c60a74&amp;quot;,&lt;br /&gt;
    price: 215000,&lt;br /&gt;
    ship: {&lt;br /&gt;
      ...''[[shipdata.plist]]'' details of ship...&lt;br /&gt;
    },&lt;br /&gt;
    personality: 9807,&lt;br /&gt;
    extras: [&amp;quot;EQ_GAL_DRIVE&amp;quot;, &amp;quot;EQ_FUEL_SCOOPS&amp;quot;, &amp;quot;EQ_ENERGY_UNIT&amp;quot;, &amp;quot;EQ_FUEL_INJECTION&amp;quot;, &amp;quot;EQ_DOCK_COMP&amp;quot;, &amp;quot;EQ_ECM&amp;quot;]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is the amount being paid the for ship.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tradeIn&amp;lt;/code&amp;gt; is the trade in value of the current ship.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerBoughtNewShip|playerBoughtNewShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillReplaceShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillReplaceShip&amp;lt;/code&amp;gt; handler is called just before a ship is replaced using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillReplaceShip = function(dataKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; is the shipdata.plist &amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; for the ship being purchased.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerReplacedShip|playerReplacedShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;chartHightlightModeChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.87}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;chartHighlightModeChanged&amp;lt;/code&amp;gt; handler is called whenever the highlight mode of the galactic chart is changed either manually (from player input) or programmatically (by setting the mode with &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: PlayerShip#chartHighlightMode|player.ship.chartHightlightMode]]&amp;lt;/code&amp;gt;). The &amp;quot;newMode&amp;quot; parameter will be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_SUNCOLOR&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_ECONOMY&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_GOVERNMENT&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_TECHLEVEL&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 this.chartHightlightModeChanged = function(newMode)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;compassTargetChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;compassTargetChanged&amp;lt;/code&amp;gt; handler is called when a new target is selected. Mode can be any of the following:&lt;br /&gt;
&lt;br /&gt;
 COMPASS_MODE_BASIC&lt;br /&gt;
 COMPASS_MODE_PLANET&lt;br /&gt;
 COMPASS_MODE_STATION&lt;br /&gt;
 COMPASS_MODE_SUN&lt;br /&gt;
 COMPASS_MODE_TARGET&lt;br /&gt;
 COMPASS_MODE_BEACONS&lt;br /&gt;
&lt;br /&gt;
script example &lt;br /&gt;
&lt;br /&gt;
 this.compassTargetChanged = function(whom, mode)&lt;br /&gt;
 {&lt;br /&gt;
      log(' Now targeting ' + whom);&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;dayChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;dayChanged&amp;lt;/code&amp;gt; handler is called each time a new day starts. At very low frame rates while the clock is updating, it is possible for this handler to be called twice in the same frame. Therefore, clock.days will not be correct for one of the calls. Use the day number (newday parameter) passed to the handler instead.&lt;br /&gt;
&lt;br /&gt;
 this.dayChanged = function(newday)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; handler is called at the end of the escape pod sequence, after the &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; event and just prior to the &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; events. &lt;br /&gt;
&lt;br /&gt;
Use this handler if you need to override the destination for the escape pod with [[Oolite_JavaScript_Reference:_Player#setEscapePodDestination|&amp;lt;code&amp;gt;player.setEscapePodDestination()&amp;lt;/code&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
 this.escapePodSequenceOver = function() &lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;guiScreenChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;guiScreenChanged&amp;lt;/code&amp;gt; handler is called when the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; changes. The ''from'' parameter is the screen it is leaving and ''to'' is the screen initially being switched to. Note that the screen can have changed again in the meantime by the action of other oxps. Therefore, it is generally better to test the global &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; to see which page is really on display instead of using the ''to'' parameter. (world script only)&lt;br /&gt;
&lt;br /&gt;
This handler will only fire when switched to/from any of the following:&lt;br /&gt;
&lt;br /&gt;
1.76: &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MAIN&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt;(F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MANIFEST&amp;quot;&amp;lt;/code&amp;gt;(F5F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;&amp;lt;/code&amp;gt;(F7), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_OPTIONS&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_EQUIP_SHIP&amp;quot;&amp;lt;/code&amp;gt;(F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHIPYARD&amp;quot;&amp;lt;/code&amp;gt;(F3F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;&amp;lt;/code&amp;gt;(F6), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_LONG_RANGE_CHART&amp;quot;&amp;lt;/code&amp;gt;(F6F6), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKET&amp;quot;&amp;lt;/code&amp;gt;(F8), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_CONTRACTS&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_REPORT&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.77: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_INTERFACES&amp;quot;&amp;lt;/code&amp;gt;(F4) and removes &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_CONTRACTS&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.81: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKETINFO&amp;quot;&amp;lt;/code&amp;gt;(F8F8)&lt;br /&gt;
&lt;br /&gt;
 this.guiScreenChanged = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;guiScreenWillChange&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;guiScreenWillChange&amp;lt;/code&amp;gt; handler is called when the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; is about to change.  On these screens, a script could change the content of the page to be displayed. (world script only)&lt;br /&gt;
&lt;br /&gt;
This handler will only fire when switching to/from any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_EQUIP_SHIP&amp;quot;&amp;lt;/code&amp;gt;(F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MANIFEST&amp;quot;&amp;lt;/code&amp;gt;(F5F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKET&amp;quot;&amp;lt;/code&amp;gt;(F8), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHIPYARD&amp;quot;&amp;lt;/code&amp;gt;(F3F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;&amp;lt;/code&amp;gt;(F7)&lt;br /&gt;
&lt;br /&gt;
1.77: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_INTERFACES&amp;quot;&amp;lt;/code&amp;gt;(F4), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt;(F5)&lt;br /&gt;
&lt;br /&gt;
1.81: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKETINFO&amp;quot;&amp;lt;/code&amp;gt;(F8F8)&lt;br /&gt;
&lt;br /&gt;
 this.guiScreenWillChange = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;infoSystemChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;infoSystemChanged&amp;lt;/code&amp;gt; handler is called when the system displayed in F7 is changed, e.g. by moving the small blue cursor along the planned route in the chart.&lt;br /&gt;
&lt;br /&gt;
 this.infoSystemChanged = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;infoSystemWillChange&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;infoSystemWChange&amp;lt;/code&amp;gt; handler is called just before the system displayed in F7 is updated, e.g. by moving the small blue cursor along the planned route in the chart.&lt;br /&gt;
&lt;br /&gt;
 this.infoSystemWillChange = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;mfdKeyChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mfdKeyChanged&amp;lt;/code&amp;gt; handler is called whenever the player changes the content of an MFD slot. The &amp;lt;code&amp;gt;activeMFD&amp;lt;/code&amp;gt; parameter identifies which MFD slot is being changed, and the &amp;lt;code&amp;gt;mfdKey&amp;lt;/code&amp;gt; specifies the key code now in use in this slot.&lt;br /&gt;
&lt;br /&gt;
 this.mfdKeyChanged = function(activeMFD : integer, mfdKey : string)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: PlayerShip#setMultiFunctionDisplay|PlayerShip.setMultiFunctionDisplay()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionChoiceWasReset&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionChoiceWasReset&amp;lt;/code&amp;gt; handler is called when the mission choice is set to &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; via script (either using the legacy script method resetMissionChice or using &amp;lt;code&amp;gt;mission.runScreen ({choices: null})&amp;lt;/code&amp;gt; in javascript)&lt;br /&gt;
&lt;br /&gt;
 this.missionChoiceWasReset= function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionScreenEnded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionScreenEnded&amp;lt;/code&amp;gt; handler is called when a mission screen ends. Note that another script may have put up a new mission screen in the meantime. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.missionScreenEnded = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; handler is called if there are no mission/report screens active and the player's ship is docked. It gets fired at game startup, upon docking and after an arrival report or previous mission screen has ended.  (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.missionScreenOpportunity= function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This handler works a bit different from other handlers. It fires for every installed OXP/OXZ until one creates a mission screen during this handler, and then it stops. When the mission screen ends and there is no callback function that creates a new mission screen, the &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; is sent again to all installed OXPs/OXZs starting with the one that created the last mission screen. All this means is that when this handler fires, it is safe to show a mission screen and no further tests are needed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reportScreenEnded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;reportScreenEnded&amp;lt;/code&amp;gt; handler is called when the last arrival-report  screen ends. This is a screen that should not be written by a missionscreen. The code should wait until this eventhandler fires. Note that an other script may have put up a new missionscreen in the meantime. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.reportScreenEnded = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;selectedMFDChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;selectedMFDChanged&amp;lt;/code&amp;gt; handler is send whenever the player selects a new MFD slot (normally using the default keypress &amp;quot;;&amp;quot;). The &amp;lt;code&amp;gt;activeMFD&amp;lt;/code&amp;gt; paramater is the index of the MFD which is now active.&lt;br /&gt;
&lt;br /&gt;
 this.selectedMFDChanged = function(activeMFD : integer)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipCollided&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipCollided&amp;lt;/code&amp;gt; handler is send after a collision with otherShip.&lt;br /&gt;
&lt;br /&gt;
 this.shipCollided = function(otherShip)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipSpawned&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipSpawned&amp;lt;/code&amp;gt; handler is called after an NPC ship has been added to the system. After a witchspace jump it means that first all ships are added to the system, then all the relevant shipSpawned events are triggered.&amp;lt;br&amp;gt;&lt;br /&gt;
This handler for the worldScript is new since Oolite 1.74. After the event is sent to the shipScript, it is now also send to the worldScript with the added entity as argument.&lt;br /&gt;
&lt;br /&gt;
 this.shipSpawned = function(ship)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; handler is called when the player bails out. This will be followed by the &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; event, and then a &amp;lt;code&amp;gt;shipWillDockWithStation()&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;shipDockedWithStation()&amp;lt;/code&amp;gt; pair after a few seconds.&lt;br /&gt;
&lt;br /&gt;
 this.shipLaunchedEscapePod = function(escapepod)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;systemInformationChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;systemInformationChanged&amp;lt;/code&amp;gt; handler is called when system information is modified. It is passed the galaxy and system ID which were changed, and the key and new value in the SystemInfo object.&lt;br /&gt;
&lt;br /&gt;
To avoid problems with recursion, attempting to change the value of any system information property from within this handler will fail and log an error. Also note that changes which take place while Oolite is not running (from OXP planetinfo.plist files) will not cause this handler to be called when the game is reloaded.&lt;br /&gt;
&lt;br /&gt;
 this.systemInformationChanged = function(galaxy,system,key,newValue)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;viewDirectionChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;viewDirectionChanged&amp;lt;/code&amp;gt; handler is called when the player view changes, with a string to indicate which view the player is facing. Amongst its possible values are &amp;quot;VIEW_FORWARD&amp;quot;, &amp;quot;VIEW_AFT&amp;quot;, &amp;quot;VIEW_PORT&amp;quot;, &amp;quot;VIEW_STARBOARD&amp;quot;,&lt;br /&gt;
&amp;quot;VIEW_CUSTOM&amp;quot;,&lt;br /&gt;
&amp;quot;VIEW_GUI_DISPLAY&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 this.viewDirectionChanged = function(viewString)&lt;br /&gt;
 {&lt;br /&gt;
   if (viewString == &amp;quot;VIEW_PORT&amp;quot;)&lt;br /&gt;
   {&lt;br /&gt;
      // Your code here&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== System population ===&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.79 and later, functions are called to populate and repopulate the system. These functions do not have fixed names, as they depend on the system, but otherwise act like normal worldscript functions. [[Oolite System Populator|The populator page]] has more documentation on these functions.&lt;br /&gt;
&lt;br /&gt;
=== Defunct ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentDestroyed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
''Handler no longer exists in current stable version 1.80''&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentDestroyed&amp;lt;/code&amp;gt; handler is called when equipment gets destroyed completely beyond repair. (in strict mode, 1.77 or earlier only)  (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentDestroyed = function(equipment)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;tickle&amp;lt;/code&amp;gt; (removed in 1.77) ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tickle&amp;lt;/code&amp;gt; handler is called periodically-ish, whenever the old [[property list|plist]] scripts are updated. &amp;lt;code&amp;gt;tickle()&amp;lt;/code&amp;gt; is deprecated. In new code, use appropriate event handlers or [[Oolite JavaScript Reference: Timer|timers]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Missing Events ===&lt;br /&gt;
&lt;br /&gt;
All the initially planned events have been implemented in 1.74.&lt;br /&gt;
&lt;br /&gt;
If there are other events you would like to be able to respond to, please write a request [http://www.aegidian.org/bb/viewtopic.php?t=3296 on the forum].&lt;br /&gt;
&lt;br /&gt;
'''See also:''' [[Oolite JavaScript Reference: Ship script event handlers|ship script event handlers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_World_script_event_handlers&amp;diff=79335</id>
		<title>Oolite JavaScript Reference: World script event handlers</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_World_script_event_handlers&amp;diff=79335"/>
		<updated>2023-06-21T15:41:47Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* playerWillSaveGame */ Corrected the possible values of the parameter, formating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a list of event handlers which can be implemented inside world scripts [[Scripting Oolite with JavaScript|JavaScript scripts for Oolite]]. Additionally, ship script handlers called on the player's ship will cause an equivalent world script event.&lt;br /&gt;
&lt;br /&gt;
Most event handlers can be used both in world scripts and in ship scripts. Generally speaking, handlers starting with &amp;quot;ship&amp;quot; can be used for both scripts and those starting with &amp;quot;player&amp;quot; are meant only for the player (= can only be used in a world script). Exceptions on this rule are mentioned with the individual handlers below. &lt;br /&gt;
&lt;br /&gt;
World scripts can be either found inside Config\script.js, or be distinctly named .js files inside the Scripts directory - in the latter case, the worldScript.plist will list the active world scripts.&lt;br /&gt;
&lt;br /&gt;
World scripts are always active.&lt;br /&gt;
&lt;br /&gt;
The list of event handlers will change from version to version (usually additions of extra handlers). For this reason, any variables or functions you create as &amp;lt;code&amp;gt;this.variable&amp;lt;/code&amp;gt; should have a name beginning with '_' or '$' - e.g. &amp;lt;code&amp;gt;this._variable&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;this.$variable&amp;lt;/code&amp;gt; - to avoid potential conflicts with future event handlers (which will never start with '_' or '$').&lt;br /&gt;
&lt;br /&gt;
=== Game State ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;gamePaused&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This event is called when the game is paused. This is mainly useful for pausing sound playback which should not continue while the game is paused.&lt;br /&gt;
&lt;br /&gt;
 this.gamePaused = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;gameResumed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This event is called when the game is resumed from pause. This is mainly useful for resuming sound playback paused in a &amp;lt;code&amp;gt;gamePaused&amp;lt;/code&amp;gt; handler.&lt;br /&gt;
&lt;br /&gt;
 this.gameResumed = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillSaveGame&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillSaveGame&amp;lt;/code&amp;gt; handler is called whenever the player saves a game. The transferred message is one of the following strings: &amp;lt;code&amp;gt;&amp;quot;STANDARD_SAVE&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;AUTO_SAVE&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;QUICK_SAVE&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillSaveGame = function(message)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Using this event is useful for storing temporary variables in &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Global#missionVariables|missionVariables]]&amp;lt;/code&amp;gt;, just before the game gets saved. &amp;lt;code&amp;gt;missionVariables&amp;lt;/code&amp;gt; are slow in use compared to normal JS variables, therefore their use should be minimised for efficient code. The main benefit of using &amp;lt;code&amp;gt;missionVariables&amp;lt;/code&amp;gt; is that they are saved in a saved game. See also [[Mission variable]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt; handler is called after all OXPs have been loaded. This also means that it is called every time the player loads a game, begins a new game or presses space after dying. It can be used to do one-off initialisation such as copying mission variables into &amp;lt;code&amp;gt;this.*&amp;lt;/code&amp;gt; properties for efficiency or setting up data arrays to be used by the script in other handlers. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.startUp = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that from Oolite 1.79 onwards the player is in the main station while this handler runs but may be moved to another station soon after.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt; handler is run at game startup after the initial population of the system has been complete, and after the player has been moved to the station recorded in their save game. The order of world events at game start is therefore:&lt;br /&gt;
* &amp;lt;code&amp;gt;startUp&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;systemWillPopulate&amp;lt;/code&amp;gt; (or an alternative handler specified by the system info)&lt;br /&gt;
* &amp;lt;code&amp;gt;startUpComplete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Docking ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; handler is called at the beginning of the docking tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillDockWithStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == null&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == true&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_DOCKING&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; handler is called at the end of the docking tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipDockedWithStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == station&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == true&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_DOCKED&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guiScreen&amp;lt;/code&amp;gt; is either &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_REPORT&amp;quot;&amp;lt;/code&amp;gt;. However, any identical handler from an other oxp could have changed those values. Never count on it but double check when important.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; handler is called at the beginning of the launch tunnel effect.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillLaunchFromStation = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == station&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == false&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_LAUNCHING&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLaunchedFromStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLaunchedFromStation&amp;lt;/code&amp;gt; handler is called at the end of the launch tunnel effect. The handler's argument is the station which launched the ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipLaunchedFromStation = function(stationLaunchedFrom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
At this moment &amp;lt;code&amp;gt;ship.dockedStation == null&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.docked == false&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ship.status == &amp;quot;STATUS_IN_FLIGHT&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerStartedAutoPilot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerStartedAutoPilot&amp;lt;/code&amp;gt; handler is called when the player starts autopilot docking. It is not called for the instantaneous dock command. The handler is called with an argument containing the station entity that is the docking target.&lt;br /&gt;
&lt;br /&gt;
 this.playerStartedAutoPilot = function(stationForDocking)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCancelledAutoPilot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCancelledAutoPilot&amp;lt;/code&amp;gt; handler is called when the player cancels autopilot docking.&lt;br /&gt;
&lt;br /&gt;
 this.playerCancelledAutoPilot = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceCancelled&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceCancelled&amp;lt;/code&amp;gt; handler is called when the player withdraws their request to dock at a station. &lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceCancelled = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceExpired&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceExpired&amp;lt;/code&amp;gt; handler is called when the player exceeds the two minute window without requesting an extension&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceExpired = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingClearanceGranted&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingClearanceGranted&amp;lt;/code&amp;gt; handler is called when the player is given permission to dock at a station. If the player is given immediate clearance to dock, this event will be called immediately after the &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; event. If, however, the station is unable to give immediate clearance, then there will be some delay between the request to dock and permission being granted. This event will be called when the station actually gives docking clearance.&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingClearanceGranted = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerDockingRefused&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerDockingRefused&amp;lt;/code&amp;gt; handler is called when a station refuses to provide autopilot docking instructions.&lt;br /&gt;
&lt;br /&gt;
 this.playerDockingRefused = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerRequestedDockingClearance&amp;lt;/code&amp;gt; handler is called when a station answers on a docking request of the player by targeting the station and pressing L (shift-l).&lt;br /&gt;
&lt;br /&gt;
 this.playerRequestedDockingClearance = function(message)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Message is a string and can take the values: &amp;quot;DOCKING_CLEARANCE_GRANTED&amp;quot;, &amp;quot;DOCKING_CLEARANCE_DENIED_TRAFFIC_OUTBOUND&amp;quot;, &amp;quot;DOCKING_CLEARANCE_DENIED_TRAFFIC_INBOUND&amp;quot;,  &amp;quot;DOCKING_CLEARANCE_DENIED_SHIP_FUGITIVE&amp;quot;, &amp;quot;DOCKING_CLEARANCE_NOT_REQUIRED&amp;quot;, &amp;quot;DOCKING_CLEARANCE_EXTENDED&amp;quot; or &amp;quot;DOCKING_CLEARANCE_CANCELLED&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRescuedEscapePod&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerRescuedEscapePod&amp;lt;/code&amp;gt; handler is called when the player rescues an escape pod which does not have scripted content (all consequences of scripted content escape pods are assumed to be dealt with by the specified script instead). It has three parameters:&lt;br /&gt;
# the rescue fee, in decicredits&lt;br /&gt;
# the fee reason, which can be &amp;quot;insurance&amp;quot;, &amp;quot;bounty&amp;quot; or &amp;quot;slave&amp;quot; (in the latter case, the fee will always be zero)&lt;br /&gt;
# a dictionary like those in the &amp;lt;code&amp;gt;ship.crew&amp;lt;/code&amp;gt; property describing the pod occupant&lt;br /&gt;
&lt;br /&gt;
 this.playerRescuedEscapePod = function(fee, reason, occupant)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called after the escape pod has been processed, but slightly before the arrival report screen giving the results of the processing is displayed to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCompletedContract&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCompletedContract&amp;lt;/code&amp;gt; handler is called when a passenger, parcel or cargo contract ends, either successfully or by defaulting on it. It is not called when all contracts are cancelled on a galactic jump. It has four parameters:&lt;br /&gt;
# The type of contract, which can be &amp;quot;cargo&amp;quot;, &amp;quot;parcel&amp;quot; or &amp;quot;passenger&amp;quot;&lt;br /&gt;
# The result of the contract, which can be &amp;quot;success&amp;quot;, &amp;quot;late&amp;quot;, &amp;quot;failed&amp;quot;, or for cargo contracts only &amp;quot;short&amp;quot;&lt;br /&gt;
# The fee paid for the contract in decicredits&lt;br /&gt;
# The contract information dictionary&lt;br /&gt;
Note that the fee actually paid for the contract will often ''not'' match the originally agreed fee in the contract information dictionary, as penalties for late delivery or bonuses for good service are included in the fee parameter.&lt;br /&gt;
&lt;br /&gt;
 this.playerCompletedContract = function(type, result, fee, contract)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called after the contract has been processed, but slightly before the arrival report screen giving the results of the processing is displayed to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerEnteredContract&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerEnteredContract&amp;lt;/code&amp;gt; handler is called when a passenger, parcel or cargo contract starts, just after the items have been transferred to the player ship. It has two parameters:&lt;br /&gt;
# The type of contract, which can be &amp;quot;cargo&amp;quot;, &amp;quot;parcel&amp;quot; or &amp;quot;passenger&amp;quot;&lt;br /&gt;
# The contract information dictionary&lt;br /&gt;
&lt;br /&gt;
 this.playerEnteredContract = function(type, contract)&lt;br /&gt;
 {&lt;br /&gt;
     // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Witchspace Jumps ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerStartedJumpCountdown&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerStartedJumpCountdown&amp;lt;/code&amp;gt; handler is called when the user starts a witchspace or galactic witchspace jump countdown. The &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter is a string specifying which type of jump is occuring; currently, the possible values are “standard” and “galactic”. Other values may be added in future. The &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; parameter is a number specifying the number of seconds the countdown is running for.&lt;br /&gt;
&lt;br /&gt;
 this.playerStartedJumpCountdown = function(type, seconds)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerCancelledJumpCountdown&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerCancelledJumpCountdown&amp;lt;/code&amp;gt; handler is called when the user cancels a witchspace or galactic witchspace jump countdown.&lt;br /&gt;
&lt;br /&gt;
 this.playerCancelledJumpCountdown = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerJumpFailed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerJumpFailed&amp;lt;/code&amp;gt; handler is called at the end of a witchspace or galactic witchspace countdown, if the jump is not possible. The &amp;lt;code&amp;gt;reason&amp;lt;/code&amp;gt; parameter is a string specifying why the jump failed. The current values are:&lt;br /&gt;
* '''&amp;quot;insufficient fuel&amp;quot;''' - the ship no longer has enough fuel to make the jump (e.g. injector use or fuel leak).&lt;br /&gt;
* '''&amp;quot;blocked&amp;quot;''' - a heavy ship is near the player (specifically &amp;lt;code&amp;gt;object mass&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;object distance&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; &amp;gt;= 10.0, and &amp;lt;code&amp;gt;object distance&amp;lt;/code&amp;gt; &amp;lt;= scanner range).&lt;br /&gt;
* '''&amp;quot;malfunction&amp;quot;''' - the jump malfunctioned in a way that leaves the player ship in the current system.&lt;br /&gt;
* '''&amp;quot;malfunction&amp;quot;''' - the Galactic Hyperdrive is damaged or removed during a galactic jump countdown.&lt;br /&gt;
&lt;br /&gt;
Also theoretically possible but unlikely in current Oolite:&lt;br /&gt;
* '''&amp;quot;too far&amp;quot;''' - the jump destination is outside the 7LY range (but wasn't when the countdown started).&lt;br /&gt;
* '''&amp;quot;no target&amp;quot;''' - the jump destination is the current location (but wasn't when the countdown started).&lt;br /&gt;
&lt;br /&gt;
 this.playerJumpFailed = function(reason)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt; handler is called immediately before a witchspace jump, while the player is still in the starting system. The &amp;lt;code&amp;gt;cause&amp;lt;/code&amp;gt; parameter is a string specifying what sort of jump is occuring; currently, the possible values are “standard jump”, “galactic jump” and “wormhole”. Other values may be added in future.&lt;br /&gt;
&lt;br /&gt;
 // 1.80 or earlier&lt;br /&gt;
 this.shipWillEnterWitchspace = function(cause)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In 1.81 or later the handler gains a second parameter, describing the jump destination. For standard and wormhole jumps, this will be the system ID of the destination system. For galactic jumps, this will be the galaxy ID of the destination galaxy. (As [[Oolite JavaScript Reference: PlayerShip#galacticHyperspaceBehaviour|player.ship.galacticHyperspaceBehaviour]] may be changed during &amp;lt;code&amp;gt;shipWillEnterWitchspace&amp;lt;/code&amp;gt;, it is not possible to predict in advance of a galactic jump being made what the resulting system ID in the destination galaxy will be)&lt;br /&gt;
&lt;br /&gt;
 // 1.81 or later&lt;br /&gt;
 this.shipWillEnterWitchspace = function(cause, destination)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; handler is called as a witchspace jump concludes. When it is called, the player is (from a program perspective) in the destination system, but the tunnel effect has not yet been shown. Use this event to set up elements which need to be present in-system after the player exits witchspace.&lt;br /&gt;
&lt;br /&gt;
 this.shipWillExitWitchspace = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedWitchspace&amp;lt;/code&amp;gt; handler is called after a witchspace jump has concluded and the tunnel effect has been shown.&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedWitchspace = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerEnteredNewGalaxy&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerEnteredNewGalaxy&amp;lt;/code&amp;gt; handler is called just before shipWillExitWitchspace.&lt;br /&gt;
&lt;br /&gt;
the sequence of events for a player jumping to a different galaxy is as follows:&lt;br /&gt;
&lt;br /&gt;
shipWillEnterWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
playerWillEnterWitchspace (NPC ship event)&amp;lt;br&amp;gt;&lt;br /&gt;
playerEnteredNewGalaxy (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
shipWillExitWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
shipExitedWitchspace (world event)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 this.playerEnteredNewGalaxy = function(galaxyNumber)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18392 Order of JS events when galactic jumping] (2016)&lt;br /&gt;
&lt;br /&gt;
=== Enter/Exit Aegis ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipEnteredStationAegis&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipEnteredStationAegis&amp;lt;/code&amp;gt; handler is called when the player enters the aegis of the main-station (2x scanner range from main-station). Other stations than the main-station don't give aegis messages.&lt;br /&gt;
&lt;br /&gt;
 this.shipEnteredStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedStationAegis&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedStationAegis&amp;lt;/code&amp;gt; handler is called when the player leaves the aegis of the main-station (2x scanner range from main-station).&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipEnteredPlanetaryVicinity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipEnteredPlanetaryVicinity&amp;lt;/code&amp;gt; handler is called when the player enters the planet aegis (3x planet radius).&lt;br /&gt;
&lt;br /&gt;
 this.shipEnteredPlanetaryVicinity = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipExitedPlanetaryVicinity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipExitedPlanetaryVicinity&amp;lt;/code&amp;gt; handler is called when the player leaves the planet aegis (3x planet radius).&lt;br /&gt;
&lt;br /&gt;
 this.shipExitedPlanetaryVicinity = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipApproachingPlanetSurface&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipApproachingPlanetSurface&amp;lt;/code&amp;gt; handler is called when the player is very close to the planet (crosses a border ± 500 meter above the surface).&lt;br /&gt;
&lt;br /&gt;
 this.shipApproachingPlanetSurface = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLeavingPlanetSurface&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLeavingPlanetSurface&amp;lt;/code&amp;gt; handler is called when the player leaves the planet (crosses a border ± 500 meter above the surface).&lt;br /&gt;
&lt;br /&gt;
 this.shipLeavingPlanetSurface = function(planet)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Combat ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;alertConditionChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;alertConditionChanged&amp;lt;/code&amp;gt; handler is called when the player’s alert status (&amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Player#alertCondition|player.alertCondition]]&amp;lt;/code&amp;gt;) changes. Only the player and stations have an alert condition. (world script and station scripts)&lt;br /&gt;
&lt;br /&gt;
 this.alertConditionChanged = function(newCondition, oldCondition)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerTargetedMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerTargetedMissile&amp;lt;/code&amp;gt; handler is called when the player targets the nearest missile by pressing &amp;quot;T&amp;quot; (shift-t).&lt;br /&gt;
&lt;br /&gt;
 this.playerTargetedMissile = function(missile)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipAttackedOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipAttackedOther&amp;lt;/code&amp;gt; handler is called when the player hits another with a laser shot. &amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt; is the identity of the ship being hit.&lt;br /&gt;
&lt;br /&gt;
 this.shipAttackedOther = function(other)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipAttackedWithMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipAttackedWithMissile&amp;lt;/code&amp;gt; handler is called when a missile is fired. &amp;lt;code&amp;gt;missile&amp;lt;/code&amp;gt; contains the missile entity and &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that launched the missile.&lt;br /&gt;
&lt;br /&gt;
 this.shipAttackedWithMissile = function(missile, whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipBeingAttacked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipBeingAttacked&amp;lt;/code&amp;gt; handler is called when a laser shot  hits. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that attacked.&lt;br /&gt;
&lt;br /&gt;
 this.shipBeingAttacked = function(whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipBeingAttackedByCloaked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipBeingAttackedByCloaked&amp;lt;/code&amp;gt; handler is called when a laser shot from a cloaked ship hits. Guess what, there is no parameter because he is cloaked!&lt;br /&gt;
&lt;br /&gt;
 this.shipBeingAttackedByCloaked = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipKilledOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.75}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipKilledOther&amp;lt;/code&amp;gt; handler is called when a ship kills an other ship. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; the identity of the ship that was killed. &amp;lt;code&amp;gt;damageType&amp;lt;/code&amp;gt; is the type of damage.&lt;br /&gt;
&lt;br /&gt;
 this.shipKilledOther = function(whom : ship, damageType : string)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipReleasedEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipReleasedEquipment&amp;lt;/code&amp;gt; handler is called when a ship launches a mine (a pylon-mounted equipment item whose key ends with &amp;quot;_MINE&amp;quot;). &amp;lt;code&amp;gt;mine&amp;lt;/code&amp;gt; contains the launched mine entity.&lt;br /&gt;
&lt;br /&gt;
 this.shipReleasedEquipment = function(mine)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetDestroyed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetDestroyed&amp;lt;/code&amp;gt; handler is called when the target gets destroyed by the player. &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; contains the destroyed target entity. This command is always preceded by the &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; handler.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetDestroyed = function(target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipDied&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipDied&amp;lt;/code&amp;gt; handler is called when the ship or player dies. Expect a &amp;lt;code&amp;gt;reset()&amp;lt;/code&amp;gt; shortly when it is the player ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipDied = function(whom, why)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
'''whom''' contains the entity that caused the kill. '''why''' is the cause written as string and is one of: &amp;quot;removed&amp;quot;, &amp;quot;hit a planet&amp;quot;, &amp;quot;energy damage&amp;quot;, &amp;quot;scrape damage&amp;quot;, &amp;quot;heat damage&amp;quot;, &amp;quot;cascade weapon&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
(&amp;quot;cascade weapon&amp;quot; is new in 1.74 and  &amp;quot;removed&amp;quot; / &amp;quot;energy damage&amp;quot; were accidentally switched in 1.73)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipFiredMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipFiredMissile&amp;lt;/code&amp;gt; handler is called when a missile is fired. &amp;lt;code&amp;gt;missile&amp;lt;/code&amp;gt; contains the missile entity and &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; the identity of the target. The handler is send to the ship that launched the missile.&lt;br /&gt;
&lt;br /&gt;
 this.shipFiredMissile = function(missile, target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetLost&amp;lt;/code&amp;gt; handler is called when the target gets lost. &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; contains the lost target entity.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetLost = function(target)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipTargetCloaked&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipTargetCloaked&amp;lt;/code&amp;gt; handler is called when the target cloakes.&lt;br /&gt;
&lt;br /&gt;
 this.shipTargetCloaked = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;weaponsSystemsToggled&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;weaponsSystemsToggled&amp;lt;/code&amp;gt; handler is called whenever the player toggles their weapons systems on or off. The &amp;lt;code&amp;gt;state&amp;lt;/code&amp;gt; parameter contains the new state of the weapons systems&lt;br /&gt;
&lt;br /&gt;
 this.weaponsSystemsToggled = function(state : boolean)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Equipment and Cargo ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentAdded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentAdded&amp;lt;/code&amp;gt; handler is called whenever the player ship gains an item of equipment. This includes &amp;quot;gaining&amp;quot; of &amp;lt;code&amp;gt;EQ_SOMETHING_DAMAGED&amp;lt;/code&amp;gt; when an &amp;lt;code&amp;gt;EQ_SOMETHING&amp;lt;/code&amp;gt; is damaged. This event will fire regardless of the reason for the equipment being added to the ship.&lt;br /&gt;
&lt;br /&gt;
 this.equipmentAdded = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
       // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is often more convenient than monitoring both &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt;, and will also detect equipment addition by script.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentDamaged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentDamaged&amp;lt;/code&amp;gt; handler is called when equipment gets damaged. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentDamaged = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentRemoved&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentRemoved&amp;lt;/code&amp;gt; handler is called whenever the player ship loses an item of equipment. This includes &amp;quot;losing&amp;quot; of &amp;lt;code&amp;gt;EQ_SOMETHING_DAMAGED&amp;lt;/code&amp;gt; when an &amp;lt;code&amp;gt;EQ_SOMETHING&amp;lt;/code&amp;gt; is repaired. This event will fire regardless of the reason for the equipment being removed from the ship.&lt;br /&gt;
&lt;br /&gt;
 this.equipmentRemoved = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
       // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentRepaired&amp;lt;/code&amp;gt; handler is called when equipment gets repaired. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentRepaired = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtCargo&amp;lt;/code&amp;gt; handler is called when cargo is bought at the market screen. &amp;lt;code&amp;gt;commodity&amp;lt;/code&amp;gt; contains the non-localised name for the cargo. You can get the localised name using &amp;lt;code&amp;gt;expandDescription(&amp;quot;[commodity-name &amp;quot;+commodity+&amp;quot;]&amp;quot;);&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is price per unit in tenths of a credit.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtCargo = function(commodity, units, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtEquipment&amp;lt;/code&amp;gt; handler is called when equipment is bought at the outfit screen.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtEquipment = function(equipment, paid)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The 'paid' parameter is added from 1.89 onwards. This is the amount of credits the player paid for the equipment, including any refunds that might have been applied during the purchase (eg when purchasing a laser and installing it in a position where a laser is already fitted, the cost of the current laser will be refunded to the player during the purchase).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; handler is called when a new ship is bought. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerBoughtNewShip = function(ship, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The 'price' parameter is added from 1.81 onwards. It is the cost of the ship (not counting any trade-in value of the player's old ship) in credits, or zero for changes using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' In a future release of Oolite, &amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; will no longer be fired when the ship is replaced using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]. Instead, the &amp;lt;code&amp;gt;[[#playerReplacedShip|playerReplacedShip]]&amp;lt;/code&amp;gt; event should be used. At the moment, both events (&amp;lt;code&amp;gt;playerBoughtNewShip&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt;) will fire.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerWillBuyNewShip|playerWillBuyNewShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerChangedPrimedEquipment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerChangedPrimedEquipment&amp;lt;/code&amp;gt; handler is called whenever the player changes the currently primed equipment (either with shift-n or ctrl-shift-n). The equipment key of the newly primed equipment will be passed as an argument.&lt;br /&gt;
&lt;br /&gt;
 this.playerChangedPrimedEquipment = function(equipmentKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerReplacedShip&amp;lt;/code&amp;gt; handler is called when the player ship is replaced via the JS method [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip&amp;lt;/code&amp;gt;]]. May be needed to re-evaluate the old equipment as replacing a ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerReplacedShip = function(ship)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerWillReplaceShip|playerWillReplaceShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerSoldCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerSoldCargo&amp;lt;/code&amp;gt; handler is called when cargo is sold at the market screen. &amp;lt;code&amp;gt;commodity&amp;lt;/code&amp;gt; contains the non-localised name for the cargo. You can get the localised name using &amp;lt;code&amp;gt;expandDescription(&amp;quot;[commodity-name &amp;quot;+commodity+&amp;quot;]&amp;quot;);&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is price per unit in tenths of a credit.&lt;br /&gt;
&lt;br /&gt;
 this.playerSoldCargo = function(commodity, units, price)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipScoopedFuel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipScoopedFuel&amp;lt;/code&amp;gt; handler is called whenever the player's ship transfers 0.1LY of fuel from the scoops to the tank.&lt;br /&gt;
&lt;br /&gt;
 this.shipScoopedFuel = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipScoopedOther&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipScoopedOther&amp;lt;/code&amp;gt; handler is called when a ship scoops cargo. The scooped item is transferred as argument.&amp;lt;br&amp;gt;If the cargo is scripted cargo, but not otherwise, then the scooped cargo itself gets the handler &amp;lt;code&amp;gt;shipWasScooped&amp;lt;/code&amp;gt; with the scooper as argument.&lt;br /&gt;
&lt;br /&gt;
 this.shipScoopedOther = function(whom)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillBuyNewShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillBuyNewShip&amp;lt;/code&amp;gt; handler is called just before a new ship is bought. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillBuyNewShip = function(dataKey, shipyard, price, tradeIn)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; is the shipdata.plist &amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; for the ship being purchased.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;shipyard&amp;lt;/code&amp;gt; is a dictionary object containing details about the ship being purchased, with information similar to the following:&lt;br /&gt;
 {&lt;br /&gt;
    short_description: &amp;quot;Python: Plus Galactic Hyperdrive. Extra Energy Unit. Docking Computers. E.C.M. System. Forward weapon upgraded to military laser. Price 215 000 ₢.&amp;quot;,&lt;br /&gt;
    shipdata_key: &amp;quot;python-player&amp;quot;,&lt;br /&gt;
    id: &amp;quot;675b6b-c60a74&amp;quot;,&lt;br /&gt;
    price: 215000,&lt;br /&gt;
    ship: {&lt;br /&gt;
      ...''[[shipdata.plist]]'' details of ship...&lt;br /&gt;
    },&lt;br /&gt;
    personality: 9807,&lt;br /&gt;
    extras: [&amp;quot;EQ_GAL_DRIVE&amp;quot;, &amp;quot;EQ_FUEL_SCOOPS&amp;quot;, &amp;quot;EQ_ENERGY_UNIT&amp;quot;, &amp;quot;EQ_FUEL_INJECTION&amp;quot;, &amp;quot;EQ_DOCK_COMP&amp;quot;, &amp;quot;EQ_ECM&amp;quot;]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;price&amp;lt;/code&amp;gt; is the amount being paid the for ship.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tradeIn&amp;lt;/code&amp;gt; is the trade in value of the current ship.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerBoughtNewShip|playerBoughtNewShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerWillReplaceShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{Oolite-method-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;playerWillReplaceShip&amp;lt;/code&amp;gt; handler is called just before a ship is replaced using [[Oolite JavaScript Reference: Player#replaceShip|&amp;lt;code&amp;gt;player.replaceShip()&amp;lt;/code&amp;gt;]]. May be needed to re-evaluate the old equipment as buying a new ship does not trigger equipment removal.&lt;br /&gt;
&lt;br /&gt;
 this.playerWillReplaceShip = function(dataKey)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; is the shipdata.plist &amp;lt;code&amp;gt;dataKey&amp;lt;/code&amp;gt; for the ship being purchased.&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[#playerReplacedShip|playerReplacedShip]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;chartHightlightModeChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.87}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;chartHighlightModeChanged&amp;lt;/code&amp;gt; handler is called whenever the highlight mode of the galactic chart is changed either manually (from player input) or programmatically (by setting the mode with &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: PlayerShip#chartHighlightMode|player.ship.chartHightlightMode]]&amp;lt;/code&amp;gt;). The &amp;quot;newMode&amp;quot; parameter will be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_SUNCOLOR&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_ECONOMY&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_GOVERNMENT&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;OOLRC_MODE_TECHLEVEL&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 this.chartHightlightModeChanged = function(newMode)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;compassTargetChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;compassTargetChanged&amp;lt;/code&amp;gt; handler is called when a new target is selected. Mode can be any of the following:&lt;br /&gt;
&lt;br /&gt;
 COMPASS_MODE_BASIC&lt;br /&gt;
 COMPASS_MODE_PLANET&lt;br /&gt;
 COMPASS_MODE_STATION&lt;br /&gt;
 COMPASS_MODE_SUN&lt;br /&gt;
 COMPASS_MODE_TARGET&lt;br /&gt;
 COMPASS_MODE_BEACONS&lt;br /&gt;
&lt;br /&gt;
script example &lt;br /&gt;
&lt;br /&gt;
 this.compassTargetChanged = function(whom, mode)&lt;br /&gt;
 {&lt;br /&gt;
      log(' Now targeting ' + whom);&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;dayChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;dayChanged&amp;lt;/code&amp;gt; handler is called each time a new day starts. At very low frame rates while the clock is updating, it is possible for this handler to be called twice in the same frame. Therefore, clock.days will not be correct for one of the calls. Use the day number (newday parameter) passed to the handler instead.&lt;br /&gt;
&lt;br /&gt;
 this.dayChanged = function(newday)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; handler is called at the end of the escape pod sequence, after the &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; event and just prior to the &amp;lt;code&amp;gt;shipWillDockWithStation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shipDockedWithStation&amp;lt;/code&amp;gt; events. &lt;br /&gt;
&lt;br /&gt;
Use this handler if you need to override the destination for the escape pod with [[Oolite_JavaScript_Reference:_Player#setEscapePodDestination|&amp;lt;code&amp;gt;player.setEscapePodDestination()&amp;lt;/code&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
 this.escapePodSequenceOver = function() &lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;guiScreenChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;guiScreenChanged&amp;lt;/code&amp;gt; handler is called when the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; changes. The ''from'' parameter is the screen it is leaving and ''to'' is the screen initially being switched to. Note that the screen can have changed again in the meantime by the action of other oxps. Therefore, it is generally better to test the global &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; to see which page is really on display instead of using the ''to'' parameter. (world script only)&lt;br /&gt;
&lt;br /&gt;
This handler will only fire when switched to/from any of the following:&lt;br /&gt;
&lt;br /&gt;
1.76: &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MAIN&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt;(F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MANIFEST&amp;quot;&amp;lt;/code&amp;gt;(F5F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;&amp;lt;/code&amp;gt;(F7), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_OPTIONS&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_EQUIP_SHIP&amp;quot;&amp;lt;/code&amp;gt;(F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHIPYARD&amp;quot;&amp;lt;/code&amp;gt;(F3F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;&amp;lt;/code&amp;gt;(F6), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_LONG_RANGE_CHART&amp;quot;&amp;lt;/code&amp;gt;(F6F6), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKET&amp;quot;&amp;lt;/code&amp;gt;(F8), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_CONTRACTS&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_REPORT&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.77: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_INTERFACES&amp;quot;&amp;lt;/code&amp;gt;(F4) and removes &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_CONTRACTS&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.81: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKETINFO&amp;quot;&amp;lt;/code&amp;gt;(F8F8)&lt;br /&gt;
&lt;br /&gt;
 this.guiScreenChanged = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;guiScreenWillChange&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;guiScreenWillChange&amp;lt;/code&amp;gt; handler is called when the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global#guiScreen|guiScreen]]&amp;lt;/code&amp;gt; is about to change.  On these screens, a script could change the content of the page to be displayed. (world script only)&lt;br /&gt;
&lt;br /&gt;
This handler will only fire when switching to/from any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_EQUIP_SHIP&amp;quot;&amp;lt;/code&amp;gt;(F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MANIFEST&amp;quot;&amp;lt;/code&amp;gt;(F5F5), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKET&amp;quot;&amp;lt;/code&amp;gt;(F8), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SHIPYARD&amp;quot;&amp;lt;/code&amp;gt;(F3F3), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;&amp;lt;/code&amp;gt;(F7)&lt;br /&gt;
&lt;br /&gt;
1.77: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_INTERFACES&amp;quot;&amp;lt;/code&amp;gt;(F4), &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_STATUS&amp;quot;&amp;lt;/code&amp;gt;(F5)&lt;br /&gt;
&lt;br /&gt;
1.81: adds &amp;lt;code&amp;gt;&amp;quot;GUI_SCREEN_MARKETINFO&amp;quot;&amp;lt;/code&amp;gt;(F8F8)&lt;br /&gt;
&lt;br /&gt;
 this.guiScreenWillChange = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;infoSystemChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;infoSystemChanged&amp;lt;/code&amp;gt; handler is called when the system displayed in F7 is changed, e.g. by moving the small blue cursor along the planned route in the chart.&lt;br /&gt;
&lt;br /&gt;
 this.infoSystemChanged = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;infoSystemWillChange&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;infoSystemWChange&amp;lt;/code&amp;gt; handler is called just before the system displayed in F7 is updated, e.g. by moving the small blue cursor along the planned route in the chart.&lt;br /&gt;
&lt;br /&gt;
 this.infoSystemWillChange = function(to, from)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;mfdKeyChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mfdKeyChanged&amp;lt;/code&amp;gt; handler is called whenever the player changes the content of an MFD slot. The &amp;lt;code&amp;gt;activeMFD&amp;lt;/code&amp;gt; parameter identifies which MFD slot is being changed, and the &amp;lt;code&amp;gt;mfdKey&amp;lt;/code&amp;gt; specifies the key code now in use in this slot.&lt;br /&gt;
&lt;br /&gt;
 this.mfdKeyChanged = function(activeMFD : integer, mfdKey : string)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''See also:''' &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: PlayerShip#setMultiFunctionDisplay|PlayerShip.setMultiFunctionDisplay()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionChoiceWasReset&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionChoiceWasReset&amp;lt;/code&amp;gt; handler is called when the mission choice is set to &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; via script (either using the legacy script method resetMissionChice or using &amp;lt;code&amp;gt;mission.runScreen ({choices: null})&amp;lt;/code&amp;gt; in javascript)&lt;br /&gt;
&lt;br /&gt;
 this.missionChoiceWasReset= function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionScreenEnded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionScreenEnded&amp;lt;/code&amp;gt; handler is called when a mission screen ends. Note that another script may have put up a new mission screen in the meantime. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.missionScreenEnded = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; handler is called if there are no mission/report screens active and the player's ship is docked. It gets fired at game startup, upon docking and after an arrival report or previous mission screen has ended.  (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.missionScreenOpportunity= function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This handler works a bit different from other handlers. It fires for every installed OXP/OXZ until one creates a mission screen during this handler, and then it stops. When the mission screen ends and there is no callback function that creates a new mission screen, the &amp;lt;code&amp;gt;missionScreenOpportunity&amp;lt;/code&amp;gt; is sent again to all installed OXPs/OXZs starting with the one that created the last mission screen. All this means is that when this handler fires, it is safe to show a mission screen and no further tests are needed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reportScreenEnded&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;reportScreenEnded&amp;lt;/code&amp;gt; handler is called when the last arrival-report  screen ends. This is a screen that should not be written by a missionscreen. The code should wait until this eventhandler fires. Note that an other script may have put up a new missionscreen in the meantime. (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.reportScreenEnded = function()&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;selectedMFDChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.85}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;selectedMFDChanged&amp;lt;/code&amp;gt; handler is send whenever the player selects a new MFD slot (normally using the default keypress &amp;quot;;&amp;quot;). The &amp;lt;code&amp;gt;activeMFD&amp;lt;/code&amp;gt; paramater is the index of the MFD which is now active.&lt;br /&gt;
&lt;br /&gt;
 this.selectedMFDChanged = function(activeMFD : integer)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipCollided&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipCollided&amp;lt;/code&amp;gt; handler is send after a collision with otherShip.&lt;br /&gt;
&lt;br /&gt;
 this.shipCollided = function(otherShip)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipSpawned&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipSpawned&amp;lt;/code&amp;gt; handler is called after an NPC ship has been added to the system. After a witchspace jump it means that first all ships are added to the system, then all the relevant shipSpawned events are triggered.&amp;lt;br&amp;gt;&lt;br /&gt;
This handler for the worldScript is new since Oolite 1.74. After the event is sent to the shipScript, it is now also send to the worldScript with the added entity as argument.&lt;br /&gt;
&lt;br /&gt;
 this.shipSpawned = function(ship)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;shipLaunchedEscapePod&amp;lt;/code&amp;gt; handler is called when the player bails out. This will be followed by the &amp;lt;code&amp;gt;escapePodSequenceOver&amp;lt;/code&amp;gt; event, and then a &amp;lt;code&amp;gt;shipWillDockWithStation()&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;shipDockedWithStation()&amp;lt;/code&amp;gt; pair after a few seconds.&lt;br /&gt;
&lt;br /&gt;
 this.shipLaunchedEscapePod = function(escapepod)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;systemInformationChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
{{oolite-method-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;systemInformationChanged&amp;lt;/code&amp;gt; handler is called when system information is modified. It is passed the galaxy and system ID which were changed, and the key and new value in the SystemInfo object.&lt;br /&gt;
&lt;br /&gt;
To avoid problems with recursion, attempting to change the value of any system information property from within this handler will fail and log an error. Also note that changes which take place while Oolite is not running (from OXP planetinfo.plist files) will not cause this handler to be called when the game is reloaded.&lt;br /&gt;
&lt;br /&gt;
 this.systemInformationChanged = function(galaxy,system,key,newValue)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;viewDirectionChanged&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;viewDirectionChanged&amp;lt;/code&amp;gt; handler is called when the player view changes, with a string to indicate which view the player is facing. Amongst its possible values are &amp;quot;VIEW_FORWARD&amp;quot;, &amp;quot;VIEW_AFT&amp;quot;, &amp;quot;VIEW_PORT&amp;quot;, &amp;quot;VIEW_STARBOARD&amp;quot;,&lt;br /&gt;
&amp;quot;VIEW_CUSTOM&amp;quot;,&lt;br /&gt;
&amp;quot;VIEW_GUI_DISPLAY&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 this.viewDirectionChanged = function(viewString)&lt;br /&gt;
 {&lt;br /&gt;
   if (viewString == &amp;quot;VIEW_PORT&amp;quot;)&lt;br /&gt;
   {&lt;br /&gt;
      // Your code here&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== System population ===&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.79 and later, functions are called to populate and repopulate the system. These functions do not have fixed names, as they depend on the system, but otherwise act like normal worldscript functions. [[Oolite System Populator|The populator page]] has more documentation on these functions.&lt;br /&gt;
&lt;br /&gt;
=== Defunct ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;equipmentDestroyed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
''Handler no longer exists in current stable version 1.80''&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;equipmentDestroyed&amp;lt;/code&amp;gt; handler is called when equipment gets destroyed completely beyond repair. (in strict mode, 1.77 or earlier only)  (world script only)&lt;br /&gt;
&lt;br /&gt;
 this.equipmentDestroyed = function(equipment)&lt;br /&gt;
 {&lt;br /&gt;
      // Your code here&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;tickle&amp;lt;/code&amp;gt; (removed in 1.77) ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tickle&amp;lt;/code&amp;gt; handler is called periodically-ish, whenever the old [[property list|plist]] scripts are updated. &amp;lt;code&amp;gt;tickle()&amp;lt;/code&amp;gt; is deprecated. In new code, use appropriate event handlers or [[Oolite JavaScript Reference: Timer|timers]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Missing Events ===&lt;br /&gt;
&lt;br /&gt;
All the initially planned events have been implemented in 1.74.&lt;br /&gt;
&lt;br /&gt;
If there are other events you would like to be able to respond to, please write a request [http://www.aegidian.org/bb/viewtopic.php?t=3296 on the forum].&lt;br /&gt;
&lt;br /&gt;
'''See also:''' [[Oolite JavaScript Reference: Ship script event handlers|ship script event handlers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=File:TionislaChronicleArray.oxz&amp;diff=79118</id>
		<title>File:TionislaChronicleArray.oxz</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=File:TionislaChronicleArray.oxz&amp;diff=79118"/>
		<updated>2023-06-07T13:45:39Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Alnivel uploaded a new version of File:TionislaChronicleArray.oxz&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Version 1.04&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Debug_OXP&amp;diff=79088</id>
		<title>Debug OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Debug_OXP&amp;diff=79088"/>
		<updated>2023-05-26T21:01:24Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* The console script */ Updated the example and added a section about using variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are developing OXPs, the Debug Console is a tool that you should keep handy at all times, because it enables you to test things that normally are either impossible to test without it, or require substantial effort to generate the right conditions for testing. '''Debug.oxp''' enables JavaScript console support in Oolite (1.70 and later). It also adds a menu with various debug facilities under Mac OS X.&lt;br /&gt;
&lt;br /&gt;
'''To run this OXP you need the [http://www.oolite.org/download/ ''OXP Developer release''] version of Oolite.''' There are subtle differences between the versions for each of the three platforms (AppleMac, Windows &amp;amp; Linux).&lt;br /&gt;
&lt;br /&gt;
=== Downloads ===&lt;br /&gt;
[[Media:Basic-debug.oxz|Basic-Debug OXZ for Oolite v1.83/84]]&lt;br /&gt;
&lt;br /&gt;
== External JavaScript console support ==&lt;br /&gt;
On all platforms, installing Debug.oxp enables support for external console applications using the [[Oolite debug console TCP protocol]]. By default, it will attempt to connect to a console running on the same computer, but this can be changed by specifying a different &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; (and, optionally, &amp;lt;code&amp;gt;console-port&amp;lt;/code&amp;gt;) in ''debugConfig.plist''. For external console support on the same computer under Mac OS X, &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; must be explicitly set to “127.0.0.1”; if this is not done, the [[#Integrated JavaScript console|integrated JavaScript console]] will be used instead. For information on using a console (integrated or external), see [[#Using the JavaScript console|Using the JavaScript console]] below.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' A cross-platform, python based, external console application is available in the [https://github.com/OoliteProject/oolite-debug-console/releases/download/v1.5/OoDebugConsole1.5.zip Oolite GitHub project] area.&lt;br /&gt;
&lt;br /&gt;
It contains a precompiled console for windows based computers, and the original python based console for Linux and Posix compliant computers.&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu Linux you will need python 2.6.x installed and (at least) the packages &amp;lt;code&amp;gt;blt python-tk tk8.5&amp;lt;/code&amp;gt; (or the equivalents in other distros.)&lt;br /&gt;
&lt;br /&gt;
== Mac OS X-specific features ==&lt;br /&gt;
Under Mac OS X, the Debug OXP provides a menu with various debugging options and an integrated JavaScript console, as well as enabling external console support as on all platforms. This was originally written by [http://www.aegidian.org/bb/viewtopic.php?f=8&amp;amp;t=3661 Jens Ayton/Ahruman] for version 1.69 (TR) back in 2007. To use this you need the '''Debug OXP''' in your AddOns folder ''and'' the '''Test Release''' version of Oolite.&lt;br /&gt;
&lt;br /&gt;
=== Debug menu (Mac OS X only) ===&lt;br /&gt;
[[Image:Oolite-debug-menu.png|494px]]&lt;br /&gt;
&lt;br /&gt;
The Debug menu provides options to&lt;br /&gt;
* Show the Oolite run log in the standard [[OXP_howto#OXP_Verifier|Console]] application.&lt;br /&gt;
* Enable or disable various classes of log message at runtime (like editing ''logcontrol.plist'', without the need to restart Oolite).&lt;br /&gt;
* Enable various testing features, such as drawing of bounding boxes.&lt;br /&gt;
* Show the JavaScript console, and specify when it should be shown automatically. (This may not have any effect with external consoles, depending on the external console implementation.)&lt;br /&gt;
* Create a ship of any role near the main station (equivalent to the &amp;lt;code&amp;gt;:spawn&amp;lt;/code&amp;gt; [[#Macros|macro]]).&lt;br /&gt;
Note: some of these features are implemented by sending JavaScript messages to the [[#The console script|console script]]. If the script has been modified, some features may not work properly.&lt;br /&gt;
&lt;br /&gt;
The Log Message Classes submenu can be modified by editing ''debugLogMessageClassesMenu.plist'', found inside the OXP. This is merged from Config directories in the usual fashion.&lt;br /&gt;
&lt;br /&gt;
=== Integrated JavaScript console (Mac OS X only) ===&lt;br /&gt;
[[Image:Oolite debug protocol example 1.png|594px]]&lt;br /&gt;
&lt;br /&gt;
The integrated JavaScript console provides a window within Oolite which acts as a [[#Using the JavaScript console|JavaScript console]]. It can be shown using the Show JavaScript Console command in the Debug menu, unless external console mode has been enabled by setting &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; in ''debugConfig.plist''.&lt;br /&gt;
&lt;br /&gt;
The integrated console has a 100-line memory. To see previous commands, press ⇞ (Page Up) or ⌥↑ (Option-Up Arrow). You can go the other way in the obvious manner.&lt;br /&gt;
&lt;br /&gt;
== Using the JavaScript console ==&lt;br /&gt;
The JavaScript console, whether integrated or external, provides a powerful mechanism for interactively manipulating the game world. It can be used to issue simple commands, like &amp;lt;code&amp;gt;player.ship.awardEquipment(&amp;quot;EQ_FUEL_INJECTION&amp;quot;)&amp;lt;/code&amp;gt;. It can be used to inspect properties of entities in the game world. And it can be used to develop scripts, by rewriting and testing methods of live ship scripts and world scripts.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
Macros are a special type of command prefixed with a colon. Instead of being interpreted as a JavaScript command, a macro is looked up in a dictionary, and the result is used as the “real” command. For instance, if you enter the command &amp;lt;code&amp;gt;:listM&amp;lt;/code&amp;gt; (short for “list macros”), the macro dictionary is queried for the string “listM”, and (by default) the code &amp;lt;code&amp;gt;for (let prop in macros) { ConsoleMessage('macro-list', ':' + prop) }&amp;lt;/code&amp;gt; is found and executed. This code is called the ''expansion'' of the macro. The result is a list of macros being printed:&lt;br /&gt;
 :clr&lt;br /&gt;
 :clear&lt;br /&gt;
 :spawn&lt;br /&gt;
 :bgColor&lt;br /&gt;
 :showM&lt;br /&gt;
 :rmFgColor&lt;br /&gt;
 ::&lt;br /&gt;
 :d&lt;br /&gt;
 :ds&lt;br /&gt;
 :listM&lt;br /&gt;
 :setM&lt;br /&gt;
 :delM&lt;br /&gt;
 :fgColor&lt;br /&gt;
 :rmBgColor&lt;br /&gt;
 :resetM&lt;br /&gt;
&lt;br /&gt;
As you can see in the example, To see the expansion of a macro without executing it, use &amp;lt;code&amp;gt;:showM&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;gt; :showM :delM&lt;br /&gt;
 :delM = deleteMacro(PARAM)&lt;br /&gt;
&lt;br /&gt;
When a macro with the word &amp;lt;code&amp;gt;PARAM&amp;lt;/code&amp;gt; is executed, &amp;lt;code&amp;gt;PARAM&amp;lt;/code&amp;gt; is replaced with any text following the macro name, surrounded in quotation marks. This is how &amp;lt;code&amp;gt;:showM&amp;lt;/code&amp;gt; functions, for example; the string “:showM :delM” is expanded to “showMacro(&amp;quot;:delM&amp;quot;)”, causing the JavaScript function &amp;lt;code&amp;gt;showMacro()&amp;lt;/code&amp;gt;, which is part of the [[#The console script|console script]], to be called. You can see the implementation of &amp;lt;code&amp;gt;showMacro()&amp;lt;/code&amp;gt; by entering &amp;lt;code&amp;gt;showMacro&amp;lt;/code&amp;gt; – without any parentheses – into the console.&lt;br /&gt;
&lt;br /&gt;
An initial set of macros is loaded from ''debugConfig.plist''. If you edit any macros, using &amp;lt;code&amp;gt;:setM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;:delM&amp;lt;/code&amp;gt;, all macros are saved in Oolite’s preferences from that point forwards. This means that you don’t have to re-enter any macros you write with &amp;lt;code&amp;gt;:setM&amp;lt;/code&amp;gt; after restarting Oolite.&lt;br /&gt;
&lt;br /&gt;
The following example creates a simple :msg macro:&lt;br /&gt;
 &amp;gt; :setM msg ConsoleMessage(' ',PARAM)&lt;br /&gt;
If you then type:&lt;br /&gt;
 &amp;gt; :msg Hello World&lt;br /&gt;
The macro will be expanded, and you'll see “Hello World” on the console. However, macros are not functions, so you cannot use macros in the middle of javascript, or as part of another macro.&lt;br /&gt;
&lt;br /&gt;
=== Console Properties ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;console&amp;lt;/code&amp;gt; object has several properties. To see the full list of them check &amp;lt;code&amp;gt;oolite-debug-console.js&amp;lt;/code&amp;gt; inside your copy of the Debug OXP.&lt;br /&gt;
&lt;br /&gt;
==== Debug Flags ====&lt;br /&gt;
 '''debugFlags''' : Number (integer, read/write)&lt;br /&gt;
An integer bit mask specifying various debug options. Note that the flags vary between builds.&lt;br /&gt;
The current flags can be seen in OODebugFlags.h in the Oolite source code, for instance at:&lt;br /&gt;
https://github.com/OoliteProject/oolite/blob/master/src/Core/Debug/OODebugFlags.h&lt;br /&gt;
&lt;br /&gt;
 DEBUG_LINKED_LISTS       = 0x00000001&lt;br /&gt;
 DEBUG_COLLISIONS         = 0x00000004&lt;br /&gt;
 DEBUG_DOCKING            = 0x00000008&lt;br /&gt;
 DEBUG_OCTREE_LOGGING     = 0x00000010&lt;br /&gt;
 DEBUG_BOUNDING_BOXES     = 0x00000040&lt;br /&gt;
 DEBUG_OCTREE_DRAW        = 0x00000080&lt;br /&gt;
 DEBUG_DRAW_NORMALS       = 0x00000100&lt;br /&gt;
 DEBUG_NO_DUST            = 0x00000200&lt;br /&gt;
 DEBUG_NO_SHADER_FALLBACK = 0x00000400&lt;br /&gt;
 DEBUG_SHADER_VALIDATION  = 0x00000800&lt;br /&gt;
 DEBUG_MISC               = 0x10000000&lt;br /&gt;
&lt;br /&gt;
To set flags, you can use either numeric literals directly or symbolic names as properties of the console object. For example, to toggle rendering of bounding boxes and surface normals, you might use:&lt;br /&gt;
 console.debugFlags ^= console.DEBUG_BOUNDING_BOXES;&lt;br /&gt;
 console.debugFlags ^= console.DEBUG_DRAW_NORMALS;&lt;br /&gt;
&lt;br /&gt;
This will work as well:&lt;br /&gt;
 console.debugFlags ^= 0x00000040;&lt;br /&gt;
 console.debugFlags ^= 0x00000100;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To disable everything just set it to zero:&lt;br /&gt;
 console.debugFlags = 0&lt;br /&gt;
&lt;br /&gt;
==== Shaders ====&lt;br /&gt;
 '''shaderMode''' : String (read/write)&lt;br /&gt;
A string specifying the current shader mode. One of the following:&lt;br /&gt;
* &amp;quot;SHADERS_NOT_SUPPORTED&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_OFF&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_SIMPLE&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_FULL&amp;quot;&lt;br /&gt;
If it is SHADERS_NOT_SUPPORTED, it cannot be set to any other value. If it is not SHADERS_NOT_SUPPORTED, it can be set to SHADERS_OFF, SHADERS_SIMPLE or SHADERS_FULL, unless maximumShaderMode (see below) is SHADERS_SIMPLE, in which case SHADERS_FULL is not allowed.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this is equivalent to &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Oolite#gameSettings|oolite.gameSettings]].shaderEffectsLevel&amp;lt;/code&amp;gt;, which is available even when the debug console is not active, but is read-only.&lt;br /&gt;
&lt;br /&gt;
 '''maximumShaderMode''' : String (read-only)&lt;br /&gt;
A string specifying the fanciest available shader mode. One of the following:&lt;br /&gt;
* &amp;quot;SHADERS_NOT_SUPPORTED&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_SIMPLE&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_FULL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 '''reducedDetailMode''': Boolean (read/write)&lt;br /&gt;
Whether reduced detail mode is in effect (simplifies graphics in various ways).&lt;br /&gt;
&lt;br /&gt;
 '''glVendorString''' : String (read-only)&lt;br /&gt;
&lt;br /&gt;
 '''glRendererString''' : String (read-only)&lt;br /&gt;
	Information about the OpenGL renderer.&lt;br /&gt;
&lt;br /&gt;
==== Error Logging ====&lt;br /&gt;
 '''dumpStackForErrors''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, when an error or exception is reported a stack trace will be written to the log (if possible). Ignored if not showing error locations.&lt;br /&gt;
&lt;br /&gt;
 '''dumpStackForWarnings''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, when a warning is reported a stack trace will be written to the log (if possible). Ignored if not showing error locations.&lt;br /&gt;
&lt;br /&gt;
 '''showErrorLocations''' : Boolean (read/write)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if file and line should be shown when reporting JavaScript errors and warnings. Default: &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 '''showErrorLocationsDuringConsoleEval''': Boolean (read/write)&lt;br /&gt;
Override value for showErrorLocations used while evaluating code entered in the console. Default: &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. (This information is generally not useful for code passed to eval().)&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous ====&lt;br /&gt;
 '''displayFPS''': Boolean (read/write)&lt;br /&gt;
Boolean specifying whether FPS (and associated information) should be displayed.&lt;br /&gt;
&lt;br /&gt;
 '''platformDescription''' : String (read-only)&lt;br /&gt;
Information about the system Oolite is running on. The format of this string is not guaranteed, do not attempt to parse it.&lt;br /&gt;
&lt;br /&gt;
 '''settings''' : Object&lt;br /&gt;
A key-value store that is saved persistently. Values from debugConfig.plist are used as defaults, and any changed values are stored with the game’s preferences.&lt;br /&gt;
&lt;br /&gt;
 '''ignoreDroppedPackets''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the TCP console will try to stay connected, ignoring dropped TCP packets, if &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; - will disconnect if an error affects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- There is also boolean pedanticMode (r/w), but I failed to find what this even means, except that it's not &amp;quot;use strict&amp;quot; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Profiling ===&lt;br /&gt;
{{QuoteText|Text=&lt;br /&gt;
Just pointing out the obvious here, but I think it needs to be noted that all these optimization techniques explained here are not themselves the objective, but the means to get performance. These techniques are not there to jump in and start writing complicated code. They should be used when there is need and where they are needed. And to find this out, the biggest weapon we have is profiling. I fully recommend that before you change anything in your code, you profile it and find out where it really needs attention. &lt;br /&gt;
&lt;br /&gt;
Oolite Test Release writes something in the log header that may have escaped the attention of many, but if you look more carefully, you'll see it: It says: Build options: [...] JavaScript profiling. So you can use Oolite itself to see where bottlenecks in your OXP might be and then you can apply all these techniques exactly where there is a gain to be obtained.&lt;br /&gt;
&lt;br /&gt;
. . .&lt;br /&gt;
&lt;br /&gt;
Once the bottlenecks have been identified, then you know where you need to turn to and apply all the tips contained here. If you want performance, always profile.&lt;br /&gt;
|Source=([http://www.aegidian.org/bb/viewtopic.php?p=257063#p257063 another_commander] regarding [[Optimization_tips|optimization tips]])}}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;profile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''profile'''(func : function [, this : Object]) : String&lt;br /&gt;
Time the specified function, report the time spent in various Oolite functions and how much time is excluded from the time limiter mechanism. If the second argument isn't specified it defaults to the console world script.&lt;br /&gt;
&lt;br /&gt;
Example of use:&lt;br /&gt;
 console.profile(function() { return this._systemName(42) }, worldScripts[&amp;quot;oolite-contracts-helpers&amp;quot;])&lt;br /&gt;
It will result in something like this:&lt;br /&gt;
 Total time: 0.059 ms&lt;br /&gt;
 JavaScript: 0.034 ms, native: 0.024 ms&lt;br /&gt;
 Counted towards limit: 0.0439983 ms, excluded: 0.0150017 ms&lt;br /&gt;
 Profiler overhead: 0.034 ms&lt;br /&gt;
                                                         NAME  T  COUNT    TOTAL     SELF  TOTAL%   SELF%  SELFMAX&lt;br /&gt;
                (oolite-contracts-helpers.js:161) &amp;lt;anonymous&amp;gt;  J      1     0.05     0.02    81.4    40.7     0.02&lt;br /&gt;
                                        SystemInfoGetProperty  N      4     0.02     0.01    28.8    20.3     0.01&lt;br /&gt;
                                (&amp;lt;console input&amp;gt;) &amp;lt;anonymous&amp;gt;  J      1     0.06     0.01    98.3    16.9     0.01&lt;br /&gt;
                                     GetJSSystemInfoForSystem  N      1     0.00     0.00     8.5     8.5     0.00&lt;br /&gt;
                                 OOJSNativeObjectFromJSObject  N      4     0.00     0.00     6.8     6.8     0.00&lt;br /&gt;
                                    SystemStaticInfoForSystem  N      1     0.01     0.00    10.2     1.7     0.00&lt;br /&gt;
                                         OOStringFromJSString  N      4     0.00     0.00     1.7     1.7     0.00&lt;br /&gt;
                                            GlobalGetProperty  N      1     0.00     0.00     1.7     1.7     0.00&lt;br /&gt;
     -[NSString(OOJavaScriptExtensions) oo:jsValueInContext:]  N      1     0.00     0.00     0.0     0.0     0.00&lt;br /&gt;
The table contains the trace of the calls, with separate metrics for each one of them, as well as their type (J for Javascript, N for Native).&lt;br /&gt;
&lt;br /&gt;
You may want to copy the result to the editor with a monospace font if the columns don't appear to be aligned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' while profile() is running, the time limiter is effectively disabled (specifically, it's set to ten million seconds).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;getProfile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''getProfile'''(func : function [, this : Object]) : Object&lt;br /&gt;
Like &amp;lt;code&amp;gt;profile()&amp;lt;/code&amp;gt;, but returns an object, which is more amenable to processing in scripts. To see the structure of the object, run:&lt;br /&gt;
 console.getProfile(function(){PS.position.add([0, 0, 0])})&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Seems like it is broken now - it just executes function silently, but it should do this - http://www.aegidian.org/bb/viewtopic.php?p=127089#p127089&lt;br /&gt;
==== &amp;lt;code&amp;gt;trace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''trace'''(func : function [, this : Object]) : Object&lt;br /&gt;
Logs the hierarchy of calls made, which can help track down where an error is occurring.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variables in the console ===&lt;br /&gt;
You may want to save the result of a command so that you can use it in one of the next commands. There are several ways to do this, as well as several pitfalls.&lt;br /&gt;
&lt;br /&gt;
First of all, as var, let and const limit the scope of the variable to the enclosing function, they do it as well for command scope, so do not use them if you want to reuse the result. In most cases, instead of this just assign the result to the variable without declaration - it will be stored in the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Global | global]]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
 &amp;gt; a // Check to ensure that the variable is not defined&lt;br /&gt;
 Exception: ReferenceError: a is not defined&lt;br /&gt;
 &amp;gt; a = 123&lt;br /&gt;
 123&lt;br /&gt;
 &amp;gt; global.a&lt;br /&gt;
 123&lt;br /&gt;
 &amp;gt; a&lt;br /&gt;
 123&lt;br /&gt;
 &amp;gt; global.a = 456&lt;br /&gt;
 456&lt;br /&gt;
 &amp;gt; a&lt;br /&gt;
 456&lt;br /&gt;
&lt;br /&gt;
It's the simplest way, and it has one minor pitfall - the variable name must not overlap with existing global properties from the Oolite or other OXPs.&lt;br /&gt;
&lt;br /&gt;
You can also use the console script's &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;. After defining the variable as a property of &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; it can be used without explicit &amp;lt;code&amp;gt;this&amp;lt;u&amp;gt;.&amp;lt;/u&amp;gt;&amp;lt;/code&amp;gt;. Property of &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; hides property of &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt;. See the example (continues the previous):&lt;br /&gt;
 &amp;gt; this.a = 789&lt;br /&gt;
 789&lt;br /&gt;
 &amp;gt; a&lt;br /&gt;
 789&lt;br /&gt;
 &amp;gt; global.a // still has the old value&lt;br /&gt;
 456&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; is [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this not a variable but keyword], and has somewhat non-obvious behaviour when used inside of functions (the example continues the previous):&lt;br /&gt;
 &amp;gt; f = function() { return a } // There is no local a, so it uses one from the command's this, if it wasn't there, it will it would use one from the global scope.&lt;br /&gt;
 &amp;gt; f()&lt;br /&gt;
 789&lt;br /&gt;
 &amp;gt; f = function() { return this.a }&lt;br /&gt;
 &amp;gt; f() // function called not as a method, so uses &amp;quot;global&amp;quot; as &amp;quot;this&amp;quot; (only in nonstrict code)&lt;br /&gt;
 456&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Predefined and special variables ====&lt;br /&gt;
The console also offers a few short aliases by default:&lt;br /&gt;
 P = player;&lt;br /&gt;
 PS = player.ship;&lt;br /&gt;
 S = system;&lt;br /&gt;
 M = missionVariables;&lt;br /&gt;
They added in the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; way and you can add your own - check the next section for it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The special variable &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; stores the last non-&amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; result:&lt;br /&gt;
 &amp;gt; system.addShipsToRoute(&amp;quot;trader&amp;quot;, 1, 1)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[Ship &amp;quot;Boa&amp;quot; position: (-105926, 56511.4, 896027) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;gt; $[0]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Ship &amp;quot;Boa&amp;quot; position: (-105926, 56511.4, 896027) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;gt; $.dataKey&lt;br /&gt;
 griff_boa_alt-NPC&lt;br /&gt;
 &amp;gt; $&lt;br /&gt;
 griff_boa_alt-NPC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The console script ===&lt;br /&gt;
While an external or integrated console is required to provide a means of user interaction, most of the actual behaviour of the console is implemented in JavaScript, in a script called ''oolite-debug-console.js''. Input typed into the console is passed to the console script, which then generates output. The console script is also informed of log messages and JavaScript errors, and provides a global function, &amp;lt;code&amp;gt;ConsoleMessage(colorCode: String, message: String)&amp;lt;/code&amp;gt;, to write messages to the console using its background colour support. Lastly, the console script implements the entire macro system.&lt;br /&gt;
&lt;br /&gt;
This means that the console’s behaviour can be extensively customized, for instance, by replacing the macro system with something more powerful. There are two basic approaches to doing this:&lt;br /&gt;
* Creating a custom script (or a copy) with the same name, in an OXP which loads later than Debug.oxp (e.g., one which has a name which comes later in alphabetical order).&lt;br /&gt;
* Using a normal world script, and changing the console script object at startup.&lt;br /&gt;
The latter approach has the advantage that it can continue to work with future versions of the console script, and multiple patches can coexist. For example, a modification to supplement the macro system with a better one might look as follows:&lt;br /&gt;
 this.name = &amp;quot;my-super-console-macros&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 this.startUp = function()&lt;br /&gt;
 {&lt;br /&gt;
     // Ensure debug console is installed&lt;br /&gt;
     if (!console)  return&lt;br /&gt;
     &lt;br /&gt;
     // Save the original implementation of consolePerformJSCommand&lt;br /&gt;
     // Note the prefix, used to ensure uniqueness. If several scripts patch&lt;br /&gt;
     // the same method, it's important that they use different names.&lt;br /&gt;
     console.script.mySuperConsoleMacros_original_consolePerformJSCommand = console.script.consolePerformJSCommand&lt;br /&gt;
     &lt;br /&gt;
     // Replace console.script.consolePerformJSCommand with custom function&lt;br /&gt;
     console.script.consolePerformJSCommand = function(command)&lt;br /&gt;
     {&lt;br /&gt;
         // Note that in this function &amp;quot;this&amp;quot; will refer to console.script, &amp;quot;oolite-debug-console&amp;quot;, not&lt;br /&gt;
         // &amp;quot;my-super-console-macros&amp;quot;, since the function will be called as a&lt;br /&gt;
         // method of the console.&lt;br /&gt;
         &lt;br /&gt;
         // Strip leading spaces, same code as the original function.&lt;br /&gt;
         while (command.charAt(0) == &amp;quot; &amp;quot;)&lt;br /&gt;
         {&lt;br /&gt;
             command = command.substring(1)&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         if (command.charAt(0) == &amp;quot;!&amp;quot;)&lt;br /&gt;
         {&lt;br /&gt;
             // Super macro call detected.&lt;br /&gt;
             // Insert super macro system here.&lt;br /&gt;
         }&lt;br /&gt;
         else&lt;br /&gt;
         {&lt;br /&gt;
             // Otherwise, call through to the original method.&lt;br /&gt;
             console.script.mySuperConsoleMacros_original_consolePerformJSCommand(command)&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
This same patching technique, incidentally, can be used to modify scripts at runtime, either from the console or from other scripts.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=3&amp;amp;t=20965 How do I? .... (on Debug Console)] (2021) - change system, change ship... - 2 pages&lt;br /&gt;
&lt;br /&gt;
* Debug console issues: [http://www.aegidian.org/bb/viewtopic.php?f=10&amp;amp;t=20877 Problem with external debug console on Mac] (2021+)&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20512 (WIP) new GUI for debug console] (CAG 2020) - an improved Debug console - see below&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20512 Debug Console] for Python and Windows (CAG 2020)&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=17731 Some Tips] on using the Debug Console (2015) - 1 page&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12030 Hints and tips for using the debug console] (2012) - 5 pages&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?f=9&amp;amp;t=12779 Handy tip for starting the Debug Console in Linux] (2012)&lt;br /&gt;
&lt;br /&gt;
{{misc-OXP}}&lt;br /&gt;
[[Category:Oolite utilities]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Debug_OXP&amp;diff=79087</id>
		<title>Debug OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Debug_OXP&amp;diff=79087"/>
		<updated>2023-05-26T18:10:18Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Added &amp;quot;Profiling&amp;quot; section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are developing OXPs, the Debug Console is a tool that you should keep handy at all times, because it enables you to test things that normally are either impossible to test without it, or require substantial effort to generate the right conditions for testing. '''Debug.oxp''' enables JavaScript console support in Oolite (1.70 and later). It also adds a menu with various debug facilities under Mac OS X.&lt;br /&gt;
&lt;br /&gt;
'''To run this OXP you need the [http://www.oolite.org/download/ ''OXP Developer release''] version of Oolite.''' There are subtle differences between the versions for each of the three platforms (AppleMac, Windows &amp;amp; Linux).&lt;br /&gt;
&lt;br /&gt;
=== Downloads ===&lt;br /&gt;
[[Media:Basic-debug.oxz|Basic-Debug OXZ for Oolite v1.83/84]]&lt;br /&gt;
&lt;br /&gt;
== External JavaScript console support ==&lt;br /&gt;
On all platforms, installing Debug.oxp enables support for external console applications using the [[Oolite debug console TCP protocol]]. By default, it will attempt to connect to a console running on the same computer, but this can be changed by specifying a different &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; (and, optionally, &amp;lt;code&amp;gt;console-port&amp;lt;/code&amp;gt;) in ''debugConfig.plist''. For external console support on the same computer under Mac OS X, &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; must be explicitly set to “127.0.0.1”; if this is not done, the [[#Integrated JavaScript console|integrated JavaScript console]] will be used instead. For information on using a console (integrated or external), see [[#Using the JavaScript console|Using the JavaScript console]] below.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' A cross-platform, python based, external console application is available in the [https://github.com/OoliteProject/oolite-debug-console/releases/download/v1.5/OoDebugConsole1.5.zip Oolite GitHub project] area.&lt;br /&gt;
&lt;br /&gt;
It contains a precompiled console for windows based computers, and the original python based console for Linux and Posix compliant computers.&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu Linux you will need python 2.6.x installed and (at least) the packages &amp;lt;code&amp;gt;blt python-tk tk8.5&amp;lt;/code&amp;gt; (or the equivalents in other distros.)&lt;br /&gt;
&lt;br /&gt;
== Mac OS X-specific features ==&lt;br /&gt;
Under Mac OS X, the Debug OXP provides a menu with various debugging options and an integrated JavaScript console, as well as enabling external console support as on all platforms. This was originally written by [http://www.aegidian.org/bb/viewtopic.php?f=8&amp;amp;t=3661 Jens Ayton/Ahruman] for version 1.69 (TR) back in 2007. To use this you need the '''Debug OXP''' in your AddOns folder ''and'' the '''Test Release''' version of Oolite.&lt;br /&gt;
&lt;br /&gt;
=== Debug menu (Mac OS X only) ===&lt;br /&gt;
[[Image:Oolite-debug-menu.png|494px]]&lt;br /&gt;
&lt;br /&gt;
The Debug menu provides options to&lt;br /&gt;
* Show the Oolite run log in the standard [[OXP_howto#OXP_Verifier|Console]] application.&lt;br /&gt;
* Enable or disable various classes of log message at runtime (like editing ''logcontrol.plist'', without the need to restart Oolite).&lt;br /&gt;
* Enable various testing features, such as drawing of bounding boxes.&lt;br /&gt;
* Show the JavaScript console, and specify when it should be shown automatically. (This may not have any effect with external consoles, depending on the external console implementation.)&lt;br /&gt;
* Create a ship of any role near the main station (equivalent to the &amp;lt;code&amp;gt;:spawn&amp;lt;/code&amp;gt; [[#Macros|macro]]).&lt;br /&gt;
Note: some of these features are implemented by sending JavaScript messages to the [[#The console script|console script]]. If the script has been modified, some features may not work properly.&lt;br /&gt;
&lt;br /&gt;
The Log Message Classes submenu can be modified by editing ''debugLogMessageClassesMenu.plist'', found inside the OXP. This is merged from Config directories in the usual fashion.&lt;br /&gt;
&lt;br /&gt;
=== Integrated JavaScript console (Mac OS X only) ===&lt;br /&gt;
[[Image:Oolite debug protocol example 1.png|594px]]&lt;br /&gt;
&lt;br /&gt;
The integrated JavaScript console provides a window within Oolite which acts as a [[#Using the JavaScript console|JavaScript console]]. It can be shown using the Show JavaScript Console command in the Debug menu, unless external console mode has been enabled by setting &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; in ''debugConfig.plist''.&lt;br /&gt;
&lt;br /&gt;
The integrated console has a 100-line memory. To see previous commands, press ⇞ (Page Up) or ⌥↑ (Option-Up Arrow). You can go the other way in the obvious manner.&lt;br /&gt;
&lt;br /&gt;
== Using the JavaScript console ==&lt;br /&gt;
The JavaScript console, whether integrated or external, provides a powerful mechanism for interactively manipulating the game world. It can be used to issue simple commands, like &amp;lt;code&amp;gt;player.ship.awardEquipment(&amp;quot;EQ_FUEL_INJECTION&amp;quot;)&amp;lt;/code&amp;gt;. It can be used to inspect properties of entities in the game world. And it can be used to develop scripts, by rewriting and testing methods of live ship scripts and world scripts.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
Macros are a special type of command prefixed with a colon. Instead of being interpreted as a JavaScript command, a macro is looked up in a dictionary, and the result is used as the “real” command. For instance, if you enter the command &amp;lt;code&amp;gt;:listM&amp;lt;/code&amp;gt; (short for “list macros”), the macro dictionary is queried for the string “listM”, and (by default) the code &amp;lt;code&amp;gt;for (let prop in macros) { ConsoleMessage('macro-list', ':' + prop) }&amp;lt;/code&amp;gt; is found and executed. This code is called the ''expansion'' of the macro. The result is a list of macros being printed:&lt;br /&gt;
 :clr&lt;br /&gt;
 :clear&lt;br /&gt;
 :spawn&lt;br /&gt;
 :bgColor&lt;br /&gt;
 :showM&lt;br /&gt;
 :rmFgColor&lt;br /&gt;
 ::&lt;br /&gt;
 :d&lt;br /&gt;
 :ds&lt;br /&gt;
 :listM&lt;br /&gt;
 :setM&lt;br /&gt;
 :delM&lt;br /&gt;
 :fgColor&lt;br /&gt;
 :rmBgColor&lt;br /&gt;
 :resetM&lt;br /&gt;
&lt;br /&gt;
As you can see in the example, To see the expansion of a macro without executing it, use &amp;lt;code&amp;gt;:showM&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;gt; :showM :delM&lt;br /&gt;
 :delM = deleteMacro(PARAM)&lt;br /&gt;
&lt;br /&gt;
When a macro with the word &amp;lt;code&amp;gt;PARAM&amp;lt;/code&amp;gt; is executed, &amp;lt;code&amp;gt;PARAM&amp;lt;/code&amp;gt; is replaced with any text following the macro name, surrounded in quotation marks. This is how &amp;lt;code&amp;gt;:showM&amp;lt;/code&amp;gt; functions, for example; the string “:showM :delM” is expanded to “showMacro(&amp;quot;:delM&amp;quot;)”, causing the JavaScript function &amp;lt;code&amp;gt;showMacro()&amp;lt;/code&amp;gt;, which is part of the [[#The console script|console script]], to be called. You can see the implementation of &amp;lt;code&amp;gt;showMacro()&amp;lt;/code&amp;gt; by entering &amp;lt;code&amp;gt;showMacro&amp;lt;/code&amp;gt; – without any parentheses – into the console.&lt;br /&gt;
&lt;br /&gt;
An initial set of macros is loaded from ''debugConfig.plist''. If you edit any macros, using &amp;lt;code&amp;gt;:setM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;:delM&amp;lt;/code&amp;gt;, all macros are saved in Oolite’s preferences from that point forwards. This means that you don’t have to re-enter any macros you write with &amp;lt;code&amp;gt;:setM&amp;lt;/code&amp;gt; after restarting Oolite.&lt;br /&gt;
&lt;br /&gt;
The following example creates a simple :msg macro:&lt;br /&gt;
 &amp;gt; :setM msg ConsoleMessage(' ',PARAM)&lt;br /&gt;
If you then type:&lt;br /&gt;
 &amp;gt; :msg Hello World&lt;br /&gt;
The macro will be expanded, and you'll see “Hello World” on the console. However, macros are not functions, so you cannot use macros in the middle of javascript, or as part of another macro.&lt;br /&gt;
&lt;br /&gt;
=== Console Properties ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;console&amp;lt;/code&amp;gt; object has several properties. To see the full list of them check &amp;lt;code&amp;gt;oolite-debug-console.js&amp;lt;/code&amp;gt; inside your copy of the Debug OXP.&lt;br /&gt;
&lt;br /&gt;
==== Debug Flags ====&lt;br /&gt;
 '''debugFlags''' : Number (integer, read/write)&lt;br /&gt;
An integer bit mask specifying various debug options. Note that the flags vary between builds.&lt;br /&gt;
The current flags can be seen in OODebugFlags.h in the Oolite source code, for instance at:&lt;br /&gt;
https://github.com/OoliteProject/oolite/blob/master/src/Core/Debug/OODebugFlags.h&lt;br /&gt;
&lt;br /&gt;
 DEBUG_LINKED_LISTS       = 0x00000001&lt;br /&gt;
 DEBUG_COLLISIONS         = 0x00000004&lt;br /&gt;
 DEBUG_DOCKING            = 0x00000008&lt;br /&gt;
 DEBUG_OCTREE_LOGGING     = 0x00000010&lt;br /&gt;
 DEBUG_BOUNDING_BOXES     = 0x00000040&lt;br /&gt;
 DEBUG_OCTREE_DRAW        = 0x00000080&lt;br /&gt;
 DEBUG_DRAW_NORMALS       = 0x00000100&lt;br /&gt;
 DEBUG_NO_DUST            = 0x00000200&lt;br /&gt;
 DEBUG_NO_SHADER_FALLBACK = 0x00000400&lt;br /&gt;
 DEBUG_SHADER_VALIDATION  = 0x00000800&lt;br /&gt;
 DEBUG_MISC               = 0x10000000&lt;br /&gt;
&lt;br /&gt;
To set flags, you can use either numeric literals directly or symbolic names as properties of the console object. For example, to toggle rendering of bounding boxes and surface normals, you might use:&lt;br /&gt;
 console.debugFlags ^= console.DEBUG_BOUNDING_BOXES;&lt;br /&gt;
 console.debugFlags ^= console.DEBUG_DRAW_NORMALS;&lt;br /&gt;
&lt;br /&gt;
This will work as well:&lt;br /&gt;
 console.debugFlags ^= 0x00000040;&lt;br /&gt;
 console.debugFlags ^= 0x00000100;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To disable everything just set it to zero:&lt;br /&gt;
 console.debugFlags = 0&lt;br /&gt;
&lt;br /&gt;
==== Shaders ====&lt;br /&gt;
 '''shaderMode''' : String (read/write)&lt;br /&gt;
A string specifying the current shader mode. One of the following:&lt;br /&gt;
* &amp;quot;SHADERS_NOT_SUPPORTED&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_OFF&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_SIMPLE&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_FULL&amp;quot;&lt;br /&gt;
If it is SHADERS_NOT_SUPPORTED, it cannot be set to any other value. If it is not SHADERS_NOT_SUPPORTED, it can be set to SHADERS_OFF, SHADERS_SIMPLE or SHADERS_FULL, unless maximumShaderMode (see below) is SHADERS_SIMPLE, in which case SHADERS_FULL is not allowed.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this is equivalent to &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Oolite#gameSettings|oolite.gameSettings]].shaderEffectsLevel&amp;lt;/code&amp;gt;, which is available even when the debug console is not active, but is read-only.&lt;br /&gt;
&lt;br /&gt;
 '''maximumShaderMode''' : String (read-only)&lt;br /&gt;
A string specifying the fanciest available shader mode. One of the following:&lt;br /&gt;
* &amp;quot;SHADERS_NOT_SUPPORTED&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_SIMPLE&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_FULL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 '''reducedDetailMode''': Boolean (read/write)&lt;br /&gt;
Whether reduced detail mode is in effect (simplifies graphics in various ways).&lt;br /&gt;
&lt;br /&gt;
 '''glVendorString''' : String (read-only)&lt;br /&gt;
&lt;br /&gt;
 '''glRendererString''' : String (read-only)&lt;br /&gt;
	Information about the OpenGL renderer.&lt;br /&gt;
&lt;br /&gt;
==== Error Logging ====&lt;br /&gt;
 '''dumpStackForErrors''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, when an error or exception is reported a stack trace will be written to the log (if possible). Ignored if not showing error locations.&lt;br /&gt;
&lt;br /&gt;
 '''dumpStackForWarnings''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, when a warning is reported a stack trace will be written to the log (if possible). Ignored if not showing error locations.&lt;br /&gt;
&lt;br /&gt;
 '''showErrorLocations''' : Boolean (read/write)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if file and line should be shown when reporting JavaScript errors and warnings. Default: &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 '''showErrorLocationsDuringConsoleEval''': Boolean (read/write)&lt;br /&gt;
Override value for showErrorLocations used while evaluating code entered in the console. Default: &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. (This information is generally not useful for code passed to eval().)&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous ====&lt;br /&gt;
 '''displayFPS''': Boolean (read/write)&lt;br /&gt;
Boolean specifying whether FPS (and associated information) should be displayed.&lt;br /&gt;
&lt;br /&gt;
 '''platformDescription''' : String (read-only)&lt;br /&gt;
Information about the system Oolite is running on. The format of this string is not guaranteed, do not attempt to parse it.&lt;br /&gt;
&lt;br /&gt;
 '''settings''' : Object&lt;br /&gt;
A key-value store that is saved persistently. Values from debugConfig.plist are used as defaults, and any changed values are stored with the game’s preferences.&lt;br /&gt;
&lt;br /&gt;
 '''ignoreDroppedPackets''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the TCP console will try to stay connected, ignoring dropped TCP packets, if &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; - will disconnect if an error affects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- There is also boolean pedanticMode (r/w), but I failed to find what this even means, except that it's not &amp;quot;use strict&amp;quot; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Profiling ===&lt;br /&gt;
{{QuoteText|Text=&lt;br /&gt;
Just pointing out the obvious here, but I think it needs to be noted that all these optimization techniques explained here are not themselves the objective, but the means to get performance. These techniques are not there to jump in and start writing complicated code. They should be used when there is need and where they are needed. And to find this out, the biggest weapon we have is profiling. I fully recommend that before you change anything in your code, you profile it and find out where it really needs attention. &lt;br /&gt;
&lt;br /&gt;
Oolite Test Release writes something in the log header that may have escaped the attention of many, but if you look more carefully, you'll see it: It says: Build options: [...] JavaScript profiling. So you can use Oolite itself to see where bottlenecks in your OXP might be and then you can apply all these techniques exactly where there is a gain to be obtained.&lt;br /&gt;
&lt;br /&gt;
. . .&lt;br /&gt;
&lt;br /&gt;
Once the bottlenecks have been identified, then you know where you need to turn to and apply all the tips contained here. If you want performance, always profile.&lt;br /&gt;
|Source=([http://www.aegidian.org/bb/viewtopic.php?p=257063#p257063 another_commander] regarding [[Optimization_tips|optimization tips]])}}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;profile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''profile'''(func : function [, this : Object]) : String&lt;br /&gt;
Time the specified function, report the time spent in various Oolite functions and how much time is excluded from the time limiter mechanism. If the second argument isn't specified it defaults to the console world script.&lt;br /&gt;
&lt;br /&gt;
Example of use:&lt;br /&gt;
 console.profile(function() { return this._systemName(42) }, worldScripts[&amp;quot;oolite-contracts-helpers&amp;quot;])&lt;br /&gt;
It will result in something like this:&lt;br /&gt;
 Total time: 0.059 ms&lt;br /&gt;
 JavaScript: 0.034 ms, native: 0.024 ms&lt;br /&gt;
 Counted towards limit: 0.0439983 ms, excluded: 0.0150017 ms&lt;br /&gt;
 Profiler overhead: 0.034 ms&lt;br /&gt;
                                                         NAME  T  COUNT    TOTAL     SELF  TOTAL%   SELF%  SELFMAX&lt;br /&gt;
                (oolite-contracts-helpers.js:161) &amp;lt;anonymous&amp;gt;  J      1     0.05     0.02    81.4    40.7     0.02&lt;br /&gt;
                                        SystemInfoGetProperty  N      4     0.02     0.01    28.8    20.3     0.01&lt;br /&gt;
                                (&amp;lt;console input&amp;gt;) &amp;lt;anonymous&amp;gt;  J      1     0.06     0.01    98.3    16.9     0.01&lt;br /&gt;
                                     GetJSSystemInfoForSystem  N      1     0.00     0.00     8.5     8.5     0.00&lt;br /&gt;
                                 OOJSNativeObjectFromJSObject  N      4     0.00     0.00     6.8     6.8     0.00&lt;br /&gt;
                                    SystemStaticInfoForSystem  N      1     0.01     0.00    10.2     1.7     0.00&lt;br /&gt;
                                         OOStringFromJSString  N      4     0.00     0.00     1.7     1.7     0.00&lt;br /&gt;
                                            GlobalGetProperty  N      1     0.00     0.00     1.7     1.7     0.00&lt;br /&gt;
     -[NSString(OOJavaScriptExtensions) oo:jsValueInContext:]  N      1     0.00     0.00     0.0     0.0     0.00&lt;br /&gt;
The table contains the trace of the calls, with separate metrics for each one of them, as well as their type (J for Javascript, N for Native).&lt;br /&gt;
&lt;br /&gt;
You may want to copy the result to the editor with a monospace font if the columns don't appear to be aligned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' while profile() is running, the time limiter is effectively disabled (specifically, it's set to ten million seconds).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;getProfile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''getProfile'''(func : function [, this : Object]) : Object&lt;br /&gt;
Like &amp;lt;code&amp;gt;profile()&amp;lt;/code&amp;gt;, but returns an object, which is more amenable to processing in scripts. To see the structure of the object, run:&lt;br /&gt;
 console.getProfile(function(){PS.position.add([0, 0, 0])})&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Seems like it is broken now - it just executes function silently, but it should do this - http://www.aegidian.org/bb/viewtopic.php?p=127089#p127089&lt;br /&gt;
==== &amp;lt;code&amp;gt;trace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''trace'''(func : function [, this : Object]) : Object&lt;br /&gt;
Logs the hierarchy of calls made, which can help track down where an error is occurring.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The console script ===&lt;br /&gt;
While an external or integrated console is required to provide a means of user interaction, most of the actual behaviour of the console is implemented in JavaScript, in a script called ''oolite-debug-console.js''. Input typed into the console is passed to the console script, which then generates output. The console script is also informed of log messages and JavaScript errors, and provides a global function, &amp;lt;code&amp;gt;ConsoleMessage(colorCode: String, message: String)&amp;lt;/code&amp;gt;, to write messages to the console using its background colour support. Lastly, the console script implements the entire macro system.&lt;br /&gt;
&lt;br /&gt;
This means that the console’s behaviour can be extensively customized, for instance, by replacing the macro system with something more powerful. There are two basic approaches to doing this:&lt;br /&gt;
* Creating a custom script (or a copy) with the same name, in an OXP which loads later than Debug.oxp (e.g., one which has a name which comes later in alphabetical order).&lt;br /&gt;
* Using a normal world script, and changing the console script object at startup.&lt;br /&gt;
The latter approach has the advantage that it can continue to work with future versions of the console script, and multiple patches can coexist. For example, a modification to supplement the macro system with a better one might look as follows:&lt;br /&gt;
 this.name = &amp;quot;my-super-console-macros&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 this.startUp = function()&lt;br /&gt;
 {&lt;br /&gt;
     // Ensure debug console is installed&lt;br /&gt;
     if (!debugConsole)  return&lt;br /&gt;
     &lt;br /&gt;
     // Save original implementation of consolePerformJSCommand&lt;br /&gt;
     // Note the prefix, used to ensure uniqueness. If several scripts patch&lt;br /&gt;
     // the same method, it's important that they use different names.&lt;br /&gt;
     debugConsole.mySuperConsoleMacros_original_consolePerformJSCommand = debugConsole.consolePerformJSCommand&lt;br /&gt;
     &lt;br /&gt;
     // Replace debugConsole.consolePerformJSCommand with custom function&lt;br /&gt;
     debugConsole.consolePerformJSCommand = function(command)&lt;br /&gt;
     {&lt;br /&gt;
         // Note that in this function &amp;quot;this&amp;quot; will refer to debugconsole, not&lt;br /&gt;
         // my-super-console-macros, since the function will be called as a&lt;br /&gt;
         // method of debugConsole.&lt;br /&gt;
         &lt;br /&gt;
         // Strip leading spaces, same code as original function.&lt;br /&gt;
         while (command.charAt(0) == &amp;quot; &amp;quot;)&lt;br /&gt;
         {&lt;br /&gt;
             command = command.substring(1)&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         if (command.charAt(0) == &amp;quot;!&amp;quot;)&lt;br /&gt;
         {&lt;br /&gt;
             // Super macro call detected.&lt;br /&gt;
             // Insert super macro system here.&lt;br /&gt;
         }&lt;br /&gt;
         else&lt;br /&gt;
         {&lt;br /&gt;
             // Otherwise, call through to original method.&lt;br /&gt;
             debugConsole.mySuperConsoleMacros_original_consolePerformJSCommand(command)&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
This same patching technique, incidentally, can be used to modify scripts at runtime, either from the console or from other scripts.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=3&amp;amp;t=20965 How do I? .... (on Debug Console)] (2021) - change system, change ship... - 2 pages&lt;br /&gt;
&lt;br /&gt;
* Debug console issues: [http://www.aegidian.org/bb/viewtopic.php?f=10&amp;amp;t=20877 Problem with external debug console on Mac] (2021+)&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20512 (WIP) new GUI for debug console] (CAG 2020) - an improved Debug console - see below&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20512 Debug Console] for Python and Windows (CAG 2020)&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=17731 Some Tips] on using the Debug Console (2015) - 1 page&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12030 Hints and tips for using the debug console] (2012) - 5 pages&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?f=9&amp;amp;t=12779 Handy tip for starting the Debug Console in Linux] (2012)&lt;br /&gt;
&lt;br /&gt;
{{misc-OXP}}&lt;br /&gt;
[[Category:Oolite utilities]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Debug_OXP&amp;diff=79086</id>
		<title>Debug OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Debug_OXP&amp;diff=79086"/>
		<updated>2023-05-26T16:59:09Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Console Properties */ Rearranged and formatted section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are developing OXPs, the Debug Console is a tool that you should keep handy at all times, because it enables you to test things that normally are either impossible to test without it, or require substantial effort to generate the right conditions for testing. '''Debug.oxp''' enables JavaScript console support in Oolite (1.70 and later). It also adds a menu with various debug facilities under Mac OS X.&lt;br /&gt;
&lt;br /&gt;
'''To run this OXP you need the [http://www.oolite.org/download/ ''OXP Developer release''] version of Oolite.''' There are subtle differences between the versions for each of the three platforms (AppleMac, Windows &amp;amp; Linux).&lt;br /&gt;
&lt;br /&gt;
=== Downloads ===&lt;br /&gt;
[[Media:Basic-debug.oxz|Basic-Debug OXZ for Oolite v1.83/84]]&lt;br /&gt;
&lt;br /&gt;
== External JavaScript console support ==&lt;br /&gt;
On all platforms, installing Debug.oxp enables support for external console applications using the [[Oolite debug console TCP protocol]]. By default, it will attempt to connect to a console running on the same computer, but this can be changed by specifying a different &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; (and, optionally, &amp;lt;code&amp;gt;console-port&amp;lt;/code&amp;gt;) in ''debugConfig.plist''. For external console support on the same computer under Mac OS X, &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; must be explicitly set to “127.0.0.1”; if this is not done, the [[#Integrated JavaScript console|integrated JavaScript console]] will be used instead. For information on using a console (integrated or external), see [[#Using the JavaScript console|Using the JavaScript console]] below.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' A cross-platform, python based, external console application is available in the [https://github.com/OoliteProject/oolite-debug-console/releases/download/v1.5/OoDebugConsole1.5.zip Oolite GitHub project] area.&lt;br /&gt;
&lt;br /&gt;
It contains a precompiled console for windows based computers, and the original python based console for Linux and Posix compliant computers.&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu Linux you will need python 2.6.x installed and (at least) the packages &amp;lt;code&amp;gt;blt python-tk tk8.5&amp;lt;/code&amp;gt; (or the equivalents in other distros.)&lt;br /&gt;
&lt;br /&gt;
== Mac OS X-specific features ==&lt;br /&gt;
Under Mac OS X, the Debug OXP provides a menu with various debugging options and an integrated JavaScript console, as well as enabling external console support as on all platforms. This was originally written by [http://www.aegidian.org/bb/viewtopic.php?f=8&amp;amp;t=3661 Jens Ayton/Ahruman] for version 1.69 (TR) back in 2007. To use this you need the '''Debug OXP''' in your AddOns folder ''and'' the '''Test Release''' version of Oolite.&lt;br /&gt;
&lt;br /&gt;
=== Debug menu (Mac OS X only) ===&lt;br /&gt;
[[Image:Oolite-debug-menu.png|494px]]&lt;br /&gt;
&lt;br /&gt;
The Debug menu provides options to&lt;br /&gt;
* Show the Oolite run log in the standard [[OXP_howto#OXP_Verifier|Console]] application.&lt;br /&gt;
* Enable or disable various classes of log message at runtime (like editing ''logcontrol.plist'', without the need to restart Oolite).&lt;br /&gt;
* Enable various testing features, such as drawing of bounding boxes.&lt;br /&gt;
* Show the JavaScript console, and specify when it should be shown automatically. (This may not have any effect with external consoles, depending on the external console implementation.)&lt;br /&gt;
* Create a ship of any role near the main station (equivalent to the &amp;lt;code&amp;gt;:spawn&amp;lt;/code&amp;gt; [[#Macros|macro]]).&lt;br /&gt;
Note: some of these features are implemented by sending JavaScript messages to the [[#The console script|console script]]. If the script has been modified, some features may not work properly.&lt;br /&gt;
&lt;br /&gt;
The Log Message Classes submenu can be modified by editing ''debugLogMessageClassesMenu.plist'', found inside the OXP. This is merged from Config directories in the usual fashion.&lt;br /&gt;
&lt;br /&gt;
=== Integrated JavaScript console (Mac OS X only) ===&lt;br /&gt;
[[Image:Oolite debug protocol example 1.png|594px]]&lt;br /&gt;
&lt;br /&gt;
The integrated JavaScript console provides a window within Oolite which acts as a [[#Using the JavaScript console|JavaScript console]]. It can be shown using the Show JavaScript Console command in the Debug menu, unless external console mode has been enabled by setting &amp;lt;code&amp;gt;console-host&amp;lt;/code&amp;gt; in ''debugConfig.plist''.&lt;br /&gt;
&lt;br /&gt;
The integrated console has a 100-line memory. To see previous commands, press ⇞ (Page Up) or ⌥↑ (Option-Up Arrow). You can go the other way in the obvious manner.&lt;br /&gt;
&lt;br /&gt;
== Using the JavaScript console ==&lt;br /&gt;
The JavaScript console, whether integrated or external, provides a powerful mechanism for interactively manipulating the game world. It can be used to issue simple commands, like &amp;lt;code&amp;gt;player.ship.awardEquipment(&amp;quot;EQ_FUEL_INJECTION&amp;quot;)&amp;lt;/code&amp;gt;. It can be used to inspect properties of entities in the game world. And it can be used to develop scripts, by rewriting and testing methods of live ship scripts and world scripts.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
Macros are a special type of command prefixed with a colon. Instead of being interpreted as a JavaScript command, a macro is looked up in a dictionary, and the result is used as the “real” command. For instance, if you enter the command &amp;lt;code&amp;gt;:listM&amp;lt;/code&amp;gt; (short for “list macros”), the macro dictionary is queried for the string “listM”, and (by default) the code &amp;lt;code&amp;gt;for (let prop in macros) { ConsoleMessage('macro-list', ':' + prop) }&amp;lt;/code&amp;gt; is found and executed. This code is called the ''expansion'' of the macro. The result is a list of macros being printed:&lt;br /&gt;
 :clr&lt;br /&gt;
 :clear&lt;br /&gt;
 :spawn&lt;br /&gt;
 :bgColor&lt;br /&gt;
 :showM&lt;br /&gt;
 :rmFgColor&lt;br /&gt;
 ::&lt;br /&gt;
 :d&lt;br /&gt;
 :ds&lt;br /&gt;
 :listM&lt;br /&gt;
 :setM&lt;br /&gt;
 :delM&lt;br /&gt;
 :fgColor&lt;br /&gt;
 :rmBgColor&lt;br /&gt;
 :resetM&lt;br /&gt;
&lt;br /&gt;
As you can see in the example, To see the expansion of a macro without executing it, use &amp;lt;code&amp;gt;:showM&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;gt; :showM :delM&lt;br /&gt;
 :delM = deleteMacro(PARAM)&lt;br /&gt;
&lt;br /&gt;
When a macro with the word &amp;lt;code&amp;gt;PARAM&amp;lt;/code&amp;gt; is executed, &amp;lt;code&amp;gt;PARAM&amp;lt;/code&amp;gt; is replaced with any text following the macro name, surrounded in quotation marks. This is how &amp;lt;code&amp;gt;:showM&amp;lt;/code&amp;gt; functions, for example; the string “:showM :delM” is expanded to “showMacro(&amp;quot;:delM&amp;quot;)”, causing the JavaScript function &amp;lt;code&amp;gt;showMacro()&amp;lt;/code&amp;gt;, which is part of the [[#The console script|console script]], to be called. You can see the implementation of &amp;lt;code&amp;gt;showMacro()&amp;lt;/code&amp;gt; by entering &amp;lt;code&amp;gt;showMacro&amp;lt;/code&amp;gt; – without any parentheses – into the console.&lt;br /&gt;
&lt;br /&gt;
An initial set of macros is loaded from ''debugConfig.plist''. If you edit any macros, using &amp;lt;code&amp;gt;:setM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;:delM&amp;lt;/code&amp;gt;, all macros are saved in Oolite’s preferences from that point forwards. This means that you don’t have to re-enter any macros you write with &amp;lt;code&amp;gt;:setM&amp;lt;/code&amp;gt; after restarting Oolite.&lt;br /&gt;
&lt;br /&gt;
The following example creates a simple :msg macro:&lt;br /&gt;
 &amp;gt; :setM msg ConsoleMessage(' ',PARAM)&lt;br /&gt;
If you then type:&lt;br /&gt;
 &amp;gt; :msg Hello World&lt;br /&gt;
The macro will be expanded, and you'll see “Hello World” on the console. However, macros are not functions, so you cannot use macros in the middle of javascript, or as part of another macro.&lt;br /&gt;
&lt;br /&gt;
=== Console Properties ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;console&amp;lt;/code&amp;gt; object has several properties. To see the full list of them check &amp;lt;code&amp;gt;oolite-debug-console.js&amp;lt;/code&amp;gt; inside your copy of the Debug OXP.&lt;br /&gt;
&lt;br /&gt;
==== Debug Flags ====&lt;br /&gt;
 '''debugFlags''' : Number (integer, read/write)&lt;br /&gt;
An integer bit mask specifying various debug options. Note that the flags vary between builds.&lt;br /&gt;
The current flags can be seen in OODebugFlags.h in the Oolite source code, for instance at:&lt;br /&gt;
https://github.com/OoliteProject/oolite/blob/master/src/Core/Debug/OODebugFlags.h&lt;br /&gt;
&lt;br /&gt;
 DEBUG_LINKED_LISTS       = 0x00000001&lt;br /&gt;
 DEBUG_COLLISIONS         = 0x00000004&lt;br /&gt;
 DEBUG_DOCKING            = 0x00000008&lt;br /&gt;
 DEBUG_OCTREE_LOGGING     = 0x00000010&lt;br /&gt;
 DEBUG_BOUNDING_BOXES     = 0x00000040&lt;br /&gt;
 DEBUG_OCTREE_DRAW        = 0x00000080&lt;br /&gt;
 DEBUG_DRAW_NORMALS       = 0x00000100&lt;br /&gt;
 DEBUG_NO_DUST            = 0x00000200&lt;br /&gt;
 DEBUG_NO_SHADER_FALLBACK = 0x00000400&lt;br /&gt;
 DEBUG_SHADER_VALIDATION  = 0x00000800&lt;br /&gt;
 DEBUG_MISC               = 0x10000000&lt;br /&gt;
&lt;br /&gt;
To set flags, you can use either numeric literals directly or symbolic names as properties of the console object. For example, to toggle rendering of bounding boxes and surface normals, you might use:&lt;br /&gt;
 console.debugFlags ^= console.DEBUG_BOUNDING_BOXES;&lt;br /&gt;
 console.debugFlags ^= console.DEBUG_DRAW_NORMALS;&lt;br /&gt;
&lt;br /&gt;
This will work as well:&lt;br /&gt;
 console.debugFlags ^= 0x00000040;&lt;br /&gt;
 console.debugFlags ^= 0x00000100;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To disable everything just set it to zero:&lt;br /&gt;
 console.debugFlags = 0&lt;br /&gt;
&lt;br /&gt;
==== Shaders ====&lt;br /&gt;
 '''shaderMode''' : String (read/write)&lt;br /&gt;
A string specifying the current shader mode. One of the following:&lt;br /&gt;
* &amp;quot;SHADERS_NOT_SUPPORTED&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_OFF&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_SIMPLE&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_FULL&amp;quot;&lt;br /&gt;
If it is SHADERS_NOT_SUPPORTED, it cannot be set to any other value. If it is not SHADERS_NOT_SUPPORTED, it can be set to SHADERS_OFF, SHADERS_SIMPLE or SHADERS_FULL, unless maximumShaderMode (see below) is SHADERS_SIMPLE, in which case SHADERS_FULL is not allowed.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this is equivalent to &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Oolite#gameSettings|oolite.gameSettings]].shaderEffectsLevel&amp;lt;/code&amp;gt;, which is available even when the debug console is not active, but is read-only.&lt;br /&gt;
&lt;br /&gt;
 '''maximumShaderMode''' : String (read-only)&lt;br /&gt;
A string specifying the fanciest available shader mode. One of the following:&lt;br /&gt;
* &amp;quot;SHADERS_NOT_SUPPORTED&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_SIMPLE&amp;quot;&lt;br /&gt;
* &amp;quot;SHADERS_FULL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 '''reducedDetailMode''': Boolean (read/write)&lt;br /&gt;
Whether reduced detail mode is in effect (simplifies graphics in various ways).&lt;br /&gt;
&lt;br /&gt;
 '''glVendorString''' : String (read-only)&lt;br /&gt;
&lt;br /&gt;
 '''glRendererString''' : String (read-only)&lt;br /&gt;
	Information about the OpenGL renderer.&lt;br /&gt;
&lt;br /&gt;
==== Error Logging ====&lt;br /&gt;
 '''dumpStackForErrors''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, when an error or exception is reported a stack trace will be written to the log (if possible). Ignored if not showing error locations.&lt;br /&gt;
&lt;br /&gt;
 '''dumpStackForWarnings''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, when a warning is reported a stack trace will be written to the log (if possible). Ignored if not showing error locations.&lt;br /&gt;
&lt;br /&gt;
 '''showErrorLocations''' : Boolean (read/write)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if file and line should be shown when reporting JavaScript errors and warnings. Default: &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 '''showErrorLocationsDuringConsoleEval''': Boolean (read/write)&lt;br /&gt;
Override value for showErrorLocations used while evaluating code entered in the console. Default: &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. (This information is generally not useful for code passed to eval().)&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous ====&lt;br /&gt;
 '''displayFPS''': Boolean (read/write)&lt;br /&gt;
Boolean specifying whether FPS (and associated information) should be displayed.&lt;br /&gt;
&lt;br /&gt;
 '''platformDescription''' : String (read-only)&lt;br /&gt;
Information about the system Oolite is running on. The format of this string is not guaranteed, do not attempt to parse it.&lt;br /&gt;
&lt;br /&gt;
 '''settings''' : Object&lt;br /&gt;
A key-value store that is saved persistently. Values from debugConfig.plist are used as defaults, and any changed values are stored with the game’s preferences.&lt;br /&gt;
&lt;br /&gt;
 '''ignoreDroppedPackets''' : Boolean (read/write)&lt;br /&gt;
If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the TCP console will try to stay connected, ignoring dropped TCP packets, if &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; - will disconnect if an error affects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- There is also boolean pedanticMode (r/w), but I failed to find what this even means, except that it's not &amp;quot;use strict&amp;quot; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The console script ===&lt;br /&gt;
While an external or integrated console is required to provide a means of user interaction, most of the actual behaviour of the console is implemented in JavaScript, in a script called ''oolite-debug-console.js''. Input typed into the console is passed to the console script, which then generates output. The console script is also informed of log messages and JavaScript errors, and provides a global function, &amp;lt;code&amp;gt;ConsoleMessage(colorCode: String, message: String)&amp;lt;/code&amp;gt;, to write messages to the console using its background colour support. Lastly, the console script implements the entire macro system.&lt;br /&gt;
&lt;br /&gt;
This means that the console’s behaviour can be extensively customized, for instance, by replacing the macro system with something more powerful. There are two basic approaches to doing this:&lt;br /&gt;
* Creating a custom script (or a copy) with the same name, in an OXP which loads later than Debug.oxp (e.g., one which has a name which comes later in alphabetical order).&lt;br /&gt;
* Using a normal world script, and changing the console script object at startup.&lt;br /&gt;
The latter approach has the advantage that it can continue to work with future versions of the console script, and multiple patches can coexist. For example, a modification to supplement the macro system with a better one might look as follows:&lt;br /&gt;
 this.name = &amp;quot;my-super-console-macros&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 this.startUp = function()&lt;br /&gt;
 {&lt;br /&gt;
     // Ensure debug console is installed&lt;br /&gt;
     if (!debugConsole)  return&lt;br /&gt;
     &lt;br /&gt;
     // Save original implementation of consolePerformJSCommand&lt;br /&gt;
     // Note the prefix, used to ensure uniqueness. If several scripts patch&lt;br /&gt;
     // the same method, it's important that they use different names.&lt;br /&gt;
     debugConsole.mySuperConsoleMacros_original_consolePerformJSCommand = debugConsole.consolePerformJSCommand&lt;br /&gt;
     &lt;br /&gt;
     // Replace debugConsole.consolePerformJSCommand with custom function&lt;br /&gt;
     debugConsole.consolePerformJSCommand = function(command)&lt;br /&gt;
     {&lt;br /&gt;
         // Note that in this function &amp;quot;this&amp;quot; will refer to debugconsole, not&lt;br /&gt;
         // my-super-console-macros, since the function will be called as a&lt;br /&gt;
         // method of debugConsole.&lt;br /&gt;
         &lt;br /&gt;
         // Strip leading spaces, same code as original function.&lt;br /&gt;
         while (command.charAt(0) == &amp;quot; &amp;quot;)&lt;br /&gt;
         {&lt;br /&gt;
             command = command.substring(1)&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         if (command.charAt(0) == &amp;quot;!&amp;quot;)&lt;br /&gt;
         {&lt;br /&gt;
             // Super macro call detected.&lt;br /&gt;
             // Insert super macro system here.&lt;br /&gt;
         }&lt;br /&gt;
         else&lt;br /&gt;
         {&lt;br /&gt;
             // Otherwise, call through to original method.&lt;br /&gt;
             debugConsole.mySuperConsoleMacros_original_consolePerformJSCommand(command)&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
This same patching technique, incidentally, can be used to modify scripts at runtime, either from the console or from other scripts.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=3&amp;amp;t=20965 How do I? .... (on Debug Console)] (2021) - change system, change ship... - 2 pages&lt;br /&gt;
&lt;br /&gt;
* Debug console issues: [http://www.aegidian.org/bb/viewtopic.php?f=10&amp;amp;t=20877 Problem with external debug console on Mac] (2021+)&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20512 (WIP) new GUI for debug console] (CAG 2020) - an improved Debug console - see below&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20512 Debug Console] for Python and Windows (CAG 2020)&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=17731 Some Tips] on using the Debug Console (2015) - 1 page&lt;br /&gt;
* [http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=12030 Hints and tips for using the debug console] (2012) - 5 pages&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?f=9&amp;amp;t=12779 Handy tip for starting the Debug Console in Linux] (2012)&lt;br /&gt;
&lt;br /&gt;
{{misc-OXP}}&lt;br /&gt;
[[Category:Oolite utilities]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78999</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78999"/>
		<updated>2023-05-05T00:45:14Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Properties of the Planet */ Added illumination_color and minor tweaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0: default, all information visible&lt;br /&gt;
* 100 or more: F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more: system name is not shown&lt;br /&gt;
* 300 or more: system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 7 indicating the government type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;goverment&amp;quot; = &amp;quot;7&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Anarchy&lt;br /&gt;
: 1: Feudal&lt;br /&gt;
: 2: Multi-Governmental&lt;br /&gt;
: 3: Dictatorship&lt;br /&gt;
: 4: Communist&lt;br /&gt;
: 5: Confederacy&lt;br /&gt;
: 6: Democracy&lt;br /&gt;
: 7: Corporate State&lt;br /&gt;
&lt;br /&gt;
==Economy==&lt;br /&gt;
An integer between 0 and 7 indicating the economy type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;economy&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Rich Industrial&lt;br /&gt;
: 1: Average Industrial&lt;br /&gt;
: 2: Poor Industrial&lt;br /&gt;
: 3: Mainly Industrial&lt;br /&gt;
: 4: Mainly Agricultural&lt;br /&gt;
: 5: Rich Agricultural&lt;br /&gt;
: 6: Average Agricultural&lt;br /&gt;
: 7: Poor Agricultural&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Air Color==&lt;br /&gt;
A colour specifier determining the color of the planet's sky, as well as the atmosphere scatter color.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Air Color Mix Ratio==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The amount of air color that be mixed in the overall atmosphere color. A number from 0.0 to 1.0 (default 0.5).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color_mix_ratio&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Air Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A number clamped in range from 0.0 to 1.0 describing the density of the planet's atmosphere. All planets in the core use 0.75 as default.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_density&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Illumination Color==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A colour specifier determining the colour of the planet's illumination such as cities light. Illumination is inserted as a grayscale map in the alpha channel of the planet's diffuse texture. You can specify this key even if no illumination map is defined, but it won't have any effect - without an illumination map the dark side of the planet remains dark in all cases.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;illumination_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Terminator Threshold Vector==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
This property gives control over the color of the planet's terminator. The way the property works is not entirely straightforward, so see [http://aegidian.org/bb/viewtopic.php?p=271058#p271058 this post on BB] for more information.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;terminator_threshold_vector&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
By default the terminator vector is &amp;quot;0.105 0.18 0.28&amp;quot; - which results in a reddish orange colour.&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also define your own custom planets and moons:&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--They also can be added through script_actions, but it's deprecated and even commented out on this page--&amp;gt;&lt;br /&gt;
To add them to the system, use JS methods &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addPlanet]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addMoon]]&amp;lt;/code&amp;gt;. For the example above, the &amp;lt;code&amp;gt;planetInfoKey&amp;lt;/code&amp;gt; will be &amp;lt;code&amp;gt;&amp;quot;LavesPurpleMoon&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Position==&lt;br /&gt;
Position of the planet in space. The first parameter is 3-character code of the coordinate system, other three is x, y and z components of position vector.&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
You can omit the coordinate system parameter, then the absolute coordinate system will be used:&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See [[Oolite coordinate systems]] for more info about it.&lt;br /&gt;
&lt;br /&gt;
==Orientation==&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Other keys==&lt;br /&gt;
&lt;br /&gt;
You can use other keys from the [[#Properties_of_the_Planet| Properties of the Planet]] section for your planets and moons.&lt;br /&gt;
&lt;br /&gt;
Here are some of the keys you may want to use:&lt;br /&gt;
* &amp;quot;radius&amp;quot;: Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
* &amp;quot;rotational_velocity&amp;quot;: Rotation of the planet in rotations per second.&lt;br /&gt;
* &amp;quot;texture&amp;quot;: The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
* &amp;quot;seed&amp;quot;: Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Planet&amp;diff=78998</id>
		<title>Oolite JavaScript Reference: Planet</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Planet&amp;diff=78998"/>
		<updated>2023-05-05T00:34:08Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Properties */ Added missing properties&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;'''Prototype:''' &amp;lt;code&amp;gt;[[Oolite/Development/Scripting/Class/Entity|Entity]]&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;'''Subtypes:''' none&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''&amp;lt;code&amp;gt;Planet&amp;lt;/code&amp;gt;''' class is an &amp;lt;code&amp;gt;[[Oolite/Development/Scripting/Class/Entity|Entity]]&amp;lt;/code&amp;gt; representing a planet or moon. A &amp;lt;code&amp;gt;Planet&amp;lt;/code&amp;gt; has all the properties and methods of a &amp;lt;code&amp;gt;Entity&amp;lt;/code&amp;gt;, and several others.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
=== &amp;lt;code&amp;gt;airColor&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
 '''airColor''' : Array (read/write)&lt;br /&gt;
The colour of the planets atmosphere. An array of RGBA components, but can be set with any other [[Materials_in_Oolite#Colour_specifiers|colour specifier]].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;airColorMixRatio&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
 '''airColorMixRatio''' : Number (read/write)&lt;br /&gt;
The amount of air colour that be mixed in the overall atmosphere color. A number from 0.0 to 1.0.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;airDensity&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
 '''airDensity''' : Number (read/write)&lt;br /&gt;
The density of the planet's atmosphere. A number from 0.0 to 1.0.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;hasAtmosphere&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''hasAtmosphere''' : Boolean (read-only)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the entity has an atmosphere, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise. Planets created with the &amp;lt;code&amp;gt;System.[[Oolite/Development/Scripting/Class/System#addMoon|addMoon]]()&amp;lt;/code&amp;gt; method (or corresponding legacy scripting method) have no atmosphere, other planets do.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;illuminationColor&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
 '''illuminationColor''' : Array (read/write)&lt;br /&gt;
The colour of the planet's illumination such as cities light. An array of RGBA components, but can be set with any other [[Materials_in_Oolite#Colour_specifiers|colour specifier]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Illumination is inserted as a grayscale map in the alpha channel of the planet's diffuse texture. If no illumination map is defined, then you can still access this property but you will not see any difference by changing it - without an illumination map the dark side of the planet remains dark in all cases.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;isMainPlanet&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''isMainPlanet''' : Boolean (read-only)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the entity is the main planet of the current system, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise.&lt;br /&gt;
&lt;br /&gt;
'''See also''': &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: System#mainPlanet|system.mainPlanet]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
 '''name''' : String (read/write)&lt;br /&gt;
The name of the planet, as set by the &amp;lt;code&amp;gt;planet_name&amp;lt;/code&amp;gt; property in [[planetinfo.plist]]&lt;br /&gt;
&lt;br /&gt;
For convenience of working with secondary planets, this can be written to by JS. For the system main planet, writing to &amp;lt;code&amp;gt;system.info.planet_name&amp;lt;/code&amp;gt; is preferred.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;radius&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''radius''' : Number (read-only)&lt;br /&gt;
The equatorial radius of the planet, in metres.&lt;br /&gt;
&lt;br /&gt;
For reference: radii of main planets generated by Oolite vary between 28160 and 69110 meters. This value is shown on the planet information screen as: 2816 km to 6911 km. (Note the discrepancy of a factor 100.)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;rotationalVelocity&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''rotationalVelocity''' : Number (read/write)&lt;br /&gt;
The rotation speed of a planet. A value of x means:  x/Math.PI rotations per second. The main planet default value is pseudorandom and varies between 0.0 until 0.01&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;texture&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''texture''' : String (read/write)&lt;br /&gt;
&lt;br /&gt;
The name of the texture file (diffuse map) used by the planet. This may only be assigned to during the &amp;lt;code&amp;gt;shipWillExitWitchspace&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shipWillLaunchFromStation&amp;lt;/code&amp;gt; events.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;terminatorThresholdVector&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
 '''terminatorThresholdVector''' : [[Oolite JavaScript Reference: Vector|Vector]] (read/write)&lt;br /&gt;
&lt;br /&gt;
This property gives control over the color of the planet's terminator. The way the property works is not entirely straightforward, so see [http://aegidian.org/bb/viewtopic.php?p=271058#p271058 this post on BB] for more information.&lt;br /&gt;
&lt;br /&gt;
== Non-standard Properties ==&lt;br /&gt;
''These are not part of the official object model, but are used in various OXPs by the authors to allow manipulation of the OXP by other scripts and expansions. '''Important:''' the use of custom properties without a unique OXP-specific prefix is '''strongly discouraged''' and may cause conflicts with future versions of Oolite.''&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;solarGasGiant&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''solarGasGiant''' : Boolean (read/write)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the entity is a gas giant and should therefore prevent attempts to land on the planet's surface, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise.  Created for the Solar System OXP and used by the [[Planetfall OXP]].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;PFNoLand&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PFNoLandQuiet&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''PFNoLand''' : Boolean (read/write)&lt;br /&gt;
 '''PFNoLandQuiet''' : Boolean (read/write)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if landing will be prevented on the planet's surface (with and without a warning message), &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise.  Created and used by the [[Planetfall OXP]] from version 1.40 onwards.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;isGasGiant&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''isGasGiant''' : Boolean (read/write)&lt;br /&gt;
&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the entity is a gas giant, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise.  Created and used by the [[System_Redux_(Oolite) | System Redux OXP]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78997</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78997"/>
		<updated>2023-05-04T23:45:57Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Additional Planets */ Rearranged section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0: default, all information visible&lt;br /&gt;
* 100 or more: F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more: system name is not shown&lt;br /&gt;
* 300 or more: system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 7 indicating the government type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;goverment&amp;quot; = &amp;quot;7&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Anarchy&lt;br /&gt;
: 1: Feudal&lt;br /&gt;
: 2: Multi-Governmental&lt;br /&gt;
: 3: Dictatorship&lt;br /&gt;
: 4: Communist&lt;br /&gt;
: 5: Confederacy&lt;br /&gt;
: 6: Democracy&lt;br /&gt;
: 7: Corporate State&lt;br /&gt;
&lt;br /&gt;
==Economy==&lt;br /&gt;
An integer between 0 and 7 indicating the economy type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;economy&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Rich Industrial&lt;br /&gt;
: 1: Average Industrial&lt;br /&gt;
: 2: Poor Industrial&lt;br /&gt;
: 3: Mainly Industrial&lt;br /&gt;
: 4: Mainly Agricultural&lt;br /&gt;
: 5: Rich Agricultural&lt;br /&gt;
: 6: Average Agricultural&lt;br /&gt;
: 7: Poor Agricultural&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Air color==&lt;br /&gt;
A colour specifier determining the color of the planet's sky, as well as the atmosphere scatter color.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Air Color Mix Ratio==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The amount of air color that be mixed in the overall atmosphere color. A number from 0.0 to 1.0 (default 0.5).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color_mix_ratio&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Atmosphere Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A number clamped in range from 0.0 to 1.0 describing the density of the planet's atmosphere. All planets in the core use 0.75 as default.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_density&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Terminator Threshold Vector==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
This property gives control over the color of the planet's terminator. The way the property works is not entirely straightforward, so see [http://aegidian.org/bb/viewtopic.php?p=271058#p271058 this post on BB] for more information.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;terminator_threshold_vector&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
By default the terminator vector is &amp;quot;0.105 0.18 0.28&amp;quot; - which results in a reddish orange colour.&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also define your own custom planets and moons:&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--They also can be added through script_actions, but it's deprecated and even commented out on this page--&amp;gt;&lt;br /&gt;
To add them to the system, use JS methods &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addPlanet]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_System#addPlanet|system.addMoon]]&amp;lt;/code&amp;gt;. For the example above, the &amp;lt;code&amp;gt;planetInfoKey&amp;lt;/code&amp;gt; will be &amp;lt;code&amp;gt;&amp;quot;LavesPurpleMoon&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Position==&lt;br /&gt;
Position of the planet in space. The first parameter is 3-character code of the coordinate system, other three is x, y and z components of position vector.&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
You can omit the coordinate system parameter, then the absolute coordinate system will be used:&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See [[Oolite coordinate systems]] for more info about it.&lt;br /&gt;
&lt;br /&gt;
==Orientation==&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Other keys==&lt;br /&gt;
&lt;br /&gt;
You can use other keys from the [[#Properties_of_the_Planet| Properties of the Planet]] section for your planets and moons.&lt;br /&gt;
&lt;br /&gt;
Here are some of the keys you may want to use:&lt;br /&gt;
* &amp;quot;radius&amp;quot;: Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
* &amp;quot;rotational_velocity&amp;quot;: Rotation of the planet in rotations per second.&lt;br /&gt;
* &amp;quot;texture&amp;quot;: The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
* &amp;quot;seed&amp;quot;: Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78996</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78996"/>
		<updated>2023-05-04T22:14:48Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Properties of the Planet */ Added air_color, air_color_mix_ratio, terminator_threshold_vector properties, tweaked air_density&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0: default, all information visible&lt;br /&gt;
* 100 or more: F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more: system name is not shown&lt;br /&gt;
* 300 or more: system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 7 indicating the government type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;goverment&amp;quot; = &amp;quot;7&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Anarchy&lt;br /&gt;
: 1: Feudal&lt;br /&gt;
: 2: Multi-Governmental&lt;br /&gt;
: 3: Dictatorship&lt;br /&gt;
: 4: Communist&lt;br /&gt;
: 5: Confederacy&lt;br /&gt;
: 6: Democracy&lt;br /&gt;
: 7: Corporate State&lt;br /&gt;
&lt;br /&gt;
==Economy==&lt;br /&gt;
An integer between 0 and 7 indicating the economy type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;economy&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Rich Industrial&lt;br /&gt;
: 1: Average Industrial&lt;br /&gt;
: 2: Poor Industrial&lt;br /&gt;
: 3: Mainly Industrial&lt;br /&gt;
: 4: Mainly Agricultural&lt;br /&gt;
: 5: Rich Agricultural&lt;br /&gt;
: 6: Average Agricultural&lt;br /&gt;
: 7: Poor Agricultural&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Air color==&lt;br /&gt;
A colour specifier determining the color of the planet's sky, as well as the atmosphere scatter color.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Air Color Mix Ratio==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The amount of air color that be mixed in the overall atmosphere color. A number from 0.0 to 1.0 (default 0.5).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_color_mix_ratio&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Atmosphere Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
&lt;br /&gt;
A number clamped in range from 0.0 to 1.0 describing the density of the planet's atmosphere. All planets in the core use 0.75 as default.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;air_density&amp;quot; = &amp;quot;0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Terminator Threshold Vector==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
This property gives control over the color of the planet's terminator. The way the property works is not entirely straightforward, so see [http://aegidian.org/bb/viewtopic.php?p=271058#p271058 this post on BB] for more information.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;terminator_threshold_vector&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
By default the terminator vector is &amp;quot;0.105 0.18 0.28&amp;quot; - which results in a reddish orange colour.&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
{{oolite-prop-added|1.89}}&lt;br /&gt;
&lt;br /&gt;
The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also add keys for your own custom planets and moons, eg.&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The contents of the { could be:&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct)&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Position of the planet in space. You can use 3 or 4 parameters. With only 3 parameters the internal absolute coordinates are used. &lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
or&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Rotation of the planet in rotations per second.&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = &amp;quot;1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
 &amp;quot;texture&amp;quot; = &amp;quot;grid.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
 &amp;quot;seed&amp;quot; = &amp;quot;1 2 3 4 5 6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
A lot of the keys for the main planet, like: '''percent_land''', can also used in custom planets.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78995</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78995"/>
		<updated>2023-05-04T20:50:41Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* About the Inhabitants */ Uniform properties format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0: default, all information visible&lt;br /&gt;
* 100 or more: F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more: system name is not shown&lt;br /&gt;
* 300 or more: system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 7 indicating the government type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;goverment&amp;quot; = &amp;quot;7&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Anarchy&lt;br /&gt;
: 1: Feudal&lt;br /&gt;
: 2: Multi-Governmental&lt;br /&gt;
: 3: Dictatorship&lt;br /&gt;
: 4: Communist&lt;br /&gt;
: 5: Confederacy&lt;br /&gt;
: 6: Democracy&lt;br /&gt;
: 7: Corporate State&lt;br /&gt;
&lt;br /&gt;
==Economy==&lt;br /&gt;
An integer between 0 and 7 indicating the economy type of the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;economy&amp;quot; = &amp;quot;5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Possible values:&lt;br /&gt;
: 0: Rich Industrial&lt;br /&gt;
: 1: Average Industrial&lt;br /&gt;
: 2: Poor Industrial&lt;br /&gt;
: 3: Mainly Industrial&lt;br /&gt;
: 4: Mainly Agricultural&lt;br /&gt;
: 5: Rich Agricultural&lt;br /&gt;
: 6: Average Agricultural&lt;br /&gt;
: 7: Poor Agricultural&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Atmosphere Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
 Added by an ignoramus - needs editing by one of our cognoscenti&lt;br /&gt;
See [http://aegidian.org/bb/viewtopic.php?p=272721#p272721 another_commander » Sun Nov 22, 2020 2:26 pm]&lt;br /&gt;
In tomorrow's nightly we will have a little upgrade in the planet properties: atmosphere density.&lt;br /&gt;
&lt;br /&gt;
Some planets can be made to have denser atmosphere than others. This will allow for more variety in planets' appearance. To achieve this, you can use either the planetinfo.plist property air_density or the Javascript planet entity airDensity. The accepted value range is from 0.0 to 1.0 and anything outside of this range will be automatically clamped. We default all planets to 0.75 in the core.&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
(1.81 or later)&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
(Oolite v1.89 and higher). The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also add keys for your own custom planets and moons, eg.&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The contents of the { could be:&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct)&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Position of the planet in space. You can use 3 or 4 parameters. With only 3 parameters the internal absolute coordinates are used. &lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
or&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Rotation of the planet in rotations per second.&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = &amp;quot;1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
 &amp;quot;texture&amp;quot; = &amp;quot;grid.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
 &amp;quot;seed&amp;quot; = &amp;quot;1 2 3 4 5 6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
A lot of the keys for the main planet, like: '''percent_land''', can also used in custom planets.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78994</id>
		<title>Planetinfo.plist</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Planetinfo.plist&amp;diff=78994"/>
		<updated>2023-05-04T20:15:15Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* About the Inhabitants */ Added the concealment property&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''planetinfo.[[plist]]''' in 'AddOns/Config' contains a dictionary for each of systems for which you wish to set custom data. A list of all galaxies and planets can be found [[Oolite planet list|here]]. Each of the properties mentioned below can be set (but, notably, not the location of the main planet, which is hard coded into the system seed value):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.91 ===&lt;br /&gt;
*air_density / or the Javascript planet entity airDensity - see below (pretty picture!) &lt;br /&gt;
&lt;br /&gt;
=== Added for Oolite v.1.89 ===&lt;br /&gt;
 This needs editing by somebody who understands it! Snatched from the Progress thread&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270737#p270737 air_color] now produces the right color for the sky. Not only that, it is now used as the atmosphere scatter color when the planet is viewed from space. Non-blue atmospheres are finally possible!&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=270771#p270771 air_color_mix_ratio]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 terminator_threshold_vector shipdata key]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=271058#p271058 JSPlanet terminatorThresholdVector property]&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=269833#p269833 MULTIPLIER_LIGHTSRCRADIANCE and MULITPLIER_EXPOSURE]: Planet, ships and atmosphere shaders can now define lightsource radiance and scene exposure multipliers&lt;br /&gt;
*Also stuff about city lights&lt;br /&gt;
*And probably other stuff I missed!&lt;br /&gt;
&lt;br /&gt;
=Where Settings Apply=&lt;br /&gt;
&lt;br /&gt;
==Universal Settings==&lt;br /&gt;
&lt;br /&gt;
Some options can be applied to the entire universe, such as ambient lighting levels, eg.&lt;br /&gt;
 &amp;quot;universal&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
Universal options can be over-ridden by specifying the same option for a specific system or location in interstellar space. Obviously, not all options make sense to apply to the whole universe.&lt;br /&gt;
&lt;br /&gt;
==Interstellar Space==&lt;br /&gt;
&lt;br /&gt;
Conditions for interstellar space in general can be set with the “interstellar space” key.&lt;br /&gt;
&lt;br /&gt;
==Specific Systems==&lt;br /&gt;
&lt;br /&gt;
Each system is keyed by a string consisting of the galaxy number (0..7) followed by a space and then the planet number (0..255), eg.&lt;br /&gt;
 &amp;quot;0 7&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies system 7, in galaxy 0, ''Lave''.&lt;br /&gt;
&lt;br /&gt;
==Specific Interstellar Spaces==&lt;br /&gt;
&lt;br /&gt;
You can also specify a position in interstellar space, eg.&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
specifies the space in galaxy 0 between systems 7 and 129, ''Lave'' and ''Zaonce''.&lt;br /&gt;
&lt;br /&gt;
In 1.81 the property &amp;quot;link_color&amp;quot; when set on a specific interstellar space changes the colour of the link between the two systems in the advanced navigation array (assuming no route is in place above it).&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
 &amp;quot;interstellar: 0 7 129&amp;quot; = // jumping from Lave towards Zaonce&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 &amp;quot;interstellar: 0 129 7&amp;quot; = // jumping from Zaonce towards Lave&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
are distinct locations and if they both need the same properties this must be explicitly set for both. When setting link_color, the lower system ID must be placed first, because of how the chart is drawn.&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
Settings other than &amp;quot;universal&amp;quot; in Oolite 1.81 or later have a 'layer' property from 0 to 3. The default value for planetinfo.plist files is 1. If multiple OXPs specify a setting for a particular property, the order they will be checked in is:&lt;br /&gt;
* Layer 3 settings&lt;br /&gt;
* Layer 2 settings (default for Javascript changes to data)&lt;br /&gt;
* Layer 1 settings (default for planetinfo.plist)&lt;br /&gt;
* Universal settings&lt;br /&gt;
* Layer 0 settings (value for core game settings)&lt;br /&gt;
&lt;br /&gt;
This allows OXPs to safely override each other's changes if necessary, and for OXPs which really need a specific setting in a particular system to set it at layer 3&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;layer&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
==Terraforming Example==&lt;br /&gt;
   &lt;br /&gt;
For the planet Lave, you would use the key '0 7' (planet 7 in galaxy 0) Then you set the values. The following example sets Lave's sea to blue, land to green, and land to sea ratio to 75%. &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
 { &lt;br /&gt;
    &amp;quot;0 7&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
       &amp;quot;percent_land&amp;quot; = &amp;quot;75&amp;quot;;&lt;br /&gt;
       &amp;quot;land_color&amp;quot; = &amp;quot;0.5 1.0 0.5&amp;quot;;&lt;br /&gt;
       &amp;quot;sea_color&amp;quot; =  &amp;quot;0.3 0.7 1.0&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Then you can override any of the settings listed above, for example to change Zaatxe's (Galaxy 0 Planet 8) inhabitants into blue frogs you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 8&amp;quot; =  &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;inhabitants&amp;quot; = &amp;quot;Blue Frogs&amp;quot;;&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
You can use any or all of the keys in each of the entries. It's probably best to only use the key's you want to change. So, another example, to change the sky_blur_xxx settings for Zaonce (Galaxy 0 Planet 129) to big, heavily clustered, but pale blurs - you'd enter &lt;br /&gt;
 &lt;br /&gt;
Code:&lt;br /&gt;
     &amp;quot;0 129&amp;quot; = &lt;br /&gt;
    { &lt;br /&gt;
         &amp;quot;sky_blur_cluster_chance&amp;quot; =  &amp;quot;0.9&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
         &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;32.0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=About the Inhabitants=&lt;br /&gt;
&lt;br /&gt;
==Concealment==&lt;br /&gt;
{{oolite-prop-added|1.83}}&lt;br /&gt;
&lt;br /&gt;
An integer that determines how much information about the system is unknown.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;concealment&amp;quot; = &amp;quot;300&amp;quot;;&lt;br /&gt;
The following values are recognised:&lt;br /&gt;
* 0 - default, all information visible&lt;br /&gt;
* 100 or more - F7 screen shows no information, economy/government/TL/star colour not visible on chart&lt;br /&gt;
* 200 or more - system name is not shown&lt;br /&gt;
* 300 or more - system vanishes entirely from chart, will not be used in route plotting, cannot be targeted by player (NPCs can still jump to it, though)&lt;br /&gt;
&lt;br /&gt;
==Government==&lt;br /&gt;
&lt;br /&gt;
0: Anarchy&lt;br /&gt;
&lt;br /&gt;
1: Feudal&lt;br /&gt;
&lt;br /&gt;
2: Multi-Governmental&lt;br /&gt;
&lt;br /&gt;
3: Dictatorship&lt;br /&gt;
&lt;br /&gt;
4: Communist&lt;br /&gt;
&lt;br /&gt;
5: Confederacy&lt;br /&gt;
&lt;br /&gt;
6: Democracy&lt;br /&gt;
&lt;br /&gt;
7: Corporate State&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Economy==&lt;br /&gt;
&lt;br /&gt;
0: Rich Industrial&lt;br /&gt;
&lt;br /&gt;
1: Average Industrial&lt;br /&gt;
&lt;br /&gt;
2: Poor Industrial&lt;br /&gt;
&lt;br /&gt;
3: Mainly Industrial&lt;br /&gt;
&lt;br /&gt;
4: Mainly Agricultural&lt;br /&gt;
&lt;br /&gt;
5: Rich Agricultural&lt;br /&gt;
&lt;br /&gt;
6: Average Agricultural&lt;br /&gt;
&lt;br /&gt;
7: Poor Agricultural&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Tech Level==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 14 indicating the sophistication of the planets technology. The tech level displayed on the system data screens in game is one higher than this number (range 1 to 15).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;techlevel&amp;quot; = &amp;quot;13&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Population==&lt;br /&gt;
&lt;br /&gt;
An integer between 0 and 67 indicating the number of inhabitants of a planet in hundreds of millions&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;population&amp;quot; = &amp;quot;23&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Productivity==&lt;br /&gt;
&lt;br /&gt;
An integer indicating the productivity of a planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;productivity&amp;quot; = &amp;quot;1000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
&lt;br /&gt;
The name of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;name&amp;quot; = &amp;quot;The planet's name&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitant==&lt;br /&gt;
&lt;br /&gt;
The name for one of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitant&amp;quot; = &amp;quot;Green Platypus&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Inhabitants==&lt;br /&gt;
&lt;br /&gt;
The name of the inhabitants of the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;inhabitants&amp;quot; = &amp;quot;Green Platypi&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
A short description of the planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;description&amp;quot; = &amp;quot;Really, anything you want to say about the place!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Government Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the government.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;government_description&amp;quot; = &amp;quot;Dictatorship (Monarchy)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Economy Description==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the economy.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;economy_description&amp;quot; = &amp;quot;Mainly Industrial (Machine Tools)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Population Description==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
Overrides the default text used to describe the population.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;population_description&amp;quot; = &amp;quot;13 Billion&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Random Seed==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A seed for a random number generator used in Oolite 1.81 to generate system properties impractical to store in this file (e.g. the positions of each star on the background starfield)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, this is a string of 6 integers between 0 and 255, for example:&lt;br /&gt;
 random_seed = &amp;quot;74 90 72 2 83 183&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=System population=&lt;br /&gt;
These properties are only used in Oolite 1.79 or later.&lt;br /&gt;
&lt;br /&gt;
==Populator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|populate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;populator&amp;quot; = &amp;quot;systemWillPopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Repopulator==&lt;br /&gt;
&lt;br /&gt;
The name of the worldscript function which will be used to [[Oolite_System_Populator|repopulate the system]]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;repopulator&amp;quot; = &amp;quot;systemWillRepopulate&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Planet=&lt;br /&gt;
&lt;br /&gt;
Most of these properties are ignored if a planet texture is set.&lt;br /&gt;
&lt;br /&gt;
Note that the available planet texture generator properties changed in places between Oolite 1.77 and Oolite 1.80&lt;br /&gt;
&lt;br /&gt;
==Atmosphere Rotational Velocity==&lt;br /&gt;
&lt;br /&gt;
Sets how fast the atmosphere is rotating. (A random value between 0.0 to 0.03 is the default).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;atmosphere_rotational_velocity&amp;quot; = &amp;quot;0.1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Cloud Alpha==&lt;br /&gt;
{{oolite-prop-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
The transparency level of the cloud layer, relative to the standard transparency. 1.0 is the default. Texture packs which include clouds on the planetary texture may wish to reduce this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;cloud_alpha&amp;quot; = &amp;quot;0.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Has Atmosphere==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This boolean property is used for the main planet only. If it is unset or true, the main planet has an atmosphere, as is always the case in 1.80 and before. If it is set to be false, then the planet will not have an atmosphere.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;has_atmosphere&amp;quot; = 0;&lt;br /&gt;
&lt;br /&gt;
This has no effect on secondary planets - their atmosphere is determined by whether addition uses &amp;lt;code&amp;gt;addPlanet&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;addMoon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:AtmDensityExample.png|thumb|320px|right|Atmosphere Density examples: Stranger's ''FPO Lave'' in four increasing atmosphere densities: 0.2, 0.5, 0.75 and 1.0. Every other parameter in the planet definition is the same in all pictures.]]&lt;br /&gt;
== Atmosphere Density ==&lt;br /&gt;
{{oolite-prop-added|1.91}}&lt;br /&gt;
 Added by an ignoramus - needs editing by one of our cognoscenti&lt;br /&gt;
See [http://aegidian.org/bb/viewtopic.php?p=272721#p272721 another_commander » Sun Nov 22, 2020 2:26 pm]&lt;br /&gt;
In tomorrow's nightly we will have a little upgrade in the planet properties: atmosphere density.&lt;br /&gt;
&lt;br /&gt;
Some planets can be made to have denser atmosphere than others. This will allow for more variety in planets' appearance. To achieve this, you can use either the planetinfo.plist property air_density or the Javascript planet entity airDensity. The accepted value range is from 0.0 to 1.0 and anything outside of this range will be automatically clamped. We default all planets to 0.75 in the core.&lt;br /&gt;
&lt;br /&gt;
==Land Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Cloud==&lt;br /&gt;
The percentage of the planet's atmosphere occupied by clouds.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_cloud&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Note that with a low cloud_alpha setting not all of the clouds defined here may actually be visible&lt;br /&gt;
&lt;br /&gt;
==Percent Ice==&lt;br /&gt;
The percentage of the planet occupied by the polar ice caps. Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_ice&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Percent Land==&lt;br /&gt;
The percentage of the planet occupied by land.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;percent_land&amp;quot; = &amp;quot;0..100&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Planet Distance==&lt;br /&gt;
(1.81 or later)&lt;br /&gt;
&lt;br /&gt;
The distance from the centre of the planet to the witchpoint. Only used for the system main planet - secondary planets are positioned separately.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_distance&amp;quot; = &amp;quot;410000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The main planet is always positioned on the z-axis.&lt;br /&gt;
&lt;br /&gt;
==Planet Name==&lt;br /&gt;
{{oolite-prop-added|1.79}}&lt;br /&gt;
&lt;br /&gt;
The planet's name. For the main planet, this defaults to being the same as the system name - the property is mainly intended for secondary planets.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
  &amp;quot;planet_name&amp;quot; = &amp;quot;Earth&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Polar Land Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the land colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;land_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Polar Sea Color==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the sea colour in polar regions.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Radius==&lt;br /&gt;
An integer between 3000 and 7000 indicating the radius of the main planet. On the F7 screen, this is measured in kilometres. The radius in game is 1/100th of this.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;5500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Rotational Velocity==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Overrides rotation_speed if both are set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed==&lt;br /&gt;
A number describing the rotational velocity of the planet in radians per second. Unlike rotational_velocity, this is affected by rotation_speed_factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;rotation_speed&amp;quot; = 0.0015;&lt;br /&gt;
&lt;br /&gt;
==Rotation Speed Factor==&lt;br /&gt;
The rotational speed of all planets whose rotational speed was set by rotation_speed and not by rotational_velocity will be multiplied by this number.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;quot;rotation_speed_factor&amp;quot; = 1.0;&lt;br /&gt;
&lt;br /&gt;
(Intended more for the universal section as a &amp;quot;personal taste&amp;quot; option than for individual planets)&lt;br /&gt;
&lt;br /&gt;
==Sea Color==&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sea_color&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture==&lt;br /&gt;
The replacement texture to be used by a system's main planet.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For textures you can use lat-long maps (twice as wide as high) with a special elongation at the poles or cube maps. Other maps also will be wraped around planets but give always distortions.&amp;lt;br&amp;gt;&lt;br /&gt;
Since Oolite 1.74 you can also use cube maps for planets. Cube maps are 6 times higher as wide and will be recognised automatic by Oolite, based on its dimensions. Cube maps are the preferred method because lat-long give some distortion and have the poles improperly placed in Oolites implementation. See also [[Planettool]] for conversion from lat-long into cube maps.&lt;br /&gt;
&lt;br /&gt;
From Oolite 1.89 onwards, illumination mapping on custom planets is supported. The illumination map goes in the diffuse map's alpha channel. Low alpha values translate to high illumination. This allows for effects like city lights on a planet's dark side.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture&amp;quot; =  &amp;quot;newPlanetTexture.png&amp;quot;;&lt;br /&gt;
;N.B.&lt;br /&gt;
The illumination mapping feature is disabled by setting ''Graphics Detail: Shaders Enabled'' or lower in the game setting menu. ''Enabled'' at ''Graphics Detail: Extra Detail''.&lt;br /&gt;
&lt;br /&gt;
==Texture HSB Color==&lt;br /&gt;
This changes the overall hue of the replacement texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;texture_hsb_color&amp;quot; =  &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Texture NormSpec==&lt;br /&gt;
(Oolite v1.89 and higher). The external texture that will be used as a normal and specular map for the given planet. Colorspace should be linear, with the normal map in the r,g and b and the specular map in the a channel. The texture can be of either equirectangular or cubemap formats. This feature is available at the Extra Detail setting only. To set:&lt;br /&gt;
 &amp;quot;texture_normspec&amp;quot; = &amp;quot;planetNormalAndSpecularMap.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sky=&lt;br /&gt;
&lt;br /&gt;
==Ambient Level==&lt;br /&gt;
&lt;br /&gt;
Sets how much ambient light (shed by stars and nebulae) illuminates the dark side of objects like planets and ships. Values should typically be between 0.0 and 1.0 (1.0 is the default) but can be higher for a flat lit, cartoon-like effect.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;ambient_level&amp;quot; = &amp;quot;0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Nebula Count Multiplier==&lt;br /&gt;
This is used for defining the number of nebulas. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;nebula_count_multiplier&amp;quot; = &amp;quot;1.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Alpha==&lt;br /&gt;
Default 0.1&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_alpha&amp;quot; = &amp;quot;0.0 .. 1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Cluster Chance==&lt;br /&gt;
This is used for creating nebulae (typically 0.80)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_cluster_chance&amp;quot; = &amp;quot;0.85&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky Blur Scale==&lt;br /&gt;
Default 10. Larger numbers generate bigger nebula, but slow down the game considerable on slower machines.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_blur_scale&amp;quot; = &amp;quot;0.0 .. 128.0 or more&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Blurs==&lt;br /&gt;
This is used for defining the number of nebulas (typical is 80, maximum is 1280). This key is multiplied by a &amp;quot;nebula_count_multiplier&amp;quot; definition in Oolite 1.81 or later.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_blurs&amp;quot; = &amp;quot;800&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky N Stars==&lt;br /&gt;
This is used for defining the number of stars (typical = 600, maximum in 1.76 or earlier is 4800). This key is multiplied by a &amp;quot;star_count_multiplier&amp;quot; definition in Oolite 1.81 or later. In reduced detail mode, this number will be capped to 2400.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_n_stars&amp;quot; = &amp;quot;1200&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sky and Nebula RGB Colors==&lt;br /&gt;
&lt;br /&gt;
These are rgb values (from 0.0 to 1.0) for the two colours between which the colour of the stars (and nebulaesque blurs) vary, ordered r1 g1 b1 r2 g2 b2 where (r1 g1 b1) defines the first colour and (r2 g2 b2) the second.&amp;lt;br&amp;gt;&lt;br /&gt;
(Default values are &amp;quot;0.75 0.8 1.0 1.0 0.85 0.6&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sky_rgb_colors&amp;quot; = &amp;quot;0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0 0.0..1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Alternatively, two [[Materials in Oolite#Colour specifiers|colour specifiers]] may be used:&lt;br /&gt;
 &amp;quot;sky_color_1&amp;quot; = &amp;quot;redColor&amp;quot;;&lt;br /&gt;
 &amp;quot;sky_color_2&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;hue&amp;quot; = &amp;quot;60&amp;quot;;&lt;br /&gt;
     &amp;quot;brightness&amp;quot; = &amp;quot;0.8&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;nebula_color_1&amp;quot; = &amp;quot;greenColor&amp;quot;;&lt;br /&gt;
 &amp;quot;nebula_color_2&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Star Count Multiplier==&lt;br /&gt;
This is used for defining the number of stars. Default is 1.0. Number can be greater or less than default and is also randomised a bit. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;star_count_multiplier&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Properties of the Station=&lt;br /&gt;
&lt;br /&gt;
==Market==&lt;br /&gt;
The market to be used in this system as the default market. It points to a key in commodities.plist&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;market&amp;quot; = &amp;quot;rockhermit&amp;quot;;&lt;br /&gt;
Will use the rockhermit market as default for for all stations in the system. When no market is defined a key in commodities.plist is used that matches the role of the main station. Than that is not defined, the default market is used in this system.&lt;br /&gt;
&lt;br /&gt;
In 1.81 and later, this is replaced by market_script&lt;br /&gt;
&lt;br /&gt;
==market_script==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
A Javascript file used to load a [[Oolite Market Scripts|market script]] for global system price and quantity modifications.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;market_script&amp;quot; = &amp;quot;myoxp_newsystemmarket.js&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station==&lt;br /&gt;
The type of station orbiting the main planet.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station&amp;quot; = &amp;quot;coriolis..dodec..special&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Roll==&lt;br /&gt;
The speed at which the station rotates (as with all rotational velocities this is in radians per second) and affects all rotating stations in a system. For a specific station you can use the key [[Shipdata.plist#station_roll | station_roll]] in shipdata.plist.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_roll&amp;quot; = &amp;quot;0.5&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Station Vector==&lt;br /&gt;
The direction of the main station from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;station_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Stations Require Docking Clearance==&lt;br /&gt;
&lt;br /&gt;
Specifies if a player has to explicit ask docking permission. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|Oolite Docking Clearance]]&lt;br /&gt;
&lt;br /&gt;
=Properties of the Sun=&lt;br /&gt;
;N.B.&lt;br /&gt;
The corona effect, modified by the first three properties mentioned below, is disabled by setting ''Reduced Detail:On'' in the game setting menu. ''Enabled'' by default (''Reduced Detail:Off'').&lt;br /&gt;
&lt;br /&gt;
==Corona Flare==&lt;br /&gt;
&lt;br /&gt;
Sets the overall size of the corona in proportion to its sun. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (invisibly small) to 1.0 (huge)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_flare&amp;quot; = &amp;quot;0.075&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Hues==&lt;br /&gt;
&lt;br /&gt;
Specifies whether the corona should have visible bands of colours within the corona. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (monochromatic) to 1.0 (vivid alternating colours).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_hues&amp;quot; = &amp;quot;0.6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Corona Shimmer==&lt;br /&gt;
&lt;br /&gt;
Specifies how quickly the corona colours change. (See note above.)&lt;br /&gt;
&lt;br /&gt;
A number from 0.0 (very slow) to 1.0 (very fast).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;corona_shimmer&amp;quot; = &amp;quot;0.4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Color==&lt;br /&gt;
&lt;br /&gt;
Sets the colour of a system's sun.&lt;br /&gt;
&lt;br /&gt;
Can be any [[Materials in Oolite#Colour specifiers|colour specifier]] or [[Materials in Oolite#Named colours|named colour]]. The specified colour is blended with 50% white so it will never be a saturated colour.  Dark colours will be brightened by this blending.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_color&amp;quot; = &amp;quot;blueColor&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Distance==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Sets the distance between the sun and the main planet in metres.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance&amp;quot; = 924122;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Multiplier==&lt;br /&gt;
{{oolite-prop-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
Multiplies the distance between the sun and the main planet by this factor.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_multiplier&amp;quot; = 2;&lt;br /&gt;
&lt;br /&gt;
Ignored if sun_distance_modifier is set.&lt;br /&gt;
&lt;br /&gt;
==Sun Distance Modifier==&lt;br /&gt;
&lt;br /&gt;
Sets the approximate distance between a system sun and its main planet. The standard distance is 20 planetary radii. Setting it much lower (10, or even less) will cause delays when generating systems, as Oolite compensates for possible collisions between the sun and other system objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_distance_modifier&amp;quot; = &amp;quot;15.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 or later, sun_distance_multiplier is more useful.&lt;br /&gt;
&lt;br /&gt;
== Sun Gone Nova ==&lt;br /&gt;
&lt;br /&gt;
Sets a nova sun in the system.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_gone_nova&amp;quot; = &amp;quot;YES&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Name==&lt;br /&gt;
&lt;br /&gt;
Stores the name of a system's sun. This is only implemented in Oolite from version 1.79 onwards, though was used by OXPs before then.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_name&amp;quot; = &amp;quot;Alpha Centauri&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Radius==&lt;br /&gt;
&lt;br /&gt;
Sets the radius of a system's sun. A number between 1000 and 1000000.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_radius&amp;quot; = &amp;quot;100000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
==Sun Vector==&lt;br /&gt;
The direction of the sun from the main planet&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &amp;quot;sun_vector&amp;quot; = &amp;quot;-0.717 -0.668 0.201&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
=Hyperspace Travel=&lt;br /&gt;
&lt;br /&gt;
In Oolite 1.81 and later these properties have been moved into [[global-settings.plist]]&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Behaviour==&lt;br /&gt;
&lt;br /&gt;
The key galactic_hyperspace_behaviour controls where the player will arrive after a G.H. has been executed. There are three possible types of G.H. behavior and are as follows: &lt;br /&gt;
&lt;br /&gt;
1) Oolite standard. This is what we have up to this moment. Executing a G.H. jump will poisition the player in the next galaxy, to the closest non-isolated system with regards to their current galaxy coordinates. So, for example, if you jump from coordinates (100, 50) in galaxy 1 you will arrive in galaxy 2 at the same coordinates, unless these coordinates refer to an unreachable system, in which case the arrival point will be adjusted by the engine to maybe something like (102, 51). This is set as default behavior. It is set by assigning the string BEHAVIOUR_STANDARD to the galactic_hyperspace_behaviour key. &lt;br /&gt;
&lt;br /&gt;
2) All systems reachable. Same as above, only this time we do not check for arrival at an isolated system. Using this method, systems like Oresrati in G8, the lower left hand cluster of systems in G7, the two islands of isolated systems in G6 etc. are now possible arrival points. If you land there, you may not be able to exit again, depending on the tech levels of the systems you get to. Mission scripters may want to use this. This behaviour is set by assigning the string BEHAVIOUR_ALL_SYSTEMS_REACHABLE to galactic_hyperspace_behaviour key in planetinfo.plist. &lt;br /&gt;
&lt;br /&gt;
3) Fixed coordinates arrival point. This will make Oolite simulate some older 8-bit versions, that were putting the player in the same fixed point every time a galactic jump was performed, but there is also good potential for scripting (see below). This is set by assigning the string BEHAVIOUR_FIXED_COORDINATES to the galactic_hyperspace_behaviour key.&lt;br /&gt;
&lt;br /&gt;
==Galactic Hyperspace Fixed Coords==&lt;br /&gt;
&lt;br /&gt;
If the fixed coordinates method is chosen, then the engine will look in planetinfo.plist for a key named galactic_hyperspace_fixed_coords, from which it will read the actual coordinates that will be used as the arrival point in the next galaxy. If none is found, then coordinates (96,96) will be used.&lt;br /&gt;
&lt;br /&gt;
==Hyperspace Tunnel Color==&lt;br /&gt;
&lt;br /&gt;
One or two colours can be set, using RGBA format, to over-ride the appearance of the hyperspace tunnel effect.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  hyperspace_tunnel_color_1 = (1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
  hyperspace_tunnel_color_2 = (0.0, 0.0, 1.0, 0.25);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- =Script Actions=&lt;br /&gt;
&lt;br /&gt;
''This functionality is part of the legacy scripting system and is deprecated. Use Javascript instead.''&lt;br /&gt;
&lt;br /&gt;
Script_actions work exactly as in shipData.plist, and get activated by the player entering the specified system, or interstellar space.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
 &amp;quot;script_actions&amp;quot; =&lt;br /&gt;
 (&lt;br /&gt;
     &amp;quot;addShipsAtPrecisely: my_ship 2 wpm 0 0 15000&amp;quot;&lt;br /&gt;
 ) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Additional Planets=&lt;br /&gt;
&lt;br /&gt;
Finally you can also add keys for your own custom planets and moons, eg.&lt;br /&gt;
 &amp;quot;LavesPurpleMoon&amp;quot; =&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The contents of the { could be:&lt;br /&gt;
Orientation of the planet in space (seems not to be working correct)&lt;br /&gt;
 &amp;quot;orientation&amp;quot; = &amp;quot;0.0 1.0 0.0 0.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Position of the planet in space. You can use 3 or 4 parameters. With only 3 parameters the internal absolute coordinates are used. &lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;0 -50000 0&amp;quot;;&lt;br /&gt;
or&lt;br /&gt;
 &amp;quot;position&amp;quot; = &amp;quot;pwm 0 -50000 0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Radius of the planet in km. e.g. a value of 500 is drawn with a radius of 5000 meters but in player dialogues this value is presented as 500 km.&lt;br /&gt;
 &amp;quot;radius&amp;quot; = &amp;quot;500&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Rotation of the planet in rotations per second.&lt;br /&gt;
 &amp;quot;rotational_velocity&amp;quot; = &amp;quot;1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
The name of the texture file that is used to wrap around the surface.&lt;br /&gt;
 &amp;quot;texture&amp;quot; = &amp;quot;grid.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Seed value used to create the planet's surface features. If no seed is defined it uses the same seed as the main planet, and will create a copy of it.&lt;br /&gt;
 &amp;quot;seed&amp;quot; = &amp;quot;1 2 3 4 5 6&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
A lot of the keys for the main planet, like: '''percent_land''', can also used in custom planets.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[[Random number generator]] - originally used for creating planet descriptions&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3860 seed = &amp;quot;1 2 3 4 5 6&amp;quot;;]: Psuedo-random number generation &amp;amp; planet descriptions (2007)&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=3808 position = &amp;quot;x y z&amp;quot; in planetinfo.plist] (2007)&lt;br /&gt;
*Submersible's [https://www.youtube.com/user/submersibletoaster YouTube videos] of planet textures (2012)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=5044 Question: How to add custom planet descriptions] (2008)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=20959 Empty system] Removing the stations (and presumably inhabitants) from a system (2021)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=File:Sector7_The_Lizard%27s_Claw_RegionMap.png&amp;diff=78895</id>
		<title>File:Sector7 The Lizard's Claw RegionMap.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=File:Sector7_The_Lizard%27s_Claw_RegionMap.png&amp;diff=78895"/>
		<updated>2023-04-20T20:47:26Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Alnivel uploaded a new version of File:Sector7 The Lizard's Claw RegionMap.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=File:Sector7_The_Lizard%27s_Claw_RegionMap.png&amp;diff=78894</id>
		<title>File:Sector7 The Lizard's Claw RegionMap.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=File:Sector7_The_Lizard%27s_Claw_RegionMap.png&amp;diff=78894"/>
		<updated>2023-04-20T20:39:29Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Alnivel uploaded a new version of File:Sector7 The Lizard's Claw RegionMap.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Sector7/The_Lizard%27s_Claw_(Region)&amp;diff=78893</id>
		<title>Sector7/The Lizard's Claw (Region)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Sector7/The_Lizard%27s_Claw_(Region)&amp;diff=78893"/>
		<updated>2023-04-20T20:22:54Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Fixed links on the map&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Origin ==&lt;br /&gt;
Why is it called the Lizard's Claw? Go ask the lizards of Gebeti.&lt;br /&gt;
&lt;br /&gt;
== Map ==&lt;br /&gt;
[[Sector7/The Lizard's Claw (Region)|The Lizard's Claw]] consists of the systems [[Sector7/Anisinza|Anisinza]], [[Sector7/Ceraso|Ceraso]], [[Sector7/Ceerti|Ceerti]] and [[Sector7/Gebeti|Gebeti]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[http://aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=17175 BB Thread] for filling in the map.--&amp;gt;&lt;br /&gt;
&amp;lt;!-- This div should be part of ClickMapHeader, but the MediaWiki 1.9.3 is too old. --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative&amp;quot;&amp;gt;{{ClickMapHeader|Sector=7|Image=Sector7_The_Lizard's_Claw_RegionMap.png}}&lt;br /&gt;
{{ClickMapEntry|Name=Anisinza|Sector=7|XPos=19|YPos=14|XPosRel=58|YPosRel=22}}&lt;br /&gt;
{{ClickMapEntry|Name=Ceraso|Sector=7|XPos=13|YPos=1|XPosRel=40|YPosRel=3}}&lt;br /&gt;
{{ClickMapEntry|Name=Ceerti|Sector=7|XPos=1|YPos=9|XPosRel=4|YPosRel=15}}&lt;br /&gt;
{{ClickMapEntry|Name=Gebeti|Sector=7|XPos=0|YPos=15|XPosRel=1|YPosRel=24}}&lt;br /&gt;
{{ClickMapFooter}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- This /div should be part of ClickMapFooter, but the MediaWiki 1.9.3 is too old. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SectorTableHeader}}&lt;br /&gt;
{{SectorTableEntry|Name=Anisinza|Sector=7|System=90|XPos=19|YPos=14|Government=3|Economy=6|Techlevel=7|Population=3.4|Inhabitants=Human Colonists|Productivity=7616|Hubcount=2|Description=The world Anisinza is scourged by deadly disease.}}&lt;br /&gt;
&lt;br /&gt;
{{SectorTableEntry|Name=Ceraso|Sector=7|System=113|XPos=13|YPos=1|Government=5|Economy=1|Techlevel=11|Population=4.7|Inhabitants=Fierce Yellow Fat Humanoids|Productivity=30456|Hubcount=3|Description=The planet Ceraso is reasonably fabled for its exciting sit coms and its inhabitants' exceptional love for food blenders.}}&lt;br /&gt;
&lt;br /&gt;
{{SectorTableEntry|Name=Ceerti|Sector=7|System=62|XPos=1|YPos=9|Government=1|Economy=3|Techlevel=7|Population=3.5|Inhabitants=Fierce Slimy Frogs|Productivity=8120|Hubcount=2|Description=This world is a revolting little planet.}}&lt;br /&gt;
&lt;br /&gt;
{{SectorTableEntry|Name=Gebeti|Sector=7|System=126|XPos=0|YPos=15|Government=1|Economy=7|Techlevel=2|Population=1.3|Inhabitants=Large Green Lizards|Productivity=1560|Hubcount=2|Description=Gebeti is very fabled for its ancient Gebetian Et banana plantations.}}&lt;br /&gt;
{{SectorTableFooter}}&lt;br /&gt;
&lt;br /&gt;
== Lore ==&lt;br /&gt;
Tucked away in the northwest corner of the seventh octant are the four worlds which comprise The Lizard's Claw. The only way into The Claw (as the locals call it) is via Maarbi, 6.4 lyrs from Anisinza. To say it's an unpopular sector would be fair, but try telling that to the humanoids, frogs, and lizards who inhabit Ceraso, Ceerti, and Gebeti respectively. The colonial inhabitants of Anisinza are far too busy fighting a deadly disease to worry about popularity. Ships refuel and do their business at Anisinza's main station, and move on fast - dirtside excursions are definitely not advisable.&lt;br /&gt;
&lt;br /&gt;
Ceraso has its attractions, especially the entertainment, and is a fairly civilised planet, but don't get into an argument with the locals. Gebeti is renowned for its Et banana plantations and unspoilt countryside. Life on Gebeti, like the ponderous lizards who inhabit it, is slow moving.&lt;br /&gt;
&lt;br /&gt;
Ceerti is another matter entirely. It's perhaps unfair to call it a revolting little planet - yes, it's mainly industrial, and like Gebeti it's a feudal world, but much of that industry is underground, and the frogs have a lot of history. The many lakes with their surrounding mountains are well worth a visit, just don't go there during the mating season - then it is that the frogs earn their reputation for being fierce!&lt;br /&gt;
&lt;br /&gt;
A few well-known pilots have made Ceerti their home, and make their living as couriers, taking cross-chart contracts which can be highly lucrative.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[https://postimg.cc/gallery/xdPbyC9 Lizard's Claw gallery] (Cody 2022: The core planets with default cloud levels).&lt;br /&gt;
&lt;br /&gt;
[[Category:Sector7/Region|The Ceraso Hub]]&lt;br /&gt;
{{RoutesAndRegionsSector7}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=File:Sector7_The_Lizard%27s_Claw_RegionMap.png&amp;diff=78892</id>
		<title>File:Sector7 The Lizard's Claw RegionMap.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=File:Sector7_The_Lizard%27s_Claw_RegionMap.png&amp;diff=78892"/>
		<updated>2023-04-20T19:46:14Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Property_list&amp;diff=78789</id>
		<title>Property list</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Property_list&amp;diff=78789"/>
		<updated>2023-04-14T10:52:31Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* dictionary */ Fixed formatting and examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:plist-XML-ASCII-ill.png|thumb|right|300px|the plist formats, XML and OpenStep]]&lt;br /&gt;
A '''property list''', or '''plist''' for short, is data structured in a standardized way, used by Oolite for a wide variety of configuration files. The concept originates with [http://en.wikipedia.org/wiki/OpenStep OpenStep], the specification on which the Cocoa and GNUstep programming libraries Oolite uses are based.&lt;br /&gt;
&lt;br /&gt;
== Formats ==&lt;br /&gt;
A property list is an abstract structure which can be represented files using at least five different formats. Since Oolite uses two different implementations of property list support, one on Mac&amp;amp;nbsp;OS&amp;amp;nbsp;X and another on other platforms, it can’t consistently read all these formats.&lt;br /&gt;
&lt;br /&gt;
Two formats are recommended for Oolite: the traditional [http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/Introduction/Introduction.htmll  OpenStep format], which is easy to read, and the [http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Articles/XMLPListsConcept.html XML format], which is more flexible. The other formats are Apple binary format (which can be read by both implementations, but is not human-readable), and the GNUstep text and binary formats, which are not supported under Mac&amp;amp;nbsp;OS&amp;amp;nbsp;X.&lt;br /&gt;
&lt;br /&gt;
While the OpenStep format does not support all the data types used by Oolite – specifically, it does not support [[#integer|integers]], [[#real|reals]] or [[#boolean|booleans]] – Oolite can in most cases automatically convert [[#string|strings]] to these types starting with Oolite 1.69. (If you find an exception, please report it.) As such, the types can be used interchangeably. In prior versions of Oolite, some types, especially booleans, could not be converted automatically, so XML format was required for some property lists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Data types ==&lt;br /&gt;
The rest of this page describes the types of property list element used by Oolite, and how they are represented in OpenStep and XML format property lists. It does not cover all property list content types or file formats and is not a general-purpose reference to property lists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== string ===&lt;br /&gt;
A string is a block of text. In OpenStep format plists, this is surrounded by straight double quotation marks, with “&amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;” being used to escape quotation marks within the string: &amp;lt;code&amp;gt;&amp;quot;a string with a \&amp;quot;quotation\&amp;quot; and a &amp;amp;lt;tag&amp;amp;gt;&amp;quot;&amp;lt;/code&amp;gt;. OpenStep format plists also allow single-word strings to be used without quotation marks when this is unambiguous. However, the definition of “unambiguous” differs between Mac&amp;amp;nbsp;OS&amp;amp;nbsp;X and GNUstep, so this usage is not recommended except for numbers. In XML format, it is surrounded by &amp;lt;code&amp;gt;&amp;amp;lt;string&amp;amp;gt;&amp;lt;/code&amp;gt; tags, escaping contents with XML entities: &amp;lt;code&amp;gt;&amp;amp;lt;string&amp;amp;gt;a string with a &amp;amp;amp;quot;quotation&amp;amp;amp;quot; and a &amp;amp;amp;lt;tag&amp;amp;amp;gt;&amp;amp;lt;/string&amp;amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== integer ===&lt;br /&gt;
An integer is a whole number. In OpenStep format plists, an integer is a string whose contents happen to be digits (and optionally a minus sign), and may be unquoted: &amp;lt;code&amp;gt;-12345&amp;lt;/code&amp;gt;. In XML format, it is surrounded by &amp;lt;code&amp;gt;&amp;amp;lt;integer&amp;amp;gt;&amp;lt;/code&amp;gt; tags: &amp;lt;code&amp;gt;&amp;amp;lt;integer&amp;amp;gt;-12345&amp;amp;lt;/integer&amp;amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== real ===&lt;br /&gt;
A real is a number with a fractional part. In OpenStep format plists, reals are again written as unquoted strings: &amp;lt;code&amp;gt;42.123&amp;lt;/code&amp;gt;. In XML format, reals are surrounded by &amp;amp;lt;real&amp;amp;gt; tags: &amp;lt;code&amp;gt;&amp;amp;lt;real&amp;amp;gt;42.123&amp;amp;lt;/real&amp;amp;gt;&amp;lt;/code&amp;gt;. Large reals can be expressed in scientific notation: &amp;lt;code&amp;gt;1.35e+20&amp;lt;/code&amp;gt; means 1.35 × 10&amp;lt;small&amp;gt;&amp;lt;sup&amp;gt;20&amp;lt;/sup&amp;gt;&amp;lt;/small&amp;gt;. Integers and reals are mostly interchangeable in Oolite. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== boolean ===&lt;br /&gt;
A boolean is either of the values ''true'' or ''false''. In XML format, the tags &amp;lt;code&amp;gt;&amp;amp;lt;true/&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;false/&amp;amp;gt;&amp;lt;/code&amp;gt; can be used. OpenStep format does not support booleans. However, as of Oolite 1.69, a number of different methods can be used to represent them: any of the strings &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;on&amp;quot;&amp;lt;/code&amp;gt; may be used to represent ''true'', and any of the strings &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;no&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;off&amp;quot;&amp;lt;/code&amp;gt; may be used to represent ''false''. Also the uppercase variants of these keywords can be used as casing is ignored for these booleans.  Additionally, the number 0 is interpreted as ''false'' and any other number as ''true'' (but see [[#fuzzy boolean|fuzzy boolean]] below). The recommended form is to use &amp;lt;code&amp;gt;&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;no&amp;quot;&amp;lt;/code&amp;gt; to keep a consistent syntax that is not confusing.&lt;br /&gt;
&lt;br /&gt;
Previous versions of this page indicated that numbers could be used as booleans in OpenStep-format property lists in any version of Oolite. This is incorrect and such usage will not work with versions prior to 1.69.&lt;br /&gt;
&lt;br /&gt;
=== fuzzy boolean ===&lt;br /&gt;
A fuzzy boolean isn't really a property list type; rather, it's a special usage defined by Oolite. If a fuzzy boolean is expected, and a number is encountered, it is treated as a probability between 0 and 1. For instance, if a value of 0.5 is used, it will be treated as ''true'' half the time, and ''false'' the other half. Values other than numbers are treated like [[#boolean|booleans]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== array ===&lt;br /&gt;
An array is an ordered list of objects. &lt;br /&gt;
&lt;br /&gt;
In '''OpenStep format''', an array is contained in parentheses, with items separated by commas: &amp;lt;code&amp;gt;(0, two, &amp;quot;three and a half&amp;quot;, yes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
You can have several values without name, and they are grouped using round brackets:&lt;br /&gt;
&lt;br /&gt;
 (&lt;br /&gt;
 value1,&lt;br /&gt;
 value2,&lt;br /&gt;
 value3&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
''Note that between two values there is a comma.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''XML format''', it is contained in &amp;lt;code&amp;gt;&amp;amp;lt;array&amp;amp;gt;&amp;lt;/code&amp;gt; tags: &amp;lt;code&amp;gt;&amp;amp;lt;array&amp;amp;gt;&amp;amp;lt;integer&amp;amp;gt;0&amp;amp;lt;/integer&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;two&amp;amp;lt;/string&amp;amp;gt; &amp;amp;lt;string&amp;amp;gt;three and a half&amp;amp;lt;/string&amp;amp;gt; &amp;amp;lt;true/&amp;amp;gt;&amp;amp;lt;/array&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Later the values are just accessed by numbers: The first, the second, the next, the last, ...&lt;br /&gt;
&lt;br /&gt;
Now the part that can make plist files really complex: Wherever you place a value, it can be a primitive one (a number, a string, a boolean value like true/false) or a complex value such as an array or a dictionary. And with this you can create all the complex structures you perceive when looking at Oolite's plist files.&lt;br /&gt;
&lt;br /&gt;
=== dictionary ===&lt;br /&gt;
Dictionaries are the most complex type. They consist of key/value pairs – each pair consists of a key, which is always a string, and a value, which can be any type, including other dictionaries. Each key must be unique, and the order of pairs is not significant. Again, every value has a name or a key.&lt;br /&gt;
&lt;br /&gt;
In '''OpenStep format''', dictionaries are contained in braces, with key and value separated by &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; signs and each pair followed by a semicolon: &lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;name1&amp;quot; = &amp;quot;value1&amp;quot;;&lt;br /&gt;
   &amp;quot;name2&amp;quot; = &amp;quot;value2&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Not all names have to go into quotes, and not all values require them. But you need to watch out where you place them and where not.&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   length = 42;&lt;br /&gt;
   width = 36.5;&lt;br /&gt;
   &amp;quot;long name&amp;quot; = &amp;quot;this is a thing with a really quite long name&amp;quot;; // ''note: quotes for a key with spaces are required''&lt;br /&gt;
   attributes = (&amp;quot;hairy&amp;quot;, &amp;quot;muscular&amp;quot;); // ''note: this is actually an '''array''' of string values following the key''&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Use &amp;lt;code&amp;gt; tag if you need to mark elements of code/markup within plain text, such as function or variable names, types, literals, tags etc.&lt;br /&gt;
and &amp;lt;pre&amp;gt; tag or space at the beginning of the line (which also results in an implicit &amp;lt;pre&amp;gt; tag) if you need to mark block of code/markup - &lt;br /&gt;
several or even one line of code that &amp;quot;do something&amp;quot; beside &amp;quot;exist&amp;quot;: declare some object (equipment, function, missiontext entry), specify some value for the property, call js function etc.&lt;br /&gt;
&lt;br /&gt;
Note: This, of course, is a general recommendation, not a rule - if you know that in this particular case is better to do differently - go for it.&lt;br /&gt;
Also, it would probably be better to put it somewhere else, but I'm not sure where it would fit.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
In '''XML format''', dictionaries are contained in &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;dict&amp;amp;gt;&amp;lt;/code&amp;gt; tags,&amp;lt;/br&amp;gt;&lt;br /&gt;
with keys specified by &amp;lt;code&amp;gt;&amp;amp;lt;key&amp;amp;gt;&amp;lt;/code&amp;gt; tags &amp;lt;/br&amp;gt;&lt;br /&gt;
and immediately followed by values with whatever tag is appropriate for the value type: &lt;br /&gt;
 &amp;amp;lt;dict&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;key&amp;amp;gt;length&amp;amp;lt;/key&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;integer&amp;amp;gt;42&amp;amp;lt;/integer&amp;amp;gt; &lt;br /&gt;
   &amp;amp;lt;key&amp;amp;gt;width&amp;amp;lt;/key&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;real&amp;amp;gt;36.5&amp;amp;lt;/real&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;key&amp;amp;gt;long name&amp;amp;lt;/key&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;string&amp;amp;gt;this is a thing with a really quite long name&amp;amp;lt;/string&amp;amp;gt;  &lt;br /&gt;
   &amp;amp;lt;key&amp;amp;gt;attributes&amp;amp;lt;/key&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;array&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;string&amp;amp;gt;hairy&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;string&amp;amp;gt;muscular&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/array&amp;amp;gt;  &lt;br /&gt;
 &amp;amp;lt;/dict&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Root element ==&lt;br /&gt;
Every property list has a single value as its root. Typically this is a dictionary. In XML format, the root value must be surrounded by &amp;lt;code&amp;gt;&amp;amp;lt;plist&amp;amp;gt;&amp;lt;/code&amp;gt; tags in addition to its normal type tag: &amp;lt;code&amp;gt;&amp;amp;lt;plist&amp;amp;gt; &amp;amp;lt;dictionary&amp;amp;gt; &amp;amp;lt;key&amp;amp;gt;green&amp;amp;lt;/key&amp;amp;gt; &amp;amp;lt;array&amp;amp;gt; &amp;amp;lt;integer&amp;amp;gt;0&amp;amp;lt;/integer&amp;amp;gt; &amp;amp;lt;integer&amp;amp;gt;1&amp;amp;lt;/integer&amp;amp;gt; &amp;amp;lt;integer&amp;amp;gt;0&amp;amp;lt;/integer&amp;amp;gt; &amp;amp;lt;/array&amp;amp;gt; &amp;amp;lt;/dictionary&amp;amp;gt; &amp;amp;lt;/plist&amp;amp;gt;&amp;lt;/code&amp;gt; (OpenStep equivalent: &amp;lt;code&amp;gt;{ green = (0, 1, 0); }&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Under Mac&amp;amp;nbsp;OS&amp;amp;nbsp;X, if the root element of an OpenStep-format property list is a dictionary, it does not have to be surrounded by braces. However, ''this does not work under GNUstep'', so those creating property lists on Macs must be careful. In particular, OpenStep-format property lists exported by Property List Editor may not work under GNUstep.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
Both formats can also contain comments, which are ignored by the program but are useful to human readers. In OpenStep format, these can either start with “&amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;” and continue to the end of the line, or start with “&amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt;” and end with “&amp;lt;code&amp;gt;*/&amp;lt;/code&amp;gt;”. In XML, they start with “&amp;lt;code&amp;gt;&amp;amp;lt;!--&amp;lt;/code&amp;gt;” and end with “&amp;lt;code&amp;gt;--&amp;amp;gt;&amp;lt;/code&amp;gt;” (and must not contain “&amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;” anywhere else in the comment). &lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
 /* this line is a comment in OpenStep format */&lt;br /&gt;
 // this line is also a comment in OpenStep format&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;amp;lt;!-- this line is a comment in XML --&amp;amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== XML Preamble ==&lt;br /&gt;
XML plists also need a standard header, which looks like this:&lt;br /&gt;
 &amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;amp;gt; &lt;br /&gt;
 &amp;amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;&amp;lt;nowiki&amp;gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;lt;/nowiki&amp;gt;&amp;quot;&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Real-world Example ==&lt;br /&gt;
The following is a shortened version of Oolite’s built-in ''[[equipment.plist]]'', in both OpenStep and XML formats.&lt;br /&gt;
&lt;br /&gt;
=== OpenStep ===&lt;br /&gt;
 (&lt;br /&gt;
     (&lt;br /&gt;
         1, 300, &amp;quot;Missile&amp;quot;, &amp;quot;EQ_MISSILE&amp;quot;,&lt;br /&gt;
         &amp;quot;Faulcon de Lacy HM3 homing missile, fast and accurate when used in conjunction with standard targetting scanners.&amp;quot;,&lt;br /&gt;
         {&lt;br /&gt;
             available_to_all = &amp;quot;yes&amp;quot;;&lt;br /&gt;
         }&lt;br /&gt;
     ),&lt;br /&gt;
     (&lt;br /&gt;
         7, 9000, &amp;quot;Energy Bomb&amp;quot;, &amp;quot;EQ_ENERGY_BOMB&amp;quot;,&lt;br /&gt;
         &amp;quot;A one-shot super-weapon capable of destroying all small craft within range.&amp;quot;&lt;br /&gt;
     )&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
The round brackets are arrays in OpenStep, and are used to group information for a given key. Examples are the exhaust (if one has multiple ones for a given ship), the individual custom views and sub-entities...&lt;br /&gt;
&lt;br /&gt;
The curly brackets make up dictionaries, which tie together different keys on the same subject. The two main examples there are the overall entries themselves (each ship is made up of a dictionary of keys describing it) and the external views (a dictionary of individual views, each of which is defined as an array of keys describing that given view).&lt;br /&gt;
&lt;br /&gt;
One would recommend using a programmer-friendly editor like notepad++ or an equivalent. On N++ if you select an open or closing bracket (of whichever flavour) it will automatically highlight the other part of the pair and link them. It's useful for quickly checking that you have your pairs correct - a good habit to get into. And in many cases the kind of log error one sees is indicative of missing brackets. Those and missing quotes and semi-colons are arguably the three most common errors in openStep plists if one excludes typo's. [http://aegidian.org/bb/viewtopic.php?p=153556#p153556 Thargoid] (2011)&lt;br /&gt;
&lt;br /&gt;
=== XML ===&lt;br /&gt;
 &amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;lt;nowiki&amp;gt;&amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;array&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;array&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;integer&amp;amp;gt;1&amp;amp;lt;/integer&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;integer&amp;amp;gt;300&amp;amp;lt;/integer&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;string&amp;amp;gt;Missile&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;string&amp;amp;gt;EQ_MISSILE&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;string&amp;amp;gt;Faulcon de Lacy HM3 homing missile, fast and accurate when used in conjunction with&lt;br /&gt;
                 standard targetting scanners.&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;dict&amp;amp;gt;&lt;br /&gt;
             &amp;amp;lt;key&amp;amp;gt;available_to_all&amp;amp;lt;/key&amp;amp;gt;&lt;br /&gt;
             &amp;amp;lt;true/&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;/dict&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;/array&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;array&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;integer&amp;amp;gt;7&amp;amp;lt;/integer&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;integer&amp;amp;gt;9000&amp;amp;lt;/integer&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;string&amp;amp;gt;Energy Bomb&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;string&amp;amp;gt;EQ_ENERGY_BOMB&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;string&amp;amp;gt;A one-shot super-weapon capable of destroying all small craft within range.&amp;amp;lt;/string&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;/array&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/array&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/plist&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conversion ==&lt;br /&gt;
Technically the XML plists are the best, but they are only fully supported on Mac systems. Without a plist editor, the plists are not as easy to read or write as OpenStep plists. However, those editors are only easily available for the Mac. Windows and Linux users will have to rely on text editors to edit those plists. Therefore it is advised to write everything in open step format.&lt;br /&gt;
&lt;br /&gt;
Converting xml to open step can be done by a python script, written by Cdr. Jettison: [http://www.box.net/shared/g79rnfx4jcp1do35liin download python conversion script] ('' xml plist must be free of comment for the script to work'')&lt;br /&gt;
&lt;br /&gt;
Note that this conversion script contains CR/LF (carriage return/linefeed) end-of-lines, as used on Windows computers. This will cause ''&amp;quot;bad interpreter: No such file or directory&amp;quot;'' errors if run on Linux. You can strip out the CR characters yourself, or download this [https://www.box.com/s/n06cixgjxsxmph2drucz copy of the script which has already had the CRs removed]. (you will also need to make the script executable)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=10039 BB discussion] about converting plists (2011-21)&lt;br /&gt;
* [http://oolite.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=6836 earlier conversion discussion] (2009)&lt;br /&gt;
* [[OXP howto]]&lt;br /&gt;
* [[OXP howto plist]] has a section on finding and fixing errors&lt;br /&gt;
* [http://aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=10949 Property List problems] (2011) - mostly XML, some OpenStep&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
[[Category:Legacy scripting]]&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Condition_scripts&amp;diff=78783</id>
		<title>Oolite JavaScript Reference: Condition scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Condition_scripts&amp;diff=78783"/>
		<updated>2023-04-10T14:14:41Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* allowAwardEquipment */ Added how to add &amp;quot;oolite-barred-equipment&amp;quot; support for oxp equipment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Condition scripts ==&lt;br /&gt;
Condition scripts are used to set conditions on the appearance of ships and equipment beyond the basics possible in [[shipdata.plist]], [[shipyard.plist]], [[shiplibrary.plist]] and [[equipment.plist]]. They have a similar purpose to the &amp;quot;conditions&amp;quot; parameters in those plists, which use the legacy scripting engine, but have the full flexibility of the Javascript scripting engine. If both &amp;quot;conditions&amp;quot; and a condition script are specified for the same item, they will both be tested (but you should never need to do this).&lt;br /&gt;
&lt;br /&gt;
Conditions scripts may define any or all of the following methods. There is a single instance of each condition script regardless of how many ships and equipment items use it, so variables may be shared between calls in &amp;lt;code&amp;gt;this._property&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In 1.81 the scripts are extended slightly to modify ''how'' things may appear as well as whether they may appear.&lt;br /&gt;
&lt;br /&gt;
=== allowAwardEquipment ===&lt;br /&gt;
{{oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
In order for this method to be called, the &amp;lt;code&amp;gt;condition_script&amp;lt;/code&amp;gt; property of an equipment item (as declared in the [[Equipment.plist]] file) must be specified, it must declare the name of the Javascript file where the method exists, and the method must exist in the referenced JavaScript file. The method will only be called for the equipment items which reference the condition script.&lt;br /&gt;
&lt;br /&gt;
This method is called when the game engine needs to know whether a particular ship can have equipment fitted. In other words, it is asking whether to allow equipment to be awarded to a ship. This may be because the player is looking at possible upgrades at a station (on the F3 Equip Ship screen), or from a call to [[Oolite_JavaScript_Reference:_Ship#canAwardEquipment|ship.canAwardEquipment]] or [[Oolite_JavaScript_Reference:_Ship#canAwardEquipment|ship.awardEquipment]], or for other similar reasons. The equipment key and a reference to the ship entity are passed as parameters. You would use this method to control if, and under what conditions, a piece of equipment is offered for purchase and installation. Returning a value of &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; would indicate that the equipment can be installed; returning a value of &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; indicates the equipment can't be installed and so it won't appear on the F3 Equip Ship screen, and any of the JavaScript methods to add the equipment item would fail. If the method does not exist, or returns a value other than &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, then a value of &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; is assumed and the equipment may be added or offered for sale (subject to other conditions, of course, like TL constraints)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; will be one of:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;newShip&amp;quot;&amp;lt;/code&amp;gt; - equipment for a ship in a station shipyard (F3 F3)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;npc&amp;quot;&amp;lt;/code&amp;gt; - awarding equipment to NPC on ship setup&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;purchase&amp;quot;&amp;lt;/code&amp;gt; - equipment for purchase on the F3 screen&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;scripted&amp;quot;&amp;lt;/code&amp;gt; - equipment added by JS or legacy scripts&lt;br /&gt;
(Context can in theory also be &amp;lt;code&amp;gt;&amp;quot;loading&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;damage&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;portable&amp;quot;&amp;lt;/code&amp;gt;, but if you see one of these, it's a bug)&lt;br /&gt;
&lt;br /&gt;
 this.allowAwardEquipment = function(eqKey, ship, context)&lt;br /&gt;
 {&lt;br /&gt;
   // your code here&lt;br /&gt;
   return bool;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The standard condition script for the core game equipment allows equipment to be barred using the &amp;lt;code&amp;gt;&amp;quot;oolite-barred-equipment&amp;quot;&amp;lt;/code&amp;gt; key in &amp;lt;code&amp;gt;script_info&amp;lt;/code&amp;gt;. If this key contains an array of equipment keys, then those items of equipment will not be sold at this station. In 1.79 and later, this &amp;lt;code&amp;gt;script_info&amp;lt;/code&amp;gt; key may be applied to any ship, preventing those items being installed onto the ship. For example:&lt;br /&gt;
&lt;br /&gt;
 script_info = {&lt;br /&gt;
   &amp;quot;oolite-barred-equipment&amp;quot; = (&amp;quot;EQ_WEAPON_MILITARY_LASER&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
On a station, this would prevent it selling military lasers. On a ship in 1.79 or later, this would also stop the ship fitting military lasers.&lt;br /&gt;
&lt;br /&gt;
If you want to allow your equipment to be barred in the same way, you can either set the &amp;lt;code&amp;gt;condition_script&amp;lt;/code&amp;gt; property to use the standart &amp;lt;code&amp;gt;&amp;quot;oolite-conditions.js&amp;quot;&amp;lt;/code&amp;gt; script, or add the following snippet to the &amp;lt;code&amp;gt;allowAwardEquipment&amp;lt;/code&amp;gt; of your condition script:&lt;br /&gt;
 // OXP hook to allow stations to forbid specific equipment&lt;br /&gt;
 if(context == &amp;quot;purchase&amp;quot; &amp;amp;&amp;amp; player.ship.dockedStation &amp;amp;&amp;amp; player.ship.dockedStation.scriptInfo[&amp;quot;oolite-barred-equipment&amp;quot;])&lt;br /&gt;
 {&lt;br /&gt;
   if (player.ship.dockedStation.scriptInfo[&amp;quot;oolite-barred-equipment&amp;quot;].indexOf(equipment) != -1)&lt;br /&gt;
   {&lt;br /&gt;
     return false;&lt;br /&gt;
   };&lt;br /&gt;
 &lt;br /&gt;
 // OXP hook to allow ships to forbid specific &amp;quot;available to all&amp;quot; equipment&lt;br /&gt;
 if(ship.scriptInfo &amp;amp;&amp;amp; ship.scriptInfo[&amp;quot;oolite-barred-equipment&amp;quot;] &amp;amp;&amp;amp; ship.scriptInfo[&amp;quot;oolite-barred-equipment&amp;quot;].indexOf(equipment) != -1)&lt;br /&gt;
 {&lt;br /&gt;
   return false;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
=== allowOfferShip ===&lt;br /&gt;
{{oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
This method is called when the game engine is considering adding a ship managed by this condition script to a shipyard. If the method does not exist, or returns a value other than &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, then the ship may appear for sale (or it may not, for a variety of other reasons). The ship key from shipyard.plist is passed as a parameter.&lt;br /&gt;
&lt;br /&gt;
 this.allowOfferShip = function(shipKey)&lt;br /&gt;
 {&lt;br /&gt;
   // your code here&lt;br /&gt;
   return bool;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== allowShowLibraryShip ===&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This method is called when the ship library is being shown in-game (rather than on the start screen) and determines whether the ship appears on the list for the player to view. If the method does not exist or returns a value which cannot be interpreted as a boolean, it will be assumed to have returned &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 this.allowShowLibraryShip = function(shipKey)&lt;br /&gt;
 {&lt;br /&gt;
   // your code here&lt;br /&gt;
   return bool;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== allowSpawnShip ===&lt;br /&gt;
{{oolite-method-added|1.77}}&lt;br /&gt;
&lt;br /&gt;
This method is called when the game engine is considering spawning a ship managed by this condition script. If the method does not exist, or returns a value other than &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, then the ship may be spawned (or it may not, if another ship with the appropriate role is selected instead). The ship key from shipdata.plist is passed as a parameter.&lt;br /&gt;
&lt;br /&gt;
 this.allowSpawnShip = function(shipKey)&lt;br /&gt;
 {&lt;br /&gt;
   // your code here&lt;br /&gt;
   return bool;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== updateEquipmentPrice ===&lt;br /&gt;
{{oolite-method-added|1.81}}&lt;br /&gt;
&lt;br /&gt;
This method is called when the game engine needs to know the price of fitting equipment covered by this condition script. The method takes an equipment key and the current price as parameters, and must return a non-negative number for the actual price of the equipment.&lt;br /&gt;
&lt;br /&gt;
 this.updateEquipmentPrice = function(equipmentKey, currentPrice)&lt;br /&gt;
 {&lt;br /&gt;
   // your code here&lt;br /&gt;
   return newPrice;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This method is called before [[Shipdata.plist#equipment_price_factor|equipment_price_factor]] is considered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
There is an extended bulletin board discussion with a couple of examples [http://www.aegidian.org/bb/viewtopic.php?p=286037#p286037 here] (2022).&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78437</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78437"/>
		<updated>2023-02-12T15:47:13Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Tabular layout */ Added picture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp. They also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js (but everything can go in the script.js if so desired).&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several special spatial characters can be used in determining the layout of the text, just as in this Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|300px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
=== Tab stops ===&lt;br /&gt;
Although there are no built-in tabs, they can be imitated with some JavaScript. Below you can find some of the basic functions for formating the text, but in various OXPs you can find them under other names, as well as others that can be a way more complex and specialized.&lt;br /&gt;
However, their core principle remains the same - they add invisible characters to the string passed to them up to the desired width - just as you can do it in a text editor, by adding spaces you can get (almost) any kind of text tabulation. The functions, however, don't use a rather wide regular space, but a narrow hair space, which allows text to align more accurately.&lt;br /&gt;
&lt;br /&gt;
The unit of text width is em - the intrinsic unit size of a font. The mission screen is 32 em wide and text wider than that will wrap with breaks on spaces. You can measure the width of a string using &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Global#defaultFont|defaultFont.measureString]]&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Here you can see one of the implementations of &amp;lt;code&amp;gt;_limitText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_padTextLeft&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_padTextRight&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_padTextAround&amp;lt;/code&amp;gt; functions. Feel free to use it in your work!&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * The function cuts text to limitWidth if necessary, and adds an ellipsis in this case.&lt;br /&gt;
 * It's useful when you want to display text that may be larger than the available space, such as ship names.&lt;br /&gt;
 * Large text, if left unprocessed, can make the rest of the formatting go haywire.&lt;br /&gt;
 *&lt;br /&gt;
 * text - the string to make sure that it won't be longer than limitWidth&lt;br /&gt;
 * limitWidth - the maximum width of the result, in ems&lt;br /&gt;
 * result - the limited string &lt;br /&gt;
 */&lt;br /&gt;
this._limitText = function _limitText(text, limitWidth) {&lt;br /&gt;
    const ellipsis = &amp;quot;…&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var tmp = text;&lt;br /&gt;
    &lt;br /&gt;
    while (defaultFont.measureString(tmp) &amp;gt; limitWidth) { // until text in wider than limit&lt;br /&gt;
        // remove from the text two last characters and add an ellipsis&lt;br /&gt;
        // two because we need to remove an ellipsis from previous iteration&lt;br /&gt;
        tmp = tmp.substring(0, tmp.length - 2) + ellipsis; &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return tmp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * The functions below add hair spaces to the text to make it have a desiredWidth, &lt;br /&gt;
 * but in case if text is too wide,  the function do the _limitText instead.&lt;br /&gt;
 *&lt;br /&gt;
 * To reduce the duplication of code they all just shorcuts for more generic _padText&lt;br /&gt;
 * &lt;br /&gt;
 * text - the string that we want to have a desiredWidth&lt;br /&gt;
 * desiredWidth - the width of the result, in ems&lt;br /&gt;
 * result - the padded string &lt;br /&gt;
 */&lt;br /&gt;
this._padTextLeft = function _padTextLeft(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;left&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this._padTextRight = function _padTextRight(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this._padTextAround = function _padTextAround(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;both&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * The function add hair spaces to the text to make it have a desiredWidth.&lt;br /&gt;
 * But in case if text is too wide, the function do _limitText instead.&lt;br /&gt;
 * &lt;br /&gt;
 * text - the string that we want to have a desiredWidth&lt;br /&gt;
 * desiredWidth - the width of the result, in ems&lt;br /&gt;
 * padSide:&lt;br /&gt;
 *     &amp;quot;left&amp;quot; - add pads before the text&lt;br /&gt;
 *     &amp;quot;right&amp;quot; - add pads after the text&lt;br /&gt;
 *     &amp;quot;both&amp;quot; - add pads both before and after the text&lt;br /&gt;
 * result - the padded string &lt;br /&gt;
 */&lt;br /&gt;
this._padText = function _padText(text, desiredWidth, padSide) {&lt;br /&gt;
    // Keep character and it's width it variables for sake of optimization and clarity&lt;br /&gt;
    const hairSpace = String.fromCharCode(31);&lt;br /&gt;
    const hairSpaceWidth = defaultFont.measureString(hairSpace);&lt;br /&gt;
&lt;br /&gt;
    // Find out the width of text in ems&lt;br /&gt;
    const textWidth = defaultFont.measureString(text);&lt;br /&gt;
&lt;br /&gt;
    const padsNeeded = Math.floor((desiredWidth - textWidth) / hairSpaceWidth);&lt;br /&gt;
&lt;br /&gt;
    var resultText;&lt;br /&gt;
    if (padsNeeded &amp;gt; 1) {&lt;br /&gt;
        // new Array(n).join(someString) - the compact way to say &amp;quot;repeat the someString n times&amp;quot;&lt;br /&gt;
        if (padSide == &amp;quot;left&amp;quot;) {&lt;br /&gt;
            resultText = new Array(padsNeeded).join(hairSpace) + text;&lt;br /&gt;
        } &lt;br /&gt;
        else if (padSide == &amp;quot;right&amp;quot;) {&lt;br /&gt;
            resultText = text + new Array(padsNeeded).join(hairSpace);&lt;br /&gt;
        }                &lt;br /&gt;
        else if (padSide == &amp;quot;both&amp;quot;) {&lt;br /&gt;
            const leftPadsNumber = Math.floor(padsNeeded / 2);&lt;br /&gt;
            const leftPadding = new Array(leftPadsNumber).join(hairSpace);&lt;br /&gt;
            const rightPadding = new Array(padsNeeded - leftPadsNumber).join(hairSpace);&lt;br /&gt;
&lt;br /&gt;
            resultText = leftPadding + text + rightPadding;&lt;br /&gt;
        }&lt;br /&gt;
    }               &lt;br /&gt;
    else {&lt;br /&gt;
        resultText = this.$limitText(text, desiredWidth);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return resultText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tabular layout ===&lt;br /&gt;
When you need to get something in the form of a table or columns, you can use padText-like functions to adjust the padding of the desired width to labels and data, and then concatenate them into one line, just keep in mind that max row length is 32 em.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var pad1em = this._padTextLeft(&amp;quot;&amp;quot;, 1);&lt;br /&gt;
var tableHeader = this._padTextLeft(&amp;quot;#&amp;quot;, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(&amp;quot;Item&amp;quot;, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Remaining, pcs.&amp;quot;, 7) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Price, ₢ &amp;quot;, 7) + pad1em;&lt;br /&gt;
&lt;br /&gt;
var tableRows = Array(this.$items.length);&lt;br /&gt;
for(var i = 0; i &amp;lt; this.$items.length; i++) {&lt;br /&gt;
    var item = this.$items[i];&lt;br /&gt;
    tableRows[i] = this._padTextLeft(i + 1, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(item.name, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(item.quantity, 7) + pad1em +&lt;br /&gt;
    this._padTextLeft(formatCredits(item.price), 7) + pad1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Concatenate them in one string if you want to display &lt;br /&gt;
// the table as &amp;quot;message&amp;quot; on the mission screen&lt;br /&gt;
var table = tableHeader + &amp;quot;\n&amp;quot; + tableRows.join(&amp;quot;\n&amp;quot;) + &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy function to help format text in tabular layout for use in mission screens/MFDs. See his alaric-oxp-utilities.js file:&lt;br /&gt;
[[File:Alaric's_Tabular_text_for_MDFs_mission_screens.png|right|300px]]&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var rows = [&lt;br /&gt;
        [ /* header */&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Fleet status&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* line spacer */&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 1 */&lt;br /&gt;
&lt;br /&gt;
            { width: 1.5, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width: 20.5, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Ship&amp;quot; },&lt;br /&gt;
            { width: 10,   alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;Maintenance&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
        [ /* row 2 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;1&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Cobra Mk III&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;10%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 3 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;2&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, text: &amp;quot;Krait&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;7%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 4 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;3&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long ship class name that happens to be not so long for mission screen&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 5 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;4&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long name without ellipses that happens to be not so long for mission screen&amp;quot;, ellipses: false },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Next enemy group encounter in 4 hours&amp;quot; }&lt;br /&gt;
        ]&lt;br /&gt;
    ]&lt;br /&gt;
		&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
var utils = worldScripts[&amp;quot;alaric-oxp-utilities&amp;quot;]; // Get world script object if you copied entire file to your OXP&lt;br /&gt;
var messageText = utils._buildTabularText(rows); // or use this._buildTabularText(rows), if you copied just that funtions in your world script&lt;br /&gt;
&lt;br /&gt;
mission.runScreen({&lt;br /&gt;
    title: &amp;quot;Statistics&amp;quot;,&lt;br /&gt;
    screenID: &amp;quot;oxpname-stats-fleet&amp;quot;&lt;br /&gt;
    message: messageText&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Should there be here one more example with generating text from an array with ships? &lt;br /&gt;
To show both how to do it and how compact will it be&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lib_Starmap02.png|320px|thumb|right|Library OXP Demos: Starmap (animated)]]&lt;br /&gt;
== Visual Mission screens ==&lt;br /&gt;
It is possible to have animations or cutscenes instead. These require either Library.oxp or the deprecated CCL.&lt;br /&gt;
&lt;br /&gt;
These two oxp's allow for more complex interractions. See [[Library OXP]]'s &amp;quot;Music&amp;quot; and the two &amp;quot;Demos&amp;quot; (Starmap &amp;amp; Animator). And see also the deprecated [[CCL]]'s never-used [[Cutscene]].&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
=== Useful OXPs ===&lt;br /&gt;
*[[HDBG]] - High Definition BackGrounds - provides background pictures for Mission Screens&lt;br /&gt;
*HDBG Image Pack A (alas, Image Pack B never emerged...)&lt;br /&gt;
*[[Library OXP]] - enables animated Mission Screens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=File:Alaric%27s_Tabular_text_for_MDFs_mission_screens.png&amp;diff=78436</id>
		<title>File:Alaric's Tabular text for MDFs mission screens.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=File:Alaric%27s_Tabular_text_for_MDFs_mission_screens.png&amp;diff=78436"/>
		<updated>2023-02-12T15:44:19Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: From http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
From http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78435</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78435"/>
		<updated>2023-02-12T15:23:09Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Tab stops */ Reworded a bit for clarity&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp. They also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js (but everything can go in the script.js if so desired).&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several special spatial characters can be used in determining the layout of the text, just as in this Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|300px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
=== Tab stops ===&lt;br /&gt;
Although there are no built-in tabs, they can be imitated with some JavaScript. Below you can find some of the basic functions for formating the text, but in various OXPs you can find them under other names, as well as others that can be a way more complex and specialized.&lt;br /&gt;
However, their core principle remains the same - they add invisible characters to the string passed to them up to the desired width - just as you can do it in a text editor, by adding spaces you can get (almost) any kind of text tabulation. The functions, however, don't use a rather wide regular space, but a narrow hair space, which allows text to align more accurately.&lt;br /&gt;
&lt;br /&gt;
The unit of text width is em - the intrinsic unit size of a font. The mission screen is 32 em wide and text wider than that will wrap with breaks on spaces. You can measure the width of a string using &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Global#defaultFont|defaultFont.measureString]]&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Here you can see one of the implementations of &amp;lt;code&amp;gt;_limitText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_padTextLeft&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_padTextRight&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_padTextAround&amp;lt;/code&amp;gt; functions. Feel free to use it in your work!&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * The function cuts text to limitWidth if necessary, and adds an ellipsis in this case.&lt;br /&gt;
 * It's useful when you want to display text that may be larger than the available space, such as ship names.&lt;br /&gt;
 * Large text, if left unprocessed, can make the rest of the formatting go haywire.&lt;br /&gt;
 *&lt;br /&gt;
 * text - the string to make sure that it won't be longer than limitWidth&lt;br /&gt;
 * limitWidth - the maximum width of the result, in ems&lt;br /&gt;
 * result - the limited string &lt;br /&gt;
 */&lt;br /&gt;
this._limitText = function _limitText(text, limitWidth) {&lt;br /&gt;
    const ellipsis = &amp;quot;…&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var tmp = text;&lt;br /&gt;
    &lt;br /&gt;
    while (defaultFont.measureString(tmp) &amp;gt; limitWidth) { // until text in wider than limit&lt;br /&gt;
        // remove from the text two last characters and add an ellipsis&lt;br /&gt;
        // two because we need to remove an ellipsis from previous iteration&lt;br /&gt;
        tmp = tmp.substring(0, tmp.length - 2) + ellipsis; &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return tmp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * The functions below add hair spaces to the text to make it have a desiredWidth, &lt;br /&gt;
 * but in case if text is too wide,  the function do the _limitText instead.&lt;br /&gt;
 *&lt;br /&gt;
 * To reduce the duplication of code they all just shorcuts for more generic _padText&lt;br /&gt;
 * &lt;br /&gt;
 * text - the string that we want to have a desiredWidth&lt;br /&gt;
 * desiredWidth - the width of the result, in ems&lt;br /&gt;
 * result - the padded string &lt;br /&gt;
 */&lt;br /&gt;
this._padTextLeft = function _padTextLeft(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;left&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this._padTextRight = function _padTextRight(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this._padTextAround = function _padTextAround(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;both&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * The function add hair spaces to the text to make it have a desiredWidth.&lt;br /&gt;
 * But in case if text is too wide, the function do _limitText instead.&lt;br /&gt;
 * &lt;br /&gt;
 * text - the string that we want to have a desiredWidth&lt;br /&gt;
 * desiredWidth - the width of the result, in ems&lt;br /&gt;
 * padSide:&lt;br /&gt;
 *     &amp;quot;left&amp;quot; - add pads before the text&lt;br /&gt;
 *     &amp;quot;right&amp;quot; - add pads after the text&lt;br /&gt;
 *     &amp;quot;both&amp;quot; - add pads both before and after the text&lt;br /&gt;
 * result - the padded string &lt;br /&gt;
 */&lt;br /&gt;
this._padText = function _padText(text, desiredWidth, padSide) {&lt;br /&gt;
    // Keep character and it's width it variables for sake of optimization and clarity&lt;br /&gt;
    const hairSpace = String.fromCharCode(31);&lt;br /&gt;
    const hairSpaceWidth = defaultFont.measureString(hairSpace);&lt;br /&gt;
&lt;br /&gt;
    // Find out the width of text in ems&lt;br /&gt;
    const textWidth = defaultFont.measureString(text);&lt;br /&gt;
&lt;br /&gt;
    const padsNeeded = Math.floor((desiredWidth - textWidth) / hairSpaceWidth);&lt;br /&gt;
&lt;br /&gt;
    var resultText;&lt;br /&gt;
    if (padsNeeded &amp;gt; 1) {&lt;br /&gt;
        // new Array(n).join(someString) - the compact way to say &amp;quot;repeat the someString n times&amp;quot;&lt;br /&gt;
        if (padSide == &amp;quot;left&amp;quot;) {&lt;br /&gt;
            resultText = new Array(padsNeeded).join(hairSpace) + text;&lt;br /&gt;
        } &lt;br /&gt;
        else if (padSide == &amp;quot;right&amp;quot;) {&lt;br /&gt;
            resultText = text + new Array(padsNeeded).join(hairSpace);&lt;br /&gt;
        }                &lt;br /&gt;
        else if (padSide == &amp;quot;both&amp;quot;) {&lt;br /&gt;
            const leftPadsNumber = Math.floor(padsNeeded / 2);&lt;br /&gt;
            const leftPadding = new Array(leftPadsNumber).join(hairSpace);&lt;br /&gt;
            const rightPadding = new Array(padsNeeded - leftPadsNumber).join(hairSpace);&lt;br /&gt;
&lt;br /&gt;
            resultText = leftPadding + text + rightPadding;&lt;br /&gt;
        }&lt;br /&gt;
    }               &lt;br /&gt;
    else {&lt;br /&gt;
        resultText = this.$limitText(text, desiredWidth);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return resultText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tabular layout ===&lt;br /&gt;
When you need to get something in the form of a table or columns, you can use padText-like functions to adjust the padding of the desired width to labels and data, and then concatenate them into one line, just keep in mind that max row length is 32 em.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var pad1em = this._padTextLeft(&amp;quot;&amp;quot;, 1);&lt;br /&gt;
var tableHeader = this._padTextLeft(&amp;quot;#&amp;quot;, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(&amp;quot;Item&amp;quot;, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Remaining, pcs.&amp;quot;, 7) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Price, ₢ &amp;quot;, 7) + pad1em;&lt;br /&gt;
&lt;br /&gt;
var tableRows = Array(this.$items.length);&lt;br /&gt;
for(var i = 0; i &amp;lt; this.$items.length; i++) {&lt;br /&gt;
    var item = this.$items[i];&lt;br /&gt;
    tableRows[i] = this._padTextLeft(i + 1, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(item.name, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(item.quantity, 7) + pad1em +&lt;br /&gt;
    this._padTextLeft(formatCredits(item.price), 7) + pad1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Concatenate them in one string if you want to display &lt;br /&gt;
// the table as &amp;quot;message&amp;quot; on the mission screen&lt;br /&gt;
var table = tableHeader + &amp;quot;\n&amp;quot; + tableRows.join(&amp;quot;\n&amp;quot;) + &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy function to help format text in tabular layout for use in mission screens/MFDs. See his alaric-oxp-utilities.js file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var rows = [&lt;br /&gt;
        [ /* header */&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Fleet status&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* line spacer */&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 1 */&lt;br /&gt;
&lt;br /&gt;
            { width: 1.5, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width: 20.5, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Ship&amp;quot; },&lt;br /&gt;
            { width: 10,   alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;Maintenance&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
        [ /* row 2 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;1&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Cobra Mk III&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;10%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 3 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;2&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, text: &amp;quot;Krait&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;7%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 4 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;3&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long ship class name that happens to be not so long for mission screen&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 5 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;4&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long name without ellipses that happens to be not so long for mission screen&amp;quot;, ellipses: false },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Next enemy group encounter in 4 hours&amp;quot; }&lt;br /&gt;
        ]&lt;br /&gt;
    ]&lt;br /&gt;
		&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
var utils = worldScripts[&amp;quot;alaric-oxp-utilities&amp;quot;]; // Get world script object if you copied entire file to your OXP&lt;br /&gt;
var messageText = utils._buildTabularText(rows); // or use this._buildTabularText(rows), if you copied just that funtions in your world script&lt;br /&gt;
&lt;br /&gt;
mission.runScreen({&lt;br /&gt;
    title: &amp;quot;Statistics&amp;quot;,&lt;br /&gt;
    screenID: &amp;quot;oxpname-stats-fleet&amp;quot;&lt;br /&gt;
    message: messageText&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Should there be here one more example with generating text from an array with ships? &lt;br /&gt;
To show both how to do it and how compact will it be&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lib_Starmap02.png|320px|thumb|right|Library OXP Demos: Starmap (animated)]]&lt;br /&gt;
== Visual Mission screens ==&lt;br /&gt;
It is possible to have animations or cutscenes instead. These require either Library.oxp or the deprecated CCL.&lt;br /&gt;
&lt;br /&gt;
These two oxp's allow for more complex interractions. See [[Library OXP]]'s &amp;quot;Music&amp;quot; and the two &amp;quot;Demos&amp;quot; (Starmap &amp;amp; Animator). And see also the deprecated [[CCL]]'s never-used [[Cutscene]].&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
=== Useful OXPs ===&lt;br /&gt;
*[[HDBG]] - High Definition BackGrounds - provides background pictures for Mission Screens&lt;br /&gt;
*HDBG Image Pack A (alas, Image Pack B never emerged...)&lt;br /&gt;
*[[Library OXP]] - enables animated Mission Screens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78434</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78434"/>
		<updated>2023-02-12T12:35:07Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Tab stops */  Added code of padText functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp. They also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js (but everything can go in the script.js if so desired).&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several special spatial characters can be used in determining the layout of the text, just as in this Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|300px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
=== Tab stops ===&lt;br /&gt;
Although there are no built-in tabs, this behavior can be mimicked using helper functions. Below will be placed are just one of the implementations of the most basic and atomic functions - _limitText and _padTextLeft/Right/Around, but in various OXPs you can find them under other names, as well as others that can be a way more complex and specialized.&lt;br /&gt;
However, their core principle remains the same - they add invisible characters to the string passed to them up to the desired width - just as you can do it in a text editor, by adding spaces you can get (almost) any kind of text tabulation. The functions, however, don't use a rather wide regular space, but a narrow hair space, which allows text to align more accurately.&lt;br /&gt;
&lt;br /&gt;
Text width is measured in ems and may vary depending on the font. To measure the length of text in a default forn, you can use &amp;lt;code&amp;gt;defaultFont.measureString&amp;lt;/code&amp;gt;. The width of mission screen row equals to 32 ems.&lt;br /&gt;
&lt;br /&gt;
Here you can see one of the implementations of these functions. Inside the code there are comments that should help better understand how the functions work.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * The function cuts text to limitWidth if necessary, and adds an ellipsis in this case.&lt;br /&gt;
 * It's useful when you want to display text that may be larger than the available space, such as ship names.&lt;br /&gt;
 * Large text, if left unprocessed, can make the rest of the formatting go haywire.&lt;br /&gt;
 *&lt;br /&gt;
 * text - the string to make sure that it won't be longer than limitWidth&lt;br /&gt;
 * limitWidth - the maximum width of the result, in ems&lt;br /&gt;
 * result - the limited string &lt;br /&gt;
 */&lt;br /&gt;
this._limitText = function _limitText(text, limitWidth) {&lt;br /&gt;
    const ellipsis = &amp;quot;…&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var tmp = text;&lt;br /&gt;
    &lt;br /&gt;
    while (defaultFont.measureString(tmp) &amp;gt; limitWidth) { // until text in wider than limit&lt;br /&gt;
        // remove from the text two last characters and add an ellipsis&lt;br /&gt;
        // two because we need to remove an ellipsis from previous iteration&lt;br /&gt;
        tmp = tmp.substring(0, tmp.length - 2) + ellipsis; &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return tmp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * The functions below add hair spaces to the text to make it have a desiredWidth, &lt;br /&gt;
 * but in case if text is too wide,  the function do the _limitText instead.&lt;br /&gt;
 *&lt;br /&gt;
 * To reduce the duplication of code they all just shorcuts for more generic _padText&lt;br /&gt;
 * &lt;br /&gt;
 * text - the string that we want to have a desiredWidth&lt;br /&gt;
 * desiredWidth - the width of the result, in ems&lt;br /&gt;
 * result - the padded string &lt;br /&gt;
 */&lt;br /&gt;
this._padTextLeft = function _padTextLeft(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;left&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this._padTextRight = function _padTextRight(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this._padTextAround = function _padTextAround(text, desiredWidth) {&lt;br /&gt;
    return this._padText(text, desiredWidth, &amp;quot;both&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * The function add hair spaces to the text to make it have a desiredWidth.&lt;br /&gt;
 * But in case if text is too wide, the function do _limitText instead.&lt;br /&gt;
 * &lt;br /&gt;
 * text - the string that we want to have a desiredWidth&lt;br /&gt;
 * desiredWidth - the width of the result, in ems&lt;br /&gt;
 * padSide:&lt;br /&gt;
 *     &amp;quot;left&amp;quot; - add pads before the text&lt;br /&gt;
 *     &amp;quot;right&amp;quot; - add pads after the text&lt;br /&gt;
 *     &amp;quot;both&amp;quot; - add pads both before and after the text&lt;br /&gt;
 * result - the padded string &lt;br /&gt;
 */&lt;br /&gt;
this._padText = function _padText(text, desiredWidth, padSide) {&lt;br /&gt;
    // Keep character and it's width it variables for sake of optimization and clarity&lt;br /&gt;
    const hairSpace = String.fromCharCode(31);&lt;br /&gt;
    const hairSpaceWidth = defaultFont.measureString(hairSpace);&lt;br /&gt;
&lt;br /&gt;
    // Find out the width of text in ems&lt;br /&gt;
    const textWidth = defaultFont.measureString(text);&lt;br /&gt;
&lt;br /&gt;
    const padsNeeded = Math.floor((desiredWidth - textWidth) / hairSpaceWidth);&lt;br /&gt;
&lt;br /&gt;
    var resultText;&lt;br /&gt;
    if (padsNeeded &amp;gt; 1) {&lt;br /&gt;
        // new Array(n).join(someString) - the compact way to say &amp;quot;repeat the someString n times&amp;quot;&lt;br /&gt;
        if (padSide == &amp;quot;left&amp;quot;) {&lt;br /&gt;
            resultText = new Array(padsNeeded).join(hairSpace) + text;&lt;br /&gt;
        } &lt;br /&gt;
        else if (padSide == &amp;quot;right&amp;quot;) {&lt;br /&gt;
            resultText = text + new Array(padsNeeded).join(hairSpace);&lt;br /&gt;
        }                &lt;br /&gt;
        else if (padSide == &amp;quot;both&amp;quot;) {&lt;br /&gt;
            const leftPadsNumber = Math.floor(padsNeeded / 2);&lt;br /&gt;
            const leftPadding = new Array(leftPadsNumber).join(hairSpace);&lt;br /&gt;
            const rightPadding = new Array(padsNeeded - leftPadsNumber).join(hairSpace);&lt;br /&gt;
&lt;br /&gt;
            resultText = leftPadding + text + rightPadding;&lt;br /&gt;
        }&lt;br /&gt;
    }               &lt;br /&gt;
    else {&lt;br /&gt;
        resultText = this.$limitText(text, desiredWidth);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return resultText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tabular layout ===&lt;br /&gt;
When you need to get something in the form of a table or columns, you can use padText-like functions to adjust the padding of the desired width to labels and data, and then concatenate them into one line, just keep in mind that max row length is 32 em.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var pad1em = this._padTextLeft(&amp;quot;&amp;quot;, 1);&lt;br /&gt;
var tableHeader = this._padTextLeft(&amp;quot;#&amp;quot;, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(&amp;quot;Item&amp;quot;, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Remaining, pcs.&amp;quot;, 7) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Price, ₢ &amp;quot;, 7) + pad1em;&lt;br /&gt;
&lt;br /&gt;
var tableRows = Array(this.$items.length);&lt;br /&gt;
for(var i = 0; i &amp;lt; this.$items.length; i++) {&lt;br /&gt;
    var item = this.$items[i];&lt;br /&gt;
    tableRows[i] = this._padTextLeft(i + 1, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(item.name, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(item.quantity, 7) + pad1em +&lt;br /&gt;
    this._padTextLeft(formatCredits(item.price), 7) + pad1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Concatenate them in one string if you want to display &lt;br /&gt;
// the table as &amp;quot;message&amp;quot; on the mission screen&lt;br /&gt;
var table = tableHeader + &amp;quot;\n&amp;quot; + tableRows.join(&amp;quot;\n&amp;quot;) + &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy function to help format text in tabular layout for use in mission screens/MFDs. See his alaric-oxp-utilities.js file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var rows = [&lt;br /&gt;
        [ /* header */&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Fleet status&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* line spacer */&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 1 */&lt;br /&gt;
&lt;br /&gt;
            { width: 1.5, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width: 20.5, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Ship&amp;quot; },&lt;br /&gt;
            { width: 10,   alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;Maintenance&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
        [ /* row 2 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;1&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Cobra Mk III&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;10%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 3 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;2&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, text: &amp;quot;Krait&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;7%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 4 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;3&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long ship class name that happens to be not so long for mission screen&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 5 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;4&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long name without ellipses that happens to be not so long for mission screen&amp;quot;, ellipses: false },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Next enemy group encounter in 4 hours&amp;quot; }&lt;br /&gt;
        ]&lt;br /&gt;
    ]&lt;br /&gt;
		&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
var utils = worldScripts[&amp;quot;alaric-oxp-utilities&amp;quot;]; // Get world script object if you copied entire file to your OXP&lt;br /&gt;
var messageText = utils._buildTabularText(rows); // or use this._buildTabularText(rows), if you copied just that funtions in your world script&lt;br /&gt;
&lt;br /&gt;
mission.runScreen({&lt;br /&gt;
    title: &amp;quot;Statistics&amp;quot;,&lt;br /&gt;
    screenID: &amp;quot;oxpname-stats-fleet&amp;quot;&lt;br /&gt;
    message: messageText&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Should there be here one more example with generating text from an array with ships? &lt;br /&gt;
To show both how to do it and how compact will it be&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lib_Starmap02.png|320px|thumb|right|Library OXP Demos: Starmap (animated)]]&lt;br /&gt;
== Visual Mission screens ==&lt;br /&gt;
It is possible to have animations or cutscenes instead. These require either Library.oxp or the deprecated CCL.&lt;br /&gt;
&lt;br /&gt;
These two oxp's allow for more complex interractions. See [[Library OXP]]'s &amp;quot;Music&amp;quot; and the two &amp;quot;Demos&amp;quot; (Starmap &amp;amp; Animator). And see also the deprecated [[CCL]]'s never-used [[Cutscene]].&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
=== Useful OXPs ===&lt;br /&gt;
*[[HDBG]] - High Definition BackGrounds - provides background pictures for Mission Screens&lt;br /&gt;
*HDBG Image Pack A (alas, Image Pack B never emerged...)&lt;br /&gt;
*[[Library OXP]] - enables animated Mission Screens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78433</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78433"/>
		<updated>2023-02-12T10:54:40Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Alignment */ Added about padText- functions, no code yet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp. They also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js (but everything can go in the script.js if so desired).&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several special spatial characters can be used in determining the layout of the text, just as in this Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|300px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
=== Tab stops ===&lt;br /&gt;
Although there are no built-in tabs, this behavior can be mimicked using helper functions. Below will be placed are just one of the implementations of the most basic and atomic functions - _limitText and _padTextLeft/Right/Around, but in various OXPs you can find them under other names, as well as others that can be a way more complex and specialized.&lt;br /&gt;
However, their core principle remains the same - they add invisible characters to the string passed to them up to the desired width - just as you can do it in a text editor, by adding spaces you can get (almost) any kind of text tabulation. The functions, however, don't use a rather wide regular space, but a narrow hair space, which allows text to align more accurately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tabular layout ===&lt;br /&gt;
When you need to get something in the form of a table or columns, you can use padText-like functions to adjust the padding of the desired width to labels and data, and then concatenate them into one line, just keep in mind that max row length is 32 em.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var pad1em = this._padTextLeft(&amp;quot;&amp;quot;, 1);&lt;br /&gt;
var tableHeader = this._padTextLeft(&amp;quot;#&amp;quot;, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(&amp;quot;Item&amp;quot;, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Remaining, pcs.&amp;quot;, 7) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Price, ₢ &amp;quot;, 7) + pad1em;&lt;br /&gt;
&lt;br /&gt;
var tableRows = Array(this.$items.length);&lt;br /&gt;
for(var i = 0; i &amp;lt; this.$items.length; i++) {&lt;br /&gt;
    var item = this.$items[i];&lt;br /&gt;
    tableRows[i] = this._padTextLeft(i + 1, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(item.name, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(item.quantity, 7) + pad1em +&lt;br /&gt;
    this._padTextLeft(formatCredits(item.price), 7) + pad1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Concatenate them in one string if you want to display &lt;br /&gt;
// the table as &amp;quot;message&amp;quot; on the mission screen&lt;br /&gt;
var table = tableHeader + &amp;quot;\n&amp;quot; + tableRows.join(&amp;quot;\n&amp;quot;) + &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy function to help format text in tabular layout for use in mission screens/MFDs. See his alaric-oxp-utilities.js file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var rows = [&lt;br /&gt;
        [ /* header */&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Fleet status&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* line spacer */&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 1 */&lt;br /&gt;
&lt;br /&gt;
            { width: 1.5, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width: 20.5, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Ship&amp;quot; },&lt;br /&gt;
            { width: 10,   alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;Maintenance&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
        [ /* row 2 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;1&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Cobra Mk III&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;10%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 3 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;2&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, text: &amp;quot;Krait&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;7%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 4 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;3&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long ship class name that happens to be not so long for mission screen&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 5 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;4&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long name without ellipses that happens to be not so long for mission screen&amp;quot;, ellipses: false },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Next enemy group encounter in 4 hours&amp;quot; }&lt;br /&gt;
        ]&lt;br /&gt;
    ]&lt;br /&gt;
		&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
var utils = worldScripts[&amp;quot;alaric-oxp-utilities&amp;quot;]; // Get world script object if you copied entire file to your OXP&lt;br /&gt;
var messageText = utils._buildTabularText(rows); // or use this._buildTabularText(rows), if you copied just that funtions in your world script&lt;br /&gt;
&lt;br /&gt;
mission.runScreen({&lt;br /&gt;
    title: &amp;quot;Statistics&amp;quot;,&lt;br /&gt;
    screenID: &amp;quot;oxpname-stats-fleet&amp;quot;&lt;br /&gt;
    message: messageText&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Should there be here one more example with generating text from an array with ships? &lt;br /&gt;
To show both how to do it and how compact will it be&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Lib_Starmap02.png|320px|thumb|right|Library OXP Demos: Starmap (animated)]]&lt;br /&gt;
== Visual Mission screens ==&lt;br /&gt;
It is possible to have animations or cutscenes instead. These require either Library.oxp or the deprecated CCL.&lt;br /&gt;
&lt;br /&gt;
These two oxp's allow for more complex interractions. See [[Library OXP]]'s &amp;quot;Music&amp;quot; and the two &amp;quot;Demos&amp;quot; (Starmap &amp;amp; Animator). And see also the deprecated [[CCL]]'s never-used [[Cutscene]].&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
=== Useful OXPs ===&lt;br /&gt;
*[[HDBG]] - High Definition BackGrounds - provides background pictures for Mission Screens&lt;br /&gt;
*HDBG Image Pack A (alas, Image Pack B never emerged...)&lt;br /&gt;
*[[Library OXP]] - enables animated Mission Screens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78421</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78421"/>
		<updated>2023-02-08T23:19:39Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Alignment */ Changed appearance of code blocks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp but also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several spacial characters are used in determining the layout of the text, just as in Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|200px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
=== Tabular layout ===&lt;br /&gt;
When you need to get something in the form of a table or columns, you can use padText-like functions to adjust the padding of the desired width to labels and data, and then concatenate them into one line, just keep in mind that max row length is 32 em.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var pad1em = this._padTextLeft(&amp;quot;&amp;quot;, 1);&lt;br /&gt;
var tableHeader = this._padTextLeft(&amp;quot;#&amp;quot;, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(&amp;quot;Item&amp;quot;, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Remaining, pcs.&amp;quot;, 7) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Price, ₢ &amp;quot;, 7) + pad1em;&lt;br /&gt;
&lt;br /&gt;
var tableRows = Array(this.$items.length);&lt;br /&gt;
for(var i = 0; i &amp;lt; this.$items.length; i++) {&lt;br /&gt;
    var item = this.$items[i];&lt;br /&gt;
    tableRows[i] = this._padTextLeft(i + 1, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(item.name, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(item.quantity, 7) + pad1em +&lt;br /&gt;
    this._padTextLeft(formatCredits(item.price), 7) + pad1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Concatenate them in one string if you want to display &lt;br /&gt;
// the table as &amp;quot;message&amp;quot; on the mission screen&lt;br /&gt;
var table = tableHeader + &amp;quot;\n&amp;quot; + tableRows.join(&amp;quot;\n&amp;quot;) + &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy function to help format text in tabular layout for use in mission screens/MFDs. See his alaric-oxp-utilities.js file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width: max-content; max-height: 40vh; overflow-y: auto;&amp;quot;&amp;gt;&lt;br /&gt;
var rows = [&lt;br /&gt;
        [ /* header */&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Fleet status&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* line spacer */&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 1 */&lt;br /&gt;
&lt;br /&gt;
            { width: 1.5, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width: 20.5, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Ship&amp;quot; },&lt;br /&gt;
            { width: 10,   alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;Maintenance&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
        [ /* row 2 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;1&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Cobra Mk III&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;10%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 3 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;2&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, text: &amp;quot;Krait&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;7%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 4 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;3&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long ship class name that happens to be not so long for mission screen&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 5 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;4&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long name without ellipses that happens to be not so long for mission screen&amp;quot;, ellipses: false },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Next enemy group encounter in 4 hours&amp;quot; }&lt;br /&gt;
        ]&lt;br /&gt;
    ]&lt;br /&gt;
		&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
var utils = worldScripts[&amp;quot;alaric-oxp-utilities&amp;quot;]; // Get world script object if you copied entire file to your OXP&lt;br /&gt;
var messageText = utils._buildTabularText(rows); // or use this._buildTabularText(rows), if you copied just that funtions in your world script&lt;br /&gt;
&lt;br /&gt;
mission.runScreen({&lt;br /&gt;
    title: &amp;quot;Statistics&amp;quot;,&lt;br /&gt;
    screenID: &amp;quot;oxpname-stats-fleet&amp;quot;&lt;br /&gt;
    message: messageText&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Should there be here one more example with generating text from an array with ships? &lt;br /&gt;
To show both how to do it and how compact will it be&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Svengali's Library &amp;amp; CCL ==&lt;br /&gt;
These two oxp's allow for more complex interractions. See the deprecated [[CCL]]'s never used [[Cutscene]], as well as the current [[Library OXP]]'s &amp;quot;Music&amp;quot; and &amp;quot;Demos&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78420</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78420"/>
		<updated>2023-02-08T22:12:57Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Alignment */ Added examples how to use pad function for tables and how to use Alaric's code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp but also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several spacial characters are used in determining the layout of the text, just as in Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|200px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
=== Tabular layout ===&lt;br /&gt;
When you need to get something in the form of a table or columns, you can use padText-like functions to adjust the padding of the desired width to labels and data, and then concatenate them into one line, just keep in mind that max row length is 32 em.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
var pad1em = this._padTextLeft(&amp;quot;&amp;quot;, 1);&lt;br /&gt;
var tableHeader = this._padTextLeft(&amp;quot;#&amp;quot;, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(&amp;quot;Item&amp;quot;, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Remaining, pcs.&amp;quot;, 7) + pad1em +&lt;br /&gt;
    this._padTextAround(&amp;quot;Price, ₢ &amp;quot;, 7) + pad1em;&lt;br /&gt;
&lt;br /&gt;
var tableRows = Array(this.$items.length);&lt;br /&gt;
for(var i = 0; i &amp;lt; this.$items.length; i++) {&lt;br /&gt;
    var item = this.$items[i];&lt;br /&gt;
    tableRows[i] = this._padTextLeft(i + 1, 3) + pad1em + &lt;br /&gt;
    this._padTextRight(item.name, 11) + pad1em +&lt;br /&gt;
    this._padTextAround(item.quantity, 7) + pad1em +&lt;br /&gt;
    this._padTextLeft(formatCredits(item.price), 7) + pad1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Concatenate them in one string if you want to display &lt;br /&gt;
// the table as &amp;quot;message&amp;quot; on the mission screen&lt;br /&gt;
var table = tableHeader + &amp;quot;\n&amp;quot; + tableRows.join(&amp;quot;\n&amp;quot;) + &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy function to help format text in tabular layout for use in mission screens/MFDs.&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show code&amp;quot; data-collapsetext=&amp;quot;Hide code&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
See his alaric-oxp-utilities.js file: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show code&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
You can use it like this: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var rows = [&lt;br /&gt;
        [ /* header */&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Fleet status&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* line spacer */&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 1 */&lt;br /&gt;
&lt;br /&gt;
            { width: 1.5, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width: 20.5, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Ship&amp;quot; },&lt;br /&gt;
            { width: 10,   alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;Maintenance&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
        [ /* row 2 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;1&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Cobra Mk III&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;10%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 3 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;2&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, text: &amp;quot;Krait&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;7%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 4 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;3&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long ship class name that happens to be not so long for mission screen&amp;quot; },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [ /* row 5 */&lt;br /&gt;
            { width:   1, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;4&amp;quot; },&lt;br /&gt;
            { width: 0.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;&amp;quot; },	// spacer&lt;br /&gt;
            { width:  28, alignment: &amp;quot;LEFT&amp;quot;, text: &amp;quot;Unrealisticly long name without ellipses that happens to be not so long for mission screen&amp;quot;, ellipses: false },&lt;br /&gt;
            { width: 2.5, alignment: &amp;quot;RIGHT&amp;quot;, text: &amp;quot;100%&amp;quot; }&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
        ],&lt;br /&gt;
&lt;br /&gt;
        [&lt;br /&gt;
            { width: 32, alignment: &amp;quot;CENTER&amp;quot;, text: &amp;quot;Next enemy grooup encounter in 4 hours&amp;quot; }&lt;br /&gt;
        ]&lt;br /&gt;
    ]&lt;br /&gt;
		&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
var utils = worldScripts[&amp;quot;alaric-oxp-utilities&amp;quot;]; // Get world script object if you copied entire file to your OXP&lt;br /&gt;
var messageText = utils._buildTabularText(rows); // or use this._buildTabularText(rows), if you copied just that funtions in your world script&lt;br /&gt;
&lt;br /&gt;
mission.runScreen({&lt;br /&gt;
    title: &amp;quot;Statistics&amp;quot;,&lt;br /&gt;
    screenID: &amp;quot;oxpname-stats-fleet&amp;quot;&lt;br /&gt;
    message: messageText&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Should there be here one more example with generating text from an array with ships? &lt;br /&gt;
To show both how to do it and how compact will it be&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Svengali's Library &amp;amp; CCL ==&lt;br /&gt;
These two oxp's allow for more complex interractions. See the deprecated [[CCL]]'s never used [[Cutscene]], as well as the current [[Library OXP]]'s &amp;quot;Music&amp;quot; and &amp;quot;Demos&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78419</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78419"/>
		<updated>2023-02-08T18:58:46Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Moved Alaric's code for tabular layout to Alignment section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp but also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several spacial characters are used in determining the layout of the text, just as in Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|200px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains handy functions to help format text in tabular layout for use in mission screens/MFDs, just keep in mind that max row length on mission screens is 32 em.&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show code&amp;quot; data-collapsetext=&amp;quot;Hide code&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
See his alaric-oxp-utilities.js file: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show code&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
* an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
* is omitted from the call, it defaults to true.&lt;br /&gt;
*&lt;br /&gt;
* text				- The text to trim&lt;br /&gt;
* emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
* ellipses			- optional (default: true)&lt;br /&gt;
*&lt;br /&gt;
* Returns the new, trimmed, string.&lt;br /&gt;
*/&lt;br /&gt;
this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
{&lt;br /&gt;
	var font = defaultFont;&lt;br /&gt;
	var chPadding = String.fromCharCode(31);&lt;br /&gt;
	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
		&lt;br /&gt;
	var chWidth = [0, text.length];&lt;br /&gt;
	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
&lt;br /&gt;
	// use default for ellipses if not supplied&lt;br /&gt;
	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
	&lt;br /&gt;
	// if the text already fits, just return it.&lt;br /&gt;
	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
	&lt;br /&gt;
	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
&lt;br /&gt;
	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
		&lt;br /&gt;
	while (chWidth[0] != chWidth[1])&lt;br /&gt;
	{&lt;br /&gt;
		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
&lt;br /&gt;
		// update for next split point based on the text being too long or too short&lt;br /&gt;
		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
		emWidth[flagDirection] = emPivot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
	// for.&lt;br /&gt;
&lt;br /&gt;
	return (ellipses) &lt;br /&gt;
		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
		: text.substring(0, chWidth[0])&lt;br /&gt;
		;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
*&lt;br /&gt;
* Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
* objects with the following properties:&lt;br /&gt;
*&lt;br /&gt;
* Required properties:&lt;br /&gt;
*	text:	The text to display in this column&lt;br /&gt;
*	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
*&lt;br /&gt;
* Optional properties:&lt;br /&gt;
*	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
*	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
*  blink:		&lt;br /&gt;
*&lt;br /&gt;
* Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
this._buildTabularText = function(rows)&lt;br /&gt;
{&lt;br /&gt;
	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
	var row;&lt;br /&gt;
	&lt;br /&gt;
	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
	{&lt;br /&gt;
		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
		var i;&lt;br /&gt;
		&lt;br /&gt;
		var currentEm0 = 0;&lt;br /&gt;
		var currentEm1 = 0;&lt;br /&gt;
		var columns = rows[row];&lt;br /&gt;
		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
		{&lt;br /&gt;
		&lt;br /&gt;
			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
						&lt;br /&gt;
			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
			var width = defaultFont.measureString(text);&lt;br /&gt;
			&lt;br /&gt;
		&lt;br /&gt;
			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
&lt;br /&gt;
			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
			{&lt;br /&gt;
				&lt;br /&gt;
				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
 				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
&lt;br /&gt;
				default:&lt;br /&gt;
					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
					padding = 0; break;&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
			&lt;br /&gt;
			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
				: text&lt;br /&gt;
				;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		tabularText += rowText;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return tabularText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Svengali's Library &amp;amp; CCL ==&lt;br /&gt;
These two oxp's allow for more complex interractions. See the deprecated [[CCL]]'s never used [[Cutscene]], as well as the current [[Library OXP]]'s &amp;quot;Music&amp;quot; and &amp;quot;Demos&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78418</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78418"/>
		<updated>2023-02-08T15:04:00Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Fixed an accidentally removed section header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp but also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several spacial characters are used in determining the layout of the text, just as in Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|200px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
== Exit Screen ==&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Svengali's Library &amp;amp; CCL ==&lt;br /&gt;
These two oxp's allow for more complex interractions. See the deprecated [[CCL]]'s never used [[Cutscene]], as well as the current [[Library OXP]]'s &amp;quot;Music&amp;quot; and &amp;quot;Demos&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
*[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains Javascript for formatting MFD's - and for making text flow. See his alaric-oxp-utilities.js file:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;use strict&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
 this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
 this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
 this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
 this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
 this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
 * Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
 * an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
 * is omitted from the call, it defaults to true.&lt;br /&gt;
 *&lt;br /&gt;
 * text				- The text to trim&lt;br /&gt;
 * emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
 * ellipses			- optional (default: true)&lt;br /&gt;
 *&lt;br /&gt;
 * Returns the new, trimmed, string.&lt;br /&gt;
 */&lt;br /&gt;
 this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
 {&lt;br /&gt;
 	var font = defaultFont;&lt;br /&gt;
 	var chPadding = String.fromCharCode(31);&lt;br /&gt;
 	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
 	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
 	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
 		&lt;br /&gt;
 	var chWidth = [0, text.length];&lt;br /&gt;
 	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
 &lt;br /&gt;
 	// use default for ellipses if not supplied&lt;br /&gt;
 	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
 	&lt;br /&gt;
 	// if the text already fits, just return it.&lt;br /&gt;
 	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
 	&lt;br /&gt;
 	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
 	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
 &lt;br /&gt;
 	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
 	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
 		&lt;br /&gt;
 	while (chWidth[0] != chWidth[1])&lt;br /&gt;
 	{&lt;br /&gt;
 		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
 		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
 		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
 &lt;br /&gt;
 		// update for next split point based on the text being too long or too short&lt;br /&gt;
 		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
 &lt;br /&gt;
 		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
 		emWidth[flagDirection] = emPivot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
 	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
 	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
 	// for.&lt;br /&gt;
 &lt;br /&gt;
 	return (ellipses) &lt;br /&gt;
 		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
 		: text.substring(0, chWidth[0])&lt;br /&gt;
 		;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 /*&lt;br /&gt;
 * Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
 *&lt;br /&gt;
 * Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
 * objects with the following properties:&lt;br /&gt;
 *&lt;br /&gt;
 * Required properties:&lt;br /&gt;
 *	text:	The text to display in this column&lt;br /&gt;
 *	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
 *&lt;br /&gt;
 * Optional properties:&lt;br /&gt;
 *	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
 *	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
 *  blink:		&lt;br /&gt;
 *&lt;br /&gt;
 * Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
 this._buildTabularText = function(rows)&lt;br /&gt;
 {&lt;br /&gt;
 	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
 	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
 	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
 	var row;&lt;br /&gt;
 	&lt;br /&gt;
 	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
 	{&lt;br /&gt;
 		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
 	&lt;br /&gt;
 		var i;&lt;br /&gt;
 		&lt;br /&gt;
 		var currentEm0 = 0;&lt;br /&gt;
 		var currentEm1 = 0;&lt;br /&gt;
 		var columns = rows[row];&lt;br /&gt;
 		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
 		{&lt;br /&gt;
 		&lt;br /&gt;
 			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
 			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
 			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
 						&lt;br /&gt;
 			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
 			var width = defaultFont.measureString(text);&lt;br /&gt;
 			&lt;br /&gt;
 		&lt;br /&gt;
 			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
 &lt;br /&gt;
 			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
 			{&lt;br /&gt;
 				&lt;br /&gt;
 				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
 				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
  				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
 &lt;br /&gt;
 				default:&lt;br /&gt;
 					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
 					padding = 0; break;&lt;br /&gt;
 &lt;br /&gt;
 			}&lt;br /&gt;
 &lt;br /&gt;
 			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
 			&lt;br /&gt;
 			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
 				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
 				: text&lt;br /&gt;
 				;&lt;br /&gt;
 		}&lt;br /&gt;
 	&lt;br /&gt;
 		tabularText += rowText;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return tabularText;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78417</id>
		<title>Mission screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Mission_screen&amp;diff=78417"/>
		<updated>2023-02-08T14:56:34Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Exit Screen */ Added about mission.exitScreen and an example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OXPNote|This Page is a WIP aimed at dumb pilots like myself!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Hints.png|right|320px]]&lt;br /&gt;
Mission screens started off as screens which allow the player to interface with NPCs in a mission.oxp but also allow other sorts of &amp;quot;communication&amp;quot; as in the conversation overheard in the bar in the [[Hints]] OXP.&lt;br /&gt;
&lt;br /&gt;
They can have backdrops, changes in text and allow choices for the player.&lt;br /&gt;
&lt;br /&gt;
The text can be placed in a descriptions.plist, details about it in a script.js&lt;br /&gt;
&lt;br /&gt;
== Text  ==&lt;br /&gt;
:Several spacial characters are used in determining the layout of the text, just as in Wiki.&lt;br /&gt;
    \&amp;quot; Enables the use of colons.&lt;br /&gt;
    \\n Insert a hard Enter.&lt;br /&gt;
&lt;br /&gt;
In XML:&lt;br /&gt;
    \n Inserts a hard Enter.&lt;br /&gt;
&lt;br /&gt;
:See [[Missiontext.plist]] for more complexity (''eg'' random names, naming current system ''etc'')&lt;br /&gt;
&lt;br /&gt;
:Character '31' (hex:1F, octal:037) is a narrow 'hair-space'. Custom font OXPs should ensure that this character is blank and has the same narrow width as the core font definition, as it is used to allow an equivalent to 'tab stops' in mission text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== % codes ===&lt;br /&gt;
Here are the % codes that can be used inside description strings and what each one does:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
* %H is replaced with &amp;lt;planetName&amp;gt;. If systemName is nil, a planet name is retrieved through -[Universe getSystemName:], treating &amp;lt;seed&amp;gt; as a system seed. &amp;lt;br&amp;gt;&lt;br /&gt;
* %I is equivalent to &amp;quot;%H[planetname-derivative-suffix]&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
* %N is replaced with a random &amp;quot;alien&amp;quot; name using the planet name digraphs. If used more than once in the same string, it will produce the same name on each occurence.&lt;br /&gt;
* %R is like %N but, due to a bug, misses some possibilities. Deprecated.&lt;br /&gt;
* %JNNN, where NNN is a three-digit integer, is replaced with the name of system ID NNN in the current galaxy.&lt;br /&gt;
* %GNNNNNN, where NNNNNN is a six-digit integer, is replaced with the name of system ID NNN (first triplet) in the specified galaxy (second triplet).&lt;br /&gt;
* %% is replaced with %.&lt;br /&gt;
* %[ is replaced with [.&lt;br /&gt;
* %] is replaced with ].&lt;br /&gt;
:From [[String expansion]]&lt;br /&gt;
&lt;br /&gt;
== Colour ==&lt;br /&gt;
:Choices can be non-yellow (have a look at the various contracts interfaces in 1.77) but there is a more fundamental limitation of the current UI code that all text on a particular line has to be the same colour. [http://www.aegidian.org/bb/viewtopic.php?p=203777#p203777 Cim (2013)]&lt;br /&gt;
&lt;br /&gt;
:Code for [http://www.aegidian.org/bb/viewtopic.php?p=283402#p283402 Colour change]&lt;br /&gt;
&lt;br /&gt;
[[File:First Finance Loan Management.png|right|200px]]&lt;br /&gt;
== Alignment ==&lt;br /&gt;
There is no obvious way to do this, but [[User:Ocz|Ocz]] managed some version of right alignment for his [[First Finance OXP]]&lt;br /&gt;
&lt;br /&gt;
== Backdrop ==&lt;br /&gt;
: This is managed from within the script.js file:&lt;br /&gt;
 background: &amp;quot;&amp;quot;the_file_name_of_the_image_you_want_to_display_must_be_in_the_images_folder.png&amp;quot;,&lt;br /&gt;
or you can use ''overlay'' instead of ''background'' (less conflicts with other oxp's such as XenonUI which also tend to specify a background)&lt;br /&gt;
&lt;br /&gt;
=== Problems with Backdrop ===&lt;br /&gt;
These can be prevented from appearing by other oxp's such as [[XenonUI]] which also create backdrops for the docked screens.&lt;br /&gt;
&lt;br /&gt;
Using ''overlay'' helps, but also see Phkb's comments [http://aegidian.org/bb/viewtopic.php?p=282180#p282180 here] (for Dark Side solutions) and [http://aegidian.org/bb/viewtopic.php?p=278857#p278857 here] (using Library config).&lt;br /&gt;
&lt;br /&gt;
By default, when the mission screen ends, the game returns to the status screen (F5), but this behavior can be changed.&lt;br /&gt;
In most cases you can just provide the &amp;lt;code&amp;gt;exitScreen&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#runScreen|mission.runScreen]]&amp;lt;/code&amp;gt; call, but if&lt;br /&gt;
if the exit screen depends on the player's choice, you need change the exit screen in the mission screen callback by setting &amp;lt;code&amp;gt;[[Oolite JavaScript Reference: Mission#exitScreen|mission.exitScreen]]&amp;lt;/code&amp;gt;. Outside of a callback function, the value of this is almost meaningless, and setting it has no useful effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Show example&amp;quot; data-collapsetext=&amp;quot;Hide example&amp;quot; style=&amp;quot;max-width:max-content&amp;quot;&amp;gt;&lt;br /&gt;
The example below uses both ways: &amp;lt;span style=&amp;quot;visibility: hidden&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Show Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:max-content&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
this._runMissionScreen = function _runMissionScreen() &lt;br /&gt;
{&lt;br /&gt;
    mission.runScreen(&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Exit Screen Example&amp;quot;,&lt;br /&gt;
            exitScreen: &amp;quot;GUI_SCREEN_MARKET&amp;quot;, // &amp;lt;-- The first way &lt;br /&gt;
            choices: {&lt;br /&gt;
                &amp;quot;01_INTERFACES&amp;quot;: &amp;quot;Do nothing&amp;quot;,&lt;br /&gt;
                &amp;quot;02_CHART&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SHORT_RANGE_CHART\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;03_SYSDATA&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;GUI_SCREEN_SYSTEM_DATA\&amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;04_INVALID&amp;quot;: &amp;quot;Set mission.exitScreen to \&amp;quot;INVALID VALUE\&amp;quot;&amp;quot;,&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
        this._missionScreenCallback.bind(this)&lt;br /&gt;
    );&lt;br /&gt;
    // The mission.exitScreen variable is set to the value &lt;br /&gt;
    // of the exitScreen parameter of the function call above&lt;br /&gt;
    mission.addMessageText(&amp;quot;Current exit screen is &amp;quot; + mission.exitScreen + &amp;quot;.&amp;quot;);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
this._missionScreenCallback = function _missionScreenCallback(choice) &lt;br /&gt;
{&lt;br /&gt;
    // The choice is null when player interrupts the mission screen (e.g., presses F1 )&lt;br /&gt;
    if (choice === &amp;quot;01_INTERFACES&amp;quot; || choice === null) {&lt;br /&gt;
        // Do nothing - the exit screen will be as specified in runScreen call&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;02_CHART&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SHORT_RANGE_CHART&amp;quot;; // &amp;lt;-- The second way&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;03_SYSDATA&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;GUI_SCREEN_SYSTEM_DATA&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else if (choice === &amp;quot;04_INVALID&amp;quot;) {&lt;br /&gt;
        mission.exitScreen = &amp;quot;INVALID VALUE&amp;quot;; // The exit screen will be reset to default&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Add interface to F4 page for docked station&lt;br /&gt;
this.startUpComplete = function startUpComplete() &lt;br /&gt;
{&lt;br /&gt;
    player.ship.dockedStation.setInterface(&amp;quot;example_exit_screen&amp;quot;,&lt;br /&gt;
        {&lt;br /&gt;
            title: &amp;quot;Show exitScreen example screen&amp;quot;,&lt;br /&gt;
            summary: &amp;quot;This is an example interface definition.&amp;quot;,&lt;br /&gt;
            category: &amp;quot;AAA&amp;quot;,&lt;br /&gt;
            callback: this._runMissionScreen.bind(this)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Svengali's Library &amp;amp; CCL ==&lt;br /&gt;
These two oxp's allow for more complex interractions. See the deprecated [[CCL]]'s never used [[Cutscene]], as well as the current [[Library OXP]]'s &amp;quot;Music&amp;quot; and &amp;quot;Demos&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://aegidian.org/bb/viewtopic.php?p=276448#p276448 Creating a mission screen] for textual messages (2021)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?p=283395#p283395 Changing text colour] (2022)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18713 New Line in mission.runScreen?] (2017)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=18414 Tabular text output for MFDs/mission screens] (2016)&lt;br /&gt;
*[[User:Alaric/KV-16 Owners Manual|Alaric's unfinished Torus-field-monitor OXZ]] contains Javascript for formatting MFD's - and for making text flow. See his alaric-oxp-utilities.js file:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;use strict&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 this.name        = &amp;quot;alaric-oxp-utilities&amp;quot;;&lt;br /&gt;
 this.author      = &amp;quot;Alaric&amp;quot;;&lt;br /&gt;
 this.copyright   = &amp;quot;2016 Alaric&amp;quot;;&lt;br /&gt;
 this.description = &amp;quot;General helper functions for OXPs&amp;quot;;&lt;br /&gt;
 this.licence     = &amp;quot;CC BY-NC-SA 3.0 AU&amp;quot;;&lt;br /&gt;
 this.version	 = &amp;quot;1.0&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
 * Trims a length of text to fit in the available width. If the text is truncated, &lt;br /&gt;
 * an ellipse (U+2026) will be appended unless &amp;lt;ellipses&amp;gt; is false. If &amp;lt;ellipses&amp;gt;&lt;br /&gt;
 * is omitted from the call, it defaults to true.&lt;br /&gt;
 *&lt;br /&gt;
 * text				- The text to trim&lt;br /&gt;
 * emDisplayWidth	- The available width, in Em, to display the text&lt;br /&gt;
 * ellipses			- optional (default: true)&lt;br /&gt;
 *&lt;br /&gt;
 * Returns the new, trimmed, string.&lt;br /&gt;
 */&lt;br /&gt;
 this._trimTextToFitWidth = function(text, emDisplayWidth, ellipses)&lt;br /&gt;
 {&lt;br /&gt;
 	var font = defaultFont;&lt;br /&gt;
 	var chPadding = String.fromCharCode(31);&lt;br /&gt;
 	var ellipsesText = &amp;quot;\u2026&amp;quot;;&lt;br /&gt;
 	var emEllipsesText = font.measureString(ellipsesText);&lt;br /&gt;
 	var emPaddingText = font.measureString(chPadding);&lt;br /&gt;
 		&lt;br /&gt;
 	var chWidth = [0, text.length];&lt;br /&gt;
 	var emWidth = [font.measureString(text), 0];&lt;br /&gt;
 &lt;br /&gt;
 	// use default for ellipses if not supplied&lt;br /&gt;
 	if (ellipses === null || ellipses === undefined) ellipses = true;&lt;br /&gt;
 	&lt;br /&gt;
 	// if the text already fits, just return it.&lt;br /&gt;
 	if (emWidth[0] &amp;lt;= emDisplayWidth) return text;&lt;br /&gt;
 	&lt;br /&gt;
 	// if the display width is too short for ellipses, disable ellipses&lt;br /&gt;
 	if (emEllipsesText &amp;gt;= emDisplayWidth) ellipses = false;&lt;br /&gt;
 &lt;br /&gt;
 	// subtract ellipses with from display width if ellipses is true&lt;br /&gt;
 	emDisplayWidth -= (ellipses) ? emEllipsesText : 0;&lt;br /&gt;
 		&lt;br /&gt;
 	while (chWidth[0] != chWidth[1])&lt;br /&gt;
 	{&lt;br /&gt;
 		// get Em width of text at length midway between chWidth[0] and chWidth[1]&lt;br /&gt;
 		var chPivot = Math.ceil((chWidth[0] + chWidth[1]) / 2);&lt;br /&gt;
 		var emPivot = font.measureString(text.substring(0, chPivot)); &lt;br /&gt;
 &lt;br /&gt;
 		// update for next split point based on the text being too long or too short&lt;br /&gt;
 		var flagDirection = (emPivot &amp;lt;= emDisplayWidth) ? 0 : 1;&lt;br /&gt;
 &lt;br /&gt;
 		chWidth[flagDirection] = chPivot - flagDirection;&lt;br /&gt;
 		emWidth[flagDirection] = emPivot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	// At this point, chWidth[0] and emWidth[0] contain the trimmed width in&lt;br /&gt;
 	// characters and Em respectively. Return the text, appending ellipses if &lt;br /&gt;
 	// &amp;lt;ellipses&amp;gt; is true. The space for ellipses has already been accounted&lt;br /&gt;
 	// for.&lt;br /&gt;
 &lt;br /&gt;
 	return (ellipses) &lt;br /&gt;
 		? text.substring(0, chWidth[0]) + ellipsesText&lt;br /&gt;
 		: text.substring(0, chWidth[0])&lt;br /&gt;
 		;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 /*&lt;br /&gt;
 * Builds tabular (columns aligned) text for use in mission screens/MFDs.&lt;br /&gt;
 *&lt;br /&gt;
 * Input to the function is provided by an array of 'rows'. Each row is, itself, an array of&lt;br /&gt;
 * objects with the following properties:&lt;br /&gt;
 *&lt;br /&gt;
 * Required properties:&lt;br /&gt;
 *	text:	The text to display in this column&lt;br /&gt;
 *	width:	The width of the column in em. Text will be truncated if too long.&lt;br /&gt;
 *&lt;br /&gt;
 * Optional properties:&lt;br /&gt;
 *	alignment:	LEFT, RIGHT or CENTER. Default: LEFT&lt;br /&gt;
 *	elipses:	Display elipses for truncated text? Default: true.&lt;br /&gt;
 *  blink:		&lt;br /&gt;
 *&lt;br /&gt;
 * Multiple rows are deliniated by '\n'. No '\n' is appended to the last row.&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
 this._buildTabularText = function(rows)&lt;br /&gt;
 {&lt;br /&gt;
 	var padCharacter = String.fromCharCode(31);&lt;br /&gt;
 	var padWidth = defaultFont.measureString(padCharacter);&lt;br /&gt;
 	var tabularText = &amp;quot;&amp;quot;;&lt;br /&gt;
 	var row;&lt;br /&gt;
 	&lt;br /&gt;
 	for (row = 0; row &amp;lt; rows.length; ++row)&lt;br /&gt;
 	{&lt;br /&gt;
 		if (row &amp;gt; 0) tabularText += &amp;quot;\n&amp;quot;;&lt;br /&gt;
 	&lt;br /&gt;
 		var i;&lt;br /&gt;
 		&lt;br /&gt;
 		var currentEm0 = 0;&lt;br /&gt;
 		var currentEm1 = 0;&lt;br /&gt;
 		var columns = rows[row];&lt;br /&gt;
 		var rowText = &amp;quot;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 		for (i = 0; i &amp;lt; columns.length; ++i)&lt;br /&gt;
 		{&lt;br /&gt;
 		&lt;br /&gt;
 			currentEm0 = defaultFont.measureString(rowText);&lt;br /&gt;
 			var leading = (currentEm1 - currentEm0);&lt;br /&gt;
 			currentEm1 = currentEm1 + columns[i].width;&lt;br /&gt;
 						&lt;br /&gt;
 			var text = this._trimTextToFitWidth(columns[i].text, currentEm1 - currentEm0, columns[i].ellipses);&lt;br /&gt;
 			var width = defaultFont.measureString(text);&lt;br /&gt;
 			&lt;br /&gt;
 		&lt;br /&gt;
 			var padding = (currentEm1 - currentEm0) - width;&lt;br /&gt;
 &lt;br /&gt;
 			switch ((columns[i].alignment !== undefined) ? columns[i].alignment : &amp;quot;LEFT&amp;quot;)&lt;br /&gt;
 			{&lt;br /&gt;
 				&lt;br /&gt;
 				case &amp;quot;LEFT&amp;quot; : padding = 0; break;&lt;br /&gt;
 				case &amp;quot;RIGHT&amp;quot; : leading = 0; break;&lt;br /&gt;
  				case &amp;quot;CENTER&amp;quot; : padding = padding / 2; break;					&lt;br /&gt;
 &lt;br /&gt;
 				default:&lt;br /&gt;
 					log(this.name, &amp;quot;invalid alignment '&amp;quot; + columns[i].alignment + &amp;quot;'&amp;quot;);&lt;br /&gt;
 					padding = 0; break;&lt;br /&gt;
 &lt;br /&gt;
 			}&lt;br /&gt;
 &lt;br /&gt;
 			padding = Math.floor((leading + padding) / padWidth);&lt;br /&gt;
 			&lt;br /&gt;
 			rowText += (padding &amp;gt;= 1) &lt;br /&gt;
 				? new Array(padding).join(padCharacter) + text &lt;br /&gt;
 				: text&lt;br /&gt;
 				;&lt;br /&gt;
 		}&lt;br /&gt;
 	&lt;br /&gt;
 		tabularText += rowText;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return tabularText;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite scripting]]&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=77237</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=77237"/>
		<updated>2022-11-28T09:18:13Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Notes on original version 0.9 (2009) */ Moved instructions to a new section &amp;amp; added some styling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
=== How do I add myself as a character? ===&lt;br /&gt;
&amp;lt;span id=&amp;quot;Adding_yourself_as_a_character&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;!-- To keep old links to this section working --&amp;gt;&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler - DONE&lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE&lt;br /&gt;
* move instructions how remove / add in new section - DONE&lt;br /&gt;
* make tables with behavior options have same width&lt;br /&gt;
* add example of using behavior options&lt;br /&gt;
* add list oxp to list of other oxp's that can be used&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Note:''' Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or even just leave a request there to be added.&lt;br /&gt;
&lt;br /&gt;
You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be [[OXP_howto|OXP howto]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed custom-collapsible-left-toggle&amp;quot;  data-expandtext=&amp;quot;Expand Instruction&amp;quot; data-collapsetext=&amp;quot;Collapse Instruction&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
| role&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors&lt;br /&gt;
|- &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out&lt;br /&gt;
|- &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its shields depleted&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
| integer&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
| integer&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if they no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-flow: row wrap; max-width: fit-content;&amp;quot;&amp;gt; &amp;lt;!-- The table is on the side if there is room, otherwise it below and centered --&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;flex-grow: 1; margin-left: 20px&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle; margin: auto&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
# Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
# Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
# Remove it completely '''OR''' Go to its &amp;quot;roles&amp;quot; key, and delete the roles with &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[[Media:PersonalitiesOXP.zip|Personalities.oxp v 0.9.2]] (2022) &amp;lt;!-- (downloaded {{#downloads:PersonalitiesOXP.zip}} times) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.2 (October, 2022)&lt;br /&gt;
:new AI scripts, most personalities now use them&lt;br /&gt;
:with new scripts [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys|standard communications keys]] can be used (however, it makes sense to use only those that are used by AI), old comms keys still works &lt;br /&gt;
:fixed a bug in plistAI scripts that caused the ships themselves to never attack&lt;br /&gt;
:pauses can be added to comms messages: &amp;quot;The message will be split{pause: 12}and the second half will be sent with specified delay&amp;quot;&lt;br /&gt;
:appearance can be limited through the list of roles:&lt;br /&gt;
::1) &amp;quot;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;quot; - &lt;br /&gt;
:::pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station&lt;br /&gt;
::2) &amp;quot;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;quot; - &lt;br /&gt;
:::trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
:added methods for setting callbacks at escape pod scooping and unloading&lt;br /&gt;
:added method to adjust spawn weight (for galaxies) in case if someone suddenly decides to use 100 ship variants with a weight of (0.01) each&lt;br /&gt;
&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.90 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=77222</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=77222"/>
		<updated>2022-11-27T21:40:52Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Download Location */ Hid broken (I hope) download counter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler - DONE&lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
* make tables with behavior options have same width&lt;br /&gt;
* add example of using behavior options&lt;br /&gt;
* add list oxp to list of other oxp's that can be used&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Note:''' Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or even just leave a request there to be added.&lt;br /&gt;
&lt;br /&gt;
You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be [[OXP_howto|OXP howto]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed custom-collapsible-left-toggle&amp;quot;  data-expandtext=&amp;quot;Expand Instruction&amp;quot; data-collapsetext=&amp;quot;Collapse Instruction&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
| role&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors&lt;br /&gt;
|- &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out&lt;br /&gt;
|- &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its shields depleted&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
| integer&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
| integer&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if they no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[[Media:PersonalitiesOXP.zip|Personalities.oxp v 0.9.2]] (2022) &amp;lt;!-- (downloaded {{#downloads:PersonalitiesOXP.zip}} times) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.2 (October, 2022)&lt;br /&gt;
:new AI scripts, most personalities now use them&lt;br /&gt;
:with new scripts [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys|standard communications keys]] can be used (however, it makes sense to use only those that are used by AI), old comms keys still works &lt;br /&gt;
:fixed a bug in plistAI scripts that caused the ships themselves to never attack&lt;br /&gt;
:pauses can be added to comms messages: &amp;quot;The message will be split{pause: 12}and the second half will be sent with specified delay&amp;quot;&lt;br /&gt;
:appearance can be limited through the list of roles:&lt;br /&gt;
::1) &amp;quot;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;quot; - &lt;br /&gt;
:::pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station&lt;br /&gt;
::2) &amp;quot;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;quot; - &lt;br /&gt;
:::trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
:added methods for setting callbacks at escape pod scooping and unloading&lt;br /&gt;
:added method to adjust spawn weight (for galaxies) in case if someone suddenly decides to use 100 ship variants with a weight of (0.01) each&lt;br /&gt;
&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.90 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=77219</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=77219"/>
		<updated>2022-11-27T17:59:25Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Adding yourself as a character */ Slightly unified tables with available behavior options&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler - DONE&lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
* make tables with behavior options have same width&lt;br /&gt;
* add example of using behavior options&lt;br /&gt;
* add list oxp to list of other oxp's that can be used&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Note:''' Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or even just leave a request there to be added.&lt;br /&gt;
&lt;br /&gt;
You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be [[OXP_howto|OXP howto]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed custom-collapsible-left-toggle&amp;quot;  data-expandtext=&amp;quot;Expand Instruction&amp;quot; data-collapsetext=&amp;quot;Collapse Instruction&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
| role&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors&lt;br /&gt;
|- &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out&lt;br /&gt;
|- &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its shields depleted&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
| integer&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
| integer&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if they no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[[Media:PersonalitiesOXP.zip|Personalities.oxp v 0.9.2]] (2022) (downloaded {{#downloads:PersonalitiesOXP.zip}} times)&lt;br /&gt;
&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.2 (October, 2022)&lt;br /&gt;
:new AI scripts, most personalities now use them&lt;br /&gt;
:with new scripts [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys|standard communications keys]] can be used (however, it makes sense to use only those that are used by AI), old comms keys still works &lt;br /&gt;
:fixed a bug in plistAI scripts that caused the ships themselves to never attack&lt;br /&gt;
:pauses can be added to comms messages: &amp;quot;The message will be split{pause: 12}and the second half will be sent with specified delay&amp;quot;&lt;br /&gt;
:appearance can be limited through the list of roles:&lt;br /&gt;
::1) &amp;quot;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;quot; - &lt;br /&gt;
:::pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station&lt;br /&gt;
::2) &amp;quot;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;quot; - &lt;br /&gt;
:::trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
:added methods for setting callbacks at escape pod scooping and unloading&lt;br /&gt;
:added method to adjust spawn weight (for galaxies) in case if someone suddenly decides to use 100 ship variants with a weight of (0.01) each&lt;br /&gt;
&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.90 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76154</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76154"/>
		<updated>2022-10-23T10:05:10Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Version History */  Added info about version 0.9.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler - DONE&lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Note:''' Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or even just leave a request there to be added.&lt;br /&gt;
&lt;br /&gt;
You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be [[OXP_howto|OXP howto]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Expand Instruction&amp;quot; data-collapsetext=&amp;quot;Collapse Instruction&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| &lt;br /&gt;
| internal identifier for the character's chatter&lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| &lt;br /&gt;
| the character's human readable name&lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| role&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out of the system, after launching from the main station&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| lets the ship set course to the witchpoint, after launching from the main&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| integer&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| integer&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if he no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[[Media:PersonalitiesOXP.zip|Personalities.oxp v 0.9.2]] (2022) (downloaded {{#downloads:PersonalitiesOXP.zip}} times)&lt;br /&gt;
&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.2 (October, 2022)&lt;br /&gt;
:new AI scripts, most personalities now use them&lt;br /&gt;
:with new scripts [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys|standard communications keys]] can be used (however, it makes sense to use only those that are used by AI), old comms keys still works &lt;br /&gt;
:fixed a bug in plistAI scripts that caused the ships themselves to never attack&lt;br /&gt;
:pauses can be added to comms messages: &amp;quot;The message will be split{pause: 12}and the second half will be sent with specified delay&amp;quot;&lt;br /&gt;
:appearance can be limited through the list of roles:&lt;br /&gt;
::1) &amp;quot;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;quot; - &lt;br /&gt;
:::pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station&lt;br /&gt;
::2) &amp;quot;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;quot; - &lt;br /&gt;
:::trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
:added methods for setting callbacks at escape pod scooping and unloading&lt;br /&gt;
:added method to adjust spawn weight (for galaxies) in case if someone suddenly decides to use 100 ship variants with a weight of (0.01) each&lt;br /&gt;
&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.90 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76153</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76153"/>
		<updated>2022-10-23T10:01:57Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Download Location */ Updated download link for new version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler - DONE&lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Note:''' Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or even just leave a request there to be added.&lt;br /&gt;
&lt;br /&gt;
You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be [[OXP_howto|OXP howto]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Expand Instruction&amp;quot; data-collapsetext=&amp;quot;Collapse Instruction&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| &lt;br /&gt;
| internal identifier for the character's chatter&lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| &lt;br /&gt;
| the character's human readable name&lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| role&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out of the system, after launching from the main station&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| lets the ship set course to the witchpoint, after launching from the main&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| integer&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| integer&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if he no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[[Media:PersonalitiesOXP.zip|Personalities.oxp v 0.9.2]] (2022) (downloaded {{#downloads:PersonalitiesOXP.zip}} times)&lt;br /&gt;
&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.9 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=File:PersonalitiesOXP.zip&amp;diff=76152</id>
		<title>File:PersonalitiesOXP.zip</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=File:PersonalitiesOXP.zip&amp;diff=76152"/>
		<updated>2022-10-23T09:54:47Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: Personalities OXP 0.9.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Personalities OXP 0.9.2&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76151</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76151"/>
		<updated>2022-10-23T09:29:10Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Adding yourself as a character */ Hid under the spoiler and added some notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler - DONE&lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Note:''' Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or even just leave a request there to be added.&lt;br /&gt;
&lt;br /&gt;
You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be [[OXP_howto|OXP howto]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;  data-expandtext=&amp;quot;Expand Instruction&amp;quot; data-collapsetext=&amp;quot;Collapse Instruction&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| &lt;br /&gt;
| internal identifier for the character's chatter&lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| &lt;br /&gt;
| the character's human readable name&lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| role&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out of the system, after launching from the main station&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| lets the ship set course to the witchpoint, after launching from the main&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| integer&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| integer&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if he no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[https://www.dropbox.com/s/93yfevfm182veqv/Personalities%20OXP.zip?dl=1 Personalities.oxp v 0.91] (2022)&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.9 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76143</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76143"/>
		<updated>2022-10-22T20:51:55Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Adding yourself as a character */  Added table of message types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler &lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| &lt;br /&gt;
| internal identifier for the character's chatter&lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| &lt;br /&gt;
| the character's human readable name&lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| role&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out of the system, after launching from the main station&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| lets the ship set course to the witchpoint, after launching from the main&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| integer&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| integer&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if he no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ List of available message types&lt;br /&gt;
|-&lt;br /&gt;
! Comms key&lt;br /&gt;
! Full form (PriorityAI scripts)&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| attack&lt;br /&gt;
| oolite_beginningAttack&lt;br /&gt;
| Commencing an attack, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| flee&lt;br /&gt;
| oolite_startFleeing&lt;br /&gt;
| Ship begins fleeing combat&lt;br /&gt;
|-&lt;br /&gt;
| jump&lt;br /&gt;
| oolite_engageWitchspaceDriveFlee&lt;br /&gt;
| Ship to escape from a fight via witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| kill&lt;br /&gt;
| oolite_killedTarget&lt;br /&gt;
| Current fight target destroyed&lt;br /&gt;
|-&lt;br /&gt;
| witchspace&lt;br /&gt;
| oolite_engageWitchspaceDrive&lt;br /&gt;
| Preparing to witchspace jump&lt;br /&gt;
|-&lt;br /&gt;
| greet&lt;br /&gt;
| personalitiesOXP_greet&lt;br /&gt;
| (Only with PriorityAI) First chatter&lt;br /&gt;
|-&lt;br /&gt;
| chatter&lt;br /&gt;
| personalitiesOXP_chatter&lt;br /&gt;
| Player nearby, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| launch&lt;br /&gt;
| personalitiesOXP_launch&lt;br /&gt;
| Launched from a main station&lt;br /&gt;
|-&lt;br /&gt;
| attacked&lt;br /&gt;
| personalitiesOXP_attacked&lt;br /&gt;
| Someone hits the ship, repetitive&lt;br /&gt;
|-&lt;br /&gt;
| dead&lt;br /&gt;
| personalitiesOXP_dead&lt;br /&gt;
| Killed or ejected escape pod&lt;br /&gt;
|-&lt;br /&gt;
| captured&lt;br /&gt;
| personalitiesOXP_captured&lt;br /&gt;
| Escape pod unloaded at station&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without &amp;lt;code&amp;gt;oolite_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
 &amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;dockingWait oolite_selectedStation&amp;quot;; // In messageTypes entry types must be writen same as in descriptions key!&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]&amp;quot; = (&amp;quot;Complaints about tedious waiting for docking&amp;quot;);&lt;br /&gt;
 &amp;quot;personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]&amp;quot; = (&amp;quot;Phrase about going to check local ConStore&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[https://www.dropbox.com/s/93yfevfm182veqv/Personalities%20OXP.zip?dl=1 Personalities.oxp v 0.91] (2022)&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.9 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76139</id>
		<title>Personalities OXP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Personalities_OXP&amp;diff=76139"/>
		<updated>2022-10-22T18:51:34Z</updated>

		<summary type="html">&lt;p&gt;Alnivel: /* Adding yourself as a character */ Added and fixed tables about script_info and couple other things&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adds Oolite community personalities to your game&lt;br /&gt;
[[File:Lestradae.png|right|400px]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Notable Features ==&lt;br /&gt;
There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.&lt;br /&gt;
&lt;br /&gt;
A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.&lt;br /&gt;
&lt;br /&gt;
== Notes on Alnivel's update version 0.91 (2022) ==&lt;br /&gt;
Update of the original 10 personalities to work with newer versions of Oolite. Adds more options. &lt;br /&gt;
&lt;br /&gt;
== Notes on original version 0.9 (2009)==&lt;br /&gt;
=== DISCLAIMER ===&lt;br /&gt;
Personalities.oxp is a '''work in progress''', and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!&lt;br /&gt;
&lt;br /&gt;
=== How do I remove my own character? ===&lt;br /&gt;
 1) Open the shipdata.plist inside the &amp;quot;Config&amp;quot; folder.&lt;br /&gt;
 2) Look for the entry &amp;quot;personalities-&amp;lt;yourname&amp;gt;&amp;quot;.&lt;br /&gt;
 3a) Remove it completely.&lt;br /&gt;
 or&lt;br /&gt;
 3b) Go to its &amp;quot;roles&amp;quot; key, and delete the roles &amp;quot;personalities&amp;quot; and &amp;quot;personalities_launcher&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Adding yourself as a character ===&lt;br /&gt;
&amp;lt;!--TODO: &lt;br /&gt;
* hide it under spoiler &lt;br /&gt;
* add note that this is rather docs / an instruction in case if they want to do it completely by themself&lt;br /&gt;
* move instructions how remove / add in new section &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''&lt;br /&gt;
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.&lt;br /&gt;
#Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:&lt;br /&gt;
#* [[shipdata.plist#max_flight_speed|max_flight_speed]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_pitch|max_flight_pitch]], &lt;br /&gt;
#* [[shipdata.plist#max_flight_roll|max_flight_roll]], &lt;br /&gt;
#* [[shipdata.plist#thrust|thrust]], &lt;br /&gt;
#* [[shipdata.plist#max_energy|max_energy]], &lt;br /&gt;
#* [[shipdata.plist#energy_recharge_rate|energy_recharge_rate]], &lt;br /&gt;
#* laser types (only [[shipdata.plist#forward_weapon_type|forward]] and [[shipdata.plist#aft_weapon_type|aft]] laser available), &lt;br /&gt;
#* [[shipdata.plist#laser_color|laser_color]],&lt;br /&gt;
#* the number of  [[shipdata.plist#missiles|missiles]] you carry and their [[shipdata.plist#missile_role|main type]], &lt;br /&gt;
#* [[shipdata.plist#frangible|frangibility]] of your ship (if applicable),&lt;br /&gt;
#* installed equipment extras:&lt;br /&gt;
#** [[shipdata.plist#has_ecm|ECM]],&lt;br /&gt;
#** [[shipdata.plist#has_escape_pod|Escape Capsule]],&lt;br /&gt;
#** [[shipdata.plist#has_fuel_injection|Fuel Injectors]],&lt;br /&gt;
#** [[shipdata.plist#has_scoop|Fuel Scoops]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_booster|Shield Boosters]],&lt;br /&gt;
#** [[shipdata.plist#has_shield_enhancer|Shield Enhancers]],&lt;br /&gt;
#** an Extra Energy Unit or Naval Energy Unit (will influence the [[shipdata.plist#max_energy|max_energy]]),&lt;br /&gt;
#** [[shipdata.plist#heat_insulation|Heat Shields]],&lt;br /&gt;
#** [[shipdata.plist#has_cloaking_device|Cloaking Device]],&lt;br /&gt;
#** [[shipdata.plist#has_energy_bomb|Q-bomb]]&lt;br /&gt;
&lt;br /&gt;
'''Make sure that models, textures and shaders used be ship will be available not only for you''' &lt;br /&gt;
&lt;br /&gt;
# Copy them to the appropriate folder of OXP. &lt;br /&gt;
# (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts. &lt;br /&gt;
::Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.&lt;br /&gt;
&lt;br /&gt;
'''(Optional) Add a character entry in [[characters.plist|characters.plist]]'''&lt;br /&gt;
&lt;br /&gt;
If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!&lt;br /&gt;
&lt;br /&gt;
Example of such a entry:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;personalities-hesperus&amp;quot; = {&lt;br /&gt;
    bounty = 150; &lt;br /&gt;
    name = &amp;quot;Captain Jack Hesperus&amp;quot;; &lt;br /&gt;
    &amp;quot;random_seed&amp;quot; = &amp;quot;0 0 0 0 0 0&amp;quot;; &lt;br /&gt;
    &amp;quot;short_description&amp;quot; = &amp;quot;a notorious, feline trumble dealer from Orrira&amp;quot;; &lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Give your ship a personality (shipdata.plist)'''&lt;br /&gt;
:*'''[[shipdata.plist#name|name]]''' - &amp;lt;code&amp;gt;shipname: charactername&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#pilot|pilot]]''' - key of entry in characters.plist, for example,&amp;lt;code&amp;gt;personalities-hesperus&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*'''[[shipdata.plist#roles|roles]]''':&lt;br /&gt;
::: general role: &amp;lt;code&amp;gt;personalities&amp;lt;/code&amp;gt;&lt;br /&gt;
::: occupation: &amp;lt;code&amp;gt;personalities_cruiser&amp;lt;/code&amp;gt; (trader), &amp;lt;code&amp;gt;personalities_privateer&amp;lt;/code&amp;gt; (pirate) or &amp;lt;code&amp;gt;personalities_hunter&amp;lt;/code&amp;gt; (bounty hunter)&lt;br /&gt;
::: spawn options (several or even none may be specified): &lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_any&amp;lt;/code&amp;gt; - can appear in space or near main station in any galaxy&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_launcher_galaxy_any&amp;lt;/code&amp;gt; - can apear launching from main station in any galaxy (some ships are too big for that)&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_galaxy_0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities_launcher_galaxy_0&amp;lt;/code&amp;gt; - similar to 'any' variant but limited only to the Galaxy '''One'''.&lt;br /&gt;
::::&amp;lt;code&amp;gt;personalities_yourCharacterName&amp;lt;/code&amp;gt; - opional but useful for testing&lt;br /&gt;
::::'''Examples:'''&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan&amp;lt;/code&amp;gt; - pirate by name &amp;quot;Aodhan&amp;quot; that can appear in any galaxy both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion&amp;lt;/code&amp;gt; - bounty hunter by name &amp;quot;Gwydion&amp;quot; that can appear only in Galaxy Eight both in space and via launch from main station,&lt;br /&gt;
::::# &amp;lt;code&amp;gt;personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson&amp;lt;/code&amp;gt; - trader by name &amp;quot;Jameson&amp;quot; that can appear only in Galaxy One, Two and Three and only in space&lt;br /&gt;
&lt;br /&gt;
:*'''[[shipdata.plist#ai_type|ai_type]]''' and '''[[shipdata.plist#script|script]]''' - there are two options here: plist AI or priority AI&lt;br /&gt;
::''Plist AI'' - relatively obsolete, but more straightforward for making your own tweaks:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalitiesCruiserAI.plist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalitiesHunterAI.plist&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalitiesPrivateerAI.plist&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''Priority AI'' - available more communications and slightly better interaction with the environment:&lt;br /&gt;
::: '''ai_type''' - &amp;lt;code&amp;gt;personalities-cruiserAI.js&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;personalities-hunterAI.js&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;personalities-privateerAI.js&amp;lt;/code&amp;gt; &lt;br /&gt;
::: '''script''' - &amp;lt;code&amp;gt;personalities-priorityai-ship-script.js&amp;lt;/code&amp;gt;&lt;br /&gt;
::''You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.''&lt;br /&gt;
&lt;br /&gt;
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' &amp;lt;!--NOTE: I link to Format section, because in script_info almost nothing--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+ Plist AI&lt;br /&gt;
|- &lt;br /&gt;
! Key&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| &lt;br /&gt;
| internal identifier for the character's chatter&lt;br /&gt;
|- &lt;br /&gt;
| displayName&lt;br /&gt;
| &lt;br /&gt;
| the character's human readable name&lt;br /&gt;
|- &lt;br /&gt;
| attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors immediatly if attacked&lt;br /&gt;
|- &lt;br /&gt;
| attackProbability&lt;br /&gt;
| number in range [0; 1]&lt;br /&gt;
| chance of finding the ship's prey (see below) with each scan&lt;br /&gt;
|- &lt;br /&gt;
| cargoType&lt;br /&gt;
| role&lt;br /&gt;
| special cargo carried by the ship (e.g. &amp;quot;missilepod&amp;quot;)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;cloak&amp;quot;&lt;br /&gt;
| lets the ship only use its cloak if its energy is down to 1/2 (= shields depleted)&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | energyLow&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| lets the ship flee with injectors, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out, if its energy is down to 1/4&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | launch&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| lets the ship jump out of the system, after launching from the main station&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| lets the ship set course to the witchpoint, after launching from the main&lt;br /&gt;
|- &lt;br /&gt;
| maxCargo&lt;br /&gt;
| integer&lt;br /&gt;
| the maximum number of cargopods spawned if the ship dies&lt;br /&gt;
|- &lt;br /&gt;
| miningProbability&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| chance of finding asteroids with each scan (only if no prey found) and mining them&lt;br /&gt;
|- &lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance of using the fuel station (if any), if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance of going to the sun first, if spawned at witchpoint&lt;br /&gt;
|- &lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | prey&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateers only) will only attack ships which are victims&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateers only) will attack any ship&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunters only) will attack any ship with a bounty above a certain treshold&lt;br /&gt;
|- &lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunters only) will only attack Thargoids, not pirates&lt;br /&gt;
|- &lt;br /&gt;
| preyLimit&lt;br /&gt;
| integer&lt;br /&gt;
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|+Priority AI&lt;br /&gt;
|-&lt;br /&gt;
! Key&lt;br /&gt;
! Key meaning / commentary&lt;br /&gt;
! Value&lt;br /&gt;
! Value meaning / commentary&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| internal identifier, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| displayName&lt;br /&gt;
| the character's human readable name, required&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | attacked&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do when attacked&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;destroy&amp;quot;&lt;br /&gt;
| destroy the attacker, even if he no longer wants to fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;repel&amp;quot;&lt;br /&gt;
| repel the attacker&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyDown&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/2 (shield down)&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | energyLow&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do in combat when energy is less than 1/4&lt;br /&gt;
| &amp;quot;flee&amp;quot;&lt;br /&gt;
| flee away from the fight (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| try to witchspace out from the combat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;continue&amp;quot;&lt;br /&gt;
| keep fighting (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | launch&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do after launch from the main station&lt;br /&gt;
| &amp;quot;jump&amp;quot;&lt;br /&gt;
| jump to another system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;stay&amp;quot;&lt;br /&gt;
| keep in this system&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;random&amp;quot;&lt;br /&gt;
| 50 / 50 (default)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | prey&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | who to hunt&lt;br /&gt;
| &amp;quot;everybody&amp;quot;&lt;br /&gt;
| (privateer only) any clean or not ship (but not police)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;loneVictim&amp;quot;&lt;br /&gt;
| (privateer only) lone pirate victims&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;traders&amp;quot;&lt;br /&gt;
| (privateer only) pirate victim ships&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;offenders&amp;quot;&lt;br /&gt;
| (hunter only) any offender with sufficient bounty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;thargoids&amp;quot;&lt;br /&gt;
| (hunter only) only thargoids&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;nobody&amp;quot;&lt;br /&gt;
| (default) but logicale suitable only for cruisers&lt;br /&gt;
|-&lt;br /&gt;
| preyLimit&lt;br /&gt;
| the minimum bounty that is worth attacking prey&lt;br /&gt;
| positive number&lt;br /&gt;
| if not specified, the standard fine threshold / 2 is used&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | preyCombatOdds&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | what combat odds are sufficient to attack, &amp;quot;good&amp;quot; is default&lt;br /&gt;
| &amp;quot;none&amp;quot;&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Note that the standard oolite hunters are happy with the (not) bad outcome: &amp;lt;br \&amp;gt;&amp;quot;if we require bounty hunters to have actual *good* odds they'll never shoot anything&amp;quot; &amp;lt;br \&amp;gt;(from oolite-bountyHunterAI.js)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;excelent&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;good&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;bad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;terrible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if you hear a distress call if combat odds good enough&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do distressCallInsufficientOddsReaction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;help&amp;quot;&lt;br /&gt;
| intervene on the side of the victim (this is not necessarily who sent the call)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;finishOff&amp;quot;&lt;br /&gt;
| attack the sender of the call&lt;br /&gt;
|-&lt;br /&gt;
| distressCallCombatOdds&lt;br /&gt;
| what combat odds are sufficient to intervene&lt;br /&gt;
| &lt;br /&gt;
| same as for preyCombatOdds&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | distressCallInsufficientOddsReaction&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | what to do if it's too dangerous to intervene&lt;br /&gt;
| &amp;quot;ignore&amp;quot;&lt;br /&gt;
| (default) do nothing, just fly by&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;leaveVicinity&amp;quot;&lt;br /&gt;
| leave vicinity of the sender of distress call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;jumpOut&amp;quot;&lt;br /&gt;
| preventively try to witchspace out&lt;br /&gt;
|-&lt;br /&gt;
| miningProbability&lt;br /&gt;
| chance to start mining if nothing to do more and it posible&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | number in range [0; 1]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fuelstationProbability&lt;br /&gt;
| chance to to refuel at fuelstation after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| sunskimProbability&lt;br /&gt;
| chance to  sunskim after witchspace jump if posible and need&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''&lt;br /&gt;
# Add entry of what types of messages are used:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-messageTypes&amp;quot; = &amp;quot;attack attacked captured chatter dead flee jump kill launch witchspace&amp;quot;&amp;lt;/code&amp;gt; - &amp;quot;name&amp;quot; here must be same as in '''script_info'''&lt;br /&gt;
# Add the comms themselves:&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attack&amp;quot; = (&amp;quot;Phrase to be sent when attack&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-attacked&amp;quot; = (&amp;quot;Either this phrase will be sent..&amp;quot;, &amp;quot;or this one when ship attacked&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;&amp;quot;personalities-''name''-chatter&amp;quot; = (&amp;quot;Also you can add...{pause: 5} some dramatic pauses!&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
 List of avalaible comms coming soon&lt;br /&gt;
&lt;br /&gt;
If you have any questions or suggestions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 BB thread] or send a PM to Alnivel.&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions &amp;amp; comments]&lt;br /&gt;
&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character&lt;br /&gt;
&lt;br /&gt;
== Minimum Requirements ==&lt;br /&gt;
Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy.&lt;br /&gt;
Personalities 0.9 was written and tested on [[Oolite]] 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.&lt;br /&gt;
&lt;br /&gt;
== Download Location ==&lt;br /&gt;
[https://www.dropbox.com/s/93yfevfm182veqv/Personalities%20OXP.zip?dl=1 Personalities.oxp v 0.91] (2022)&lt;br /&gt;
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.&lt;br /&gt;
&lt;br /&gt;
[[File:IconLib.png|right]]&lt;br /&gt;
== Tweaking ==&lt;br /&gt;
This oxp is customisable through [[Library OXP]] - via the '''Config for AddOns''' option on the docked F4 screen&lt;br /&gt;
&lt;br /&gt;
== Version History ==&lt;br /&gt;
*version 0.9.1 (September, 2022) by Alnivel&lt;br /&gt;
:requires Oolite 1.9 (probably can work even on versions 1.82+, but not tested)&lt;br /&gt;
:fixed several broken function calls&lt;br /&gt;
:changed names of internal variables and resources to avoid conflicts&lt;br /&gt;
:changed comms message using method, it now requires a description.plist entry to be defined in this format:&lt;br /&gt;
::&amp;quot;personalities-&amp;lt;personality name&amp;gt;-messageTypes&amp;quot; = &amp;quot;&amp;lt;list of space separated message types&amp;gt;&amp;quot;;&lt;br /&gt;
:rewritten methods for the spawn of special ships, changing a probability of this spawns now easier&lt;br /&gt;
:added method for adding role to appear on a specified condition, such as system id, after some event ''etc''&lt;br /&gt;
&lt;br /&gt;
*version 0.9 (November 5th, 2009) by Commander McLane&lt;br /&gt;
:functional version for testing and feedback purposes&lt;br /&gt;
:script may still get worked over&lt;br /&gt;
:requires Oolite 1.73&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6806 Personalities.oxp] (2009 - date)&lt;br /&gt;
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&amp;amp;t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)&lt;br /&gt;
*[http://www.aegidian.org/bb/viewtopic.php?f=2&amp;amp;t=569 How would you like to appear as a Cameo in OOLite?] (2005)&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite]]&lt;br /&gt;
{{ambience-OXP}}&lt;/div&gt;</summary>
		<author><name>Alnivel</name></author>
		
	</entry>
</feed>