<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://backup.witchspacewiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phasted</id>
	<title>Elite Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://backup.witchspacewiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phasted"/>
	<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php/Special:Contributions/Phasted"/>
	<updated>2026-04-16T05:07:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Oolite_Javascript_Reference:_PriorityAI_Documentation&amp;diff=40716</id>
		<title>Oolite Javascript Reference: PriorityAI Documentation</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Oolite_Javascript_Reference:_PriorityAI_Documentation&amp;diff=40716"/>
		<updated>2014-08-01T03:01:06Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* conditionMissileNeedsLaunchEvasion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the priority-based Javascript AI system, which allows more flexible behaviour than the old plist-based AIs to be written in fewer lines of code. New programmers may find [[Oolite_PriorityAI_Tutorial|the priority AI tutorial]] to be more useful as an introduction.&lt;br /&gt;
&lt;br /&gt;
Priority-based Javascript AI is available from Oolite 1.79 onwards.&lt;br /&gt;
&lt;br /&gt;
== Constructor and general functions ==&lt;br /&gt;
&lt;br /&gt;
==== Constructor ====&lt;br /&gt;
 '''new PriorityAIController'''(ship : Ship) : PriorityAIController&lt;br /&gt;
Creates a priority AI and attaches it to the specified ship. Using this from anywhere other than that ship's AI script is not recommended.&lt;br /&gt;
&lt;br /&gt;
 var ai = new worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;].PriorityAIController(this.ship);&lt;br /&gt;
&lt;br /&gt;
=== Properties ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ship&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 '''ship''' : Ship (read-only)&lt;br /&gt;
The ship to which the priority AI is attached.&lt;br /&gt;
&lt;br /&gt;
=== General Methods ===&lt;br /&gt;
&lt;br /&gt;
Additional methods are described in later sections, sorted by purpose.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;applyHandlers&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''applyHandlers'''(handlers : Object)&lt;br /&gt;
Deletes any existing event handlers applied to the ship's AI Script by a previous invocation of &amp;lt;code&amp;gt;applyHandlers&amp;lt;/code&amp;gt;, and copies the handlers in the argument object to the AI Script. All handlers applied this way run with '&amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;' equal to the PriorityAIController, not to the AI Script.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;clearHandlers&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''clearHandlers'''(handlers : Object)&lt;br /&gt;
Deletes any existing event handlers applied to the ship's AI Script by a previous invocation of &amp;lt;code&amp;gt;applyHandlers&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;communicate&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''communicate'''(key : String, params : Object, priority : Number)&lt;br /&gt;
If the communication &amp;quot;key&amp;quot; has previously been [[#_setCommunication|defined]] for this ship's [[#setCommunicationsRole|communications role]] and [[#setCommunicationsPersonality|personality]], retrieves it, calls &amp;lt;code&amp;gt;expandDescription&amp;lt;/code&amp;gt; on it, using the parameters in the object (which can either be a dictionary, or a Ship). This message may then broadcast on the public channel, depending on the priority. If the object is a Ship, it will be converted to a dictionary for expandDescription with the following parameters:&lt;br /&gt;
* &amp;lt;code&amp;gt;oolite_entityClass&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;ship.shipClassName&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;oolite_entityName&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;ship.shipUniqueName&amp;lt;/code&amp;gt;&lt;br /&gt;
Other parameters may be added later to this expansion.&lt;br /&gt;
&lt;br /&gt;
The priority can be a number from 1 to 4&lt;br /&gt;
# Always send this message&lt;br /&gt;
# Send this message if no messages sent in the last 10 seconds&lt;br /&gt;
# Send this message if no messages sent or received in the last 10 seconds&lt;br /&gt;
# Send this message if no messages sent or received in the last 60 seconds&lt;br /&gt;
This is used to prevent an overwhelming number of comms messages being sent. While priority 1 is necessary for messages which must be heard by the player, care must be taken to ensure by other means that they cannot be sent repeatedly.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;communicationsPersonality&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''communicationsPersonality'''() : String&lt;br /&gt;
The current communications personality&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;communicationsRole&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''communicationsRole'''() : String&lt;br /&gt;
The current communications role&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;getParameter&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''getParameter'''(key : String) : Value&lt;br /&gt;
If a parameter with that key has previously been set, return its value. Otherwise return null. Note that the return value can be of any type, so you must be careful when setting and retrieving parameters to avoid type errors.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;getWaypointGenerator&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''getWaypointGenerator'''() : Function&lt;br /&gt;
If a waypoint generation function has previously been set, return it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;noteCommsHeard&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''noteCommsHeard'''()&lt;br /&gt;
This function is used to reset the timers for [[#communicate|priority 3 and 4 communications]]. The standard event handlers will call this for you, but you may need to call it manually otherwise.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reconsiderIn&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''reconsiderIn'''(delay : Number)&lt;br /&gt;
Force a reconsideration of the AI's priority list ahead of schedule, if no request for sooner reconsideration has already been received. &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; must be at least 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reconsiderNow&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''reconsiderNow'''()&lt;br /&gt;
Force a reconsideration of the AI's priority list ahead of schedule.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setCommunicationsRole&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setCommunicationsRole'''(role : String)&lt;br /&gt;
Sets the ship's communications role to the given value. This is then used to vary the communications messages as defined by [[#_setCommunication|_setCommunication]].&lt;br /&gt;
&lt;br /&gt;
If personalities have previously been defined for this role, and the ship's current personality is either &amp;quot;generic&amp;quot; or not one defined for this role, then it will also select a new communications personality at this point, based on [[Oolite_JavaScript_Reference:_Ship#entityPersonality|ship.entityPersonality]]. If the &amp;quot;oolite_personalityMatchesLeader&amp;quot; parameter has been set, then this is a 0..1 chance that the ship will instead take the personality of its group leader (if this ship is the group leader, this instead is the chance it will copy its personality to group members)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setCommunicationsPersonality&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setCommunicationsPersonality'''(role : String)&lt;br /&gt;
Sets the ship's communications personality to the given value. This is then used to vary the communications messages as defined by [[#_setCommunication|_setCommunication]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setParameter&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setParameter'''(key : String, value : Value)&lt;br /&gt;
Set the named parameter to the given value. Values may be of any type. To remove a parameter, use a value of null. See the [[#Parameters|Parameters]] section below for parameter keys used by the core AIs and the standard priority AI library.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setPriorities&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setPriorities'''(priorities : Array [, delay: Number])&lt;br /&gt;
Set the priority list for the AI, and evaluate it. The format of the priority list is described in the next section.&lt;br /&gt;
&lt;br /&gt;
An optional delay parameter can be set, which will cause evaluation to start only after this many seconds. If it is unset, the AI will start after a random period between 0 and 1 seconds.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setWaypointGenerator&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setWaypointGenerator'''(generator : Function)&lt;br /&gt;
Sets the AI's [[#Waypoint_Generators|Waypoint Generators]] waypoint generator function.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
The following parameters are used by the standard library and accessed using [[#getParameter|getParameter]] and [[#setParameter|setParameter]], but you can also define your own for custom AIs. More detailed documentation will be provided soon.&lt;br /&gt;
&lt;br /&gt;
As with all custom items, prefixing new parameter names with a key unique to your OXP is strongly advised.&lt;br /&gt;
&lt;br /&gt;
==== Flag Parameters ====&lt;br /&gt;
Flag parameters are intended to be set in the AI initialisation routine to vary the behaviour of the AI.&lt;br /&gt;
&lt;br /&gt;
 oolite_flag_allowPlanetaryLanding&lt;br /&gt;
 oolite_flag_autoSpreadMissiles&lt;br /&gt;
 oolite_flag_behaviourLogging&lt;br /&gt;
 oolite_flag_continueUnlikelyPursuits&lt;br /&gt;
 oolite_flag_escortsCoverRetreat&lt;br /&gt;
 oolite_flag_fightsNearHostileStations&lt;br /&gt;
 oolite_flag_fleesPreemptively&lt;br /&gt;
 oolite_flag_likesInterstellarSpace&lt;br /&gt;
 oolite_flag_listenForDistressCall&lt;br /&gt;
 oolite_flag_markOffenders&lt;br /&gt;
 oolite_flag_neverFleeToWitchspace&lt;br /&gt;
 oolite_flag_noDockingUntilDestination&lt;br /&gt;
 oolite_flag_noSpecialThargoidReaction&lt;br /&gt;
 oolite_flag_patrolStation&lt;br /&gt;
 oolite_flag_scanIgnoresUnpowered&lt;br /&gt;
 oolite_flag_selfDestructAbandonedShip&lt;br /&gt;
 oolite_flag_sendsDistressCalls&lt;br /&gt;
 oolite_flag_surrendersEarly&lt;br /&gt;
 oolite_flag_surrendersLate&lt;br /&gt;
 oolite_flag_watchForCargo&lt;br /&gt;
 oolite_flag_witchspacePursuit&lt;br /&gt;
&lt;br /&gt;
==== Other parameters ====&lt;br /&gt;
These parameters are used for storage of long-term state that may need to be kept between runs of the priority tree. In general, Configuration and Response functions set them, and Condition, Behaviour and Response functions read them, but this is only a guideline. Implementors of custom functions may need to get or set these parameters for proper interaction with built-in functions used by the same AI.&lt;br /&gt;
&lt;br /&gt;
 oolite_cargoDropped&lt;br /&gt;
 oolite_cascadeDetected&lt;br /&gt;
 oolite_distressAggressor&lt;br /&gt;
 oolite_distressSender&lt;br /&gt;
 oolite_distressTimestamp&lt;br /&gt;
 oolite_dockingStation&lt;br /&gt;
 oolite_escortRole&lt;br /&gt;
 oolite_friendlyRoles&lt;br /&gt;
 oolite_groupPower&lt;br /&gt;
 oolite_interceptCoordinates&lt;br /&gt;
 oolite_interceptTarget&lt;br /&gt;
 oolite_lastAssist&lt;br /&gt;
 oolite_lastFleeing&lt;br /&gt;
 oolite_lastPirateVictim&lt;br /&gt;
 oolite_leaderRole&lt;br /&gt;
 oolite_personalityMatchesLeader&lt;br /&gt;
 oolite_pirateLurk&lt;br /&gt;
 oolite_playerFriendlyFireAlready&lt;br /&gt;
 oolite_rememberedTarget&lt;br /&gt;
 oolite_scanResults&lt;br /&gt;
 oolite_scanResultSpecific&lt;br /&gt;
 oolite_selectedPlanet&lt;br /&gt;
 oolite_selectedStation&lt;br /&gt;
 oolite_stationPatrolRole&lt;br /&gt;
 oolite_waypoint&lt;br /&gt;
 oolite_waypointRange&lt;br /&gt;
 oolite_waypoints&lt;br /&gt;
 oolite_witchspaceDestination&lt;br /&gt;
 oolite_witchspaceEntry&lt;br /&gt;
 oolite_witchspaceWormhole&lt;br /&gt;
&lt;br /&gt;
== Writing a priority list ==&lt;br /&gt;
&lt;br /&gt;
The priority list is the core of the priority AI. The list will be reevaluated periodically - either timed, or when events occur - and on each reevaluation it will be searched from top to bottom. When a valid priority is found, searching will stop, and that priority will be executed.&lt;br /&gt;
&lt;br /&gt;
If the parameter &amp;quot;oolite_flag_behaviourLogging&amp;quot; is set with [[#setParameter|setParameter]] then verbose information will be written to the log file regarding the processing of the priority list. It is generally advisable to use the debug console to do this for one ship at a time, rather than setting it generally!&lt;br /&gt;
&lt;br /&gt;
=== Basic structure ===&lt;br /&gt;
&lt;br /&gt;
The priority list is an array of objects. Each object contains a set&lt;br /&gt;
of keys and values. The keys are considered in the&lt;br /&gt;
following order and are all optional.&lt;br /&gt;
* '''preconfiguration''': function run unconditionally if this element of the list is reached.&lt;br /&gt;
* '''condition''': function run unconditionally if this element of the list is reached. If it returns false, the remainder of the object is ignored, and consideration moves to the next list element.&lt;br /&gt;
* '''notcondition''': function run unconditionally if this element of the list is reached. If it returns true, the remainder of the object is ignored, and consideration moves to the next list element.&lt;br /&gt;
If neither '''condition''' nor '''notcondition''' are set, this is treated as if a condition was set and was true.&lt;br /&gt;
* '''configuration''': function run if conditions allow&lt;br /&gt;
* '''behaviour''': function run if conditions allow. If this exists, no further elements of the priority list will be considered.&lt;br /&gt;
* '''reconsider''': A number. If a behaviour is executed, the priority list will next be reconsidered in this many seconds. If this value is absent the priority list will only be considered if an event causes it.&lt;br /&gt;
* '''truebranch''': a priority list array. If there was no behaviour, but the conditions allow one to be run, the truebranch will be evaluated as a priority list. If the truebranch causes a behaviour to be executed, consideration will end here. If the truebranch reaches its end without executing a behaviour, consideration will continue with the next element of the main priority list.&lt;br /&gt;
* '''falsebranch''': a priority list array. This will be executed if the the conditions caused the previous four elements to be skipped.&lt;br /&gt;
&lt;br /&gt;
If evaluation reaches the end of the main priority list without finding a behaviour to execute, an error will be noted in the log. In general the last element of the main priority list should always be unconditional (or have a truebranch and a falsebranch, both of which have an unconditional last element).&lt;br /&gt;
&lt;br /&gt;
Example of simple behaviour: (from thargoid AI)&lt;br /&gt;
  {&lt;br /&gt;
    preconfiguration: ai.configurationCheckScanner,&lt;br /&gt;
    condition: ai.conditionScannerContainsNonThargoid,&lt;br /&gt;
    configuration: ai.configurationAcquireScannedTarget,&lt;br /&gt;
    behaviour: ai.behaviourDestroyCurrentTarget,&lt;br /&gt;
    reconsider: 1&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Example of branch usage: (from police AI)&lt;br /&gt;
  {&lt;br /&gt;
    /* The group leader leads the patrol */&lt;br /&gt;
    condition: ai.conditionIsGroupLeader,&lt;br /&gt;
    truebranch: [&lt;br /&gt;
      /* Nothing interesting here. Patrol for a bit */&lt;br /&gt;
      {&lt;br /&gt;
        condition: ai.conditionHasWaypoint,&lt;br /&gt;
        configuration: ai.configurationSetDestinationToWaypoint,&lt;br /&gt;
        behaviour: ai.behaviourApproachDestination,&lt;br /&gt;
        reconsider: 30&lt;br /&gt;
      },&lt;br /&gt;
      /* No patrol route set up. Make one */&lt;br /&gt;
      {&lt;br /&gt;
        configuration: ai.configurationSetWaypoint,&lt;br /&gt;
        behaviour: ai.behaviourApproachDestination,&lt;br /&gt;
        reconsider: 30&lt;br /&gt;
      }&lt;br /&gt;
    ],&lt;br /&gt;
    /* Other ships in the group will set themselves up&lt;br /&gt;
    * as escorts if possible, or looser followers if&lt;br /&gt;
    * not */&lt;br /&gt;
    falsebranch: [&lt;br /&gt;
      {&lt;br /&gt;
        preconfiguration: ai.configurationEscortGroupLeader,&lt;br /&gt;
        condition: ai.conditionIsEscorting,&lt;br /&gt;
        behaviour: ai.behaviourEscortMothership,&lt;br /&gt;
        reconsider: 30&lt;br /&gt;
      },&lt;br /&gt;
      /* if we can't set up as an escort */&lt;br /&gt;
      {&lt;br /&gt;
        behaviour: ai.behaviourFollowGroupLeader,&lt;br /&gt;
        reconsider: 15&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The AI Library provides a selection of standard condition,&lt;br /&gt;
configuration and behaviour functions for us in AIs, but you can also&lt;br /&gt;
write your own.&lt;br /&gt;
  /* Ship is unstable and may explode under stress */&lt;br /&gt;
  {&lt;br /&gt;
    condition: function()&lt;br /&gt;
    {&lt;br /&gt;
      return Math.random() &amp;lt; 0.01; // 1% chance per evaluation&lt;br /&gt;
    }				&lt;br /&gt;
    behaviour: function()&lt;br /&gt;
    {&lt;br /&gt;
      this.ship.explode();&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
=== Evaluation context ===&lt;br /&gt;
&lt;br /&gt;
All condition, configuration and behaviour functions are evaluated in the context of the AI object. The '&amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;' variable when one of these functions is run therefore points to the priority AI, '''not''' to the AI Script.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;this.ship&amp;lt;/code&amp;gt; is defined and will be equivalent to the this.ship seen by the AI Script. However, if you wish to access properties of the AI Script you must use &amp;lt;code&amp;gt;this.ship.AIScript.''property''&amp;lt;/code&amp;gt;. Properties and methods of the priority AI may be accessed directly, e.g. &amp;lt;code&amp;gt;[[#allied|this.allied]](this.ship,this.ship.target)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behaviour functions ==&lt;br /&gt;
&lt;br /&gt;
Behaviour functions determine what the ship will do next. They&lt;br /&gt;
generally begin a particular behaviour, and set up event handlers&lt;br /&gt;
(generally aided by the response templates) to allow interruption or&lt;br /&gt;
modification of that behaviour should anything interesting happen.&lt;br /&gt;
&lt;br /&gt;
Behaviour functions take no arguments and return nothing.&lt;br /&gt;
&lt;br /&gt;
=== General behaviours ===&lt;br /&gt;
&lt;br /&gt;
Behaviours intended for ships in general. These mostly use &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;, and occasionally add others.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourApproachDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourApproachDestination'''()&lt;br /&gt;
Travels from the current position to within &amp;lt;code&amp;gt;desiredRange&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt;, avoiding obstacles on the way. &lt;br /&gt;
&lt;br /&gt;
If a waypoint is set in the parameters &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot;, it will clear these parameters if when it reaches its destination it is sufficiently close to the waypoint. If the parameter &amp;quot;oolite_flag_patrolStation&amp;quot; is set, and its group leader is a station, it will report in to the station  upon reaching the waypoint.&lt;br /&gt;
&lt;br /&gt;
Temporary waypoints needed to avoid obstacles will be stored in the&lt;br /&gt;
&amp;quot;oolite_waypoints&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourAssassinateCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourAssassinateCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, only stopping when interrupted or when the target is destroyed. It will potentially send both &amp;quot;oolite_beginningAssassination&amp;quot; and &amp;quot;oolite_beginningFight&amp;quot; communications messages (though if the former is defined, the latter will not be sent due to the communications priority system). This is otherwise identical in behaviour to [[#behaviourCommenceAttackOnCurrentTarget|behaviourCommenceAttackOnCurrentTarget]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourAvoidCascadeExplosion&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourAvoidCascadeExplosion'''()&lt;br /&gt;
Fly, using injectors if available, to a safe distance from any nearby quirium cascades (or active mines)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourBecomeInactiveThargon&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourBecomeInactiveThargon'''()&lt;br /&gt;
This behaviour is intended to deactivate thargons and should generally only be used for that purpose. It changes the scan class to CLASS_CARGO, clears the ship's targeting information, brings it to a stop, removes it from its ship groups, and removes it from nearby NPCs targeting systems (it can be retargeted). Unlike the equivalent plist AI command, it does not remove it as a player target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourCollectSalvage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourCollectSalvage'''()&lt;br /&gt;
This behaviour attempts to scoop the current target. If it is successful, the &amp;quot;oolite_cargoDropped&amp;quot; parameter recording the number of seen cargo pods will be cleared.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourCommenceAttackOnCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourCommenceAttackOnCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, only stopping when interrupted or when the target is destroyed. Unlike the &amp;lt;code&amp;gt;behaviourDestroyCurrentTarget&amp;lt;/code&amp;gt; behaviour, it may first send the &amp;quot;[[#oolite_beginningFight|oolite_beginningFight]]&amp;quot; communications message, so should only be used when starting a fight with a new target/group - not when in the middle of a fight.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourDestroyCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourDestroyCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, only stopping when interrupted or when the target is destroyed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourDockWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourDockWithStation'''()&lt;br /&gt;
This behaviour docks with the station specified in the parameter &amp;quot;oolite_dockingStation&amp;quot;. If the target refuses docking or the ship is too big to dock, the parameter will be cleared.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourEnterWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourEnterWitchspace'''()&lt;br /&gt;
This behaviour attempts to enter witchspace. It can do this in several ways:&lt;br /&gt;
* If the parameter &amp;quot;oolite_witchspaceWormhole&amp;quot; is set to an active wormhole, it will try to fly to and use that wormhole.&lt;br /&gt;
* If the parameter &amp;quot;oolite_witchspaceDestination&amp;quot; is set, then it will try to jump to that destination using its own drive. It will wait for its escorts to be launched, and will start spinning up this drive. Calling this behaviour again after 15 seconds will cause it to jump out.&lt;br /&gt;
* Otherwise, it will wait for a wormhole to be suggested by another member of its group, or for the player to create one.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourEscortMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourEscortMothership'''()&lt;br /&gt;
This behaviour performs non-combat escorting of the ship's group leader, in the formation requested by the lead ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFineCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFineCurrentTarget'''()&lt;br /&gt;
If the ship has scan class &amp;quot;CLASS_POLICE&amp;quot; and a current target, mark that target for fines when it next docks.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFleeCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFleeCombat'''()&lt;br /&gt;
The ship will flee from hostility, in the following order:&lt;br /&gt;
* Cascade explosions (coordinates from the parameter &amp;quot;oolite_cascadeDetected&amp;quot;)&lt;br /&gt;
* Its current target, if it can see it&lt;br /&gt;
* Its defense targets, if it can see them&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFollowCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFollowCurrentTarget'''()&lt;br /&gt;
The ship will follow the current target, including through a witchspace jump if necessary, and will additionally [[#conditionHasRememberedTarget|remember]] the target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFollowGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFollowGroupLeader'''()&lt;br /&gt;
The ship will follow the group leader if there is one, attempting to remain within a few kilometres of it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourGuardTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourGuardTarget'''()&lt;br /&gt;
The ship will fly to within a few kilometres of its current target. Similar to &amp;lt;code&amp;gt;behaviourFollowCurrentTarget&amp;lt;/code&amp;gt; but will not follow the target into witchspace and will not remember that it was doing so if distracted.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourJoinTargetGroup&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourJoinTargetGroup'''()&lt;br /&gt;
The ship will add itself to its target's ship group. You should previously have used appropriate condition tests to check that this is appropriate behaviour.&lt;br /&gt;
 &lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourLandOnPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourLandOnPlanet'''()&lt;br /&gt;
Lands on the nearest planet. Unlike most behaviours, this one does not include the standard responses, so you should generally wait until the ship is only a few hundred metres above the surface before using it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourLeaveVicinityOfDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourLeaveVicinityOfDestination'''()&lt;br /&gt;
Moves outside scanner range of the current destination coordinates.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourLeaveVicinityOfTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourLeaveVicinityOfTarget'''()&lt;br /&gt;
Moves outside scanner range of the current target. Unlike fleeing, this does not use fuel injectors if they are fitted, and does not cause the ship to appear hostile to its target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMineTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMineTarget'''()&lt;br /&gt;
Attacks the current target with a mining laser to break it into splinters. If the current target is not a rock, this behaviour will be cancelled and the target will be lost.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourOfferToEscort&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourOfferToEscort'''()&lt;br /&gt;
Offers to escort the ship identified by the parameter &amp;quot;oolite_scanResultSpecific&amp;quot;. Unless this parameter has been set by the scanner condition [[#conditionScannerContainsShipNeedingEscort|conditionScannerContainsShipNeedingEscort]] this is extremely likely to fail.&lt;br /&gt;
&lt;br /&gt;
To be accepted as an escort, the ship must have a primary role in the &amp;lt;code&amp;gt;oolite-escorts&amp;lt;/code&amp;gt; [[role-categories.plist|role category]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourPayOffPirates&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourPayOffPirates'''()&lt;br /&gt;
If a pirate demand to dump cargo exists, dump that many cargo canisters (or all of them, if fewer), and then switch to [[#behaviourFleeCombat|behaviourFleeCombat]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourReconsider&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourReconsider'''()&lt;br /&gt;
Does nothing except schedule a re-evaluation of the priority list.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRejoinMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRejoinMothership'''()&lt;br /&gt;
This behaviour flies to rejoin the mothership, and then escorts it as in [[#behaviourEscortMothership|behaviourEscortMothership]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRepelCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRepelCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, but will break off the attack (and ask its escorts to do the same) if the target starts fleeing.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRespondToDistressCall&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRespondToDistressCall'''()&lt;br /&gt;
If the ship has a valid distress call represented by the parameters &amp;quot;oolite_distressAggressor&amp;quot; and &amp;quot;oolite_distressSender&amp;quot; it will attack the aggressor if it can see it. Otherwise it will fly (with injectors if available) to near the sender, attempting to locate the aggressor.&lt;br /&gt;
&lt;br /&gt;
If the aggressor has a lower bounty than the sender, then the ship will assume that the distress call is &amp;quot;unjust&amp;quot;, and attack the sender instead.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRobTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRobTarget'''()&lt;br /&gt;
If an existing group demand for cargo is in effect, attack the current target in the hope that it meets it. Demands are stored with the group leader if possible.&lt;br /&gt;
&lt;br /&gt;
If there is no existing demand for cargo, create one based on the cargo capacity of the target ship, the current system government, the cargo capacity of the group, and other factors.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourSunskim&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourSunskim'''()&lt;br /&gt;
Fly along until fuel tanks are full. In general, this behaviour should not be started until sunskimming height is reached (test with [[#conditionReadyToSunskim|conditionReadyToSunskim]]), and [[#configurationSetDestinationToSunskimEnd|configurationSetDestinationToSunskimEnd]] should be used to set a safe sunskimming direction.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourTumble&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourTumble'''()&lt;br /&gt;
Start tumbling. Unlike most behaviours, this one does not include the standard responses, so you will need to manually request a reconsideration of priorities if one is needed.&lt;br /&gt;
&lt;br /&gt;
=== Missile behaviours ===&lt;br /&gt;
&lt;br /&gt;
Missile behaviours use &amp;lt;code&amp;gt;responsesAddMissile&amp;lt;/code&amp;gt;. More discussion of setting missile parameters, ECM response, and detonation can be found there.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMissileInterceptCoordinates&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMissileInterceptCoordinates'''()&lt;br /&gt;
Close to the desired missile range (default 25m, or specified by the &amp;lt;code&amp;gt;oolite_missile_proximity&amp;lt;/code&amp;gt; key in script info), detonating when reached. The coordinates to close in on are specified in the &amp;quot;oolite_interceptCoordinates&amp;quot;. This is used to track missile targets which cloak.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMissileInterceptTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMissileInterceptTarget'''()&lt;br /&gt;
Close to the desired missile range (default 25m, or specified by the &amp;lt;code&amp;gt;oolite_missile_proximity&amp;lt;/code&amp;gt; key in script info), detonating when reached.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMissileSelfDestruct&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMissileSelfDestruct'''()&lt;br /&gt;
Destroys the missile without detonating the payload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Station behaviours ===&lt;br /&gt;
&lt;br /&gt;
Station behaviours use &amp;lt;code&amp;gt;responsesAddStation&amp;lt;/code&amp;gt; to set up their general handlers, as most standard behaviours are unnecessary or unhelpful for a stationary station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchDefenseShips&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchDefenseShips'''()&lt;br /&gt;
If the station has a target and the target is aggressive, launches a defense ship if any remain, increases the alert condition to Red, and requests a group attack on the target. Otherwise does nothing.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchMiner&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchMiner'''()&lt;br /&gt;
If the station does not currently have a miner in its ship group, launches one. Also reduces the alert condition by one step.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchPatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchPatrol'''()&lt;br /&gt;
If the station does not currently have a ship in its ship group with the primary role equal to the parameter &amp;quot;oolite_stationPatrolRole&amp;quot;, launches one. Also reduces the alert condition by one step.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchSalvager&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchMiner'''()&lt;br /&gt;
Launches a salvager. Also reduces the alert condition by one step.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationManageTraffic&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationManageTraffic'''()&lt;br /&gt;
The station idles. If the system repopulator has requested launches that this station can fulfil, it may launch a ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationRespondToDistressCall&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationRespondToDistressCall'''()&lt;br /&gt;
Locates the aggressor and sender in the same way as [[#behaviourRespondToDistressCall|behaviourRespondToDistressCall]. If the aggressor is not visible, does nothing, otherwise sets the aggressor as a target, increases alert condition to Red, and launches a defense ship to attack the aggressor.&lt;br /&gt;
&lt;br /&gt;
== Condition functions ==&lt;br /&gt;
&lt;br /&gt;
Condition functions are used to determine whether to execute a&lt;br /&gt;
priority AI behaviour. They take no arguments and return a Boolean.&lt;br /&gt;
&lt;br /&gt;
=== Combat conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions related to the ship's performance in combat.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCascadeDetected&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCascadeDetected'''() : Boolean&lt;br /&gt;
Returns true if a cascade explosion has been detected recently (as given by the parameter &amp;quot;oolite_cascadeDetected&amp;quot; containing the explosion coordinates).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCombatOdds*&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCombatOddsTerrible'''() : Boolean&lt;br /&gt;
 function '''conditionCombatOddsBad'''() : Boolean&lt;br /&gt;
 function '''conditionCombatOddsGood'''() : Boolean&lt;br /&gt;
 function '''conditionCombatOddsExcellent'''() : Boolean&lt;br /&gt;
These functions return true if the perceived odds of this ship's group winning a fight against the target ship's group can reasonably be described with the appropriate description. &amp;quot;Good&amp;quot; and &amp;quot;Excellent&amp;quot; require the odds to be better than a particular threshold (so Excellent odds are always also Good), while &amp;quot;Bad&amp;quot; and &amp;quot;Terrible&amp;quot; require the odds to be worse than that threshold.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupAttritionReached&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupAttritionReached'''() : Boolean&lt;br /&gt;
This condition is true if the ship is in a group and that group has lost more than a quarter of its initial ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupSuppliesLow&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupSuppliesLow'''() : Boolean&lt;br /&gt;
This condition is true if the ship's group is running out of consumables such as missiles or fuel, or has several damaged ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionInCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionInCombat'''() : Boolean&lt;br /&gt;
The ship is currently attacking other ships, or a ship in its group or one of its escorts is.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionInCombatWithHostiles&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionInCombat'''() : Boolean&lt;br /&gt;
The ship is currently attacking other ships, or a ship in its group or one of its escorts is. Additionally, at least one of the targets of those ships is itself attacking (though not necessarily attacking anything from this ship's group)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionLosingCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionLosingCombat'''() : Boolean&lt;br /&gt;
The ship is in combat, but is losing. The exact definition of &amp;quot;losing&amp;quot; may vary, and is intended to account for the overall tactical situation.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipInCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipInCombat'''() : Boolean&lt;br /&gt;
This ship's group leader is attacking and/or being attacked. Other ships in the group are not considered. This ship must be able to see its leader's target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipIsAttacking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipIsAttacking'''() : Boolean&lt;br /&gt;
This ship's group leader is attacking a target. This ship must be able to see its leader's target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipIsAttackingHostileTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipIsAttacking'''() : Boolean&lt;br /&gt;
This ship's group leader is attacking a target which is itself attacking something. This ship must be able to see its leader's target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipUnderAttack&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipUnderAttack'''() : Boolean&lt;br /&gt;
This ship's group leader is currently being targeted. This ship must be able to see the attacker.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSuppliesLow&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSuppliesLow'''() : Boolean&lt;br /&gt;
This condition is true if this ship is personally running out of consumables such as missiles or fuel, or is damaged. This is effectively a wrapper around &amp;lt;code&amp;gt;ship.damageAssessment()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Navigation conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions related to the ship's surroundings and navigation through the system.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCanWitchspaceOnRoute&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCanWitchspaceOnRoute'''() : Boolean&lt;br /&gt;
The ship has a witchspace drive, a witchspace route, and the next system on its [[#setWitchspaceRouteTowitchspace|route]] is within range with the current fuel supply.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCanWitchspaceOut&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCanWitchspaceOut'''() : Boolean&lt;br /&gt;
The ship has a witchspace drive, and at least one other system is within range with the current fuel supply.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionFriendlyStationExists&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionFriendlyStationExists'''() : Boolean&lt;br /&gt;
There is at least one friendly station in the system.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionFriendlyStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionFriendlyStationNearby'''() : Boolean&lt;br /&gt;
There is at least one friendly station within scanner range&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupIsSeparated&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupIsSeparated'''() : Boolean&lt;br /&gt;
The ship is in a group and has a group leader, and is out of scanner range of that leader (or out of 2x scanner range if the leader is a station)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasSelectedPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasSelectedPlanet'''() : Boolean&lt;br /&gt;
The ship has a valid planet in the &amp;quot;oolite_selectedPlanet&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasSelectedStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasSelectedStation'''() : Boolean&lt;br /&gt;
The ship has a valid planet in the &amp;quot;oolite_selectedStation&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHomeStationExists&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHomeStationExists'''() : Boolean&lt;br /&gt;
The ship's home station still exists&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHomeStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHomeStationNearby'''() : Boolean&lt;br /&gt;
The ship's home station is within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHostileStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHostileStationNearby'''() : Boolean&lt;br /&gt;
There is at least one hostile station within scanner range&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionInInterstellarSpace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionInInterstellarSpace'''() : Boolean&lt;br /&gt;
The ship is currently in interstellar space.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMainPlanetNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMainPlanetNearby'''() : Boolean&lt;br /&gt;
The ship is within 3 radii of the surface of the main planet&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionNearDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionNearDestination'''() : Boolean&lt;br /&gt;
The ship is closer than the desired range to its destination&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionPlayerNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionPlayerNearby'''() : Boolean&lt;br /&gt;
The player's ship is within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionReadyToSunskim&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionReadyToSunskim'''() : Boolean&lt;br /&gt;
The ship is close enough to the sun to scoop fuel.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSelectedStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSelectedStationNearby'''() : Boolean&lt;br /&gt;
The ship has a selected station in the &amp;quot;oolite_selectedStation&amp;quot; parameter, and it is within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSelectedStationNearMainPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSelectedStationNearMainPlanet'''() : Boolean&lt;br /&gt;
The ship has a selected station in the &amp;quot;oolite_selectedStation&amp;quot; parameter, and it is within 3 radii of the surface of the main planet.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionStationNearby'''() : Boolean&lt;br /&gt;
There is a station within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSunskimPossible&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSunskimPossible'''() : Boolean&lt;br /&gt;
There is a sun, it's not going nova, it hasn't gone nova, the ship has a non-full fuel tank and fuel scoops, and the ship has sufficient heat insulation to skim safely.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionWormholeNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionWormholeNearby'''() : Boolean&lt;br /&gt;
There is an entry wormhole within scanner range.&lt;br /&gt;
&lt;br /&gt;
=== Piracy-related conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions involved in piratical activities.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCargoDemandsMet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCargoDemandsMet'''() : Boolean&lt;br /&gt;
Since this ship (or an ally) made a cargo demand, this ship has seen enough cargo dropped to meet that demand.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupHasEnoughLoot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupHasEnoughLoot'''() : Boolean&lt;br /&gt;
The group this ship belongs to has obtained enough cargo to call it a day. Currently this happens when cargo space usage is above 50%, but more sophisticated checks are planned involving damage or lost ships, expenditure of consumables, and so on.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionPiratesCanBePaidOff&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionPiratesCanBePaidOff'''() : Boolean&lt;br /&gt;
Pirates have demanded that this ship dump cargo, and it currently has enough cargo on board to meet that demand.&lt;br /&gt;
&lt;br /&gt;
=== Scanning conditions ===&lt;br /&gt;
&lt;br /&gt;
These conditions check the ship's latest scan ([[#configurationCheckScanner|configurationCheckScanner]]) for ships meeting particular requirements. If a ship is found, it will be placed in the &amp;quot;oolite_scanResultsSpecific&amp;quot; parameter, in addition to the condition returning true.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsAssassinationTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsAssassinationTarget'''() : Boolean&lt;br /&gt;
The scan contains an assassination target (i.e. an escape capsule)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsCleanShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsCleanShip'''() : Boolean&lt;br /&gt;
The scan contains a clean ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsCourier&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsCourier'''() : Boolean&lt;br /&gt;
The scan contains a courier ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsEscapePods&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsEscapePods'''() : Boolean&lt;br /&gt;
The scan contains an escape pod travelling slower than this ship's maximum speed, and this ship is able to scoop cargo.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsFineableOffender&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsFineableOffender'''() : Boolean&lt;br /&gt;
The scan contains a piloted ship with an offender legal status at or below the system threshold (varies with government) that has not already been marked for fines.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsFugitive&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsFugitive'''() : Boolean&lt;br /&gt;
The scan contains a fugitive ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsHuntableOffender&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsHuntableOffender'''() : Boolean&lt;br /&gt;
The scan contains a piloted ship with an offender legal status not too small to bother with (varies with government).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSeriousOffender&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSeriousOffender'''() : Boolean&lt;br /&gt;
The scan contains a piloted ship with an offender legal status at or above the system threshold for fines (varies with government).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsHunters&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsHunters'''() : Boolean&lt;br /&gt;
The scan contains a ship with role &amp;quot;hunter&amp;quot;, or a police ship, or the main station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsLoneVictim&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsLoneVictim'''() : Boolean&lt;br /&gt;
The scan contains a single pirate victim and no other unallied ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsMiningOpportunity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsMiningOpportunity'''() : Boolean&lt;br /&gt;
The scan contains a boulder (preferentially) or an asteroid, and the ship has a mining laser, a fuel scoop, and a non-full hold.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsNonThargoid&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsNonThargoid'''() : Boolean&lt;br /&gt;
The scan contains a ship which is not a Thargoid ship. Rocks and cargo will only be returned if there is nothing more interesting about.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsPirateLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsPirateLeader'''() : Boolean&lt;br /&gt;
The scan contains a pirate leader (usually a heavily-armed freighter)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsPirateVictims&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsPirateVictims'''() : Boolean&lt;br /&gt;
The scan contains a pirate victim (as defined by &amp;lt;code&amp;gt;[[role-categories.plist]]&amp;lt;/code&amp;gt;) which is carrying at least some cargo and has not recently been robbed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsReadyThargoidMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsReadyThargoidMothership'''() : Boolean&lt;br /&gt;
The scan contains a thargoid mothership which has the capability to control at least one more thargon.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsRocks&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsRocks'''() : Boolean&lt;br /&gt;
The scan contains boulders (preferentially) or asteroids.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSalvage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSalvage'''() : Boolean&lt;br /&gt;
The scan contains cargo which could in theory be scooped.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSalvageForGroup&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSalvageForGroup'''() : Boolean&lt;br /&gt;
The scan contains cargo which could in theory be scooped, and it is travelling slowly enough that at least one of the ships in the group with fuel scoops and cargo space can collect it..&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSalvageForMe&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSalvageForMe'''() : Boolean&lt;br /&gt;
The scan contains cargo which can be scooped by this ship (travelling slowly enough, and this ship has scoops and space)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsShipNeedingEscort&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsShipNeedingEscort'''() : Boolean&lt;br /&gt;
The scan contains a ship which has fewer escorts than its maximum. If the ship is clean, this will only detect other clean ships. If the ship is not clean, this will only detect other non-clean ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSuspiciousShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSuspiciousShip'''() : Boolean&lt;br /&gt;
The scan contains a ship with a criminal reputation (whether or not it currently carries a bounty)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsThargoidMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsThargoidMothership'''() : Boolean&lt;br /&gt;
The scan contains a thargoid mothership which has the capability to control thargons. The number of thargons currently being controlled is irrelevant to this scan.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsUnspreadMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsUnspreadMissile'''() : Boolean&lt;br /&gt;
The scan contains a missile which has the same target and owner as this ship, but is closer to the target and within 500 metres of this ship. This is mainly used for &amp;quot;smart&amp;quot; missiles to ensure that impact times for a salvo are spread out.&lt;br /&gt;
&lt;br /&gt;
=== State querying conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions related to the state of the ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionAllEscortsInFlight&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionAllEscortsInFlight'''() : Boolean&lt;br /&gt;
If the ship has living escorts, then this function returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; only if they are all in normal flight (and not docked, launching, or in a wormhole). If the ship has no escorts then this function also returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCanScoopCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCanScoopCargo'''() : Boolean&lt;br /&gt;
The ship has a working fuel scoop and at least 1 TC of free space in its hold.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCargoIsProfitableHere&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCargoIsProfitableHere'''() : Boolean&lt;br /&gt;
The current contents of the ship's hold can be sold at an above average price at the main station (this is currently determined very approximately - solely asking &amp;quot;is the current system on the right side of the Ind/Agri divide&amp;quot; - rather than checking station prices.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCoinFlip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCoinFlip'''() : Boolean&lt;br /&gt;
Returns true half the time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupLeaderIsStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupLeaderIsStation'''() : Boolean&lt;br /&gt;
The ship has a group leader and the group leader is a station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasInterceptCoordinates&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasInterceptCoordinates'''() : Boolean&lt;br /&gt;
The ship has intercept coordinates set in the parameter &amp;quot;oolite_interceptCoordinates&amp;quot;. These are used by missiles to home in on a last-known location if the target cloaks.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasMothership'''() : Boolean&lt;br /&gt;
The ship has a group leader which is not itself.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasNonThargoidTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasNonThargoidTarget'''() : Boolean&lt;br /&gt;
The ship's target is not null, and is not a thargoid ship (by scan class).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasReceivedDistressCall&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasReceivedDistressCall'''() : Boolean&lt;br /&gt;
The ship has recently received a distress call. Distress calls expire after 30 seconds, or if the sender is no longer visible, or if the aggressor is dead.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasRememberedTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasRememberedTarget'''() : Boolean&lt;br /&gt;
The ship has a remembered target. This is set by [[#behaviourFollowCurrentTarget|behaviourFollowCurrentTarget]] to allow persistent tracking of a ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasTarget'''() : Boolean&lt;br /&gt;
The ship's target is not null.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasWaypoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasWaypoint'''() : Boolean&lt;br /&gt;
The ship has a waypoint set by its [[#|waypoint generator]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionIsActiveThargon&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionIsActiveThargon'''() : Boolean&lt;br /&gt;
The ship is a thargon (&amp;quot;EQ_THARGON&amp;quot;) and is active.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionIsEscorting&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionIsEscorting'''() : Boolean&lt;br /&gt;
The ship is currently escorting another ship. Stricter than [[#conditionHasMothership|conditionHasMothership]]: this also requires this ship to be in the group leader's escort group.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionIsGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionIsGroupLeader'''() : Boolean&lt;br /&gt;
The ship is in a group and is the leader of the group&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMissileNeedsLaunchEvasion&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMissileNeedsLaunchEvasion'''() : Boolean&lt;br /&gt;
This function checks if the &amp;lt;code&amp;gt;oolite_flag_launchAdjustMissile&amp;lt;/code&amp;gt; parameter is set to a non-null value, and returns true if so.&lt;br /&gt;
&lt;br /&gt;
Missile AI scripts may find the following code useful to set this flag to avoid collisions with the launching ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipSpawned = function()&lt;br /&gt;
 {&lt;br /&gt;
   /* Launch correction when fired at target in aft arc */&lt;br /&gt;
   var s = this.ship; &lt;br /&gt;
   if(s.target &amp;amp;&amp;amp; s.target.position.subtract(s.position).direction().dot(s.vectorForward) &amp;lt; -0.8)&lt;br /&gt;
   {&lt;br /&gt;
     this.oolite_priorityai.setParameter(&amp;quot;oolite_flag_launchAdjustMissile&amp;quot;,true);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
See also [[#configurationMissileAdjustLaunch|configurationMissileAdjustLaunch]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMissileOutOfFuel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMissileOutOfFuel'''() : Boolean&lt;br /&gt;
The ship has travelled beyond the maximum missile range. The default is 30km, but this may be overridden by the &amp;lt;code&amp;gt;oolite_missile_range&amp;lt;/code&amp;gt; parameter in the ship's script info.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionPatrolIsOver&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionPatrolIsOver'''() : Boolean&lt;br /&gt;
The ship's patrol is over (either due to distance travelled or a need to re-arm and repair). Note that the distance threshold is relatively low, so for ships on long patrol routes between system bodies this function should only be called when reaching appropriate waypoints.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionWitchspaceEntryRequested&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionWitchspaceEntryRequested'''() : Boolean&lt;br /&gt;
The ship has been requested to enter a wormhole set in the &amp;quot;oolite_witchspaceWormhole&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
== Configuration functions ==&lt;br /&gt;
&lt;br /&gt;
Configuration functions are usually used to set up parameters needed for a behaviour, though some may be used at the preconfiguration stage to set up parameters for a condition test. They take no arguments and do not return anything.&lt;br /&gt;
&lt;br /&gt;
=== Destination configurations ===&lt;br /&gt;
&lt;br /&gt;
These configurations set a destination, a desired range and a desired speed suitable for use with [[#behaviourApproachDestination|behaviourApproachDestination]]. Unless otherwise stated, [[#cruiseSpeed|cruiseSpeed]] will be used as the desired speed.&lt;br /&gt;
&lt;br /&gt;
If they are unable to set a destination, they may set the destination to the ship's current position, or may do nothing. Generally a condition should be used to check that the configuration is sensible.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationMissileAdjustLaunch&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationMissileAdjustLaunch'''()&lt;br /&gt;
This function causes the missile to dive sharply. The intended use is in conjunction with [[#conditionMissileNeedsLaunchEvasion|conditionMissileNeedsLaunchEvasion]] to avoid collisions with the launching ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationMissileAdjustSpread&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationMissileAdjustSpread'''()&lt;br /&gt;
This function sets an intermediate destination for &amp;quot;smart&amp;quot; missiles which are adjusting their flight path to spread out a salvo's impacts on target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToHomeStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToHomeStation'''()&lt;br /&gt;
Locates the home station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToGroupLeader'''()&lt;br /&gt;
Locates the group leader, sets the destination to its position and the desired range to 15km. Maximum flight speed is used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToMainPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToMainPlanet'''()&lt;br /&gt;
Sets the destination to the main planet's position, and the desired range to 3 radii (i.e. 2 radii from the surface).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToMainStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToMainStation'''()&lt;br /&gt;
Sets the destination to the main station's position, and the desired range to 15km&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestHostileStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestHostileStation'''()&lt;br /&gt;
Locates the nearest friendly station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestFriendlyStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestFriendlyStation'''()&lt;br /&gt;
Locates the nearest friendly station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestStation'''()&lt;br /&gt;
Locates the nearest station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestWormhole&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestWormhole'''()&lt;br /&gt;
Locates the nearest entry wormhole, sets the destination to its position and the desired range to zero.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToPirateLurk&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToPirateLurk'''()&lt;br /&gt;
If the parameter &amp;quot;oolite_pirateLurk&amp;quot; is set, then set the destination to that. If currently on a lane, set the destination to the current position. Otherwise, pick a random point on one of the lanes (strongly preferring witchpoint-planet). Once a destination is selected, store it to the parameter &amp;quot;oolite_pirateLurk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The desired range is 1km.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToScannedTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToScannedTarget'''()&lt;br /&gt;
Sets the destination to the position of the ship in the parameter &amp;quot;oolite_scanResultSpecific&amp;quot;, and the desired range to 400m. This can be used to follow a ship without targeting it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSelectedPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSelectedPlanet'''()&lt;br /&gt;
Sets the destination to the position of the planet in the parameter &amp;quot;oolite_selectedPlanet&amp;quot;, and the desired range to 100m from the surface.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSelectedStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSelectedStation'''()&lt;br /&gt;
Sets the destination to the position of the station in the parameter &amp;quot;oolite_selectedStation&amp;quot;, and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSunskimEnd&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSunskimEnd'''()&lt;br /&gt;
Sets the destination to a course parallel to the sun's surface, at a range which should allow the fuel tanks to be completely refilled. The desired range is 0, and the desired speed is maximum speed.&lt;br /&gt;
&lt;br /&gt;
Note: if this function is used above sunskimming height, it will still&lt;br /&gt;
move parallel to the sun's surface, but this will not be much use.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSunskimStart&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSunskimStart'''()&lt;br /&gt;
Sets the destination to the sun's position, and the desired range to sunskimming height.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToWaypoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToWaypoint'''()&lt;br /&gt;
If the parameters &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot; are set, use those as the destination and desired range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToWitchpoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToWitchpoint'''()&lt;br /&gt;
Sets the destination to the witchpoint and the range to 10km&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetWaypoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetWaypoint'''()&lt;br /&gt;
If a waypoint generator function has been registered, runs that function to set the &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot; parameters, then sets the destination from those parameters.&lt;br /&gt;
&lt;br /&gt;
=== Docking configurations ===&lt;br /&gt;
&lt;br /&gt;
Each of these configurations sets the &amp;quot;oolite_dockingStation&amp;quot; parameter used by [[#behaviourDockWithStation|behaviourDockWithStation]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetNearbyFriendlyStationForDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetNearbyFriendlyStationForDocking'''()&lt;br /&gt;
Sets the &amp;quot;oolite_dockingStation&amp;quot; parameter to a friendly station in scanner range, if possible.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetHomeStationForDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetHomeStationForDocking'''()&lt;br /&gt;
Sets the &amp;quot;oolite_dockingStation&amp;quot; parameter to the ship's home station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetSelectedStationForDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetHomeStationForDocking'''()&lt;br /&gt;
Sets the &amp;quot;oolite_dockingStation&amp;quot; parameter to the station in the parameter &amp;quot;oolite_selectedStation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAppointGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAppointGroupLeader'''()&lt;br /&gt;
If the ship is in a group but the group has no leader, set one of the ships in the group to be the leader. Witchspace-capable ships will be preferred over those which are not.&lt;br /&gt;
&lt;br /&gt;
If the parameter &amp;quot;oolite_leaderRole&amp;quot; is set, the primary role of the new leader will be changed to that role.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationEscortGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationEscortGroupLeader'''()&lt;br /&gt;
If the ship is in a group and the group has a leader which is not this ship and the ship is not already escorting the group leader, and the parameter &amp;quot;oolite_escortRole&amp;quot; is set, then attempt to escort the group leader. The ship's primary role will be set to &amp;quot;oolite_escortRole&amp;quot; if the escort attempt is successful, and this role must therefore be a valid escort role.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationForgetCargoDemand&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationForgetCargoDemand'''()&lt;br /&gt;
If the ship has a cargo demand active (the demand must be stored on this ship, not just on a group member), discard it, and reset the &amp;quot;oolite_cargoDropped&amp;quot; parameter of this ship and all group members to zero.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationLeaveEscortGroup&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationLeaveEscortGroup'''()&lt;br /&gt;
If the ship is currently escorting another ship, leave the escort group.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationLightsOff&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationLightsOff'''()&lt;br /&gt;
Set the ship's flashers to the 'off' state.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationLightsOn&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationLightsOn'''()&lt;br /&gt;
Set the ship's flashers to the 'on' state.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetRemoteControl&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetRemoteControl'''()&lt;br /&gt;
If the ship has a group leader, set its own accuracy to that ship's accuracy. This is used by thargons when the mothership controlling them is changed.&lt;br /&gt;
&lt;br /&gt;
=== Navigation configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectPlanet'''()&lt;br /&gt;
This function places a randomly selected planet or moon in the parameter &amp;quot;oolite_selectedPlanet&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectRandomTradeStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectRandomTradeStation'''()&lt;br /&gt;
This function places a suitable station in the parameter &amp;quot;oolite_selectedStation&amp;quot;. If the ship is clean, then 90% of the time this will be the main station. If the ship is an offender, but has a bounty not greater than the fine threshold, then 50% of the time this will be the main station.&lt;br /&gt;
&lt;br /&gt;
If the main station was not selected at the previous step, a random&lt;br /&gt;
friendly station will be selected (which may be the main station&lt;br /&gt;
anyway)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectShuttleDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectShuttleDestination'''()&lt;br /&gt;
This function selects a random planet or station. The entity selected must be at least 10km from the ship. If any such entities are within 5 times the radius of the main planet from the ship, more distant entities will be ignored.&lt;br /&gt;
&lt;br /&gt;
If the selected entity was a planet, it will be stored in &amp;quot;oolite_selectedPlanet&amp;quot;. Otherwise, it will be stored in &amp;quot;oolite_selectedStation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectWitchspaceDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectWitchspaceDestination'''()&lt;br /&gt;
If the ship has no witchspace drive, unset the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter. If that parameter is already set, and is not the current system, and the ship has enough fuel to reach that system, do nothing. Otherwise, select a random system in range and place its ID in the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectWitchspaceDestinationInbound&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectWitchspaceDestination'''()&lt;br /&gt;
If the ship has no witchspace drive, unset the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter. If the ship's home system and destination system are unequal, select the next system on the route to the home system. Otherwise, select a random system in range and place its ID in the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectWitchspaceDestinationOutbound&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectWitchspaceDestination'''()&lt;br /&gt;
If the ship has no witchspace drive, unset the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter. If the ship's home system and destination system are unequal, select the next system on the route to the destination system. Otherwise, select a random system in range and place its ID in the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Station configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationStationReduceAlertLevel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationStationReduceAlertLevel'''()&lt;br /&gt;
Reduce the alert level of the station by one stage if it is not already Green.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationStationValidateTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationStationValidateTarget'''()&lt;br /&gt;
Check that the station's current target is within scanner range, and discard it if not. This is necessary for stations as unlike ships their low-level behaviour does not generally do this automatically.&lt;br /&gt;
&lt;br /&gt;
=== Target acquisition configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireCombatTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireCombatTarget'''()&lt;br /&gt;
If the ship's target is valid, not cargo and not an ally, keep the current target. Otherwise, promote one defense target to a target. If the ship has no defense targets, check to see if any ships in the group or escort group have a combat target (but do not check their defense targets).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireDefensiveEscortTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireDefensiveEscortTarget'''()&lt;br /&gt;
Search the current group leader's target and defense targets for a visible ship attacking the group leader, and target it if one is found. Otherwise, retain current target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireHostileCombatTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireHostileCombatTarget'''()&lt;br /&gt;
As [[#configurationAcquireCombatTarget|configurationAcquireCombatTarget]] but only targets which are hostile (i.e. would be valid for [[#behaviourRepelTarget|behaviourRepelTarget]]) will be selected.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireOffensiveEscortTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireOffensiveEscortTarget'''()&lt;br /&gt;
If this ship's group leader is attacking a target, and this ship can see that target, acquire that target. Otherwise retain current target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquirePlayerAsTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquirePlayerAsTarget'''()&lt;br /&gt;
Set this ship's target to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireScannedTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireScannedTarget'''()&lt;br /&gt;
Set this ship's target to the entity in the parameter &amp;quot;oolite_scanResultSpecific&amp;quot;. This parameter is set by the [[#checkScannerWithPredicate|checkScannerWithPredicate]] function, which is usually called from a &amp;lt;code&amp;gt;conditionScannerContains...&amp;lt;/code&amp;gt; condition.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationCheckScanner&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationCheckScanner'''()&lt;br /&gt;
Scans the ship's scanner range, placing a list of detected targets into the &amp;quot;oolite_scanResults&amp;quot; parameter. This is generally called in a preconfiguration before the first use of a &amp;lt;code&amp;gt;conditionScannerContains...&amp;lt;/code&amp;gt; condition in the priority list. &lt;br /&gt;
&lt;br /&gt;
If the scanner is particularly full, the list will not contain all visible objects. The current scan limit is 16.&lt;br /&gt;
&lt;br /&gt;
== Response definition functions and components ==&lt;br /&gt;
&lt;br /&gt;
=== Response definition functions ===&lt;br /&gt;
&lt;br /&gt;
Response definition functions are used to set up event handlers in the AI script. They take an object as an argument, and add event handlers to that object. They do not return anything as such, but modify their argument.&lt;br /&gt;
&lt;br /&gt;
They are generally used in behaviour functions to set up common responses. &lt;br /&gt;
 var handlers = {}; // new handler object&lt;br /&gt;
 this.responsesAddStandard(handlers); // add standard response set&lt;br /&gt;
 // add a handler for this behaviour&lt;br /&gt;
 handlers.shipEnteredStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
   this.ship.beaconCode = null; // stop transmitting&lt;br /&gt;
 }&lt;br /&gt;
 this.applyHandlers(handlers);&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddDocking'''(handlers : Object)&lt;br /&gt;
Provides some additional event handlers for use when docking with a station. &lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddEscort&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddEscort'''(handlers : Object)&lt;br /&gt;
Provides some additional event handlers for use when escorting a ship, and changes the response to in-group help requests.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddMissile'''(handlers : Object)&lt;br /&gt;
A standard set of event handlers for missiles, which should be used instead of &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A number of script info keys are used to modify the responses.&lt;br /&gt;
* oolite_missile_blastPower, oolite_missile_blastRadius, oolite_missile_blastShaping: If oolite_missile_detonation is not set, the default detonation function calls this.ship.dealEnergyDamage with the defined power, radius, and shaping. If these parameters are not set the defaults are power 170, radius 32.5, and shaping 0.25.&lt;br /&gt;
* oolite_missile_detonation: names a function in the AI script. This function will be called when the missile reaches the desired range from its target or destination. If this function is not set, the oolite_missile_blast* keys are used to set up an explosion.&lt;br /&gt;
* oolite_missile_ecmResponse: names a function in the AI script. This function will be called if the missile detects an ECM pulse. If no function is set, the missile will self destruct.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddScooping&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddScooping'''(handlers : Object)&lt;br /&gt;
Provides some additional event handlers for use when scooping fuel.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddStandard'''(handlers : Object)&lt;br /&gt;
Sets up standard event handlers to detect and respond to attacks, and to manage other common events. Certain parameter flags are used:&lt;br /&gt;
* oolite_flag_allowPlanetaryLanding: if true, the ship will land on a planet if it receives the &amp;lt;code&amp;gt;approachingPlanetSurface&amp;lt;/code&amp;gt; event. Otherwise, it will immediately reconsider its behaviour.&lt;br /&gt;
* oolite_flag_listenForDistressCall: if true, the ship will set the &amp;quot;oolite_distressAggressor&amp;quot;, &amp;quot;oolite_distressSender&amp;quot; and &amp;quot;oolite_distressTimestamp&amp;quot; parameters if it receives a distress call.&lt;br /&gt;
* oolite_flag_markOffenders: if true, the ship will apply a small bounty increase to ships it sees committing crimes.&lt;br /&gt;
* oolite_flag_sendsDistressCalls: if true, the ship will send distress calls when attacked.&lt;br /&gt;
* oolite_flag_watchForCargo: if true, the ship will increment the &amp;quot;oolite_cargoDropped&amp;quot; parameter if cargo is dumped nearby.&lt;br /&gt;
&lt;br /&gt;
If multiple standard responses are being applied, this one should be the first one applied.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddStation'''(handlers : Object)&lt;br /&gt;
A standard set of event handlers for stations, which should be used instead of &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;. The &amp;quot;oolite_flag_listenForDistressCall&amp;quot; and &amp;quot;oolite_flag_markOffenders&amp;quot; parameters have the same use as in &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Response definition components ===&lt;br /&gt;
&lt;br /&gt;
The components are standard event handlers used by the standard response functions. The following response components are available. Each is named &amp;quot;&amp;lt;code&amp;gt;responseComponent_''responseGroup''_''handlerName''&amp;lt;/code&amp;gt;&amp;quot;. You can use them in your own handler definition functions for efficiency.&lt;br /&gt;
 var handlers = {};&lt;br /&gt;
 handlers.approachingPlanetSurface = this.responseComponent_standard_approachingPlanetSurface;&lt;br /&gt;
 // .. etc ..&lt;br /&gt;
 this.applyHandlers(handlers);&lt;br /&gt;
&lt;br /&gt;
==== Standard components ====&lt;br /&gt;
Standard event handlers for normal ships.&lt;br /&gt;
 responseComponent_standard_approachingPlanetSurface&lt;br /&gt;
 responseComponent_standard_cargoDumpedNearby&lt;br /&gt;
 responseComponent_standard_cascadeWeaponDetected&lt;br /&gt;
 responseComponent_standard_commsMessageReceived&lt;br /&gt;
 responseComponent_standard_distressMessageReceived&lt;br /&gt;
 responseComponent_standard_escortAccepted&lt;br /&gt;
 responseComponent_standard_helpRequestReceived&lt;br /&gt;
 responseComponent_standard_offenceCommittedNearby&lt;br /&gt;
 responseComponent_standard_playerWillEnterWitchspace&lt;br /&gt;
 responseComponent_standard_shipAcceptedEscort&lt;br /&gt;
 responseComponent_standard_shipAchievedDesiredRange&lt;br /&gt;
 responseComponent_standard_shipAttackedOther&lt;br /&gt;
 responseComponent_standard_shipAttackedWithMissile&lt;br /&gt;
 responseComponent_standard_shipAttackerDistracted&lt;br /&gt;
 responseComponent_standard_shipBeingAttacked&lt;br /&gt;
 responseComponent_standard_shipBeingAttackedUnsuccessfully&lt;br /&gt;
 responseComponent_standard_shipFiredMissile&lt;br /&gt;
 responseComponent_standard_shipKilledOther&lt;br /&gt;
 responseComponent_standard_shipLaunchedEscapePod&lt;br /&gt;
 responseComponent_standard_shipLaunchedFromStation&lt;br /&gt;
 responseComponent_standard_shipScoopedOther&lt;br /&gt;
 responseComponent_standard_shipTargetLost&lt;br /&gt;
 responseComponent_standard_shipWillEnterWormhole&lt;br /&gt;
 responseComponent_standard_shipWitchspaceBlocked&lt;br /&gt;
 responseComponent_standard_wormholeSuggested&lt;br /&gt;
 &lt;br /&gt;
==== Missile components ====&lt;br /&gt;
Standard event handlers for missiles.&lt;br /&gt;
 responseComponent_missile_commsMessageReceived&lt;br /&gt;
 responseComponent_missile_shipHitByECM&lt;br /&gt;
 responseComponent_missile_shipTargetCloaked&lt;br /&gt;
 responseComponent_missile_shipTargetLost&lt;br /&gt;
 responseComponent_missile_shipAchievedDesiredRange&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Station components ====&lt;br /&gt;
Standard event handlers for stations.&lt;br /&gt;
 responseComponent_station_commsMessageReceived&lt;br /&gt;
 responseComponent_station_cascadeWeaponDetected&lt;br /&gt;
 responseComponent_station_shipAttackedWithMissile&lt;br /&gt;
 responseComponent_station_shipBeingAttacked&lt;br /&gt;
 responseComponent_station_shipAttackedOther&lt;br /&gt;
 responseComponent_station_shipFiredMissile&lt;br /&gt;
 responseComponent_station_shipKilledOther&lt;br /&gt;
 responseComponent_station_shipTargetLost&lt;br /&gt;
 responseComponent_station_helpRequestReceived&lt;br /&gt;
 responseComponent_station_distressMessageReceived&lt;br /&gt;
 responseComponent_station_offenceCommittedNearby&lt;br /&gt;
&lt;br /&gt;
==== Docking components ====&lt;br /&gt;
Alternative event handlers for docking ships.&lt;br /&gt;
 responseComponent_docking_shipAchievedDesiredRange&lt;br /&gt;
 responseComponent_docking_stationWithdrewDockingClearance&lt;br /&gt;
 responseComponent_docking_shipAIFrustrated&lt;br /&gt;
&lt;br /&gt;
==== Escort components ====&lt;br /&gt;
Alternative event handlers for escorts.&lt;br /&gt;
 responseComponent_escort_escortDock&lt;br /&gt;
 responseComponent_escort_helpRequestReceived&lt;br /&gt;
&lt;br /&gt;
==== Expect-witchspace components ====&lt;br /&gt;
Alternative event handlers for ships expecting that their target might enter witchspace to escape&lt;br /&gt;
 responseComponent_expectWitchspace_shipTargetLost&lt;br /&gt;
&lt;br /&gt;
==== Scooping components ====&lt;br /&gt;
Alternative event handlers for ships scooping fuel.&lt;br /&gt;
 responseComponent_scooping_shipAchievedDesiredRange&lt;br /&gt;
 responseComponent_scooping_shipScoopedFuel&lt;br /&gt;
&lt;br /&gt;
==== Track-player components ====&lt;br /&gt;
Alternative event handlers for ships following the player.&lt;br /&gt;
 responseComponent_trackPlayer_playerWillEnterWitchspace&lt;br /&gt;
&lt;br /&gt;
== Template functions ==&lt;br /&gt;
&lt;br /&gt;
These functions return standard blocks of priorities for insertion into a priority list. Each of them returns an array, so can be used as a branch in its own right, or concatenated on to an existing array. Remember that unlike a standard priority entry, you need the result of these functions, not a reference to the function.&lt;br /&gt;
 {&lt;br /&gt;
   condition: ai.conditionInCombat,&lt;br /&gt;
   falsebranch: ai.templateReturnToBase()&lt;br /&gt;
 }&lt;br /&gt;
or&lt;br /&gt;
 priorities.concat(ai.templateReturnToBase());&lt;br /&gt;
&lt;br /&gt;
==== templateLeadHuntingMission ====&lt;br /&gt;
 function '''templateLeadHuntingMission'''() : Array&lt;br /&gt;
Return the priorities for leading a patrol between waypoints. Setting the waypoint generator and handling fighting and scanning along the course of the patrol should be handled by higher priorities.&lt;br /&gt;
&lt;br /&gt;
==== templateLeadPirateMission ====&lt;br /&gt;
 function '''templateLeadPirateMission'''() : Array&lt;br /&gt;
Return the priorities for selecting targets to rob if any are about, or moving to a suitable lurk position otherwise.&lt;br /&gt;
&lt;br /&gt;
==== templateReturnToBase ====&lt;br /&gt;
 function '''templateReturnToBase'''() : Array&lt;br /&gt;
Return the priorities for travelling to and docking with a suitable station.&lt;br /&gt;
&lt;br /&gt;
==== templateReturnToBaseOrPlanet ====&lt;br /&gt;
 function '''templateReturnToBaseOrPlanet'''() : Array&lt;br /&gt;
Return the priorities for travelling to and docking with a suitable station, or landing on a planet if no suitable stations are found.&lt;br /&gt;
&lt;br /&gt;
==== templateWitchspaceJumpAnywhere ====&lt;br /&gt;
 function '''templateWitchspaceJumpAnywhere'''() : Array&lt;br /&gt;
Returns priorities for getting the ship out of the current system somehow - either by jumping out, or by finding a wormhole to hitchhike.&lt;br /&gt;
&lt;br /&gt;
==== templateWitchspaceJumpInbound ====&lt;br /&gt;
 function '''templateWitchspaceJumpInbound'''() : Array&lt;br /&gt;
Returns priorities for jumping closer to the home system, sunskimming if fuel is short. You should previously have checked that the ship is not in the home system.&lt;br /&gt;
&lt;br /&gt;
==== templateWitchspaceJumpOutbound ====&lt;br /&gt;
 function '''templateWitchspaceJumpOutbound'''() : Array&lt;br /&gt;
Returns priorities for jumping closer to the destination system, sunskimming if fuel is short. You should previously have checked that the ship is not in the destination system.&lt;br /&gt;
&lt;br /&gt;
== Utility functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are provided to make standardised checks easier to write and to wrap certain ship methods to make them easier to work with in the AI controller.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;allied&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''allied'''(ship1, ship2) : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the two ships are considered allied, false otherwise. Ships are considered allied if they are in the same group, or if they are escorts of ships in the same group.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;broadcastDistressMessage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''broadcastDistressMessage'''()&lt;br /&gt;
Broadcasts a distress message, but with a delay to ensure that [[Oolite_JavaScript_Reference:_Ship#broadcastDistressMessage|ship.broadcastDistressMessage()]] is not called too often.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;checkScannerWithPredicate&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''checkScannerWithPredicate'''(function) : Boolean&lt;br /&gt;
Called after configurationCheckScanner to locate a ship on the scanner matching a particular predicate. The predicate function must take a Ship, and return a Boolean.&lt;br /&gt;
&lt;br /&gt;
If the predicate function matches a ship, the first such match will be stored in the parameter &amp;lt;code&amp;gt;&amp;quot;oolite_scanResultSpecific&amp;quot;&amp;lt;/code&amp;gt;, and the method will return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. Otherwise the method returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;cruiseSpeed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''cruiseSpeed'''() : Number&lt;br /&gt;
Returns a suitable speed for the ship to travel at if it is interested in preserving group or escort coherence. Generally this will be 80% of its maximum speed, but it will be slower if other group members or escorts are slower.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;distance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''distance'''(position : [[Oolite_JavaScript_Reference:_Vector3D#Vector_Expressions|vectorExpression]])&lt;br /&gt;
Returns the distance to the given coordinates. This is more efficient than calling &amp;lt;code&amp;gt;this.ship.position.distanceTo(position)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;entityCommsParams&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''entityCommsParams'''(entity : Entity) : Object&lt;br /&gt;
Returns an object of communications parameters relating to the given entity. Used internally by [[#communicate|communicate()]] but may be of use elsewhere.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;fineThreshold&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''fineThreshold'''() : Number&lt;br /&gt;
The maximum bounty at which an offender should be fined rather than attacked by police ships. (Ships caught redhanded may be attacked regardless of bounty)  Varies from system to system.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;friendlyStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''friendlyStation'''(station) : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the station is friendly to the current ship, false otherwise. The main station is unfriendly to Fugitive ships and Offenders above the current [[#fineThreshold|fineThreshold]]. Other stations are only considered unfriendly to their current combat target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;homeStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''homeStation'''() : Boolean&lt;br /&gt;
Returns the home station of this ship. If the ship has an owner, and&lt;br /&gt;
the owner is a station, then that is the home station. Otherwise, the&lt;br /&gt;
first station in the ship's group is returned.&lt;br /&gt;
&lt;br /&gt;
If no home station can be found, returns &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ignorePlayerFriendlyFire&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''ignorePlayerFriendlyFire'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if this ship should ignore friendly fire from the player as they would for a known ally. Note that this function's results will change if called repeatedly, so you should only call it once per instance of friendly fire, and never call it speculatively. &lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;isAggressive&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''isAggressive'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the ship is an active danger to its current target (approximately: it is in a combat behaviour other than fleeing)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;isEscaping&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''isEscaping'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the ship is successfully running away from this ship (i.e. it is not attacking, it is travelling faster than this ship can, and it is already outside effective weapons range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;isFighting&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''isAggressive'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the ship is in combat (including fleeing). Similar to &amp;lt;code&amp;gt;ship.hasHostileTarget&amp;lt;/code&amp;gt; but works for stations as well.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;noteDistraction&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''noteDistraction'''(whom : Entity)&lt;br /&gt;
If this ship is switching combat targets because another ship distracted it, then call this function just before switching. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; is the entity that this ship will soon switch to attacking. This calls the &amp;lt;code&amp;gt;shipAttackerDistracted&amp;lt;/code&amp;gt; event handler on the current target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;oddsAssessment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''oddsAssessment'''() : Number&lt;br /&gt;
Carry out an odds assessment of this ship's group versus the target ship's group. This will return a positive number of the ratio between the two values, with a number greater than 1 implying that this ship's group is stronger, and a number less than 1 implying the target's group is stronger. The odds assessment of the target group will omit certain information unless the target is currently in combat. Ships outside of scanner range, whether friendly or hostile, will also be ignored in the assessment.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRoleAssessment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''playerRoleAssessment'''() : String&lt;br /&gt;
Determines a single perceived role for the player based on [[Oolite_JavaScript_Reference:_Player#roleWeights|player.roleWeights]]. In general, the perception will be the same for all ships in a group. This can then be used with [[Oolite_JavaScript_Reference:_Ship#roleIsInCategory|Ship.roleIsInCategory]] to determine the appropriate response.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;respondToThargoids&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''respondToThargoids'''(whom : Ship, passon : Boolean) : Boolean&lt;br /&gt;
This function causes the ship (and if the &amp;lt;code&amp;gt;passon&amp;lt;/code&amp;gt; parameter is set, its group members) to respond to the appearance of the Thargoid ship &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt;. It will return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if this ship responds, or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not.&lt;br /&gt;
&lt;br /&gt;
You must ensure that ships responding to a Thargoid as a result of a notification by a group member do not themselves set &amp;lt;code&amp;gt;passon&amp;lt;/code&amp;gt; as this may cause an infinite loop.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setWitchspaceRouteTo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setWitchspaceRouteTo'''(dest : Number)&lt;br /&gt;
This function sets the &amp;lt;code&amp;gt;oolite_witchspaceDestination&amp;lt;/code&amp;gt; parameter according to the needs of reaching the system with the system ID equal to &amp;lt;code&amp;gt;dest&amp;lt;/code&amp;gt;. As this function involves route planning, which is relatively slow, it should be called only rarely. This can then be used to determine whether to refuel or attempt to jump.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipHasRiskyContracts&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''shipHasRiskyContracts'''(ship : Ship) : Boolean&lt;br /&gt;
Sometimes returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; (non-deterministically) if the target ship is carrying contracts that someone might want assassinated or destroyed. The chance of returning &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; increases with the number of risky contracts carried. Currently this will always return &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for a non-player ship: you can check these with the &amp;lt;code&amp;gt;oolite-courier&amp;lt;/code&amp;gt; role category instead.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipInRoleCategory&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''shipInRoleCategory'''(ship : Ship, category : String) : Boolean&lt;br /&gt;
This is a wrapper around &amp;lt;code&amp;gt;Ship.roleIsInCategory&amp;lt;/code&amp;gt; which accounts for the player's effective role not being the same as &amp;lt;code&amp;gt;player.ship.primaryRole&amp;lt;/code&amp;gt;. You should generally call this instead of calling &amp;lt;code&amp;gt;Ship.roleIsInCategory&amp;lt;/code&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;stationAllegiance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''stationAllegiance'''(station : Station) : String&lt;br /&gt;
Returns &amp;lt;code&amp;gt;station.allegiance&amp;lt;/code&amp;gt; for the given station, but if this is null (as it will be for pre-1.79 stations), first sets it using a heuristic calculation.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;threatAssessment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''threatAssessment'''(ship : Ship, full : Boolean) : Number&lt;br /&gt;
This is a wrapper around &amp;lt;code&amp;gt;[[#_threatAssessment|_threatAssessment]]&amp;lt;/code&amp;gt; which is itself a wrapper around &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Ship#threatAssessment|ship.threatAssessment()]]&amp;lt;/code&amp;gt;. The combination of the two ensures that the assessment is correct for the relative combat states of this ship and the ship being assessed, as well as including effects of the player's reputation.&lt;br /&gt;
&lt;br /&gt;
== Waypoint Generators ==&lt;br /&gt;
&lt;br /&gt;
Waypoint generators are used to set patrol or other multipoint routes. When called, they should consider the ship's current position (and possibly other things), and then set the parameters &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot;. These functions have no arguments and no return value.&lt;br /&gt;
&lt;br /&gt;
In general, you should only call a waypoint generator if a waypoint is not already set.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;waypointsSpacelanePatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''waypointsSpacelanePatrol'''()&lt;br /&gt;
If the ship is near the main planet, sun, or witchpoint, pick one of the other two points (biased towards the witchpoint-planet route) and set that as the waypoint. Otherwise, if the ship is on a lane already, pick one end of the lane at random. Otherwise, pick the planet.&lt;br /&gt;
&lt;br /&gt;
Set a waypoint within 7500m of the witchpoint, 2 radii of the centre of the planet, or 2.5 radii of the centre of the sun.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;waypointsStationPatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''waypointsStationPatrol'''()&lt;br /&gt;
If the ship has a station as its group leader, define waypoints from that station. Otherwise define them from the main station. If there is no main station either, set the witchpoint as the waypoint.&lt;br /&gt;
&lt;br /&gt;
If there is a station, pick four points describing a square of diagonal length 50km centred on the station and lying in the station's xy plane. If the ship is not within 500 metres of any of these points, select one of the points as the waypoint. Otherwise, select the next point around the list as the waypoint.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;waypointsWitchpointPatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''waypointsWitchpointPatrol'''()&lt;br /&gt;
&lt;br /&gt;
Pick four points describing a square of diagonal length 30km centred on the witchpoint and lying approximately in the system's xy plane. If the ship is not within 500 metres of any of these points, select one of the points as the waypoint. Otherwise, select the next point around the list as the waypoint.&lt;br /&gt;
&lt;br /&gt;
== Global Configuration ==&lt;br /&gt;
All PriorityAIControllers share a single communications message library. This library may be edited using functions in the priority AI worldscript&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
When a key is asked for, the communications library will be checked in the following order:&lt;br /&gt;
# for a key with the specified role and personality&lt;br /&gt;
# if the role does not start with &amp;quot;_&amp;quot;, a key with the specified personality and the role &amp;quot;generic&amp;quot;&lt;br /&gt;
# if the personality does not start with &amp;quot;_&amp;quot;, a key with the specified role and the personality &amp;quot;generic&amp;quot;&lt;br /&gt;
# if neither role nor personality start with &amp;quot;_&amp;quot;, a key with &amp;quot;generic&amp;quot; role and personality.&lt;br /&gt;
In general, setting keys for the generic role (and especially with a generic personality as well) should be used with caution.&lt;br /&gt;
&lt;br /&gt;
The key's value is then expanded using expandDescription (possibly with added parameters), so entries in [[descriptions.plist]] may be used to add variety to the communications. Alternatively, a static text string also works as the value.&lt;br /&gt;
&lt;br /&gt;
==== Standard Communications Keys ====&lt;br /&gt;
&lt;br /&gt;
The following communications keys are currently defined in standard Oolite, but you can define more. Those with a parameter of Ship can have a Ship object passed to them, which will be replaced with definitions for the parameters &amp;quot;oolite_entityClass&amp;quot;, &amp;quot;oolite_entityCrew&amp;quot; and &amp;quot;oolite_entityName&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== oolite_agreeingToDumpCargo =====&lt;br /&gt;
 Parameter: &amp;quot;oolite_demandSize&amp;quot; (size of demand in TC)&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when a ship dumps cargo to satisfy a pirate demand&lt;br /&gt;
&lt;br /&gt;
===== oolite_attackLowEnergy =====&lt;br /&gt;
 Parameter: Ship,&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when requesting help as under attack and close to death&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAssassination =====&lt;br /&gt;
 Parameter: Ship, plus &amp;quot;oolite_entityContracts&amp;quot; parameter&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing a fight with the Ship defined in the parameter, like [[#oolite_beginningFight|oolite_beginningFight]], but specifically for an assassination target. The extra communications parameter contains the name of a passenger (or parcel owner) relevant to this ship (for the player, this may intentionally be someone for whom delivery has been completed - either it's a revenge hit, or they're just working from outdated intelligence)&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAttack =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing an attack on the Ship defined in the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAttackInanimate =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing an attack on the Ship (expected to be an uncrewed object like an asteroid, cargo pod, etc.) defined in the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAttackThargoid =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing an attack on the Ship (expected to be a Thargoid ship) defined in the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningFight =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing a fight with the Ship defined in the parameter. (Beginning Attack means attacking a target previously not under attack but which there may have been a reason to fight from previous combats; Beginning Fight is stronger - this ship is initiating hostilities)&lt;br /&gt;
&lt;br /&gt;
===== oolite_continueFleeing =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when the ship has been unable to reach safety from its attacker.&lt;br /&gt;
&lt;br /&gt;
===== oolite_continuingAttack =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when continuing an attack on the Ship defined in the parameter (the low priority means this is relatively rarely used, of course)&lt;br /&gt;
&lt;br /&gt;
===== oolite_continuingAttackInanimate =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when continuing an attack on the Ship (if likely to be uncrewed) defined in the parameter (the low priority means this is relatively rarely used, of course)&lt;br /&gt;
&lt;br /&gt;
===== oolite_continuingAttackThargoid =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when continuing an attack on the Ship (if Thargoid) defined in the parameter (the low priority means this is relatively rarely used, of course)&lt;br /&gt;
&lt;br /&gt;
===== oolite_distressResponseAggressor =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used to threaten the ship a distress call has been sent about.&lt;br /&gt;
&lt;br /&gt;
===== oolite_distressResponseSender =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2 or 3&lt;br /&gt;
Used to reassure a ship sending a distress call that help is on the way. [[#oolite_distressResponseAggressor|oolite_distressResponseAggressor]] is preferred - this will only be used if the ship sending the message is near the sender but not the aggressor.&lt;br /&gt;
&lt;br /&gt;
===== oolite_dockingWait =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship is waiting in a docking queue.&lt;br /&gt;
&lt;br /&gt;
===== oolite_eject =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when a ship launches an escape pod (the communication comes from the ship, not the pod, as the pod is being launched)&lt;br /&gt;
&lt;br /&gt;
===== oolite_engageWitchspaceDrive =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a lone ship is beginning its witchspace entry sequence, and is expected to enter witchspace in around 15 seconds.&lt;br /&gt;
&lt;br /&gt;
===== oolite_engageWitchspaceDriveFlee =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when a ship is preparing to escape from a fight by making a witchspace jump&lt;br /&gt;
&lt;br /&gt;
===== oolite_engageWitchspaceDriveGroup =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a grouped ship is beginning its witchspace entry sequence, and is expected to enter witchspace in around 15 seconds.&lt;br /&gt;
&lt;br /&gt;
===== oolite_escortAccepted =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when a ship accepts a new escort. The new escort will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_escortFormation =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship is entering or maintaining escort formation. The mothership will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_escortMotherAccepted =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when a ship is accepted as a new escort. The ship being escorted will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_firedMissile =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when firing a missile. The target of the missile will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_friendlyFire =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2, 3 or 4 depending on circumstances&lt;br /&gt;
Used when a ship is hit by weapons fire from another ship it considers &amp;quot;on its side&amp;quot; either because of common group or because of similar roles.&lt;br /&gt;
&lt;br /&gt;
===== oolite_groupIsOutnumbered =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 2 if group leader, 4 otherwise&lt;br /&gt;
Used when a ship realises it is in a fight with a group which seriously outclasses it, and therefore should flee.&lt;br /&gt;
&lt;br /&gt;
===== oolite_hitTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when the ship hits its target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_incomingMissile =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship has had a missile launched at it and is unable to use ECM. The missile is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedAlly =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship destroys an allied ship. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2 (3 for stations)&lt;br /&gt;
Used when the ship destroys its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedNonTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship destroys something other than its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedUncrewedTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3 (4 for stations)&lt;br /&gt;
Used when the ship destroys an uncrewed object which is its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedUncrewedNonTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3 (4 for stations)&lt;br /&gt;
Used when the ship destroys an uncrewed object other than its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_landingOnPlanet =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when beginning final landing approach to a planet.&lt;br /&gt;
&lt;br /&gt;
===== oolite_launchDefenseShips, oolite_launchMiner, oolite_launchPatrol, oolite_launchSalvager =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a station launches a ship of a particular type. The parameter is the station's current target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_leaveVicinity =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a ship is executing [[#behaviourLeaveVicinityOfDestination|behaviourLeaveVicinityOfDestination]]. The parameter is the current target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_makeDistressCall =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used as the message when a distress call is sent. The parameter is the ship's primary aggressor.&lt;br /&gt;
&lt;br /&gt;
===== oolite_makePirateDemand =====&lt;br /&gt;
 Parameter: Ship and &amp;quot;oolite_demandSize&amp;quot;&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when making a piracy demand on a ship. The Ship parameters are from the ship being robbed.&lt;br /&gt;
&lt;br /&gt;
===== oolite_markForFines =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when a police ship is marking another ship for fines on docking. The parameter is the ship being marked.&lt;br /&gt;
&lt;br /&gt;
===== oolite_mining =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when carrying out mining activity&lt;br /&gt;
&lt;br /&gt;
===== oolite_newAssailiant =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship is attacked by someone not previously considered hostile. The attacker is the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_offenceDetected =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3 if this increases the aggressor's bounty, 4 otherwise&lt;br /&gt;
Used when a police ship detects illegal hostilities. The parameter is the aggressor.&lt;br /&gt;
&lt;br /&gt;
===== oolite_patrolReportIn =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a station patrol ship reaches a waypoint. The parameter is its parent station.&lt;br /&gt;
&lt;br /&gt;
===== oolite_quiriumCascade =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a quirium cascade or an imminent cascade is detected.&lt;br /&gt;
&lt;br /&gt;
===== oolite_scoopedCargo =====&lt;br /&gt;
 Parameter: &amp;quot;oolite_goodsDescription&amp;quot; is a description of the cargo commodity&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when this ship scoops cargo.&lt;br /&gt;
&lt;br /&gt;
===== oolite_selectedStation =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship selects a station to navigate to (e.g. traders, shuttles). The parameter is the selected station.&lt;br /&gt;
&lt;br /&gt;
===== oolite_selectedWitchspaceDestination =====&lt;br /&gt;
 Parameter: &amp;quot;oolite_witchspaceDestination&amp;quot; is the name of the destination system&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship selects its witchspace destination.&lt;br /&gt;
&lt;br /&gt;
===== oolite_startFleeing =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a ship begins fleeing combat, with the parameter being the ship's current target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_startHelping =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship responds to a request for help from another grouped ship by changing its target. The parameter is the new target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_surrender =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Messages sent by fleeing ships still being fired upon, in attempt to beg for mercy. [[#oolite_agreeingToDumpCargo|oolite_agreeingToDumpCargo]] is used instead in the one case in the core game where an attacker might accept a surrender (as opposed to breaking off an attack on a fleeing ship to attack a non-fleeing one)&lt;br /&gt;
&lt;br /&gt;
===== oolite_thanksForHelp =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 1 if thanking the player, 3 otherwise&lt;br /&gt;
This message is sent if an attack on this ship's aggressor causes it to break off its own attack. The parameter is the ship helping out.&lt;br /&gt;
&lt;br /&gt;
===== oolite_thargoidAttack =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
This message is sent if the ship is attacked by a Thargoid ship while not previously fighting Thargoids. The parameter is the Thargoid ship. This is generally accompanied by a quick cessation of hostilities between Cooperative vessels for a short-term truce against the invaders.&lt;br /&gt;
&lt;br /&gt;
===== oolite_waypointReached =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 3&lt;br /&gt;
This message is sent when a ship reaches a waypoint set with the waypoint generator function.&lt;br /&gt;
&lt;br /&gt;
===== oolite_witchspaceBlocked =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
This message is sent when a large nearby mass (usually a station or asteroid) prevents witchspace entry. The parameter is the blocking mass.&lt;br /&gt;
&lt;br /&gt;
==== Standard Communications Roles ====&lt;br /&gt;
&lt;br /&gt;
The following communications roles are used by the standard Oolite AIs. Some of the roles have fallback roles used by the standard AIs, noted below. If the fallback role does not exist, or is not specified, it will fall back to using &amp;quot;generic&amp;quot; as usual.&lt;br /&gt;
&lt;br /&gt;
Note that OXP AIs might not specify the same fallback roles. OXP AIs wishing to can use code like&lt;br /&gt;
&lt;br /&gt;
 if (worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;]._getCommunicationPersonalities(&amp;quot;hermit&amp;quot;).length &amp;gt; 0)&lt;br /&gt;
 {&lt;br /&gt;
 	ai.setCommunicationsRole(&amp;quot;hermit&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
 	ai.setCommunicationsRole(&amp;quot;station&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''assassin''' - assassins&lt;br /&gt;
* '''defenseShip''' - defense ships&lt;br /&gt;
* '''escapepod''' - escape pods&lt;br /&gt;
* '''escort''' - escorts&lt;br /&gt;
* '''hermit''' - rock hermits. If no personalities are defined for this role, &amp;quot;station&amp;quot; will be used instead.&lt;br /&gt;
* '''hunter''' - bounty hunters&lt;br /&gt;
* '''pirate''' - pirates&lt;br /&gt;
* '''pirate-aegis-raider''' - pirates showing off by attacking the main station. If no personalities are defined for this role, &amp;quot;pirate&amp;quot; will be used instead.&lt;br /&gt;
* '''pirate-freighter''' - pirate freighters leading a pack. If no personalities are defined for this role, &amp;quot;pirate&amp;quot; will be used instead.&lt;br /&gt;
* '''pirate-interceptor''' - pirates assigned to distract police and hunters. If no personalities are defined for this role, &amp;quot;pirate&amp;quot; will be used instead.&lt;br /&gt;
* '''police''' - police ships&lt;br /&gt;
* '''scavenger''' - scavengers and miners.&lt;br /&gt;
* '''shuttle''' - orbital shuttles (usually unarmed)&lt;br /&gt;
* '''station''' - stations.&lt;br /&gt;
* '''trader''' - traders&lt;br /&gt;
* '''trader-courier''' - couriers. If no personalities are defined for this role, &amp;quot;trader&amp;quot; will be used instead.&lt;br /&gt;
* '''trader-opportunist''' - opportunistic traders. If no personalities are defined for this role, &amp;quot;trader&amp;quot; will be used instead.&lt;br /&gt;
* '''trader-smuggler''' - smugglers. If no personalities are defined for this role, &amp;quot;trader&amp;quot; will be used instead.&lt;br /&gt;
&lt;br /&gt;
Thargoids are set slightly differently: all the core game ones get the &amp;quot;_thargoid&amp;quot; role, with the warships getting the &amp;quot;thargoid&amp;quot; personality, and the drones getting the &amp;quot;tharglet&amp;quot; personality, even if those personalities are not otherwise defined. Note that the underscore in the role prevents fallback to &amp;quot;generic&amp;quot; messages here.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
==== _getCommunication ====&lt;br /&gt;
 function '''_getCommunication'''(role : String, personality : String, key : String) : StringOrFunction&lt;br /&gt;
This function returns either a string suitable for passing to &amp;lt;code&amp;gt;expandDescription&amp;lt;/code&amp;gt; containing the communications for the specified key, or a function called with key and parameters returning a communications string, if a ship of the specified role and personality is speaking.&lt;br /&gt;
&lt;br /&gt;
==== _getCommunicationPersonalities ====&lt;br /&gt;
 function '''_getCommunicationPersonalities'''(role : String) : Array&lt;br /&gt;
Returns the personalities which have at least one communication key defined for the given role.&lt;br /&gt;
&lt;br /&gt;
==== _setCommunication ====&lt;br /&gt;
 function '''_setCommunication'''(role : String, personality : String, key : String, value : StringOrFunction)&lt;br /&gt;
This function sets the communications values returned by [[#_getCommunication|getCommunication]]. The value may either be:&lt;br /&gt;
* a String, which will be passed to expandDescription&lt;br /&gt;
* a Function, which will be called with two parameters: the key, and the parameters object.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
 worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;]._setCommunication(&amp;quot;myoxp_role&amp;quot;,&amp;quot;generic&amp;quot;,&lt;br /&gt;
     &amp;quot;oolite_continuingAttack&amp;quot;,&amp;quot;[myoxp_role_continuesAttack]&amp;quot;);&lt;br /&gt;
 worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;]._setCommunication(&amp;quot;myoxp_role&amp;quot;,&amp;quot;generic&amp;quot;,&lt;br /&gt;
     &amp;quot;oolite_continuingAttack&amp;quot;,function(k,p) { return &amp;quot;Targeting the &amp;quot;+p.oolite_entityName+&amp;quot;. Cover me.&amp;quot;; });&lt;br /&gt;
&lt;br /&gt;
==== _setCommunications ====&lt;br /&gt;
 function '''_setCommunications'''(comms : Object)&lt;br /&gt;
This function can be used to set multiple communications keys at once. The format of the object is&lt;br /&gt;
 comms[role][personality][key] = value;&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Oolite_Javascript_Reference:_PriorityAI_Documentation&amp;diff=40715</id>
		<title>Oolite Javascript Reference: PriorityAI Documentation</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Oolite_Javascript_Reference:_PriorityAI_Documentation&amp;diff=40715"/>
		<updated>2014-08-01T02:53:03Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Basic structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the priority-based Javascript AI system, which allows more flexible behaviour than the old plist-based AIs to be written in fewer lines of code. New programmers may find [[Oolite_PriorityAI_Tutorial|the priority AI tutorial]] to be more useful as an introduction.&lt;br /&gt;
&lt;br /&gt;
Priority-based Javascript AI is available from Oolite 1.79 onwards.&lt;br /&gt;
&lt;br /&gt;
== Constructor and general functions ==&lt;br /&gt;
&lt;br /&gt;
==== Constructor ====&lt;br /&gt;
 '''new PriorityAIController'''(ship : Ship) : PriorityAIController&lt;br /&gt;
Creates a priority AI and attaches it to the specified ship. Using this from anywhere other than that ship's AI script is not recommended.&lt;br /&gt;
&lt;br /&gt;
 var ai = new worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;].PriorityAIController(this.ship);&lt;br /&gt;
&lt;br /&gt;
=== Properties ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ship&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 '''ship''' : Ship (read-only)&lt;br /&gt;
The ship to which the priority AI is attached.&lt;br /&gt;
&lt;br /&gt;
=== General Methods ===&lt;br /&gt;
&lt;br /&gt;
Additional methods are described in later sections, sorted by purpose.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;applyHandlers&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''applyHandlers'''(handlers : Object)&lt;br /&gt;
Deletes any existing event handlers applied to the ship's AI Script by a previous invocation of &amp;lt;code&amp;gt;applyHandlers&amp;lt;/code&amp;gt;, and copies the handlers in the argument object to the AI Script. All handlers applied this way run with '&amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;' equal to the PriorityAIController, not to the AI Script.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;clearHandlers&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''clearHandlers'''(handlers : Object)&lt;br /&gt;
Deletes any existing event handlers applied to the ship's AI Script by a previous invocation of &amp;lt;code&amp;gt;applyHandlers&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;communicate&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''communicate'''(key : String, params : Object, priority : Number)&lt;br /&gt;
If the communication &amp;quot;key&amp;quot; has previously been [[#_setCommunication|defined]] for this ship's [[#setCommunicationsRole|communications role]] and [[#setCommunicationsPersonality|personality]], retrieves it, calls &amp;lt;code&amp;gt;expandDescription&amp;lt;/code&amp;gt; on it, using the parameters in the object (which can either be a dictionary, or a Ship). This message may then broadcast on the public channel, depending on the priority. If the object is a Ship, it will be converted to a dictionary for expandDescription with the following parameters:&lt;br /&gt;
* &amp;lt;code&amp;gt;oolite_entityClass&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;ship.shipClassName&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;oolite_entityName&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;ship.shipUniqueName&amp;lt;/code&amp;gt;&lt;br /&gt;
Other parameters may be added later to this expansion.&lt;br /&gt;
&lt;br /&gt;
The priority can be a number from 1 to 4&lt;br /&gt;
# Always send this message&lt;br /&gt;
# Send this message if no messages sent in the last 10 seconds&lt;br /&gt;
# Send this message if no messages sent or received in the last 10 seconds&lt;br /&gt;
# Send this message if no messages sent or received in the last 60 seconds&lt;br /&gt;
This is used to prevent an overwhelming number of comms messages being sent. While priority 1 is necessary for messages which must be heard by the player, care must be taken to ensure by other means that they cannot be sent repeatedly.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;communicationsPersonality&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''communicationsPersonality'''() : String&lt;br /&gt;
The current communications personality&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;communicationsRole&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''communicationsRole'''() : String&lt;br /&gt;
The current communications role&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;getParameter&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''getParameter'''(key : String) : Value&lt;br /&gt;
If a parameter with that key has previously been set, return its value. Otherwise return null. Note that the return value can be of any type, so you must be careful when setting and retrieving parameters to avoid type errors.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;getWaypointGenerator&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''getWaypointGenerator'''() : Function&lt;br /&gt;
If a waypoint generation function has previously been set, return it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;noteCommsHeard&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''noteCommsHeard'''()&lt;br /&gt;
This function is used to reset the timers for [[#communicate|priority 3 and 4 communications]]. The standard event handlers will call this for you, but you may need to call it manually otherwise.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reconsiderIn&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''reconsiderIn'''(delay : Number)&lt;br /&gt;
Force a reconsideration of the AI's priority list ahead of schedule, if no request for sooner reconsideration has already been received. &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; must be at least 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;reconsiderNow&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''reconsiderNow'''()&lt;br /&gt;
Force a reconsideration of the AI's priority list ahead of schedule.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setCommunicationsRole&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setCommunicationsRole'''(role : String)&lt;br /&gt;
Sets the ship's communications role to the given value. This is then used to vary the communications messages as defined by [[#_setCommunication|_setCommunication]].&lt;br /&gt;
&lt;br /&gt;
If personalities have previously been defined for this role, and the ship's current personality is either &amp;quot;generic&amp;quot; or not one defined for this role, then it will also select a new communications personality at this point, based on [[Oolite_JavaScript_Reference:_Ship#entityPersonality|ship.entityPersonality]]. If the &amp;quot;oolite_personalityMatchesLeader&amp;quot; parameter has been set, then this is a 0..1 chance that the ship will instead take the personality of its group leader (if this ship is the group leader, this instead is the chance it will copy its personality to group members)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setCommunicationsPersonality&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setCommunicationsPersonality'''(role : String)&lt;br /&gt;
Sets the ship's communications personality to the given value. This is then used to vary the communications messages as defined by [[#_setCommunication|_setCommunication]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setParameter&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setParameter'''(key : String, value : Value)&lt;br /&gt;
Set the named parameter to the given value. Values may be of any type. To remove a parameter, use a value of null. See the [[#Parameters|Parameters]] section below for parameter keys used by the core AIs and the standard priority AI library.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setPriorities&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setPriorities'''(priorities : Array [, delay: Number])&lt;br /&gt;
Set the priority list for the AI, and evaluate it. The format of the priority list is described in the next section.&lt;br /&gt;
&lt;br /&gt;
An optional delay parameter can be set, which will cause evaluation to start only after this many seconds. If it is unset, the AI will start after a random period between 0 and 1 seconds.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setWaypointGenerator&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setWaypointGenerator'''(generator : Function)&lt;br /&gt;
Sets the AI's [[#Waypoint_Generators|Waypoint Generators]] waypoint generator function.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
The following parameters are used by the standard library and accessed using [[#getParameter|getParameter]] and [[#setParameter|setParameter]], but you can also define your own for custom AIs. More detailed documentation will be provided soon.&lt;br /&gt;
&lt;br /&gt;
As with all custom items, prefixing new parameter names with a key unique to your OXP is strongly advised.&lt;br /&gt;
&lt;br /&gt;
==== Flag Parameters ====&lt;br /&gt;
Flag parameters are intended to be set in the AI initialisation routine to vary the behaviour of the AI.&lt;br /&gt;
&lt;br /&gt;
 oolite_flag_allowPlanetaryLanding&lt;br /&gt;
 oolite_flag_autoSpreadMissiles&lt;br /&gt;
 oolite_flag_behaviourLogging&lt;br /&gt;
 oolite_flag_continueUnlikelyPursuits&lt;br /&gt;
 oolite_flag_escortsCoverRetreat&lt;br /&gt;
 oolite_flag_fightsNearHostileStations&lt;br /&gt;
 oolite_flag_fleesPreemptively&lt;br /&gt;
 oolite_flag_likesInterstellarSpace&lt;br /&gt;
 oolite_flag_listenForDistressCall&lt;br /&gt;
 oolite_flag_markOffenders&lt;br /&gt;
 oolite_flag_neverFleeToWitchspace&lt;br /&gt;
 oolite_flag_noDockingUntilDestination&lt;br /&gt;
 oolite_flag_noSpecialThargoidReaction&lt;br /&gt;
 oolite_flag_patrolStation&lt;br /&gt;
 oolite_flag_scanIgnoresUnpowered&lt;br /&gt;
 oolite_flag_selfDestructAbandonedShip&lt;br /&gt;
 oolite_flag_sendsDistressCalls&lt;br /&gt;
 oolite_flag_surrendersEarly&lt;br /&gt;
 oolite_flag_surrendersLate&lt;br /&gt;
 oolite_flag_watchForCargo&lt;br /&gt;
 oolite_flag_witchspacePursuit&lt;br /&gt;
&lt;br /&gt;
==== Other parameters ====&lt;br /&gt;
These parameters are used for storage of long-term state that may need to be kept between runs of the priority tree. In general, Configuration and Response functions set them, and Condition, Behaviour and Response functions read them, but this is only a guideline. Implementors of custom functions may need to get or set these parameters for proper interaction with built-in functions used by the same AI.&lt;br /&gt;
&lt;br /&gt;
 oolite_cargoDropped&lt;br /&gt;
 oolite_cascadeDetected&lt;br /&gt;
 oolite_distressAggressor&lt;br /&gt;
 oolite_distressSender&lt;br /&gt;
 oolite_distressTimestamp&lt;br /&gt;
 oolite_dockingStation&lt;br /&gt;
 oolite_escortRole&lt;br /&gt;
 oolite_friendlyRoles&lt;br /&gt;
 oolite_groupPower&lt;br /&gt;
 oolite_interceptCoordinates&lt;br /&gt;
 oolite_interceptTarget&lt;br /&gt;
 oolite_lastAssist&lt;br /&gt;
 oolite_lastFleeing&lt;br /&gt;
 oolite_lastPirateVictim&lt;br /&gt;
 oolite_leaderRole&lt;br /&gt;
 oolite_personalityMatchesLeader&lt;br /&gt;
 oolite_pirateLurk&lt;br /&gt;
 oolite_playerFriendlyFireAlready&lt;br /&gt;
 oolite_rememberedTarget&lt;br /&gt;
 oolite_scanResults&lt;br /&gt;
 oolite_scanResultSpecific&lt;br /&gt;
 oolite_selectedPlanet&lt;br /&gt;
 oolite_selectedStation&lt;br /&gt;
 oolite_stationPatrolRole&lt;br /&gt;
 oolite_waypoint&lt;br /&gt;
 oolite_waypointRange&lt;br /&gt;
 oolite_waypoints&lt;br /&gt;
 oolite_witchspaceDestination&lt;br /&gt;
 oolite_witchspaceEntry&lt;br /&gt;
 oolite_witchspaceWormhole&lt;br /&gt;
&lt;br /&gt;
== Writing a priority list ==&lt;br /&gt;
&lt;br /&gt;
The priority list is the core of the priority AI. The list will be reevaluated periodically - either timed, or when events occur - and on each reevaluation it will be searched from top to bottom. When a valid priority is found, searching will stop, and that priority will be executed.&lt;br /&gt;
&lt;br /&gt;
If the parameter &amp;quot;oolite_flag_behaviourLogging&amp;quot; is set with [[#setParameter|setParameter]] then verbose information will be written to the log file regarding the processing of the priority list. It is generally advisable to use the debug console to do this for one ship at a time, rather than setting it generally!&lt;br /&gt;
&lt;br /&gt;
=== Basic structure ===&lt;br /&gt;
&lt;br /&gt;
The priority list is an array of objects. Each object contains a set&lt;br /&gt;
of keys and values. The keys are considered in the&lt;br /&gt;
following order and are all optional.&lt;br /&gt;
* '''preconfiguration''': function run unconditionally if this element of the list is reached.&lt;br /&gt;
* '''condition''': function run unconditionally if this element of the list is reached. If it returns false, the remainder of the object is ignored, and consideration moves to the next list element.&lt;br /&gt;
* '''notcondition''': function run unconditionally if this element of the list is reached. If it returns true, the remainder of the object is ignored, and consideration moves to the next list element.&lt;br /&gt;
If neither '''condition''' nor '''notcondition''' are set, this is treated as if a condition was set and was true.&lt;br /&gt;
* '''configuration''': function run if conditions allow&lt;br /&gt;
* '''behaviour''': function run if conditions allow. If this exists, no further elements of the priority list will be considered.&lt;br /&gt;
* '''reconsider''': A number. If a behaviour is executed, the priority list will next be reconsidered in this many seconds. If this value is absent the priority list will only be considered if an event causes it.&lt;br /&gt;
* '''truebranch''': a priority list array. If there was no behaviour, but the conditions allow one to be run, the truebranch will be evaluated as a priority list. If the truebranch causes a behaviour to be executed, consideration will end here. If the truebranch reaches its end without executing a behaviour, consideration will continue with the next element of the main priority list.&lt;br /&gt;
* '''falsebranch''': a priority list array. This will be executed if the the conditions caused the previous four elements to be skipped.&lt;br /&gt;
&lt;br /&gt;
If evaluation reaches the end of the main priority list without finding a behaviour to execute, an error will be noted in the log. In general the last element of the main priority list should always be unconditional (or have a truebranch and a falsebranch, both of which have an unconditional last element).&lt;br /&gt;
&lt;br /&gt;
Example of simple behaviour: (from thargoid AI)&lt;br /&gt;
  {&lt;br /&gt;
    preconfiguration: ai.configurationCheckScanner,&lt;br /&gt;
    condition: ai.conditionScannerContainsNonThargoid,&lt;br /&gt;
    configuration: ai.configurationAcquireScannedTarget,&lt;br /&gt;
    behaviour: ai.behaviourDestroyCurrentTarget,&lt;br /&gt;
    reconsider: 1&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Example of branch usage: (from police AI)&lt;br /&gt;
  {&lt;br /&gt;
    /* The group leader leads the patrol */&lt;br /&gt;
    condition: ai.conditionIsGroupLeader,&lt;br /&gt;
    truebranch: [&lt;br /&gt;
      /* Nothing interesting here. Patrol for a bit */&lt;br /&gt;
      {&lt;br /&gt;
        condition: ai.conditionHasWaypoint,&lt;br /&gt;
        configuration: ai.configurationSetDestinationToWaypoint,&lt;br /&gt;
        behaviour: ai.behaviourApproachDestination,&lt;br /&gt;
        reconsider: 30&lt;br /&gt;
      },&lt;br /&gt;
      /* No patrol route set up. Make one */&lt;br /&gt;
      {&lt;br /&gt;
        configuration: ai.configurationSetWaypoint,&lt;br /&gt;
        behaviour: ai.behaviourApproachDestination,&lt;br /&gt;
        reconsider: 30&lt;br /&gt;
      }&lt;br /&gt;
    ],&lt;br /&gt;
    /* Other ships in the group will set themselves up&lt;br /&gt;
    * as escorts if possible, or looser followers if&lt;br /&gt;
    * not */&lt;br /&gt;
    falsebranch: [&lt;br /&gt;
      {&lt;br /&gt;
        preconfiguration: ai.configurationEscortGroupLeader,&lt;br /&gt;
        condition: ai.conditionIsEscorting,&lt;br /&gt;
        behaviour: ai.behaviourEscortMothership,&lt;br /&gt;
        reconsider: 30&lt;br /&gt;
      },&lt;br /&gt;
      /* if we can't set up as an escort */&lt;br /&gt;
      {&lt;br /&gt;
        behaviour: ai.behaviourFollowGroupLeader,&lt;br /&gt;
        reconsider: 15&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The AI Library provides a selection of standard condition,&lt;br /&gt;
configuration and behaviour functions for us in AIs, but you can also&lt;br /&gt;
write your own.&lt;br /&gt;
  /* Ship is unstable and may explode under stress */&lt;br /&gt;
  {&lt;br /&gt;
    condition: function()&lt;br /&gt;
    {&lt;br /&gt;
      return Math.random() &amp;lt; 0.01; // 1% chance per evaluation&lt;br /&gt;
    }				&lt;br /&gt;
    behaviour: function()&lt;br /&gt;
    {&lt;br /&gt;
      this.ship.explode();&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
=== Evaluation context ===&lt;br /&gt;
&lt;br /&gt;
All condition, configuration and behaviour functions are evaluated in the context of the AI object. The '&amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt;' variable when one of these functions is run therefore points to the priority AI, '''not''' to the AI Script.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;this.ship&amp;lt;/code&amp;gt; is defined and will be equivalent to the this.ship seen by the AI Script. However, if you wish to access properties of the AI Script you must use &amp;lt;code&amp;gt;this.ship.AIScript.''property''&amp;lt;/code&amp;gt;. Properties and methods of the priority AI may be accessed directly, e.g. &amp;lt;code&amp;gt;[[#allied|this.allied]](this.ship,this.ship.target)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behaviour functions ==&lt;br /&gt;
&lt;br /&gt;
Behaviour functions determine what the ship will do next. They&lt;br /&gt;
generally begin a particular behaviour, and set up event handlers&lt;br /&gt;
(generally aided by the response templates) to allow interruption or&lt;br /&gt;
modification of that behaviour should anything interesting happen.&lt;br /&gt;
&lt;br /&gt;
Behaviour functions take no arguments and return nothing.&lt;br /&gt;
&lt;br /&gt;
=== General behaviours ===&lt;br /&gt;
&lt;br /&gt;
Behaviours intended for ships in general. These mostly use &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;, and occasionally add others.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourApproachDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourApproachDestination'''()&lt;br /&gt;
Travels from the current position to within &amp;lt;code&amp;gt;desiredRange&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt;, avoiding obstacles on the way. &lt;br /&gt;
&lt;br /&gt;
If a waypoint is set in the parameters &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot;, it will clear these parameters if when it reaches its destination it is sufficiently close to the waypoint. If the parameter &amp;quot;oolite_flag_patrolStation&amp;quot; is set, and its group leader is a station, it will report in to the station  upon reaching the waypoint.&lt;br /&gt;
&lt;br /&gt;
Temporary waypoints needed to avoid obstacles will be stored in the&lt;br /&gt;
&amp;quot;oolite_waypoints&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourAssassinateCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourAssassinateCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, only stopping when interrupted or when the target is destroyed. It will potentially send both &amp;quot;oolite_beginningAssassination&amp;quot; and &amp;quot;oolite_beginningFight&amp;quot; communications messages (though if the former is defined, the latter will not be sent due to the communications priority system). This is otherwise identical in behaviour to [[#behaviourCommenceAttackOnCurrentTarget|behaviourCommenceAttackOnCurrentTarget]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourAvoidCascadeExplosion&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourAvoidCascadeExplosion'''()&lt;br /&gt;
Fly, using injectors if available, to a safe distance from any nearby quirium cascades (or active mines)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourBecomeInactiveThargon&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourBecomeInactiveThargon'''()&lt;br /&gt;
This behaviour is intended to deactivate thargons and should generally only be used for that purpose. It changes the scan class to CLASS_CARGO, clears the ship's targeting information, brings it to a stop, removes it from its ship groups, and removes it from nearby NPCs targeting systems (it can be retargeted). Unlike the equivalent plist AI command, it does not remove it as a player target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourCollectSalvage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourCollectSalvage'''()&lt;br /&gt;
This behaviour attempts to scoop the current target. If it is successful, the &amp;quot;oolite_cargoDropped&amp;quot; parameter recording the number of seen cargo pods will be cleared.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourCommenceAttackOnCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourCommenceAttackOnCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, only stopping when interrupted or when the target is destroyed. Unlike the &amp;lt;code&amp;gt;behaviourDestroyCurrentTarget&amp;lt;/code&amp;gt; behaviour, it may first send the &amp;quot;[[#oolite_beginningFight|oolite_beginningFight]]&amp;quot; communications message, so should only be used when starting a fight with a new target/group - not when in the middle of a fight.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourDestroyCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourDestroyCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, only stopping when interrupted or when the target is destroyed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourDockWithStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourDockWithStation'''()&lt;br /&gt;
This behaviour docks with the station specified in the parameter &amp;quot;oolite_dockingStation&amp;quot;. If the target refuses docking or the ship is too big to dock, the parameter will be cleared.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourEnterWitchspace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourEnterWitchspace'''()&lt;br /&gt;
This behaviour attempts to enter witchspace. It can do this in several ways:&lt;br /&gt;
* If the parameter &amp;quot;oolite_witchspaceWormhole&amp;quot; is set to an active wormhole, it will try to fly to and use that wormhole.&lt;br /&gt;
* If the parameter &amp;quot;oolite_witchspaceDestination&amp;quot; is set, then it will try to jump to that destination using its own drive. It will wait for its escorts to be launched, and will start spinning up this drive. Calling this behaviour again after 15 seconds will cause it to jump out.&lt;br /&gt;
* Otherwise, it will wait for a wormhole to be suggested by another member of its group, or for the player to create one.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourEscortMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourEscortMothership'''()&lt;br /&gt;
This behaviour performs non-combat escorting of the ship's group leader, in the formation requested by the lead ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFineCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFineCurrentTarget'''()&lt;br /&gt;
If the ship has scan class &amp;quot;CLASS_POLICE&amp;quot; and a current target, mark that target for fines when it next docks.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFleeCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFleeCombat'''()&lt;br /&gt;
The ship will flee from hostility, in the following order:&lt;br /&gt;
* Cascade explosions (coordinates from the parameter &amp;quot;oolite_cascadeDetected&amp;quot;)&lt;br /&gt;
* Its current target, if it can see it&lt;br /&gt;
* Its defense targets, if it can see them&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFollowCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFollowCurrentTarget'''()&lt;br /&gt;
The ship will follow the current target, including through a witchspace jump if necessary, and will additionally [[#conditionHasRememberedTarget|remember]] the target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourFollowGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourFollowGroupLeader'''()&lt;br /&gt;
The ship will follow the group leader if there is one, attempting to remain within a few kilometres of it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourGuardTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourGuardTarget'''()&lt;br /&gt;
The ship will fly to within a few kilometres of its current target. Similar to &amp;lt;code&amp;gt;behaviourFollowCurrentTarget&amp;lt;/code&amp;gt; but will not follow the target into witchspace and will not remember that it was doing so if distracted.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourJoinTargetGroup&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourJoinTargetGroup'''()&lt;br /&gt;
The ship will add itself to its target's ship group. You should previously have used appropriate condition tests to check that this is appropriate behaviour.&lt;br /&gt;
 &lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourLandOnPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourLandOnPlanet'''()&lt;br /&gt;
Lands on the nearest planet. Unlike most behaviours, this one does not include the standard responses, so you should generally wait until the ship is only a few hundred metres above the surface before using it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourLeaveVicinityOfDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourLeaveVicinityOfDestination'''()&lt;br /&gt;
Moves outside scanner range of the current destination coordinates.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourLeaveVicinityOfTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourLeaveVicinityOfTarget'''()&lt;br /&gt;
Moves outside scanner range of the current target. Unlike fleeing, this does not use fuel injectors if they are fitted, and does not cause the ship to appear hostile to its target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMineTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMineTarget'''()&lt;br /&gt;
Attacks the current target with a mining laser to break it into splinters. If the current target is not a rock, this behaviour will be cancelled and the target will be lost.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourOfferToEscort&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourOfferToEscort'''()&lt;br /&gt;
Offers to escort the ship identified by the parameter &amp;quot;oolite_scanResultSpecific&amp;quot;. Unless this parameter has been set by the scanner condition [[#conditionScannerContainsShipNeedingEscort|conditionScannerContainsShipNeedingEscort]] this is extremely likely to fail.&lt;br /&gt;
&lt;br /&gt;
To be accepted as an escort, the ship must have a primary role in the &amp;lt;code&amp;gt;oolite-escorts&amp;lt;/code&amp;gt; [[role-categories.plist|role category]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourPayOffPirates&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourPayOffPirates'''()&lt;br /&gt;
If a pirate demand to dump cargo exists, dump that many cargo canisters (or all of them, if fewer), and then switch to [[#behaviourFleeCombat|behaviourFleeCombat]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourReconsider&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourReconsider'''()&lt;br /&gt;
Does nothing except schedule a re-evaluation of the priority list.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRejoinMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRejoinMothership'''()&lt;br /&gt;
This behaviour flies to rejoin the mothership, and then escorts it as in [[#behaviourEscortMothership|behaviourEscortMothership]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRepelCurrentTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRepelCurrentTarget'''()&lt;br /&gt;
This behaviour attacks the current target, but will break off the attack (and ask its escorts to do the same) if the target starts fleeing.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRespondToDistressCall&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRespondToDistressCall'''()&lt;br /&gt;
If the ship has a valid distress call represented by the parameters &amp;quot;oolite_distressAggressor&amp;quot; and &amp;quot;oolite_distressSender&amp;quot; it will attack the aggressor if it can see it. Otherwise it will fly (with injectors if available) to near the sender, attempting to locate the aggressor.&lt;br /&gt;
&lt;br /&gt;
If the aggressor has a lower bounty than the sender, then the ship will assume that the distress call is &amp;quot;unjust&amp;quot;, and attack the sender instead.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourRobTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourRobTarget'''()&lt;br /&gt;
If an existing group demand for cargo is in effect, attack the current target in the hope that it meets it. Demands are stored with the group leader if possible.&lt;br /&gt;
&lt;br /&gt;
If there is no existing demand for cargo, create one based on the cargo capacity of the target ship, the current system government, the cargo capacity of the group, and other factors.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourSunskim&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourSunskim'''()&lt;br /&gt;
Fly along until fuel tanks are full. In general, this behaviour should not be started until sunskimming height is reached (test with [[#conditionReadyToSunskim|conditionReadyToSunskim]]), and [[#configurationSetDestinationToSunskimEnd|configurationSetDestinationToSunskimEnd]] should be used to set a safe sunskimming direction.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourTumble&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourTumble'''()&lt;br /&gt;
Start tumbling. Unlike most behaviours, this one does not include the standard responses, so you will need to manually request a reconsideration of priorities if one is needed.&lt;br /&gt;
&lt;br /&gt;
=== Missile behaviours ===&lt;br /&gt;
&lt;br /&gt;
Missile behaviours use &amp;lt;code&amp;gt;responsesAddMissile&amp;lt;/code&amp;gt;. More discussion of setting missile parameters, ECM response, and detonation can be found there.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMissileInterceptCoordinates&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMissileInterceptCoordinates'''()&lt;br /&gt;
Close to the desired missile range (default 25m, or specified by the &amp;lt;code&amp;gt;oolite_missile_proximity&amp;lt;/code&amp;gt; key in script info), detonating when reached. The coordinates to close in on are specified in the &amp;quot;oolite_interceptCoordinates&amp;quot;. This is used to track missile targets which cloak.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMissileInterceptTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMissileInterceptTarget'''()&lt;br /&gt;
Close to the desired missile range (default 25m, or specified by the &amp;lt;code&amp;gt;oolite_missile_proximity&amp;lt;/code&amp;gt; key in script info), detonating when reached.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourMissileSelfDestruct&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourMissileSelfDestruct'''()&lt;br /&gt;
Destroys the missile without detonating the payload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Station behaviours ===&lt;br /&gt;
&lt;br /&gt;
Station behaviours use &amp;lt;code&amp;gt;responsesAddStation&amp;lt;/code&amp;gt; to set up their general handlers, as most standard behaviours are unnecessary or unhelpful for a stationary station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchDefenseShips&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchDefenseShips'''()&lt;br /&gt;
If the station has a target and the target is aggressive, launches a defense ship if any remain, increases the alert condition to Red, and requests a group attack on the target. Otherwise does nothing.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchMiner&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchMiner'''()&lt;br /&gt;
If the station does not currently have a miner in its ship group, launches one. Also reduces the alert condition by one step.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchPatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchPatrol'''()&lt;br /&gt;
If the station does not currently have a ship in its ship group with the primary role equal to the parameter &amp;quot;oolite_stationPatrolRole&amp;quot;, launches one. Also reduces the alert condition by one step.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationLaunchSalvager&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationLaunchMiner'''()&lt;br /&gt;
Launches a salvager. Also reduces the alert condition by one step.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationManageTraffic&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationManageTraffic'''()&lt;br /&gt;
The station idles. If the system repopulator has requested launches that this station can fulfil, it may launch a ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;behaviourStationRespondToDistressCall&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''behaviourStationRespondToDistressCall'''()&lt;br /&gt;
Locates the aggressor and sender in the same way as [[#behaviourRespondToDistressCall|behaviourRespondToDistressCall]. If the aggressor is not visible, does nothing, otherwise sets the aggressor as a target, increases alert condition to Red, and launches a defense ship to attack the aggressor.&lt;br /&gt;
&lt;br /&gt;
== Condition functions ==&lt;br /&gt;
&lt;br /&gt;
Condition functions are used to determine whether to execute a&lt;br /&gt;
priority AI behaviour. They take no arguments and return a Boolean.&lt;br /&gt;
&lt;br /&gt;
=== Combat conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions related to the ship's performance in combat.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCascadeDetected&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCascadeDetected'''() : Boolean&lt;br /&gt;
Returns true if a cascade explosion has been detected recently (as given by the parameter &amp;quot;oolite_cascadeDetected&amp;quot; containing the explosion coordinates).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCombatOdds*&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCombatOddsTerrible'''() : Boolean&lt;br /&gt;
 function '''conditionCombatOddsBad'''() : Boolean&lt;br /&gt;
 function '''conditionCombatOddsGood'''() : Boolean&lt;br /&gt;
 function '''conditionCombatOddsExcellent'''() : Boolean&lt;br /&gt;
These functions return true if the perceived odds of this ship's group winning a fight against the target ship's group can reasonably be described with the appropriate description. &amp;quot;Good&amp;quot; and &amp;quot;Excellent&amp;quot; require the odds to be better than a particular threshold (so Excellent odds are always also Good), while &amp;quot;Bad&amp;quot; and &amp;quot;Terrible&amp;quot; require the odds to be worse than that threshold.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupAttritionReached&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupAttritionReached'''() : Boolean&lt;br /&gt;
This condition is true if the ship is in a group and that group has lost more than a quarter of its initial ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupSuppliesLow&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupSuppliesLow'''() : Boolean&lt;br /&gt;
This condition is true if the ship's group is running out of consumables such as missiles or fuel, or has several damaged ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionInCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionInCombat'''() : Boolean&lt;br /&gt;
The ship is currently attacking other ships, or a ship in its group or one of its escorts is.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionInCombatWithHostiles&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionInCombat'''() : Boolean&lt;br /&gt;
The ship is currently attacking other ships, or a ship in its group or one of its escorts is. Additionally, at least one of the targets of those ships is itself attacking (though not necessarily attacking anything from this ship's group)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionLosingCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionLosingCombat'''() : Boolean&lt;br /&gt;
The ship is in combat, but is losing. The exact definition of &amp;quot;losing&amp;quot; may vary, and is intended to account for the overall tactical situation.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipInCombat&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipInCombat'''() : Boolean&lt;br /&gt;
This ship's group leader is attacking and/or being attacked. Other ships in the group are not considered. This ship must be able to see its leader's target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipIsAttacking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipIsAttacking'''() : Boolean&lt;br /&gt;
This ship's group leader is attacking a target. This ship must be able to see its leader's target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipIsAttackingHostileTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipIsAttacking'''() : Boolean&lt;br /&gt;
This ship's group leader is attacking a target which is itself attacking something. This ship must be able to see its leader's target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMothershipUnderAttack&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMothershipUnderAttack'''() : Boolean&lt;br /&gt;
This ship's group leader is currently being targeted. This ship must be able to see the attacker.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSuppliesLow&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSuppliesLow'''() : Boolean&lt;br /&gt;
This condition is true if this ship is personally running out of consumables such as missiles or fuel, or is damaged. This is effectively a wrapper around &amp;lt;code&amp;gt;ship.damageAssessment()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Navigation conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions related to the ship's surroundings and navigation through the system.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCanWitchspaceOnRoute&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCanWitchspaceOnRoute'''() : Boolean&lt;br /&gt;
The ship has a witchspace drive, a witchspace route, and the next system on its [[#setWitchspaceRouteTowitchspace|route]] is within range with the current fuel supply.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCanWitchspaceOut&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCanWitchspaceOut'''() : Boolean&lt;br /&gt;
The ship has a witchspace drive, and at least one other system is within range with the current fuel supply.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionFriendlyStationExists&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionFriendlyStationExists'''() : Boolean&lt;br /&gt;
There is at least one friendly station in the system.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionFriendlyStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionFriendlyStationNearby'''() : Boolean&lt;br /&gt;
There is at least one friendly station within scanner range&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupIsSeparated&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupIsSeparated'''() : Boolean&lt;br /&gt;
The ship is in a group and has a group leader, and is out of scanner range of that leader (or out of 2x scanner range if the leader is a station)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasSelectedPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasSelectedPlanet'''() : Boolean&lt;br /&gt;
The ship has a valid planet in the &amp;quot;oolite_selectedPlanet&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasSelectedStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasSelectedStation'''() : Boolean&lt;br /&gt;
The ship has a valid planet in the &amp;quot;oolite_selectedStation&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHomeStationExists&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHomeStationExists'''() : Boolean&lt;br /&gt;
The ship's home station still exists&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHomeStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHomeStationNearby'''() : Boolean&lt;br /&gt;
The ship's home station is within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHostileStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHostileStationNearby'''() : Boolean&lt;br /&gt;
There is at least one hostile station within scanner range&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionInInterstellarSpace&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionInInterstellarSpace'''() : Boolean&lt;br /&gt;
The ship is currently in interstellar space.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMainPlanetNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMainPlanetNearby'''() : Boolean&lt;br /&gt;
The ship is within 3 radii of the surface of the main planet&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionNearDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionNearDestination'''() : Boolean&lt;br /&gt;
The ship is closer than the desired range to its destination&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionPlayerNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionPlayerNearby'''() : Boolean&lt;br /&gt;
The player's ship is within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionReadyToSunskim&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionReadyToSunskim'''() : Boolean&lt;br /&gt;
The ship is close enough to the sun to scoop fuel.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSelectedStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSelectedStationNearby'''() : Boolean&lt;br /&gt;
The ship has a selected station in the &amp;quot;oolite_selectedStation&amp;quot; parameter, and it is within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSelectedStationNearMainPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSelectedStationNearMainPlanet'''() : Boolean&lt;br /&gt;
The ship has a selected station in the &amp;quot;oolite_selectedStation&amp;quot; parameter, and it is within 3 radii of the surface of the main planet.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionStationNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionStationNearby'''() : Boolean&lt;br /&gt;
There is a station within scanner range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionSunskimPossible&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionSunskimPossible'''() : Boolean&lt;br /&gt;
There is a sun, it's not going nova, it hasn't gone nova, the ship has a non-full fuel tank and fuel scoops, and the ship has sufficient heat insulation to skim safely.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionWormholeNearby&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionWormholeNearby'''() : Boolean&lt;br /&gt;
There is an entry wormhole within scanner range.&lt;br /&gt;
&lt;br /&gt;
=== Piracy-related conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions involved in piratical activities.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCargoDemandsMet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCargoDemandsMet'''() : Boolean&lt;br /&gt;
Since this ship (or an ally) made a cargo demand, this ship has seen enough cargo dropped to meet that demand.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupHasEnoughLoot&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupHasEnoughLoot'''() : Boolean&lt;br /&gt;
The group this ship belongs to has obtained enough cargo to call it a day. Currently this happens when cargo space usage is above 50%, but more sophisticated checks are planned involving damage or lost ships, expenditure of consumables, and so on.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionPiratesCanBePaidOff&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionPiratesCanBePaidOff'''() : Boolean&lt;br /&gt;
Pirates have demanded that this ship dump cargo, and it currently has enough cargo on board to meet that demand.&lt;br /&gt;
&lt;br /&gt;
=== Scanning conditions ===&lt;br /&gt;
&lt;br /&gt;
These conditions check the ship's latest scan ([[#configurationCheckScanner|configurationCheckScanner]]) for ships meeting particular requirements. If a ship is found, it will be placed in the &amp;quot;oolite_scanResultsSpecific&amp;quot; parameter, in addition to the condition returning true.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsAssassinationTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsAssassinationTarget'''() : Boolean&lt;br /&gt;
The scan contains an assassination target (i.e. an escape capsule)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsCleanShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsCleanShip'''() : Boolean&lt;br /&gt;
The scan contains a clean ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsCourier&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsCourier'''() : Boolean&lt;br /&gt;
The scan contains a courier ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsEscapePods&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsEscapePods'''() : Boolean&lt;br /&gt;
The scan contains an escape pod travelling slower than this ship's maximum speed, and this ship is able to scoop cargo.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsFineableOffender&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsFineableOffender'''() : Boolean&lt;br /&gt;
The scan contains a piloted ship with an offender legal status at or below the system threshold (varies with government) that has not already been marked for fines.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsFugitive&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsFugitive'''() : Boolean&lt;br /&gt;
The scan contains a fugitive ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsHuntableOffender&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsHuntableOffender'''() : Boolean&lt;br /&gt;
The scan contains a piloted ship with an offender legal status not too small to bother with (varies with government).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSeriousOffender&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSeriousOffender'''() : Boolean&lt;br /&gt;
The scan contains a piloted ship with an offender legal status at or above the system threshold for fines (varies with government).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsHunters&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsHunters'''() : Boolean&lt;br /&gt;
The scan contains a ship with role &amp;quot;hunter&amp;quot;, or a police ship, or the main station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsLoneVictim&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsLoneVictim'''() : Boolean&lt;br /&gt;
The scan contains a single pirate victim and no other unallied ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsMiningOpportunity&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsMiningOpportunity'''() : Boolean&lt;br /&gt;
The scan contains a boulder (preferentially) or an asteroid, and the ship has a mining laser, a fuel scoop, and a non-full hold.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsNonThargoid&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsNonThargoid'''() : Boolean&lt;br /&gt;
The scan contains a ship which is not a Thargoid ship. Rocks and cargo will only be returned if there is nothing more interesting about.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsPirateLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsPirateLeader'''() : Boolean&lt;br /&gt;
The scan contains a pirate leader (usually a heavily-armed freighter)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsPirateVictims&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsPirateVictims'''() : Boolean&lt;br /&gt;
The scan contains a pirate victim (as defined by &amp;lt;code&amp;gt;[[role-categories.plist]]&amp;lt;/code&amp;gt;) which is carrying at least some cargo and has not recently been robbed.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsReadyThargoidMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsReadyThargoidMothership'''() : Boolean&lt;br /&gt;
The scan contains a thargoid mothership which has the capability to control at least one more thargon.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsRocks&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsRocks'''() : Boolean&lt;br /&gt;
The scan contains boulders (preferentially) or asteroids.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSalvage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSalvage'''() : Boolean&lt;br /&gt;
The scan contains cargo which could in theory be scooped.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSalvageForGroup&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSalvageForGroup'''() : Boolean&lt;br /&gt;
The scan contains cargo which could in theory be scooped, and it is travelling slowly enough that at least one of the ships in the group with fuel scoops and cargo space can collect it..&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSalvageForMe&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSalvageForMe'''() : Boolean&lt;br /&gt;
The scan contains cargo which can be scooped by this ship (travelling slowly enough, and this ship has scoops and space)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsShipNeedingEscort&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsShipNeedingEscort'''() : Boolean&lt;br /&gt;
The scan contains a ship which has fewer escorts than its maximum. If the ship is clean, this will only detect other clean ships. If the ship is not clean, this will only detect other non-clean ships.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsSuspiciousShip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsSuspiciousShip'''() : Boolean&lt;br /&gt;
The scan contains a ship with a criminal reputation (whether or not it currently carries a bounty)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsThargoidMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsThargoidMothership'''() : Boolean&lt;br /&gt;
The scan contains a thargoid mothership which has the capability to control thargons. The number of thargons currently being controlled is irrelevant to this scan.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionScannerContainsUnspreadMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionScannerContainsUnspreadMissile'''() : Boolean&lt;br /&gt;
The scan contains a missile which has the same target and owner as this ship, but is closer to the target and within 500 metres of this ship. This is mainly used for &amp;quot;smart&amp;quot; missiles to ensure that impact times for a salvo are spread out.&lt;br /&gt;
&lt;br /&gt;
=== State querying conditions ===&lt;br /&gt;
&lt;br /&gt;
Conditions related to the state of the ship&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionAllEscortsInFlight&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionAllEscortsInFlight'''() : Boolean&lt;br /&gt;
If the ship has living escorts, then this function returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; only if they are all in normal flight (and not docked, launching, or in a wormhole). If the ship has no escorts then this function also returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCanScoopCargo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCanScoopCargo'''() : Boolean&lt;br /&gt;
The ship has a working fuel scoop and at least 1 TC of free space in its hold.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCargoIsProfitableHere&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCargoIsProfitableHere'''() : Boolean&lt;br /&gt;
The current contents of the ship's hold can be sold at an above average price at the main station (this is currently determined very approximately - solely asking &amp;quot;is the current system on the right side of the Ind/Agri divide&amp;quot; - rather than checking station prices.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionCoinFlip&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionCoinFlip'''() : Boolean&lt;br /&gt;
Returns true half the time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionGroupLeaderIsStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionGroupLeaderIsStation'''() : Boolean&lt;br /&gt;
The ship has a group leader and the group leader is a station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasInterceptCoordinates&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasInterceptCoordinates'''() : Boolean&lt;br /&gt;
The ship has intercept coordinates set in the parameter &amp;quot;oolite_interceptCoordinates&amp;quot;. These are used by missiles to home in on a last-known location if the target cloaks.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasMothership&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasMothership'''() : Boolean&lt;br /&gt;
The ship has a group leader which is not itself.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasNonThargoidTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasNonThargoidTarget'''() : Boolean&lt;br /&gt;
The ship's target is not null, and is not a thargoid ship (by scan class).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasReceivedDistressCall&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasReceivedDistressCall'''() : Boolean&lt;br /&gt;
The ship has recently received a distress call. Distress calls expire after 30 seconds, or if the sender is no longer visible, or if the aggressor is dead.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasRememberedTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasRememberedTarget'''() : Boolean&lt;br /&gt;
The ship has a remembered target. This is set by [[#behaviourFollowCurrentTarget|behaviourFollowCurrentTarget]] to allow persistent tracking of a ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasTarget'''() : Boolean&lt;br /&gt;
The ship's target is not null.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionHasWaypoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionHasWaypoint'''() : Boolean&lt;br /&gt;
The ship has a waypoint set by its [[#|waypoint generator]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionIsActiveThargon&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionIsActiveThargon'''() : Boolean&lt;br /&gt;
The ship is a thargon (&amp;quot;EQ_THARGON&amp;quot;) and is active.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionIsEscorting&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionIsEscorting'''() : Boolean&lt;br /&gt;
The ship is currently escorting another ship. Stricter than [[#conditionHasMothership|conditionHasMothership]]: this also requires this ship to be in the group leader's escort group.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionIsGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionIsGroupLeader'''() : Boolean&lt;br /&gt;
The ship is in a group and is the leader of the group&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMissileNeedsLaunchEvasion&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMissileNeedsLaunchEvasion'''() : Boolean&lt;br /&gt;
This function checks if the &amp;lt;code&amp;gt;oolite_flag_launchAdjustMissile&amp;lt;/code&amp;gt; parameter is set to a non-null value, and returns true if so.&lt;br /&gt;
&lt;br /&gt;
Missile AI scripts may find the following code useful to set this flag to avoid collisions with the launching ship.&lt;br /&gt;
&lt;br /&gt;
 this.shipSpawned = function()&lt;br /&gt;
 {&lt;br /&gt;
 	/* Launch correction when fired at target in aft arc */ &lt;br /&gt;
 	if (this.ship.target &amp;amp;&amp;amp; this.ship.target.position.subtract(this.ship.position).direction().dot(this.ship.vectorForward) &amp;lt; -0.8)&lt;br /&gt;
 	{&lt;br /&gt;
 		this.oolite_priorityai.setParameter(&amp;quot;oolite_flag_launchAdjustMissile&amp;quot;,true);&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
See also [[#configurationMissileAdjustLaunch|configurationMissileAdjustLaunch]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionMissileOutOfFuel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionMissileOutOfFuel'''() : Boolean&lt;br /&gt;
The ship has travelled beyond the maximum missile range. The default is 30km, but this may be overridden by the &amp;lt;code&amp;gt;oolite_missile_range&amp;lt;/code&amp;gt; parameter in the ship's script info.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionPatrolIsOver&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionPatrolIsOver'''() : Boolean&lt;br /&gt;
The ship's patrol is over (either due to distance travelled or a need to re-arm and repair). Note that the distance threshold is relatively low, so for ships on long patrol routes between system bodies this function should only be called when reaching appropriate waypoints.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;conditionWitchspaceEntryRequested&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''conditionWitchspaceEntryRequested'''() : Boolean&lt;br /&gt;
The ship has been requested to enter a wormhole set in the &amp;quot;oolite_witchspaceWormhole&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
== Configuration functions ==&lt;br /&gt;
&lt;br /&gt;
Configuration functions are usually used to set up parameters needed for a behaviour, though some may be used at the preconfiguration stage to set up parameters for a condition test. They take no arguments and do not return anything.&lt;br /&gt;
&lt;br /&gt;
=== Destination configurations ===&lt;br /&gt;
&lt;br /&gt;
These configurations set a destination, a desired range and a desired speed suitable for use with [[#behaviourApproachDestination|behaviourApproachDestination]]. Unless otherwise stated, [[#cruiseSpeed|cruiseSpeed]] will be used as the desired speed.&lt;br /&gt;
&lt;br /&gt;
If they are unable to set a destination, they may set the destination to the ship's current position, or may do nothing. Generally a condition should be used to check that the configuration is sensible.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationMissileAdjustLaunch&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationMissileAdjustLaunch'''()&lt;br /&gt;
This function causes the missile to dive sharply. The intended use is in conjunction with [[#conditionMissileNeedsLaunchEvasion|conditionMissileNeedsLaunchEvasion]] to avoid collisions with the launching ship.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationMissileAdjustSpread&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationMissileAdjustSpread'''()&lt;br /&gt;
This function sets an intermediate destination for &amp;quot;smart&amp;quot; missiles which are adjusting their flight path to spread out a salvo's impacts on target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToHomeStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToHomeStation'''()&lt;br /&gt;
Locates the home station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToGroupLeader'''()&lt;br /&gt;
Locates the group leader, sets the destination to its position and the desired range to 15km. Maximum flight speed is used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToMainPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToMainPlanet'''()&lt;br /&gt;
Sets the destination to the main planet's position, and the desired range to 3 radii (i.e. 2 radii from the surface).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToMainStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToMainStation'''()&lt;br /&gt;
Sets the destination to the main station's position, and the desired range to 15km&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestHostileStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestHostileStation'''()&lt;br /&gt;
Locates the nearest friendly station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestFriendlyStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestFriendlyStation'''()&lt;br /&gt;
Locates the nearest friendly station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestStation'''()&lt;br /&gt;
Locates the nearest station, sets the destination to its position and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToNearestWormhole&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToNearestWormhole'''()&lt;br /&gt;
Locates the nearest entry wormhole, sets the destination to its position and the desired range to zero.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToPirateLurk&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToPirateLurk'''()&lt;br /&gt;
If the parameter &amp;quot;oolite_pirateLurk&amp;quot; is set, then set the destination to that. If currently on a lane, set the destination to the current position. Otherwise, pick a random point on one of the lanes (strongly preferring witchpoint-planet). Once a destination is selected, store it to the parameter &amp;quot;oolite_pirateLurk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The desired range is 1km.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToScannedTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToScannedTarget'''()&lt;br /&gt;
Sets the destination to the position of the ship in the parameter &amp;quot;oolite_scanResultSpecific&amp;quot;, and the desired range to 400m. This can be used to follow a ship without targeting it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSelectedPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSelectedPlanet'''()&lt;br /&gt;
Sets the destination to the position of the planet in the parameter &amp;quot;oolite_selectedPlanet&amp;quot;, and the desired range to 100m from the surface.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSelectedStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSelectedStation'''()&lt;br /&gt;
Sets the destination to the position of the station in the parameter &amp;quot;oolite_selectedStation&amp;quot;, and the desired range to 15km.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSunskimEnd&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSunskimEnd'''()&lt;br /&gt;
Sets the destination to a course parallel to the sun's surface, at a range which should allow the fuel tanks to be completely refilled. The desired range is 0, and the desired speed is maximum speed.&lt;br /&gt;
&lt;br /&gt;
Note: if this function is used above sunskimming height, it will still&lt;br /&gt;
move parallel to the sun's surface, but this will not be much use.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToSunskimStart&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToSunskimStart'''()&lt;br /&gt;
Sets the destination to the sun's position, and the desired range to sunskimming height.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToWaypoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToWaypoint'''()&lt;br /&gt;
If the parameters &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot; are set, use those as the destination and desired range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetDestinationToWitchpoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetDestinationToWitchpoint'''()&lt;br /&gt;
Sets the destination to the witchpoint and the range to 10km&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetWaypoint&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetWaypoint'''()&lt;br /&gt;
If a waypoint generator function has been registered, runs that function to set the &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot; parameters, then sets the destination from those parameters.&lt;br /&gt;
&lt;br /&gt;
=== Docking configurations ===&lt;br /&gt;
&lt;br /&gt;
Each of these configurations sets the &amp;quot;oolite_dockingStation&amp;quot; parameter used by [[#behaviourDockWithStation|behaviourDockWithStation]]&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetNearbyFriendlyStationForDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetNearbyFriendlyStationForDocking'''()&lt;br /&gt;
Sets the &amp;quot;oolite_dockingStation&amp;quot; parameter to a friendly station in scanner range, if possible.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetHomeStationForDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetHomeStationForDocking'''()&lt;br /&gt;
Sets the &amp;quot;oolite_dockingStation&amp;quot; parameter to the ship's home station.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetSelectedStationForDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetHomeStationForDocking'''()&lt;br /&gt;
Sets the &amp;quot;oolite_dockingStation&amp;quot; parameter to the station in the parameter &amp;quot;oolite_selectedStation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAppointGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAppointGroupLeader'''()&lt;br /&gt;
If the ship is in a group but the group has no leader, set one of the ships in the group to be the leader. Witchspace-capable ships will be preferred over those which are not.&lt;br /&gt;
&lt;br /&gt;
If the parameter &amp;quot;oolite_leaderRole&amp;quot; is set, the primary role of the new leader will be changed to that role.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationEscortGroupLeader&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationEscortGroupLeader'''()&lt;br /&gt;
If the ship is in a group and the group has a leader which is not this ship and the ship is not already escorting the group leader, and the parameter &amp;quot;oolite_escortRole&amp;quot; is set, then attempt to escort the group leader. The ship's primary role will be set to &amp;quot;oolite_escortRole&amp;quot; if the escort attempt is successful, and this role must therefore be a valid escort role.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationForgetCargoDemand&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationForgetCargoDemand'''()&lt;br /&gt;
If the ship has a cargo demand active (the demand must be stored on this ship, not just on a group member), discard it, and reset the &amp;quot;oolite_cargoDropped&amp;quot; parameter of this ship and all group members to zero.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationLeaveEscortGroup&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationLeaveEscortGroup'''()&lt;br /&gt;
If the ship is currently escorting another ship, leave the escort group.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationLightsOff&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationLightsOff'''()&lt;br /&gt;
Set the ship's flashers to the 'off' state.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationLightsOn&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationLightsOn'''()&lt;br /&gt;
Set the ship's flashers to the 'on' state.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSetRemoteControl&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSetRemoteControl'''()&lt;br /&gt;
If the ship has a group leader, set its own accuracy to that ship's accuracy. This is used by thargons when the mothership controlling them is changed.&lt;br /&gt;
&lt;br /&gt;
=== Navigation configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectPlanet&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectPlanet'''()&lt;br /&gt;
This function places a randomly selected planet or moon in the parameter &amp;quot;oolite_selectedPlanet&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectRandomTradeStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectRandomTradeStation'''()&lt;br /&gt;
This function places a suitable station in the parameter &amp;quot;oolite_selectedStation&amp;quot;. If the ship is clean, then 90% of the time this will be the main station. If the ship is an offender, but has a bounty not greater than the fine threshold, then 50% of the time this will be the main station.&lt;br /&gt;
&lt;br /&gt;
If the main station was not selected at the previous step, a random&lt;br /&gt;
friendly station will be selected (which may be the main station&lt;br /&gt;
anyway)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectShuttleDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectShuttleDestination'''()&lt;br /&gt;
This function selects a random planet or station. The entity selected must be at least 10km from the ship. If any such entities are within 5 times the radius of the main planet from the ship, more distant entities will be ignored.&lt;br /&gt;
&lt;br /&gt;
If the selected entity was a planet, it will be stored in &amp;quot;oolite_selectedPlanet&amp;quot;. Otherwise, it will be stored in &amp;quot;oolite_selectedStation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectWitchspaceDestination&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectWitchspaceDestination'''()&lt;br /&gt;
If the ship has no witchspace drive, unset the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter. If that parameter is already set, and is not the current system, and the ship has enough fuel to reach that system, do nothing. Otherwise, select a random system in range and place its ID in the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectWitchspaceDestinationInbound&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectWitchspaceDestination'''()&lt;br /&gt;
If the ship has no witchspace drive, unset the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter. If the ship's home system and destination system are unequal, select the next system on the route to the home system. Otherwise, select a random system in range and place its ID in the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationSelectWitchspaceDestinationOutbound&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationSelectWitchspaceDestination'''()&lt;br /&gt;
If the ship has no witchspace drive, unset the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter. If the ship's home system and destination system are unequal, select the next system on the route to the destination system. Otherwise, select a random system in range and place its ID in the &amp;quot;oolite_witchspaceDestination&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Station configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationStationReduceAlertLevel&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationStationReduceAlertLevel'''()&lt;br /&gt;
Reduce the alert level of the station by one stage if it is not already Green.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationStationValidateTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationStationValidateTarget'''()&lt;br /&gt;
Check that the station's current target is within scanner range, and discard it if not. This is necessary for stations as unlike ships their low-level behaviour does not generally do this automatically.&lt;br /&gt;
&lt;br /&gt;
=== Target acquisition configurations ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireCombatTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireCombatTarget'''()&lt;br /&gt;
If the ship's target is valid, not cargo and not an ally, keep the current target. Otherwise, promote one defense target to a target. If the ship has no defense targets, check to see if any ships in the group or escort group have a combat target (but do not check their defense targets).&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireDefensiveEscortTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireDefensiveEscortTarget'''()&lt;br /&gt;
Search the current group leader's target and defense targets for a visible ship attacking the group leader, and target it if one is found. Otherwise, retain current target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireHostileCombatTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireHostileCombatTarget'''()&lt;br /&gt;
As [[#configurationAcquireCombatTarget|configurationAcquireCombatTarget]] but only targets which are hostile (i.e. would be valid for [[#behaviourRepelTarget|behaviourRepelTarget]]) will be selected.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireOffensiveEscortTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireOffensiveEscortTarget'''()&lt;br /&gt;
If this ship's group leader is attacking a target, and this ship can see that target, acquire that target. Otherwise retain current target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquirePlayerAsTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquirePlayerAsTarget'''()&lt;br /&gt;
Set this ship's target to the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationAcquireScannedTarget&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationAcquireScannedTarget'''()&lt;br /&gt;
Set this ship's target to the entity in the parameter &amp;quot;oolite_scanResultSpecific&amp;quot;. This parameter is set by the [[#checkScannerWithPredicate|checkScannerWithPredicate]] function, which is usually called from a &amp;lt;code&amp;gt;conditionScannerContains...&amp;lt;/code&amp;gt; condition.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;configurationCheckScanner&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''configurationCheckScanner'''()&lt;br /&gt;
Scans the ship's scanner range, placing a list of detected targets into the &amp;quot;oolite_scanResults&amp;quot; parameter. This is generally called in a preconfiguration before the first use of a &amp;lt;code&amp;gt;conditionScannerContains...&amp;lt;/code&amp;gt; condition in the priority list. &lt;br /&gt;
&lt;br /&gt;
If the scanner is particularly full, the list will not contain all visible objects. The current scan limit is 16.&lt;br /&gt;
&lt;br /&gt;
== Response definition functions and components ==&lt;br /&gt;
&lt;br /&gt;
=== Response definition functions ===&lt;br /&gt;
&lt;br /&gt;
Response definition functions are used to set up event handlers in the AI script. They take an object as an argument, and add event handlers to that object. They do not return anything as such, but modify their argument.&lt;br /&gt;
&lt;br /&gt;
They are generally used in behaviour functions to set up common responses. &lt;br /&gt;
 var handlers = {}; // new handler object&lt;br /&gt;
 this.responsesAddStandard(handlers); // add standard response set&lt;br /&gt;
 // add a handler for this behaviour&lt;br /&gt;
 handlers.shipEnteredStationAegis = function(station)&lt;br /&gt;
 {&lt;br /&gt;
   this.ship.beaconCode = null; // stop transmitting&lt;br /&gt;
 }&lt;br /&gt;
 this.applyHandlers(handlers);&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddDocking&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddDocking'''(handlers : Object)&lt;br /&gt;
Provides some additional event handlers for use when docking with a station. &lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddEscort&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddEscort'''(handlers : Object)&lt;br /&gt;
Provides some additional event handlers for use when escorting a ship, and changes the response to in-group help requests.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddMissile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddMissile'''(handlers : Object)&lt;br /&gt;
A standard set of event handlers for missiles, which should be used instead of &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A number of script info keys are used to modify the responses.&lt;br /&gt;
* oolite_missile_blastPower, oolite_missile_blastRadius, oolite_missile_blastShaping: If oolite_missile_detonation is not set, the default detonation function calls this.ship.dealEnergyDamage with the defined power, radius, and shaping. If these parameters are not set the defaults are power 170, radius 32.5, and shaping 0.25.&lt;br /&gt;
* oolite_missile_detonation: names a function in the AI script. This function will be called when the missile reaches the desired range from its target or destination. If this function is not set, the oolite_missile_blast* keys are used to set up an explosion.&lt;br /&gt;
* oolite_missile_ecmResponse: names a function in the AI script. This function will be called if the missile detects an ECM pulse. If no function is set, the missile will self destruct.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddScooping&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddScooping'''(handlers : Object)&lt;br /&gt;
Provides some additional event handlers for use when scooping fuel.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddStandard'''(handlers : Object)&lt;br /&gt;
Sets up standard event handlers to detect and respond to attacks, and to manage other common events. Certain parameter flags are used:&lt;br /&gt;
* oolite_flag_allowPlanetaryLanding: if true, the ship will land on a planet if it receives the &amp;lt;code&amp;gt;approachingPlanetSurface&amp;lt;/code&amp;gt; event. Otherwise, it will immediately reconsider its behaviour.&lt;br /&gt;
* oolite_flag_listenForDistressCall: if true, the ship will set the &amp;quot;oolite_distressAggressor&amp;quot;, &amp;quot;oolite_distressSender&amp;quot; and &amp;quot;oolite_distressTimestamp&amp;quot; parameters if it receives a distress call.&lt;br /&gt;
* oolite_flag_markOffenders: if true, the ship will apply a small bounty increase to ships it sees committing crimes.&lt;br /&gt;
* oolite_flag_sendsDistressCalls: if true, the ship will send distress calls when attacked.&lt;br /&gt;
* oolite_flag_watchForCargo: if true, the ship will increment the &amp;quot;oolite_cargoDropped&amp;quot; parameter if cargo is dumped nearby.&lt;br /&gt;
&lt;br /&gt;
If multiple standard responses are being applied, this one should be the first one applied.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;responsesAddStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''responsesAddStation'''(handlers : Object)&lt;br /&gt;
A standard set of event handlers for stations, which should be used instead of &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;. The &amp;quot;oolite_flag_listenForDistressCall&amp;quot; and &amp;quot;oolite_flag_markOffenders&amp;quot; parameters have the same use as in &amp;lt;code&amp;gt;responsesAddStandard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Response definition components ===&lt;br /&gt;
&lt;br /&gt;
The components are standard event handlers used by the standard response functions. The following response components are available. Each is named &amp;quot;&amp;lt;code&amp;gt;responseComponent_''responseGroup''_''handlerName''&amp;lt;/code&amp;gt;&amp;quot;. You can use them in your own handler definition functions for efficiency.&lt;br /&gt;
 var handlers = {};&lt;br /&gt;
 handlers.approachingPlanetSurface = this.responseComponent_standard_approachingPlanetSurface;&lt;br /&gt;
 // .. etc ..&lt;br /&gt;
 this.applyHandlers(handlers);&lt;br /&gt;
&lt;br /&gt;
==== Standard components ====&lt;br /&gt;
Standard event handlers for normal ships.&lt;br /&gt;
 responseComponent_standard_approachingPlanetSurface&lt;br /&gt;
 responseComponent_standard_cargoDumpedNearby&lt;br /&gt;
 responseComponent_standard_cascadeWeaponDetected&lt;br /&gt;
 responseComponent_standard_commsMessageReceived&lt;br /&gt;
 responseComponent_standard_distressMessageReceived&lt;br /&gt;
 responseComponent_standard_escortAccepted&lt;br /&gt;
 responseComponent_standard_helpRequestReceived&lt;br /&gt;
 responseComponent_standard_offenceCommittedNearby&lt;br /&gt;
 responseComponent_standard_playerWillEnterWitchspace&lt;br /&gt;
 responseComponent_standard_shipAcceptedEscort&lt;br /&gt;
 responseComponent_standard_shipAchievedDesiredRange&lt;br /&gt;
 responseComponent_standard_shipAttackedOther&lt;br /&gt;
 responseComponent_standard_shipAttackedWithMissile&lt;br /&gt;
 responseComponent_standard_shipAttackerDistracted&lt;br /&gt;
 responseComponent_standard_shipBeingAttacked&lt;br /&gt;
 responseComponent_standard_shipBeingAttackedUnsuccessfully&lt;br /&gt;
 responseComponent_standard_shipFiredMissile&lt;br /&gt;
 responseComponent_standard_shipKilledOther&lt;br /&gt;
 responseComponent_standard_shipLaunchedEscapePod&lt;br /&gt;
 responseComponent_standard_shipLaunchedFromStation&lt;br /&gt;
 responseComponent_standard_shipScoopedOther&lt;br /&gt;
 responseComponent_standard_shipTargetLost&lt;br /&gt;
 responseComponent_standard_shipWillEnterWormhole&lt;br /&gt;
 responseComponent_standard_shipWitchspaceBlocked&lt;br /&gt;
 responseComponent_standard_wormholeSuggested&lt;br /&gt;
 &lt;br /&gt;
==== Missile components ====&lt;br /&gt;
Standard event handlers for missiles.&lt;br /&gt;
 responseComponent_missile_commsMessageReceived&lt;br /&gt;
 responseComponent_missile_shipHitByECM&lt;br /&gt;
 responseComponent_missile_shipTargetCloaked&lt;br /&gt;
 responseComponent_missile_shipTargetLost&lt;br /&gt;
 responseComponent_missile_shipAchievedDesiredRange&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Station components ====&lt;br /&gt;
Standard event handlers for stations.&lt;br /&gt;
 responseComponent_station_commsMessageReceived&lt;br /&gt;
 responseComponent_station_cascadeWeaponDetected&lt;br /&gt;
 responseComponent_station_shipAttackedWithMissile&lt;br /&gt;
 responseComponent_station_shipBeingAttacked&lt;br /&gt;
 responseComponent_station_shipAttackedOther&lt;br /&gt;
 responseComponent_station_shipFiredMissile&lt;br /&gt;
 responseComponent_station_shipKilledOther&lt;br /&gt;
 responseComponent_station_shipTargetLost&lt;br /&gt;
 responseComponent_station_helpRequestReceived&lt;br /&gt;
 responseComponent_station_distressMessageReceived&lt;br /&gt;
 responseComponent_station_offenceCommittedNearby&lt;br /&gt;
&lt;br /&gt;
==== Docking components ====&lt;br /&gt;
Alternative event handlers for docking ships.&lt;br /&gt;
 responseComponent_docking_shipAchievedDesiredRange&lt;br /&gt;
 responseComponent_docking_stationWithdrewDockingClearance&lt;br /&gt;
 responseComponent_docking_shipAIFrustrated&lt;br /&gt;
&lt;br /&gt;
==== Escort components ====&lt;br /&gt;
Alternative event handlers for escorts.&lt;br /&gt;
 responseComponent_escort_escortDock&lt;br /&gt;
 responseComponent_escort_helpRequestReceived&lt;br /&gt;
&lt;br /&gt;
==== Expect-witchspace components ====&lt;br /&gt;
Alternative event handlers for ships expecting that their target might enter witchspace to escape&lt;br /&gt;
 responseComponent_expectWitchspace_shipTargetLost&lt;br /&gt;
&lt;br /&gt;
==== Scooping components ====&lt;br /&gt;
Alternative event handlers for ships scooping fuel.&lt;br /&gt;
 responseComponent_scooping_shipAchievedDesiredRange&lt;br /&gt;
 responseComponent_scooping_shipScoopedFuel&lt;br /&gt;
&lt;br /&gt;
==== Track-player components ====&lt;br /&gt;
Alternative event handlers for ships following the player.&lt;br /&gt;
 responseComponent_trackPlayer_playerWillEnterWitchspace&lt;br /&gt;
&lt;br /&gt;
== Template functions ==&lt;br /&gt;
&lt;br /&gt;
These functions return standard blocks of priorities for insertion into a priority list. Each of them returns an array, so can be used as a branch in its own right, or concatenated on to an existing array. Remember that unlike a standard priority entry, you need the result of these functions, not a reference to the function.&lt;br /&gt;
 {&lt;br /&gt;
   condition: ai.conditionInCombat,&lt;br /&gt;
   falsebranch: ai.templateReturnToBase()&lt;br /&gt;
 }&lt;br /&gt;
or&lt;br /&gt;
 priorities.concat(ai.templateReturnToBase());&lt;br /&gt;
&lt;br /&gt;
==== templateLeadHuntingMission ====&lt;br /&gt;
 function '''templateLeadHuntingMission'''() : Array&lt;br /&gt;
Return the priorities for leading a patrol between waypoints. Setting the waypoint generator and handling fighting and scanning along the course of the patrol should be handled by higher priorities.&lt;br /&gt;
&lt;br /&gt;
==== templateLeadPirateMission ====&lt;br /&gt;
 function '''templateLeadPirateMission'''() : Array&lt;br /&gt;
Return the priorities for selecting targets to rob if any are about, or moving to a suitable lurk position otherwise.&lt;br /&gt;
&lt;br /&gt;
==== templateReturnToBase ====&lt;br /&gt;
 function '''templateReturnToBase'''() : Array&lt;br /&gt;
Return the priorities for travelling to and docking with a suitable station.&lt;br /&gt;
&lt;br /&gt;
==== templateReturnToBaseOrPlanet ====&lt;br /&gt;
 function '''templateReturnToBaseOrPlanet'''() : Array&lt;br /&gt;
Return the priorities for travelling to and docking with a suitable station, or landing on a planet if no suitable stations are found.&lt;br /&gt;
&lt;br /&gt;
==== templateWitchspaceJumpAnywhere ====&lt;br /&gt;
 function '''templateWitchspaceJumpAnywhere'''() : Array&lt;br /&gt;
Returns priorities for getting the ship out of the current system somehow - either by jumping out, or by finding a wormhole to hitchhike.&lt;br /&gt;
&lt;br /&gt;
==== templateWitchspaceJumpInbound ====&lt;br /&gt;
 function '''templateWitchspaceJumpInbound'''() : Array&lt;br /&gt;
Returns priorities for jumping closer to the home system, sunskimming if fuel is short. You should previously have checked that the ship is not in the home system.&lt;br /&gt;
&lt;br /&gt;
==== templateWitchspaceJumpOutbound ====&lt;br /&gt;
 function '''templateWitchspaceJumpOutbound'''() : Array&lt;br /&gt;
Returns priorities for jumping closer to the destination system, sunskimming if fuel is short. You should previously have checked that the ship is not in the destination system.&lt;br /&gt;
&lt;br /&gt;
== Utility functions ==&lt;br /&gt;
&lt;br /&gt;
These functions are provided to make standardised checks easier to write and to wrap certain ship methods to make them easier to work with in the AI controller.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;allied&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''allied'''(ship1, ship2) : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the two ships are considered allied, false otherwise. Ships are considered allied if they are in the same group, or if they are escorts of ships in the same group.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;broadcastDistressMessage&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''broadcastDistressMessage'''()&lt;br /&gt;
Broadcasts a distress message, but with a delay to ensure that [[Oolite_JavaScript_Reference:_Ship#broadcastDistressMessage|ship.broadcastDistressMessage()]] is not called too often.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;checkScannerWithPredicate&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''checkScannerWithPredicate'''(function) : Boolean&lt;br /&gt;
Called after configurationCheckScanner to locate a ship on the scanner matching a particular predicate. The predicate function must take a Ship, and return a Boolean.&lt;br /&gt;
&lt;br /&gt;
If the predicate function matches a ship, the first such match will be stored in the parameter &amp;lt;code&amp;gt;&amp;quot;oolite_scanResultSpecific&amp;quot;&amp;lt;/code&amp;gt;, and the method will return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. Otherwise the method returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;cruiseSpeed&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''cruiseSpeed'''() : Number&lt;br /&gt;
Returns a suitable speed for the ship to travel at if it is interested in preserving group or escort coherence. Generally this will be 80% of its maximum speed, but it will be slower if other group members or escorts are slower.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;distance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''distance'''(position : [[Oolite_JavaScript_Reference:_Vector3D#Vector_Expressions|vectorExpression]])&lt;br /&gt;
Returns the distance to the given coordinates. This is more efficient than calling &amp;lt;code&amp;gt;this.ship.position.distanceTo(position)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;entityCommsParams&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''entityCommsParams'''(entity : Entity) : Object&lt;br /&gt;
Returns an object of communications parameters relating to the given entity. Used internally by [[#communicate|communicate()]] but may be of use elsewhere.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;fineThreshold&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''fineThreshold'''() : Number&lt;br /&gt;
The maximum bounty at which an offender should be fined rather than attacked by police ships. (Ships caught redhanded may be attacked regardless of bounty)  Varies from system to system.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;friendlyStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''friendlyStation'''(station) : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the station is friendly to the current ship, false otherwise. The main station is unfriendly to Fugitive ships and Offenders above the current [[#fineThreshold|fineThreshold]]. Other stations are only considered unfriendly to their current combat target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;homeStation&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''homeStation'''() : Boolean&lt;br /&gt;
Returns the home station of this ship. If the ship has an owner, and&lt;br /&gt;
the owner is a station, then that is the home station. Otherwise, the&lt;br /&gt;
first station in the ship's group is returned.&lt;br /&gt;
&lt;br /&gt;
If no home station can be found, returns &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ignorePlayerFriendlyFire&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''ignorePlayerFriendlyFire'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if this ship should ignore friendly fire from the player as they would for a known ally. Note that this function's results will change if called repeatedly, so you should only call it once per instance of friendly fire, and never call it speculatively. &lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;isAggressive&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''isAggressive'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the ship is an active danger to its current target (approximately: it is in a combat behaviour other than fleeing)&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;isEscaping&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''isEscaping'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the ship is successfully running away from this ship (i.e. it is not attacking, it is travelling faster than this ship can, and it is already outside effective weapons range.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;isFighting&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''isAggressive'''() : Boolean&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the ship is in combat (including fleeing). Similar to &amp;lt;code&amp;gt;ship.hasHostileTarget&amp;lt;/code&amp;gt; but works for stations as well.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;noteDistraction&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''noteDistraction'''(whom : Entity)&lt;br /&gt;
If this ship is switching combat targets because another ship distracted it, then call this function just before switching. &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt; is the entity that this ship will soon switch to attacking. This calls the &amp;lt;code&amp;gt;shipAttackerDistracted&amp;lt;/code&amp;gt; event handler on the current target.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;oddsAssessment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''oddsAssessment'''() : Number&lt;br /&gt;
Carry out an odds assessment of this ship's group versus the target ship's group. This will return a positive number of the ratio between the two values, with a number greater than 1 implying that this ship's group is stronger, and a number less than 1 implying the target's group is stronger. The odds assessment of the target group will omit certain information unless the target is currently in combat. Ships outside of scanner range, whether friendly or hostile, will also be ignored in the assessment.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;playerRoleAssessment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''playerRoleAssessment'''() : String&lt;br /&gt;
Determines a single perceived role for the player based on [[Oolite_JavaScript_Reference:_Player#roleWeights|player.roleWeights]]. In general, the perception will be the same for all ships in a group. This can then be used with [[Oolite_JavaScript_Reference:_Ship#roleIsInCategory|Ship.roleIsInCategory]] to determine the appropriate response.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;respondToThargoids&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''respondToThargoids'''(whom : Ship, passon : Boolean) : Boolean&lt;br /&gt;
This function causes the ship (and if the &amp;lt;code&amp;gt;passon&amp;lt;/code&amp;gt; parameter is set, its group members) to respond to the appearance of the Thargoid ship &amp;lt;code&amp;gt;whom&amp;lt;/code&amp;gt;. It will return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if this ship responds, or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; if not.&lt;br /&gt;
&lt;br /&gt;
You must ensure that ships responding to a Thargoid as a result of a notification by a group member do not themselves set &amp;lt;code&amp;gt;passon&amp;lt;/code&amp;gt; as this may cause an infinite loop.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;setWitchspaceRouteTo&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''setWitchspaceRouteTo'''(dest : Number)&lt;br /&gt;
This function sets the &amp;lt;code&amp;gt;oolite_witchspaceDestination&amp;lt;/code&amp;gt; parameter according to the needs of reaching the system with the system ID equal to &amp;lt;code&amp;gt;dest&amp;lt;/code&amp;gt;. As this function involves route planning, which is relatively slow, it should be called only rarely. This can then be used to determine whether to refuel or attempt to jump.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipHasRiskyContracts&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''shipHasRiskyContracts'''(ship : Ship) : Boolean&lt;br /&gt;
Sometimes returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; (non-deterministically) if the target ship is carrying contracts that someone might want assassinated or destroyed. The chance of returning &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; increases with the number of risky contracts carried. Currently this will always return &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for a non-player ship: you can check these with the &amp;lt;code&amp;gt;oolite-courier&amp;lt;/code&amp;gt; role category instead.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;shipInRoleCategory&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''shipInRoleCategory'''(ship : Ship, category : String) : Boolean&lt;br /&gt;
This is a wrapper around &amp;lt;code&amp;gt;Ship.roleIsInCategory&amp;lt;/code&amp;gt; which accounts for the player's effective role not being the same as &amp;lt;code&amp;gt;player.ship.primaryRole&amp;lt;/code&amp;gt;. You should generally call this instead of calling &amp;lt;code&amp;gt;Ship.roleIsInCategory&amp;lt;/code&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;stationAllegiance&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''stationAllegiance'''(station : Station) : String&lt;br /&gt;
Returns &amp;lt;code&amp;gt;station.allegiance&amp;lt;/code&amp;gt; for the given station, but if this is null (as it will be for pre-1.79 stations), first sets it using a heuristic calculation.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;threatAssessment&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''threatAssessment'''(ship : Ship, full : Boolean) : Number&lt;br /&gt;
This is a wrapper around &amp;lt;code&amp;gt;[[#_threatAssessment|_threatAssessment]]&amp;lt;/code&amp;gt; which is itself a wrapper around &amp;lt;code&amp;gt;[[Oolite_JavaScript_Reference:_Ship#threatAssessment|ship.threatAssessment()]]&amp;lt;/code&amp;gt;. The combination of the two ensures that the assessment is correct for the relative combat states of this ship and the ship being assessed, as well as including effects of the player's reputation.&lt;br /&gt;
&lt;br /&gt;
== Waypoint Generators ==&lt;br /&gt;
&lt;br /&gt;
Waypoint generators are used to set patrol or other multipoint routes. When called, they should consider the ship's current position (and possibly other things), and then set the parameters &amp;quot;oolite_waypoint&amp;quot; and &amp;quot;oolite_waypointRange&amp;quot;. These functions have no arguments and no return value.&lt;br /&gt;
&lt;br /&gt;
In general, you should only call a waypoint generator if a waypoint is not already set.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;waypointsSpacelanePatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''waypointsSpacelanePatrol'''()&lt;br /&gt;
If the ship is near the main planet, sun, or witchpoint, pick one of the other two points (biased towards the witchpoint-planet route) and set that as the waypoint. Otherwise, if the ship is on a lane already, pick one end of the lane at random. Otherwise, pick the planet.&lt;br /&gt;
&lt;br /&gt;
Set a waypoint within 7500m of the witchpoint, 2 radii of the centre of the planet, or 2.5 radii of the centre of the sun.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;waypointsStationPatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''waypointsStationPatrol'''()&lt;br /&gt;
If the ship has a station as its group leader, define waypoints from that station. Otherwise define them from the main station. If there is no main station either, set the witchpoint as the waypoint.&lt;br /&gt;
&lt;br /&gt;
If there is a station, pick four points describing a square of diagonal length 50km centred on the station and lying in the station's xy plane. If the ship is not within 500 metres of any of these points, select one of the points as the waypoint. Otherwise, select the next point around the list as the waypoint.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;waypointsWitchpointPatrol&amp;lt;/code&amp;gt; ====&lt;br /&gt;
 function '''waypointsWitchpointPatrol'''()&lt;br /&gt;
&lt;br /&gt;
Pick four points describing a square of diagonal length 30km centred on the witchpoint and lying approximately in the system's xy plane. If the ship is not within 500 metres of any of these points, select one of the points as the waypoint. Otherwise, select the next point around the list as the waypoint.&lt;br /&gt;
&lt;br /&gt;
== Global Configuration ==&lt;br /&gt;
All PriorityAIControllers share a single communications message library. This library may be edited using functions in the priority AI worldscript&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
When a key is asked for, the communications library will be checked in the following order:&lt;br /&gt;
# for a key with the specified role and personality&lt;br /&gt;
# if the role does not start with &amp;quot;_&amp;quot;, a key with the specified personality and the role &amp;quot;generic&amp;quot;&lt;br /&gt;
# if the personality does not start with &amp;quot;_&amp;quot;, a key with the specified role and the personality &amp;quot;generic&amp;quot;&lt;br /&gt;
# if neither role nor personality start with &amp;quot;_&amp;quot;, a key with &amp;quot;generic&amp;quot; role and personality.&lt;br /&gt;
In general, setting keys for the generic role (and especially with a generic personality as well) should be used with caution.&lt;br /&gt;
&lt;br /&gt;
The key's value is then expanded using expandDescription (possibly with added parameters), so entries in [[descriptions.plist]] may be used to add variety to the communications. Alternatively, a static text string also works as the value.&lt;br /&gt;
&lt;br /&gt;
==== Standard Communications Keys ====&lt;br /&gt;
&lt;br /&gt;
The following communications keys are currently defined in standard Oolite, but you can define more. Those with a parameter of Ship can have a Ship object passed to them, which will be replaced with definitions for the parameters &amp;quot;oolite_entityClass&amp;quot;, &amp;quot;oolite_entityCrew&amp;quot; and &amp;quot;oolite_entityName&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== oolite_agreeingToDumpCargo =====&lt;br /&gt;
 Parameter: &amp;quot;oolite_demandSize&amp;quot; (size of demand in TC)&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when a ship dumps cargo to satisfy a pirate demand&lt;br /&gt;
&lt;br /&gt;
===== oolite_attackLowEnergy =====&lt;br /&gt;
 Parameter: Ship,&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when requesting help as under attack and close to death&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAssassination =====&lt;br /&gt;
 Parameter: Ship, plus &amp;quot;oolite_entityContracts&amp;quot; parameter&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing a fight with the Ship defined in the parameter, like [[#oolite_beginningFight|oolite_beginningFight]], but specifically for an assassination target. The extra communications parameter contains the name of a passenger (or parcel owner) relevant to this ship (for the player, this may intentionally be someone for whom delivery has been completed - either it's a revenge hit, or they're just working from outdated intelligence)&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAttack =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing an attack on the Ship defined in the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAttackInanimate =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing an attack on the Ship (expected to be an uncrewed object like an asteroid, cargo pod, etc.) defined in the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningAttackThargoid =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing an attack on the Ship (expected to be a Thargoid ship) defined in the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_beginningFight =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when commencing a fight with the Ship defined in the parameter. (Beginning Attack means attacking a target previously not under attack but which there may have been a reason to fight from previous combats; Beginning Fight is stronger - this ship is initiating hostilities)&lt;br /&gt;
&lt;br /&gt;
===== oolite_continueFleeing =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when the ship has been unable to reach safety from its attacker.&lt;br /&gt;
&lt;br /&gt;
===== oolite_continuingAttack =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when continuing an attack on the Ship defined in the parameter (the low priority means this is relatively rarely used, of course)&lt;br /&gt;
&lt;br /&gt;
===== oolite_continuingAttackInanimate =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when continuing an attack on the Ship (if likely to be uncrewed) defined in the parameter (the low priority means this is relatively rarely used, of course)&lt;br /&gt;
&lt;br /&gt;
===== oolite_continuingAttackThargoid =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when continuing an attack on the Ship (if Thargoid) defined in the parameter (the low priority means this is relatively rarely used, of course)&lt;br /&gt;
&lt;br /&gt;
===== oolite_distressResponseAggressor =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used to threaten the ship a distress call has been sent about.&lt;br /&gt;
&lt;br /&gt;
===== oolite_distressResponseSender =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2 or 3&lt;br /&gt;
Used to reassure a ship sending a distress call that help is on the way. [[#oolite_distressResponseAggressor|oolite_distressResponseAggressor]] is preferred - this will only be used if the ship sending the message is near the sender but not the aggressor.&lt;br /&gt;
&lt;br /&gt;
===== oolite_dockingWait =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship is waiting in a docking queue.&lt;br /&gt;
&lt;br /&gt;
===== oolite_eject =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when a ship launches an escape pod (the communication comes from the ship, not the pod, as the pod is being launched)&lt;br /&gt;
&lt;br /&gt;
===== oolite_engageWitchspaceDrive =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a lone ship is beginning its witchspace entry sequence, and is expected to enter witchspace in around 15 seconds.&lt;br /&gt;
&lt;br /&gt;
===== oolite_engageWitchspaceDriveFlee =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when a ship is preparing to escape from a fight by making a witchspace jump&lt;br /&gt;
&lt;br /&gt;
===== oolite_engageWitchspaceDriveGroup =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a grouped ship is beginning its witchspace entry sequence, and is expected to enter witchspace in around 15 seconds.&lt;br /&gt;
&lt;br /&gt;
===== oolite_escortAccepted =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when a ship accepts a new escort. The new escort will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_escortFormation =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship is entering or maintaining escort formation. The mothership will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_escortMotherAccepted =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used when a ship is accepted as a new escort. The ship being escorted will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_firedMissile =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when firing a missile. The target of the missile will be passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_friendlyFire =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2, 3 or 4 depending on circumstances&lt;br /&gt;
Used when a ship is hit by weapons fire from another ship it considers &amp;quot;on its side&amp;quot; either because of common group or because of similar roles.&lt;br /&gt;
&lt;br /&gt;
===== oolite_groupIsOutnumbered =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 2 if group leader, 4 otherwise&lt;br /&gt;
Used when a ship realises it is in a fight with a group which seriously outclasses it, and therefore should flee.&lt;br /&gt;
&lt;br /&gt;
===== oolite_hitTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when the ship hits its target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_incomingMissile =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship has had a missile launched at it and is unable to use ECM. The missile is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedAlly =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship destroys an allied ship. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2 (3 for stations)&lt;br /&gt;
Used when the ship destroys its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedNonTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship destroys something other than its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedUncrewedTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3 (4 for stations)&lt;br /&gt;
Used when the ship destroys an uncrewed object which is its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_killedUncrewedNonTarget =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3 (4 for stations)&lt;br /&gt;
Used when the ship destroys an uncrewed object other than its current target. The target is passed as the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_landingOnPlanet =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when beginning final landing approach to a planet.&lt;br /&gt;
&lt;br /&gt;
===== oolite_launchDefenseShips, oolite_launchMiner, oolite_launchPatrol, oolite_launchSalvager =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a station launches a ship of a particular type. The parameter is the station's current target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_leaveVicinity =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a ship is executing [[#behaviourLeaveVicinityOfDestination|behaviourLeaveVicinityOfDestination]]. The parameter is the current target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_makeDistressCall =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
Used as the message when a distress call is sent. The parameter is the ship's primary aggressor.&lt;br /&gt;
&lt;br /&gt;
===== oolite_makePirateDemand =====&lt;br /&gt;
 Parameter: Ship and &amp;quot;oolite_demandSize&amp;quot;&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when making a piracy demand on a ship. The Ship parameters are from the ship being robbed.&lt;br /&gt;
&lt;br /&gt;
===== oolite_markForFines =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 1&lt;br /&gt;
Used when a police ship is marking another ship for fines on docking. The parameter is the ship being marked.&lt;br /&gt;
&lt;br /&gt;
===== oolite_mining =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when carrying out mining activity&lt;br /&gt;
&lt;br /&gt;
===== oolite_newAssailiant =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when the ship is attacked by someone not previously considered hostile. The attacker is the parameter.&lt;br /&gt;
&lt;br /&gt;
===== oolite_offenceDetected =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3 if this increases the aggressor's bounty, 4 otherwise&lt;br /&gt;
Used when a police ship detects illegal hostilities. The parameter is the aggressor.&lt;br /&gt;
&lt;br /&gt;
===== oolite_patrolReportIn =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a station patrol ship reaches a waypoint. The parameter is its parent station.&lt;br /&gt;
&lt;br /&gt;
===== oolite_quiriumCascade =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a quirium cascade or an imminent cascade is detected.&lt;br /&gt;
&lt;br /&gt;
===== oolite_scoopedCargo =====&lt;br /&gt;
 Parameter: &amp;quot;oolite_goodsDescription&amp;quot; is a description of the cargo commodity&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when this ship scoops cargo.&lt;br /&gt;
&lt;br /&gt;
===== oolite_selectedStation =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship selects a station to navigate to (e.g. traders, shuttles). The parameter is the selected station.&lt;br /&gt;
&lt;br /&gt;
===== oolite_selectedWitchspaceDestination =====&lt;br /&gt;
 Parameter: &amp;quot;oolite_witchspaceDestination&amp;quot; is the name of the destination system&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship selects its witchspace destination.&lt;br /&gt;
&lt;br /&gt;
===== oolite_startFleeing =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Used when a ship begins fleeing combat, with the parameter being the ship's current target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_startHelping =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 4&lt;br /&gt;
Used when a ship responds to a request for help from another grouped ship by changing its target. The parameter is the new target.&lt;br /&gt;
&lt;br /&gt;
===== oolite_surrender =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 3&lt;br /&gt;
Messages sent by fleeing ships still being fired upon, in attempt to beg for mercy. [[#oolite_agreeingToDumpCargo|oolite_agreeingToDumpCargo]] is used instead in the one case in the core game where an attacker might accept a surrender (as opposed to breaking off an attack on a fleeing ship to attack a non-fleeing one)&lt;br /&gt;
&lt;br /&gt;
===== oolite_thanksForHelp =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 1 if thanking the player, 3 otherwise&lt;br /&gt;
This message is sent if an attack on this ship's aggressor causes it to break off its own attack. The parameter is the ship helping out.&lt;br /&gt;
&lt;br /&gt;
===== oolite_thargoidAttack =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 2&lt;br /&gt;
This message is sent if the ship is attacked by a Thargoid ship while not previously fighting Thargoids. The parameter is the Thargoid ship. This is generally accompanied by a quick cessation of hostilities between Cooperative vessels for a short-term truce against the invaders.&lt;br /&gt;
&lt;br /&gt;
===== oolite_waypointReached =====&lt;br /&gt;
 Parameter: none&lt;br /&gt;
 Priority: 3&lt;br /&gt;
This message is sent when a ship reaches a waypoint set with the waypoint generator function.&lt;br /&gt;
&lt;br /&gt;
===== oolite_witchspaceBlocked =====&lt;br /&gt;
 Parameter: Ship&lt;br /&gt;
 Priority: 3&lt;br /&gt;
This message is sent when a large nearby mass (usually a station or asteroid) prevents witchspace entry. The parameter is the blocking mass.&lt;br /&gt;
&lt;br /&gt;
==== Standard Communications Roles ====&lt;br /&gt;
&lt;br /&gt;
The following communications roles are used by the standard Oolite AIs. Some of the roles have fallback roles used by the standard AIs, noted below. If the fallback role does not exist, or is not specified, it will fall back to using &amp;quot;generic&amp;quot; as usual.&lt;br /&gt;
&lt;br /&gt;
Note that OXP AIs might not specify the same fallback roles. OXP AIs wishing to can use code like&lt;br /&gt;
&lt;br /&gt;
 if (worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;]._getCommunicationPersonalities(&amp;quot;hermit&amp;quot;).length &amp;gt; 0)&lt;br /&gt;
 {&lt;br /&gt;
 	ai.setCommunicationsRole(&amp;quot;hermit&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
 	ai.setCommunicationsRole(&amp;quot;station&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''assassin''' - assassins&lt;br /&gt;
* '''defenseShip''' - defense ships&lt;br /&gt;
* '''escapepod''' - escape pods&lt;br /&gt;
* '''escort''' - escorts&lt;br /&gt;
* '''hermit''' - rock hermits. If no personalities are defined for this role, &amp;quot;station&amp;quot; will be used instead.&lt;br /&gt;
* '''hunter''' - bounty hunters&lt;br /&gt;
* '''pirate''' - pirates&lt;br /&gt;
* '''pirate-aegis-raider''' - pirates showing off by attacking the main station. If no personalities are defined for this role, &amp;quot;pirate&amp;quot; will be used instead.&lt;br /&gt;
* '''pirate-freighter''' - pirate freighters leading a pack. If no personalities are defined for this role, &amp;quot;pirate&amp;quot; will be used instead.&lt;br /&gt;
* '''pirate-interceptor''' - pirates assigned to distract police and hunters. If no personalities are defined for this role, &amp;quot;pirate&amp;quot; will be used instead.&lt;br /&gt;
* '''police''' - police ships&lt;br /&gt;
* '''scavenger''' - scavengers and miners.&lt;br /&gt;
* '''shuttle''' - orbital shuttles (usually unarmed)&lt;br /&gt;
* '''station''' - stations.&lt;br /&gt;
* '''trader''' - traders&lt;br /&gt;
* '''trader-courier''' - couriers. If no personalities are defined for this role, &amp;quot;trader&amp;quot; will be used instead.&lt;br /&gt;
* '''trader-opportunist''' - opportunistic traders. If no personalities are defined for this role, &amp;quot;trader&amp;quot; will be used instead.&lt;br /&gt;
* '''trader-smuggler''' - smugglers. If no personalities are defined for this role, &amp;quot;trader&amp;quot; will be used instead.&lt;br /&gt;
&lt;br /&gt;
Thargoids are set slightly differently: all the core game ones get the &amp;quot;_thargoid&amp;quot; role, with the warships getting the &amp;quot;thargoid&amp;quot; personality, and the drones getting the &amp;quot;tharglet&amp;quot; personality, even if those personalities are not otherwise defined. Note that the underscore in the role prevents fallback to &amp;quot;generic&amp;quot; messages here.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
==== _getCommunication ====&lt;br /&gt;
 function '''_getCommunication'''(role : String, personality : String, key : String) : StringOrFunction&lt;br /&gt;
This function returns either a string suitable for passing to &amp;lt;code&amp;gt;expandDescription&amp;lt;/code&amp;gt; containing the communications for the specified key, or a function called with key and parameters returning a communications string, if a ship of the specified role and personality is speaking.&lt;br /&gt;
&lt;br /&gt;
==== _getCommunicationPersonalities ====&lt;br /&gt;
 function '''_getCommunicationPersonalities'''(role : String) : Array&lt;br /&gt;
Returns the personalities which have at least one communication key defined for the given role.&lt;br /&gt;
&lt;br /&gt;
==== _setCommunication ====&lt;br /&gt;
 function '''_setCommunication'''(role : String, personality : String, key : String, value : StringOrFunction)&lt;br /&gt;
This function sets the communications values returned by [[#_getCommunication|getCommunication]]. The value may either be:&lt;br /&gt;
* a String, which will be passed to expandDescription&lt;br /&gt;
* a Function, which will be called with two parameters: the key, and the parameters object.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
 worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;]._setCommunication(&amp;quot;myoxp_role&amp;quot;,&amp;quot;generic&amp;quot;,&lt;br /&gt;
     &amp;quot;oolite_continuingAttack&amp;quot;,&amp;quot;[myoxp_role_continuesAttack]&amp;quot;);&lt;br /&gt;
 worldScripts[&amp;quot;oolite-libPriorityAI&amp;quot;]._setCommunication(&amp;quot;myoxp_role&amp;quot;,&amp;quot;generic&amp;quot;,&lt;br /&gt;
     &amp;quot;oolite_continuingAttack&amp;quot;,function(k,p) { return &amp;quot;Targeting the &amp;quot;+p.oolite_entityName+&amp;quot;. Cover me.&amp;quot;; });&lt;br /&gt;
&lt;br /&gt;
==== _setCommunications ====&lt;br /&gt;
 function '''_setCommunications'''(comms : Object)&lt;br /&gt;
This function can be used to set multiple communications keys at once. The format of the object is&lt;br /&gt;
 comms[role][personality][key] = value;&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=User_talk:Phasted&amp;diff=40662</id>
		<title>User talk:Phasted</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=User_talk:Phasted&amp;diff=40662"/>
		<updated>2014-07-31T10:01:29Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Real-Life Economics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Real-Life Economics ==&lt;br /&gt;
&lt;br /&gt;
Hi, you created the article [[Real-Life Economics]], but removed its content later on. Why? Greetings: [[User:Makarius|Makarius]] 07:59, 14 July 2014 (BST)&lt;br /&gt;
&lt;br /&gt;
I just decided it would be easier to write it as a text file and cut-and-paste it into place later...&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40352</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40352"/>
		<updated>2014-07-07T14:44:35Z</updated>

		<summary type="html">&lt;p&gt;Phasted: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40346</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40346"/>
		<updated>2014-07-07T14:34:49Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Why this OXP?==&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing ''Elite'' on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's just laughable to think that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such a price disparity could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
Prices aren't just random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
&lt;br /&gt;
The EconBalance for any system is determined using a formula that takes a number of variables into account, including: &lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;ul style = &amp;quot;font-size:14px;list-style:circle outside none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li style = &amp;quot;font-weight:700&amp;quot;&amp;gt;Economy Type and Distance&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style = &amp;quot;font-size:12px;font-weight:200&amp;quot;&amp;gt;Wealthy systems (RichAg and RichInd) have the greatest influence on EconBalance.  AvAg and AvInd systems have slightly less impact.  PoorAg and PoorInd systems have even less influence, and MainlyAg and MainlyInd have the least of all.&lt;br /&gt;
&lt;br /&gt;
Distance is also a factor.  A RichInd system at 5.2 LY distance will have less effect on EconBalance than that same RichInd system at a distance of 0.4 LY.&amp;lt;br&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style = &amp;quot;font-weight:700&amp;quot;&amp;gt;Nearest Agricultural and Nearest Industrial Systems&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style = &amp;quot;font-size:12px;font-weight:200&amp;quot;&amp;gt;The distance in LY to the nearest Agricultural system (excluding MainlyAg) is subtracted from the distance in LY to the nearest Industrial system (excluding MainlyInd).  The result is added to EconBalance.&amp;lt;br&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style = &amp;quot;font-weight:700&amp;quot;&amp;gt;Agricultural Economies in Range and Industrial Economies in Range&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style = &amp;quot;font-size:12px;font-weight:200&amp;quot;&amp;gt;The number of Industrial economies in the cluster (MainlyInd count as 0.4) is subtracted from the number of Agricultural economies in the cluster (MainlyAg count as 0.4).  The result is added to EconBalance.&lt;br /&gt;
&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How this OXP works =&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Oolite_JavaScript_Reference:_Manifest&amp;diff=40340</id>
		<title>Oolite JavaScript Reference: Manifest</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Oolite_JavaScript_Reference:_Manifest&amp;diff=40340"/>
		<updated>2014-07-07T07:27:31Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Behaviour notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;'''Prototype:''' &amp;lt;code&amp;gt;Object&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;
'''&amp;lt;code&amp;gt;Manifest&amp;lt;/code&amp;gt;''' provides direct access to the cargo carried by the player.&lt;br /&gt;
&lt;br /&gt;
Except &amp;lt;code&amp;gt;[[#list|list]]&amp;lt;/code&amp;gt;, each property is an integer representing the quantity of a certain commodity. The units depend on the commodity, just as on the trading screen.&lt;br /&gt;
&lt;br /&gt;
=== Behaviour notes ===&lt;br /&gt;
When increasing a commodity, extra cargo beyond the ship’s capacity is discarded silently. For example, if the ship has 6 t of space available, and you add 10 to &amp;lt;code&amp;gt;player.ship.manifest.food&amp;lt;/code&amp;gt;, only 6 t of food will be awarded.&lt;br /&gt;
&lt;br /&gt;
For gold and platinum, 500 kg or more rounds up to 1 t, below 500 kg counts as 0 t in [[Oolite JavaScript Reference: Ship#cargoSpaceAvailable|cargo space]] calculations. This means a script can add up to 499 kg of gold or platinum into a nominally full hold. (The player himself can buy unlimited quantities at the market screen.) In the same way, 500 000 g of gemstones is rounded up to 1 t. (If you feel tempted to award the player half a tonne of gemstones, keep in mind that one can only sell up to 127 units of a commodity at a given station using the trading screen.)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 if (player.ship.[[Oolite JavaScript Reference: Ship#cargoSpaceAvailable|cargoSpaceAvailable]] &amp;gt;= 10)&lt;br /&gt;
 {&lt;br /&gt;
     player.ship.manifest.food += 10;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Cargo marshalling ===&lt;br /&gt;
When a player launches, all cargo from the manifest is loaded in cargo pods with the role “1t-cargopod”. This has some consequences for handling g and kg commodities when in flight:&lt;br /&gt;
&lt;br /&gt;
* Every full t of such an article that the player has is put in a barrel on launch and consumes 1 t cargo space.&lt;br /&gt;
* Every barrel that the player scoops takes one t of cargo space even when the content is far less in weight.&lt;br /&gt;
* Every time cargo is added by script, the added amount is added to the hold in one or more 1 t cargo pods.&lt;br /&gt;
* Every time the cargo is reduced, it is removed from one of the barrels. When the barrel becomes empty in the process, the barrel is removed.&lt;br /&gt;
&lt;br /&gt;
On docking all barrels are unloaded and the manifest becomes just a list of goods. The manifest can be handled the same way when docked as when in flight, but the behaviour described above explains why the hold fills up fast when adding several small quantities of g/kg commodities by script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
=== &amp;lt;code&amp;gt;food&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''food''' : Number (read/write integer)&lt;br /&gt;
The quantity of food in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;textiles&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''textiles''' : Number (read/write integer)&lt;br /&gt;
The quantity of textiles in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;radioactives&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''radioactives''' : Number (read/write integer)&lt;br /&gt;
The quantity of radioactives in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;slaves&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''slaves''' : Number (read/write integer)&lt;br /&gt;
The quantity of slaves in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;liquorWines&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''liquorWines''' : Number (read/write integer)&lt;br /&gt;
The quantity of liquor/wines in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;luxuries&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''luxuries''' : Number (read/write integer)&lt;br /&gt;
The quantity of luxuries in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;narcotics&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''narcotics''' : Number (read/write integer)&lt;br /&gt;
The quantity of narcotics in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;computers&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''computers''' : Number (read/write integer)&lt;br /&gt;
The quantity of computers in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;alloys&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''alloys''' : Number (read/write integer)&lt;br /&gt;
The quantity of alloys in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;firearms&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''firearms''' : Number (read/write integer)&lt;br /&gt;
The quantity of firearms in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;furs&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''furs''' : Number (read/write integer)&lt;br /&gt;
The quantity of furs in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;minerals&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''minerals''' : Number (read/write integer)&lt;br /&gt;
The quantity of minerals in the ship’s hold (t).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;gold&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''gold''' : Number (read/write integer)&lt;br /&gt;
The quantity of gold in the ship’s hold (kg).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;platinum&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''platinum''' : Number (read/write integer)&lt;br /&gt;
The quantity of platinum in the ship’s hold (kg).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;gemStones&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''gemStones''' : Number (read/write integer)&lt;br /&gt;
The quantity of gem-stones in the ship’s hold. 500000 g and more counts as 1 ton in [[Oolite JavaScript Reference: Ship#cargoSpaceAvailable|cargoSpace]] calculations.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;alienItems&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''alienItems''' : Number (read/write integer)&lt;br /&gt;
The quantity of alien items in the ship’s hold.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt; ===&lt;br /&gt;
 '''list''' : Array (read-only)&lt;br /&gt;
Array of objects. Each object contains information for a commodity present in the player’s hold:&lt;br /&gt;
 commodity : String (the name of the corresponding property)&lt;br /&gt;
 containers: Number (integer) - 1.79 or later&lt;br /&gt;
 quantity : Number (integer)&lt;br /&gt;
 displayName : String (commodity display name, can be different for different languages)&lt;br /&gt;
 unit : String (“t”, “kg” or “g”)&lt;br /&gt;
&lt;br /&gt;
Quantity is the number of units of cargo carried; containers is the number of TC containers this takes up. For the sub-tonne commodities these numbers are likely to be significantly different, and no containers are used while the ship is docked.&lt;br /&gt;
&lt;br /&gt;
'''Examples:'''&lt;br /&gt;
 var i, m;&lt;br /&gt;
 &lt;br /&gt;
 // for certain types of cargo (like gem-stones) player.ship.cargoSpaceUsed can still be 0&lt;br /&gt;
 // even if we’re carrying 100 or more.&lt;br /&gt;
 log(&amp;quot;The player is currently carrying &amp;quot; + (manifest.list.length &amp;gt; 0 ? &amp;quot;the following:&amp;quot; : &amp;quot;nothing.&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 for (i = 0; i &amp;lt; manifest.list.length; i++)&lt;br /&gt;
 {&lt;br /&gt;
     m = manifest.list[i];&lt;br /&gt;
     log( m.quantity + &amp;quot; &amp;quot; + m.unit + &amp;quot; of &amp;quot;+ m.displayName );&lt;br /&gt;
 }&lt;br /&gt;
and&lt;br /&gt;
 var i, c;&lt;br /&gt;
 &lt;br /&gt;
 // now remove ''at least 1 of / 20% of'' each type of cargo carried.&lt;br /&gt;
 for (i = 0; i &amp;lt; manifest.list.length; i++)&lt;br /&gt;
 {&lt;br /&gt;
 	c = manifest.list[i].commodity;&lt;br /&gt;
 	manifest[c] = Math.floor(manifest[c] * 0.8);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Oolite JavaScript Reference]]&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40336</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40336"/>
		<updated>2014-07-06T23:23:26Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Why this OXP?==&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing ''Elite'' on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's just laughable to think that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such a price disparity could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
&lt;br /&gt;
The EconBalance for any system is determined using a formula that takes a number of variables into account, including: &lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;ul style = &amp;quot;font-size:15px;list-style:circle outside none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Economy Type and Distance&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style = &amp;quot;font-size:11px&amp;quot;&amp;gt;Wealthy systems (RichAg and RichInd) have the greatest influence on EconBalance.  AvAg and AvInd systems have slightly less impact.  PoorAg and PoorInd systems have even less influence, and MainlyAg and MainlyInd have the least of all.&lt;br /&gt;
&lt;br /&gt;
Distance is also a factor.  A RichInd system at 5.2 LY distance will have less effect on EconBalance than that same RichInd system at a distance of 0.4 LY.&amp;lt;br&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Nearest Agricultural and Nearest Industrial Systems&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style = &amp;quot;font-size:11px&amp;quot;&amp;gt;The distance in LY to the nearest Agricultural system (excluding MainlyAg) is subtracted from the distance in LY to the nearest Industrial system (excluding MainlyInd).  The result is added to EconBalance.&amp;lt;br&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agricultural Economies in Range and Industrial Economies in Range&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style = &amp;quot;font-size:11px&amp;quot;&amp;gt;The number of Industrial economies in the cluster (MainlyInd count as 0.4) is subtracted from the number of Agricultural economies in the cluster (MainlyAg count as 0.4).  The result is added to EconBalance.&lt;br /&gt;
&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How this OXP works =&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40335</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40335"/>
		<updated>2014-07-06T22:06:28Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Why this OXP?==&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing ''Elite'' on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's just laughable to think that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such a price disparity could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
&lt;br /&gt;
The EconBalance for any system is determined using a formula that takes a number of variables into account, including: &lt;br /&gt;
&lt;br /&gt;
==== • Economy Type and Distance====&lt;br /&gt;
Wealthy systems (RichAg and RichInd) have the greatest influence on EconBalance.  AvAg and AvInd systems have slightly less impact.  PoorAg and PoorInd systems have even less influence, and MainlyAg and MainlyInd have the least of all.&lt;br /&gt;
&lt;br /&gt;
Distance is also a factor.  A RichInd system at 5.2 LY distance will have less effect on EconBalance than that same RichInd system at a distance of 0.4 LY.&lt;br /&gt;
==== • Nearest Agricultural and Nearest Industrial Systems====&lt;br /&gt;
The distance in LY to the nearest Agricultural system (excluding MainlyAg) is subtracted from the distance in LY to the nearest Industrial system (excluding MainlyInd).  The result is added to EconBalance.&lt;br /&gt;
==== • Agricultural Economies in Range and Industrial Economies in Range====&lt;br /&gt;
The number of Industrial economies in the cluster (MainlyInd count as 0.4) is subtracted from the number of Agricultural economies in the cluster (MainlyAg count as 0.4).  The result is added to EconBalance.&lt;br /&gt;
= How this OXP works =&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40334</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40334"/>
		<updated>2014-07-06T20:48:48Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Why this OXP?==&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing ''Elite'' on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
= How this OXP works =&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40333</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40333"/>
		<updated>2014-07-06T20:46:32Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
==Why this OXP?==&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing ''Elite'' on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How this OXP works ==&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40332</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40332"/>
		<updated>2014-07-06T20:39:46Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Is this anything?=&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How this OXP works ==&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40331</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40331"/>
		<updated>2014-07-06T19:47:05Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is it?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why it shouldn't work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The local economic balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How this OXP works ==&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the player ===&lt;br /&gt;
&lt;br /&gt;
'''''Real-Life Economics''''' will make it much more difficult to earn a living as a trader.  You'll no longer be able to fill your hold with cargo and unload it for a huge profit at the system &amp;quot;next door.&amp;quot;  You may have to travel a long, long way to make a big score.  You'll also find that, because movements in quantity are now directly (rather than inversely) related to changes in price, when prices are lowest, quantities available for sale will be pretty low, too.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40330</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40330"/>
		<updated>2014-07-06T19:34:41Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
===What is the Lazy-Trader Shuffle?===&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Local Economic Balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How this OXP works ==&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the Player ===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40329</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40329"/>
		<updated>2014-07-06T19:33:01Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===What to do about it===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Local Economic Balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How this OXP works ==&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the Player ===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40328</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40328"/>
		<updated>2014-07-06T19:31:38Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Local Economic Balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How this OXP works ==&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Consequences for the Player ===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40327</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40327"/>
		<updated>2014-07-06T19:26:14Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Star Clusters ===&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Local Economic Balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40326</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40326"/>
		<updated>2014-07-06T19:24:41Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
==The Lazy-Trader Shuffle==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Rather, they are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
==Star Clusters and the Local Economic Balance==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Local Economic Balance ===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40325</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40325"/>
		<updated>2014-07-06T19:18:23Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Prices are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The local Economic Balance ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40324</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40324"/>
		<updated>2014-07-06T19:15:59Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling Tiffany's to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In ''Elite'', the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  ''Oolite'', however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''How brilliant of me to notice this!''&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;''I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders most often head for RichInd and PoorAg worlds, robotically shuttling back and forth between them.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Prices are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''star cluster''' is just what the name suggests... a group of stars arranged around a common center, called the '''''hub'''''.  Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (7 light-years) of that system is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The local Economic Balance ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40323</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40323"/>
		<updated>2014-07-06T17:50:52Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling them to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In Elite, the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice this!&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As a result, traders will more often than not, head for RichInd and PoorAg worlds.  There's no good reason to go to a PoorInd or RichAg system.  The prices are &amp;quot;wrong.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
Prices are not random numbers arbitrarily pulled out of a hat.  Prices are a compromise between what Buyers are willing to pay, and what Sellers are willing to accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40322</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40322"/>
		<updated>2014-07-06T17:30:03Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economic model. It's nothing short of laughable to suppose that one star system could have a commodity-price (for Computers, let's say...) of 101.2 Cr. per ton while another system just a short jump away sells the very same commodity for only 61.2 Cr. and that such an arrangement could persist indefinitely. &lt;br /&gt;
&lt;br /&gt;
Suppose, for example, that Wal-Mart® were to set up shop right next door to Tiffany &amp;amp; Co.®, selling the exact same merchandise at substantially lower price.  What do you think might happen to prices at Tiffany's?  While there might be a small handful of snobs willing to pay higher prices for the Tiffany® name, enabling them to cling to their existing prices, sooner or later, competition from Wal-Mart® would compel them to change their business model.&lt;br /&gt;
&lt;br /&gt;
In Elite, the economic model is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
So, I did.&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice this!&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40303</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40303"/>
		<updated>2014-07-06T09:41:12Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice this!&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Why the Lazy-Trader Shuffle Shouldn't Work===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40302</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40302"/>
		<updated>2014-07-06T09:39:18Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* The Lazy-Trader Shuffle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it out almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice this!&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;I must be some kind of a '''genius'''!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40301</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40301"/>
		<updated>2014-07-06T07:01:14Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, however, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yours Truly, for instance) to pop the hood and monkey around inside...&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice this!&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers (or any Industrial-type goods) will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;br /&gt;
&lt;br /&gt;
By the same token, the lowest price for Agricultural goods will be found in a PoorAg system in an AG-heavy cluster.  The highest price for those goods are at RichInd worlds in IND-heavy clusters.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40300</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40300"/>
		<updated>2014-07-06T06:50:17Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yous Truly) to pop the hood and monkey around the&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every new player figures it almost immediately:  Computers are cheap and plentiful in Rich Industrial systems, and they can be sold for an enormous profit to the Poor and Agricultural.  Liquor/Wines (and Furs, when they're available) are cheap in PoorAg systems and pricey on RichInd worlds.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice this!&amp;quot;  The New Player might beam as he pats himself on the back.  &amp;quot;I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40299</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40299"/>
		<updated>2014-07-06T06:29:55Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yous Truly) to pop the hood and monkey around the&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Star Clusters and the Local Economic Balance===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A star cluster is just what the name suggests... a group of stars &lt;br /&gt;
Every system in the Ooniverse is the hub of its own cluster.  Any star within jump distance (seven Light-years) of that system (the hub) is a member of the cluster.&lt;br /&gt;
&lt;br /&gt;
The local Economic Balance &lt;br /&gt;
&lt;br /&gt;
===Effect on Prices===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The lowest price you'll ever find for Computers will be in a Poor Industrial system in a heavily-Industrialized cluster.  The highest price will be in a Rich Agricultural system in a heavily-Agricultural cluster.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40298</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40298"/>
		<updated>2014-07-06T05:44:56Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game, beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others) allows any clumsy, talentless hack (like Yous Truly) to pop the hood and monkey around the&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===One More Section===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40297</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40297"/>
		<updated>2014-07-06T05:32:54Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===One More Section===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40296</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40296"/>
		<updated>2014-07-06T05:23:44Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox EquipStats Oolite| title = Real-Life Economics&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
|equipName =  Ore Processor&lt;br /&gt;
|equipCost = 3500&lt;br /&gt;
|equipTL = 12&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===One More Section===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40295</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40295"/>
		<updated>2014-07-06T05:16:21Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox EquipStats Oolite| title = Real-Life Economics&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
|equipName =  Ore Processor&lt;br /&gt;
|equipCost = 3500&lt;br /&gt;
|equipTL = 12&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40294</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40294"/>
		<updated>2014-07-06T05:15:42Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox OXPb| title = Real-Life Economics&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
|equipName =  Ore Processor&lt;br /&gt;
|equipCost = 3500&lt;br /&gt;
|equipTL = 12&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40293</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40293"/>
		<updated>2014-07-06T05:14:13Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox EquipStats Oolite| title = Real-Life Economics&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
|equipName =  Ore Processor&lt;br /&gt;
|equipCost = 3500&lt;br /&gt;
|equipTL = 12&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40292</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40292"/>
		<updated>2014-07-06T05:12:54Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox OXPb| title = Real-Life Economics&lt;br /&gt;
|version = 1.0&lt;br /&gt;
|release = 2012-01-01&lt;br /&gt;
|license =&lt;br /&gt;
|features = Tools&lt;br /&gt;
|category =&lt;br /&gt;
|author = Your name&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40291</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40291"/>
		<updated>2014-07-06T05:11:33Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox OXPb| title = Real-Life Economics&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40290</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40290"/>
		<updated>2014-07-06T05:08:53Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox EquipStats Oolite| title = Real-Life Economics&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40289</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40289"/>
		<updated>2014-07-06T05:08:04Z</updated>

		<summary type="html">&lt;p&gt;Phasted: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox EquipStats Oolite| title = Ore Processor&lt;br /&gt;
|image = [[Image:OreProcessorSplinter.png|right|thumb|300px|A field of splinters to be extracted]]&lt;br /&gt;
|equipName =  Ore Processor&lt;br /&gt;
|equipCost = 3500&lt;br /&gt;
|equipTL = 12&lt;br /&gt;
}}&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40288</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40288"/>
		<updated>2014-07-06T05:01:40Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;br /&gt;
&lt;br /&gt;
In Elite, this behavior is hard-coded into the game; beyond the reach of all but Mr. Bell and Mr. Braben.  Oolite, thanks to Mr. Williams and Mr. Ayton (among others)&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40287</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40287"/>
		<updated>2014-07-06T04:53:40Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* The Lazy-Trader Shuffle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's idiot-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40286</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40286"/>
		<updated>2014-07-06T04:53:07Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* The Lazy-Trader Shuffle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;How brilliant of me to notice that!  I must be some kind of a genius!  I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's fool-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40285</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40285"/>
		<updated>2014-07-06T04:51:29Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* The Lazy-Trader Shuffle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's fool-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40284</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40284"/>
		<updated>2014-07-06T04:50:56Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* The Lazy-Trader Shuffle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;br /&gt;
&amp;quot;I'll just find a Rich Industrial/Poor Agricultural pair -- reasonably close to one another -- and make a killing hauling Computers one way and Liquor/Wines back... it's fool-proof!&amp;quot;&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40283</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40283"/>
		<updated>2014-07-06T04:47:36Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Lazy-Trader Shuffle===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40282</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40282"/>
		<updated>2014-07-06T04:45:41Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) has always been the extremely unrealistic economics model.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40281</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40281"/>
		<updated>2014-07-06T04:44:56Z</updated>

		<summary type="html">&lt;p&gt;Phasted: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
For me, one of the least satisfying elements of this game (going all the way back to the good ol' days playing Elite on my ancient Commodore 128) was the extremely unrealistic economics model.&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
	<entry>
		<id>http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40280</id>
		<title>Real-Life Economics</title>
		<link rel="alternate" type="text/html" href="http://backup.witchspacewiki.org/index.php?title=Real-Life_Economics&amp;diff=40280"/>
		<updated>2014-07-06T04:40:37Z</updated>

		<summary type="html">&lt;p&gt;Phasted: Created page with &amp;quot;===Overview===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;/div&gt;</summary>
		<author><name>Phasted</name></author>
		
	</entry>
</feed>