Difference between revisions of "Shipdata.plist"

From Elite Wiki
(typo)
(accuracy: added note)
(128 intermediate revisions by 18 users not shown)
Line 1: Line 1:
 +
{{QuoteText|Text=The shipdata.plist would be more accurately called objectdata nowadays - a "ship" in Oolite might be a ship, a station, a rock, basically any solid object smaller than a planet (or moon)|Source=([https://bb.oolite.space/viewtopic.php?p=275475#p275475 Cim])}}
 +
 +
= Format =
 +
Shipdata.plist is in [[Property list]] format.
 +
The shipdata document is a dictionary of ships. Example:
 +
 +
    {
 +
      "rsvh_adder" = {
 +
        like_ship = "adder";
 +
        is_external_dependency = yes;
 +
        pilot = "oolite-hunter";
 +
        roles = "rrs-vicious-hunter(1)";
 +
        "missile_role" = "EQ_HARDENED_MISSILE";
 +
    "script_info" = {
 +
    "randomshipnames" = "hunter";
 +
    "skilled_npc_role" = "hunter";
 +
    };
 +
      };
 +
   
 +
      "rsvh_asp" = {
 +
        like_ship = "asp";
 +
        is_external_dependency = yes;
 +
        pilot = "oolite-hunter";
 +
        roles = "rrs-vicious-hunter(1)";
 +
        "aft_weapon_type" = "WEAPON_BEAM_LASER";
 +
    "script_info" = {
 +
    "randomshipnames" = "hunter";
 +
    "skilled_npc_role" = "hunter";
 +
    };
 +
      };
 +
    }
 +
 
'''shipdata.[[plist]]''' will provide Oolite with all the definitions necessary to include it as an entity in the game, be it ship, station, freak object or sub-entity [[shipdata_structure|(extra)]]. The following (property) entries are, for order's sake, listed alphabetically:
 
'''shipdata.[[plist]]''' will provide Oolite with all the definitions necessary to include it as an entity in the game, be it ship, station, freak object or sub-entity [[shipdata_structure|(extra)]]. The following (property) entries are, for order's sake, listed alphabetically:
  
 +
= Ship keys=
 +
The following keys are used by all ships
 +
==accuracy==
 +
Used with missiles it has influence on tracking of target. Allowed values with missiles are between 0.0 and 10.0. When not defined, the system assigns to the missile the accuracy value of 0.0, which corresponds to the standard missile tracking behaviour.
  
==accuracy==
+
In 1.76 or earlier, when used with NPC ships it slightly enlarges the chance of shooting at greater distances, and makes a small improvement to their aim. Value with NPC ships is between -5 and 10 though all values between -5 and +1 will be increased to +1. When not defined, NPCs will be assigned a random value in the range +1 to +10.
Used with missiles it has influence on tracking of target. Allowed values with missiles are between 0.0 and 10.0. When not defined, the system assings to the missile the accuracy value of 0.0, which corresponds to the standard missile tracking behaviour.
 
  
Used with NPC ships it enlarges the chance of shooting at greater distances. Value with NPC ships is between -5 and 10.
+
In 1.77 or later, when used with NPC ships it affects various aspects of the ship AI. Values can be assigned between -5 and +10. When not defined, a random value between -5 and +5 will be used. [[OXP_NPC_Combat_AI|NPC accuracy]] significantly affects the quality of the AI in combat.
  
 
Example:
 
Example:
  "accuracy" = 8;
+
  "accuracy" = 8.3;
 +
 
 +
:See Cim's detailed explanation [https://bb.oolite.space/viewtopic.php?p=173293#p173293 here] (2012)
 +
:Compare with [[Shipdata.plist#reaction_time|reaction_time]]
  
 
== aft_eject_position ==
 
== aft_eject_position ==
Line 17: Line 55:
  
 
== aft_weapon_type ==
 
== aft_weapon_type ==
Assigns the ship's laser.  
+
Assigns the ship's aft laser.  
 
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE).  
 
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE).  
  
Line 29: Line 67:
 
  "ai_type" = "pirateAI.plist";
 
  "ai_type" = "pirateAI.plist";
  
== allows_auto_docking ==
 
{{Oolite-prop-added|1.75}}<BR>
 
When set false for a station, this station will not allow the use of a docking computer. Default value in "yes".
 
 
Example:
 
allows_auto_docking = "no";
 
 
== allows_fast_docking ==
 
{{Oolite-prop-added|1.75}}<BR>
 
When set true for a station, this station will allow fast docking with the docking computer. Default value in "no".
 
 
Example:
 
allows_fast_docking = "yes";
 
 
 
== auto_ai ==
 
== auto_ai ==
 
This will autoswitch the ai to the appropriate one if a ship was added in one of its standard roles like trader or pirate. (true by default). See also the comment in the autoAIMap.plist inside Oolite. Defining auto_ai is only necessary when using one of the standard roles mentioned in the autoAIMap.plist for your ship. auto_ai does nothing for ships with custom roles.
 
This will autoswitch the ai to the appropriate one if a ship was added in one of its standard roles like trader or pirate. (true by default). See also the comment in the autoAIMap.plist inside Oolite. Defining auto_ai is only necessary when using one of the standard roles mentioned in the autoAIMap.plist for your ship. auto_ai does nothing for ships with custom roles.
Line 48: Line 72:
 
  "auto_ai" = yes;
 
  "auto_ai" = yes;
 
This auto_ai switch is also used for bounties. When auto_ai is false the ship will keep the bounty as defined for the ship but, when true and the ship is added in one of the populator roles, the ship will get the default bounty for that role.
 
This auto_ai switch is also used for bounties. When auto_ai is false the ship will keep the bounty as defined for the ship but, when true and the ship is added in one of the populator roles, the ship will get the default bounty for that role.
 +
 +
== auto_weapons ==
 +
{{oolite-prop-added|1.79}}
 +
 +
This parameter if true (the default is false) indicates to the Oolite system populator (and potentially to OXPs) that they may change the weapons, missile load, equipment and other such parameters of this ship to make it better fit its role. This allows you to specify a single hull for multiple roles, and have the ship re-equipped to suit those roles. Ships intended for general addition to the spacelanes in standard roles and not intended to be significantly different in difficulty to the core ships should probably turn this on.
 +
 +
Example:
 +
"auto_weapons" = yes;
 +
 +
See [https://bb.oolite.space/viewtopic.php?p=235800#p235800 here] for more detail
  
 
== beacon ==
 
== beacon ==
 
A special feature for beacons and navigation aids.
 
A special feature for beacons and navigation aids.
The string can be anything - the first letter is what's displayed in the advanced space compass.
+
The string can be anything - the first letter was what was displayed in the advanced space compass before Oolite v.1.79. It is still the only display for the older [[HUD]]'s.
  
 
Example:  
 
Example:  
  "beacon" = "X-code";
+
  "beacon" = "X";
  
The following characters are known to be used as identifiers for '''stations and other fixed objects''' (listed with their respective OXPs):
+
Characters that are known to be used as identifiers for '''stations and other fixed objects''' are found on the page for the [[Advanced_Space_Compass#List_of_Navigational_Buoys|Advanced Space Compass]]. Most letters have been used multiple times in various OXPs.
  
A = Astromine (Commies)
+
Since v.1.79 the HUD also displays a longer label; before that several HUD OXPs were available to do something similar (see [[Advanced Space Compass]]).
B = Black Monk Monastery (Black Monks)
 
    A Seedy Space Bar (Random Hits)
 
    Nemeanian Military Base (Assassins)
 
C = CoachWhip hOopy Casino (Hoopy Casino)
 
    Pi-42 Con Store (Your Ad Here)
 
F = Collective Zero-G Factory (Commies)
 
    Collective SLAPU (Commies)
 
    Imperial AstroFactory (Dictators)
 
G = Griff Research Ltd Orbital Base (Assassins)
 
    GRS Buoy Factory (GRS Buoy Repair)
 
H = Hacker Outpost (Anarchies)
 
    Deep Space Hoopy Hotel : Hades Branch (Assassins)
 
L = The Link Base (Ionics)
 
    Deep Space Hoopy Hotel : Lernean Branch (Assassins)
 
N = Main Station Beacon
 
P = Tianve Pulsar Monitoring Station (Tianve)
 
R = Rock Hermit (Rock Hermit Locator)
 
    Augeaian Orbital Repair Facility (Assassins)
 
    Rebel Outpost (Assassins)
 
Q = Hesperides Wiseguy Way-Station (Assassins)
 
S = Navy SecCom Station (Galactic Navy)
 
    Special Branch Orbital Headquarters (Assassins)
 
T = Taranis Corporation HQ (Taranis)
 
W = Witchpoint Buoy
 
Z = Free Trade Zone (Free Trade Zone)
 
  
The following characters are known to be used for '''non-station objects that may appear anywhere''':
+
We can also use custom icons with the compass. For that you must define a key in descriptions.plist with the same name as the beacon definition.  Than define the icon in the same way as missile icons. (An array of x/y-coordinates that will be connected by lines). You can find more info at [https://bb.oolite.space/viewtopic.php?f=4&t=9529 the Oolite BB].<br>
 +
Example in shipdata:
 +
"beacon" = "fuelStation_location";
 +
Example in descriptions.plist
 +
"fuelStation_location" =  (1, 2, -3, 2, -3, -4, 3, -4, 3, 4,  -3, 4, -3, 3, 2, 3, 2, -3, 1, -3 );
 +
Before 1.75 the ships primary role was used for defining the icon name in descriptions.plist, but since 1.75 the beacon name itself is used.
  
H = Homing Beacon (ett Homing Beacon)
+
There are several devices which detect things from great distance: the Vanilla game's [[Advanced Space Compass]], [[The Galactic Almanac OXZ]], [[Telescope]] and the [[Long Range Scanner]]. The last is a cheat OXP useful for programmers. See the [https://bb.oolite.space/viewtopic.php?p=281279#p281279 HIMSN thread] for details of making things invisible to them.
  
The following characters should not be assigned easily to stations or ships that are supposed to appear anywhere, because they are likely to be used for ships in other OXPs:
+
== beacon_label ==
 +
{{oolite-prop-added|1.79}}
  
M = Mark
+
A full label for the beacon. If this is not set, it will default to be the same as <code>beacon</code>, but it may be useful to have a beacon with a full label starting with a different letter than its code. The beacon label text will be expanded using the standard description rules
T = Target
+
  "beacon_label" = "%H Station"; // Lave Station, Diso Station, etc.
V = Victim
 
X = general marker
 
+ = general marker
 
 
 
Starting with Oolite 1.73 we can also use custom icons with the compass. For that you must define a key in descriptions.plist with the same name as one of the roles of the ship with beacon. Than define the icon in the same way as missile icons. (An array of x/y-coordinates that will be connected by lines)
 
  "fuelStation_location" = (1, 2, -3, 2, -3, -4, 3, -4, 3, 4,  -3, 4, -3, 3, 2, 3, 2, -3, 1, -3 );
 
  
 
== bounty ==
 
== bounty ==
Line 113: Line 122:
  
 
When used for barrels, it is also possible to add several units in a pod by preceding the commodity name with a space separated number. Adding more than a ton in a pod is not possible. Defining a quantity for ships is not possible this way.<br>
 
When used for barrels, it is also possible to add several units in a pod by preceding the commodity name with a space separated number. Adding more than a ton in a pod is not possible. Defining a quantity for ships is not possible this way.<br>
Since Oolite 1.74 it will also be possible to define a mix of random cargo for ships by using the string "SCARCE_GOODS" or "PLENTIFUL_GOODS", instead of a commodity name. The first selects random goods that are scarce at the main station, the second selects goods that are plentiful present at the main station. (Populator added traders heading toward the station always have scarce goods while traders heading from the main station always have plentiful goods on board. It would be wise to stick to this rule with custom ships.)<br>
+
It is possible to define a mix of random cargo for ships by using the string "SCARCE_GOODS" or "PLENTIFUL_GOODS", instead of a commodity name. The first selects random goods that are scarce at the main station, the second selects goods that are plentiful present at the main station. (Populator added traders heading toward the station always have scarce goods while traders heading from the main station always have plentiful goods on board. It would be wise to stick to this rule with custom ships.)<br>
 
To make cargo_carried working for ships, the cargo_type must be "CARGO_NOT_CARGO" to define the ship not being cargo itself. (see below)
 
To make cargo_carried working for ships, the cargo_type must be "CARGO_NOT_CARGO" to define the ship not being cargo itself. (see below)
 +
 +
'''Note''': A bug introduced in 1.82 means that only commodity keys from the [[Trade-goods.plist]] are recognised here. That is "gold" will be recognised, whereas "Gold" will not. This bug is fixed in the 1.83/1.84 release.
  
 
== [[cargo_type]] ==
 
== [[cargo_type]] ==
Determines if object is indeed cargo (CARGO_RANDOM, CARGO_SLAVES, CARGO_THARGOID, CARGO_ALLOY, CARGO_MINERALS, CARGO_CARRIED) or a ship, as below, which is not cargo. Works since Oolite 1.71 also for pods spawn by a script. CARGO_CARRIED needs in addition an second key cargo_carried that specifies the cargo. (see below)<br>
+
Determines if object is indeed cargo (CARGO_RANDOM, CARGO_SLAVES, CARGO_THARGOID, CARGO_ALLOY, CARGO_MINERALS, CARGO_CARRIED) or a ship, as below, which is not cargo. (CARGO_RANDOM is not fully random but means that a container can hold any kind of commodity.)<br>
  
 
Example:
 
Example:
 
  "cargo_type" = "CARGO_RANDOM";
 
  "cargo_type" = "CARGO_RANDOM";
  
More control of contents of barrels is available through the CARGO_CARRIED string.
+
Will create random cargo, often based on availability in the system. When you want fixed cargo you can use:
  
 
Example:
 
Example:
Line 134: Line 145:
 
  "cargo_carried" = "Computers";
 
  "cargo_carried" = "Computers";
  
Another notable type of cargo is the scripted item CARGO_SCRIPTED_ITEM, as examplified by the cloacking device. When CARGO_SCRIPTED_ITEM is defined, the barrels will trigger scooping events for the ship-scripts. Other barrels don't trigger scooping events.<br>
+
Another notable type of cargo is the scripted item CARGO_SCRIPTED_ITEM, as exemplified by the cloaking device. When CARGO_SCRIPTED_ITEM is defined, the barrels will trigger scooping events for the ship-scripts. Other barrels don't trigger scooping events.<br>
Until 1.74 such scripted barrels were removed from the system after scooping. Starting with 1.74 the barrels are stored in the ships hold like normal barrels when a cargo was defined for them with the JS method "setCargo". Scripted cargo works with any object that can be scooped. When you have scripted escape pods that must be preserved, fill it with one ton of Slaves.
+
The cargo barrels are stored in the ships hold like normal barrels when a cargo was defined for them with the JS method "setCargo". Without defined content, scripted barrels are removed after scooping. Scripted cargo works with any object that can be scooped. When you have scripted escape pods that must be preserved after scooping, fill it with one ton of Slaves.
 +
 
 +
== cloak_automatic ==
 +
{{oolite-prop-added|1.75}}
 +
 
 +
When false, the cloak of npc ships will never get activate automatic during combat, but is only activated by JS script commands. (True by default)
 +
 
 +
Example:
 +
"cloak_automatic" = no;
  
 
== cloak_passive ==
 
== cloak_passive ==
When true, any firing of laser will deactivate the cloak. (False by default)  
+
When true, any firing of laser will deactivate the cloak. (False by default in 1.76 or earlier, true by default in 1.77 or later)  
  
 
Example:
 
Example:
Line 144: Line 163:
  
 
==conditions==
 
==conditions==
Whit this option you can include an array of extra conditions when to add a ship. When the conditions are not met, the ship does not appear in a selection list by role. Useful when you have a standard ship like a trader that should only be added in certain systems.
+
With this option you can include an array of extra conditions when to add a ship. When the conditions are not met, the ship does not appear in a selection list by role. Useful when you have a standard ship like a trader that should only be added in certain systems.
  
 
Example:
 
Example:
  "conditions" = ("systemGovernment_number equal 3",
+
  "conditions" = (
 +
                "systemGovernment_number equal 3",
 
                 "systemEconomy_number lessthan 4"
 
                 "systemEconomy_number lessthan 4"
 
                 );
 
                 );
 +
 +
==condition_script==
 +
''Available from Oolite 1.77 onwards''
 +
 +
This option specifies a Javascript file which controls the addition of this ship. The <code>allowSpawnShip</code> function in that [[Oolite_JavaScript_Reference:_Condition_scripts|condition script]] will then be tested before the ship is added. Several ships can share a condition script.
 +
 +
Example:
 +
"condition_script" = "myoxp_conditions.js";
 +
 +
== counts_as_kill ==
 +
{{oolite-prop-added|1.75}}
 +
 +
Killing this ship will not count as a kill by the player when set to false. (Default is true). Using this key prevents awarding kills to all kind of cargo, debris etc.
 +
 +
Example:
 +
"counts_as_kill" = no;
  
 
== custom_views==
 
== custom_views==
Line 172: Line 208:
  
 
Example:
 
Example:
custom_views =
+
  custom_views =
(
+
(
{
+
    {
view_description = "Front View";
+
        view_description = "Front View";
view_orientation = "0.0 0.0 1.0 0.0";
+
        view_orientation = "0.0 0.0 1.0 0.0";
view_position = "0.0 30.0 200.0";
+
        view_position = "0.0 30.0 200.0";
weapon_facing = "FORWARD";
+
        weapon_facing = "FORWARD";
}
+
    }
);
+
);
  
 
== death_actions ==
 
== death_actions ==
Line 188: Line 224:
 
  "death_actions" = ("spawn: explosive_shrapnel 1");
 
  "death_actions" = ("spawn: explosive_shrapnel 1");
 
   
 
   
 +
== debris_role ==
 +
{{oolite-prop-added|1.74}}
  
== debris_role ==
+
Specifies the kind of debris an asteroid or boulder generates. When not defined they default to generating 'ships' with role "boulder" or "splinter".
Specifies the kind of debris an asteroid or boulder generates. When not defined they default to generating 'ships' with role "boulder" or "splinter". (Key added with Oolite 1.74)
 
  
 
Example:
 
Example:
 
  "debris_role" = "my_boulder_foo";
 
  "debris_role" = "my_boulder_foo";
 
  
== defense_ship ==
+
See the discussion here: [https://bb.oolite.space/viewtopic.php?f=4&t=10061 (RELEASE) Icesteroids V2] (2011-12) - about role circularity and about the vanilla game code creating alloys whenever anything big explodes!
Gives an oportunity to designate a particular ship by name that will defend a station/carrier. When launched from a carrier the scanclass becomes that of the carrier.
 
  
Example:
+
== density ==
<key>defense_ship</key>
+
This real value is used to calculate a ships total mass. Default is 1.0. The mass of the ship is then 20 * density * volume.
<string>my_defender</string>
 
  
== defense_ship_role ==
+
Ship's mass does not affect its flight under the non-inertial engines - see [[#thrust|thrust]]. It does affect:
Gives an oportunity to designate a particular (group of) ships that will defend a station/carrier. This has to be specified in the [[Shipdata.plist#roles|roles]] of the ship(s) that are assigned to defend. When launched from a carrier the scanclass becomes that of the carrier.
+
* changes in momentum, and damage done, in a collision
 +
* the minimum distance needed from this ship for another ship to open a witchspace wormhole (the blocking radius is the square root of a tenth of the mass)
 +
* the length of time a witchspace wormhole opened by this ship will remain open, and the radius of that wormhole.
  
 
Example:
 
Example:
  <key>defense_ship_role</key>
+
  "density" = 1.5;
<string>carrier_defenders</string>
 
  
== density ==
+
• See Eric Walch's comment on vanilla-game Coriolis stations [https://bb.oolite.space/viewtopic.php?p=118196#p118196 here] (2010)
This real value is used to calculate a ships total mass. Default is 1.0
 
 
 
Example:
 
<key>density</key>
 
<real>1.5</real>
 
  
 
== display_name ==
 
== display_name ==
Line 221: Line 251:
  
 
Example:
 
Example:
  <key>display_name</key>
+
  "display_name" = "ExampleShip Mark IX";
<string>ExampleShip Mark IX</string>
 
  
== docking_pattern_model ==
+
== energy_recharge_rate ==
The name of the .dat file that is used for displaying the docking pattern for this station onlyDefault is ring.dat.  (Introduced in version 1.74)
+
The rate at which energy is replenishedStations are at 100, Adders at 2. (Default value: 1)
  
 
Example:
 
Example:
  <key>docking_pattern_model</key>
+
  "energy_recharge_rate" = "3.5";
<string>ring.dat</string>
+
 
 +
See [https://bb.oolite.space/viewtopic.php?f=4&t=12152 Energy rates and recharge] for more detail (2012)
 +
 
 +
== escape_pod_model ==
 +
With this entry ships can have custom escape pods. Defaults to "escape-capsule".
 +
 
 +
'''Since v1.65:''' You have to specify the '''role''' of your custom escape pod (not its entry-name).
  
== energy_recharge_rate ==
+
'''Since v1.77:''' Deprecated in favour of <code>escape_pod_role</code>.
The rate at which energy is replenished. Stations are at 100, Adders at 2. (Default value: 1)
 
  
 
Example:
 
Example:
  <key>energy_recharge_rate</key>
+
  "escape_pod_model" = "custom_pod_role";
<real>3.5</real>
 
  
== escape_pod_model ==
+
'''Note:''' Each shipdata entry has an implicit unique role in the form of a shipdata key enclosed in square brackets - e.g. "[entry-name]". It might be useful if you want to use a specific escape pod that has no unique role.
With this entry ships can have custom escape pods. (starting from version 1.65) You have to specify the '''role''' of your custom escape pod (not its entry-name).
+
 
 +
== escape_pod_role ==
 +
With this entry ships can have custom escape pods. It's almost the same as <code>escape_pod_model</code>, but has a less ambiguous name. Added in v1.77.
 +
 
 +
The game first tries to spawn a pod using <code>escape_pod_role</code>, but if the property isn't set or a spawn fails, the game uses <code>escape_pod_model</code>. If the latter fails too, the game tries the "escape-capsule" role.
  
 
Example:
 
Example:
  <key>escape_pod_model</key>
+
  "escape_pod_model" = "custom_pod_role";
<string>custom_pod</string>
 
  
 
== escorts ==
 
== escorts ==
Determines how many escorts an NPC shall have. Maximum is 16. In save systems Oolite may randomly decide to subtract escorts from the defined value.  
+
Determines how many escorts an NPC shall have. Maximum is 16.
  
 
Example:
 
Example:
  <key>escorts</key>
+
  "escorts" = 4;
<integer>4</integer>
+
Warning: Ships with scanClass = CLASS_POLICE should always have escorts set to zero. Oolite will set this value here and add wingmans instead of escorts. Without special scripting escorts won't escort a mother with CLASS_POLICE.<br>
Warning: Ships with scanClass = CLASS_POLICE should always have escorts set to zero. Oolite will set this value here and add wingmans instead of escorts. Without special scripting escorts won't escort a mother with CLASS_POLICE.
+
For ships that are added in a trader role, the populator can decide to subtract escorts from the defined value when the system is estimated as safe.  
  
== escort-role ==
+
== escort_role ==
Assigns the specific ship type to be the escort, by the ship's role. (Starting with Oolite 1.74 also the name "escort_role" is accepted.)
+
Assigns the specific ship type to be the escort, by the ship's role. (Before Oolite 1.74 only the name "escort-role" is accepted.)
  
 
Example:
 
Example:
  <key>escort-role</key>
+
  "escort_role" = "my_custom_escort_role";
<string>my_custom_escort_role</string>
+
Escort ships will use the escortAI.plist unless "auto_ai" is set to false.
Warning: Only usable since  Oolite 1.71. It will use the AI file defined in shipdata for this escort and will not use any default escortAI. So make sure the summoned escort has an AI defined in its entry that is capable of supporting escorting.
+
 
 +
 
 +
==escort_roles==
 +
{{oolite-prop-added|1.79}}
  
== escort-ship ==
+
This property overrules <code>escorts</code>, <code>escort_role</code> and <code>escort_ship</code> to allow more flexible specification of a ship's escorts. It takes the form of a list of dictionaries, each containing a "role", "min" and "max" key. The ship will then get between "min" and "max" of that role of escort ship (specific ships can be added using the "[dataKey]" style of role), with "max" more likely in Anarchy systems and "min" more likely in Corporate States.
Assigns the specific ship type to be the escort, by the ship's name. (Starting with Oolite 1.74 also the name "escort_ship" is accepted.)
 
  
Example:
+
  escort_roles = (
<key>escort-ship</key>
+
      { role = "escort"; min = -2; max = 2; },
<string>cobramk1</string>
+
      { role = "escort-medium"; min = 0; max = 4; },
 +
      { role = "escort-heavy"; min = -4; max = 2; },
 +
      { role = ""; min = 0; max = 2; } // spare slots for wandering escorts
 +
  );
 +
 
 +
A negative number can be used for "min" - this makes it more likely that none of this type of escort will be used in safer systems, and makes the maximum number less likely in the more dangerous systems. In the example above, the ship will mainly be escorted by "escort-medium" ships, with a couple of "escort" ships likely in unsafe systems, and a small chance of "escort-heavy" ships also appearing in more dangerous systems.
  
== equipment_price_factor ==
+
Leaving the role key blank allows the ship to have spare slots for escorts which are left unfilled when the ship is spawned. This can be used to simulate a willingness to hire additional escorts, or to indicate that the ship has already lost some of its escorts.
Equipment price mask for dockables.
 
  
Example:
+
The maximum number of escorts remains 16, and the list will be processed from top to bottom. Once 16 escorts are added no further entries will be considered.
<key>equipment_price_factor</key>
 
<real>4.5</real>
 
  
== equivalent_tech_level ==
+
== escort_ship ==
Sets shipyard tech level for dockables, different to the local system techlevel.
+
Assigns the specific ship type to be the escort, by the ship's name. (Before Oolite 1.74 only the name "escort-ship" is accepted.)
  
 
Example:
 
Example:
  <key>equivalent_tech_level</key>
+
  "escort_ship" = "cobramk1";
<integer>1</integer>
+
Escort ships will use the escortAI.plist unless "auto_ai" is set to false.
 +
 
 +
In Oolite 1.77 and later it is also possible to use <code>"escort_role" = "[cobramk1]"</code>
  
 
== exhaust ==
 
== exhaust ==
Line 289: Line 331:
 
'''x y z''' is the position relative to the origin of the main model.  
 
'''x y z''' is the position relative to the origin of the main model.  
  
'''width''' in meters, how wide a plume is on x axis. (x radius)
+
'''width''' in meters, how far a plume extends on x axis, on each side of plume position. (x radius)
  
'''height''' in meters, how tall a plume is on y axis. (y radius)
+
'''height''' in meters, how far a plume extends on y axis, above and below of plume position. (y radius)
  
 
'''length''' in meters, how long a plume is on z axis. (This value is in current Oolite versions ignored. Length is now derived from the ships speed)
 
'''length''' in meters, how long a plume is on z axis. (This value is in current Oolite versions ignored. Length is now derived from the ships speed)
Line 299: Line 341:
  
 
Example:
 
Example:
  <key>exhaust</key>
+
  "exhaust" = (
<array>
+
     "5 0.0 -25 3.0 2.0 10.0",
     <string>5 0.0 -25 6.0 4.0 10.0</string>
+
     "-5 0.0 -25 3.0 2.0 10.0"
     <string>-5 0.0 -25 6.0 4.0 10.0</string>
+
);
  </array>
+
 
 +
== exhaust_emissive_color ==
 +
{{oolite-prop-added|1.79}}
 +
 
 +
Determines the colour of the exhausts.
 +
 
 +
For the colour you can use either a [[Materials in Oolite#Colour specifiers|colour specifier]] or a [[Materials in Oolite#Named colours|named colour]].
 +
 
 +
Example:
 +
"exhaust_emissive_color" = "redColor";
 +
or
 +
"exhaust_emissive_color" = "1 0 0";
 +
 
 +
== explosion_type ==
 +
{{oolite-prop-added|1.81}}
 +
 
 +
A list of [[explosions.plist]] entries describing how the ship explodes if destroyed.
 +
 
 +
Example:
 +
  "explosion_type" = ("oolite-default-asteroid-explosion");
  
 
== extra_cargo ==
 
== extra_cargo ==
Cargobay extension size can now be customised. This is the amount the cargo capacity increases when an extra cargobay is installed. Default value is 15. It is only used with player ships.
+
Cargobay extension size can be customised. This is the amount the cargo capacity increases when an extra cargobay is installed. Default value is 15. It is only used with player ships.
  
 
Example:
 
Example:
  <key>extra_cargo</key>
+
  "extra_cargo" = 25;
<integer>value</integer>
 
  
 
== forward_weapon_type ==
 
== forward_weapon_type ==
Assigns the ship's laser.  
+
Assigns the ship's forward laser.  
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE).  
+
Any weapon type from the [[equipment.plist]] can be used.<br> e.g.: WEAPON_PULSE_LASER, WEAPON_BEAM_LASER, WEAPON_MILITARY_LASER, WEAPON_MINING_LASER, WEAPON_PLASMA_CANNON, WEAPON_THARGOID_LASER and WEAPON_NONE.  
  
 
Example:
 
Example:
  <key>forward_weapon_type</key>
+
  "forward_weapon_type" = "WEAPON_BEAM_LASER";
<string>WEAPON_BEAM_LASER</string>
 
 
 
  
 
== frangible ==
 
== frangible ==
Line 327: Line 385:
  
 
Example:
 
Example:
  <key>frangible</key>
+
  "frangible" = no;
  <false/>
+
   
 
 
 
== fragment_chance ==
 
== fragment_chance ==
 
Determines if a ship breaks apart into fragments and generates parts with role "wreckage". By chance factor, or true/false. Default is 90% chance.
 
Determines if a ship breaks apart into fragments and generates parts with role "wreckage". By chance factor, or true/false. Default is 90% chance.
Line 335: Line 392:
  
 
Example:
 
Example:
  <key>fragment_chance</key>
+
  "fragment_chance" = no;
  <false/>
+
   
 
 
 
== fuel ==
 
== fuel ==
Determines an NPC ship's fuel storage, which will affect how it uses its Fuel Injectors.
+
Determines an NPC ship's fuel storage, which will affect how it uses its Fuel Injectors and how far it can jump. If unspecified the default is zero (though ships added via the system populator will often be given some fuel anyway)
  
 
Example:
 
Example:
  <key>fuel</key>
+
  "fuel" = 70;
<integer>70</integer>
 
 
 
  
 
== has_cloaking_device ==
 
== has_cloaking_device ==
Line 350: Line 404:
  
 
Example:
 
Example:
  <key>has_cloaking_device</key>
+
  "has_cloaking_device" = 0.5;
<real>0.5</real>
 
  
 
== has_ecm ==
 
== has_ecm ==
Line 357: Line 410:
  
 
Example:
 
Example:
  <key>has_ecm</key>
+
  "has_ecm" = 0.5;
<real>0.5</real>
 
 
or
 
or
  <key>has_ecm</key>
+
  "has_ecm" = no;
  <false/>
+
   
 
 
 
== has_energy_bomb ==
 
== has_energy_bomb ==
 
Determines if a ship has an energy bomb. If it has one, it might launch a mine with role "energy_bomb" as part of his fleeing behavior. currently the only build-in mine with this role is the q-bomb.<br>A ship will only deploy the bomb when it has also fuel-injectors and some fuel left to avoid getting killed by its own bomb. On average it will try to deploy the bomb once every 100 seconds during fleeing.
 
Determines if a ship has an energy bomb. If it has one, it might launch a mine with role "energy_bomb" as part of his fleeing behavior. currently the only build-in mine with this role is the q-bomb.<br>A ship will only deploy the bomb when it has also fuel-injectors and some fuel left to avoid getting killed by its own bomb. On average it will try to deploy the bomb once every 100 seconds during fleeing.
  
 
Example:
 
Example:
  <key>has_energy_bomb</key>
+
  "has_energy_bomb" = yes;
<false/>
 
  
 
== has_escape_pod ==
 
== has_escape_pod ==
Line 377: Line 427:
 
  has_escape_pod = 0.75;
 
  has_escape_pod = 0.75;
 
  has_escape_pod = 3;
 
  has_escape_pod = 3;
 
XML example:
 
<key>has_escape_pod</key>
 
<false/>
 
  
 
== has_fuel_injection ==
 
== has_fuel_injection ==
Line 386: Line 432:
  
 
Example:
 
Example:
  <key>has_fuel_injection</key>
+
  "has_fuel_injection" = 0.99;
<real>0.99</real>
+
 
 
==has_military_jammer==
 
==has_military_jammer==
 
Determines if a ship has a military jammer. Ships equipped with this item become invisible on the radar.  
 
Determines if a ship has a military jammer. Ships equipped with this item become invisible on the radar.  
 
Example:
 
Example:
  <key>has_military_jammer</key>
+
  "has_military_jammer" = 0.75;
<real>0.75</real>
 
  
 
==has_military_scanner_filter==
 
==has_military_scanner_filter==
 
Determines if a ship has a military jammer filter. Ships equipped with this item can see ships equipped with a military jammer on the radar.  
 
Determines if a ship has a military jammer filter. Ships equipped with this item can see ships equipped with a military jammer on the radar.  
 
Example:
 
Example:
  <key>has_military_scanner_filter</key>
+
  "has_military_scanner_filter" = 0.50;
<real>0.50</real>
 
 
 
== has_npc_traffic ==
 
Determines if a station has NPC traffic (carriers are treated as stations, too). Default is "YES", when set to NO the station will not launch random traders.
 
 
 
Example:
 
<key>has_npc_traffic</key>
 
<true/>
 
  
 
== has_scoop ==
 
== has_scoop ==
Line 411: Line 448:
  
 
Example:
 
Example:
  <key>has_scoop</key>
+
  "has_scoop" = no;
<false/>
 
  
 
== has_scoop_message ==
 
== has_scoop_message ==
Line 418: Line 454:
  
 
Example:
 
Example:
  <key>has_scoop_message</key>
+
  "has_scoop_message" = no;
<false/>
 
  
 
== has_shield_booster==
 
== has_shield_booster==
Line 425: Line 460:
  
 
Example:
 
Example:
  <key>has_shield_booster</key>
+
  "has_shield_booster" = 0.80;
<real>0.80</real>
+
 
 
== has_shield_enhancer ==
 
== has_shield_enhancer ==
 
Determines if a ship has the coveted shield enhancer. (enlarges max energy with 256 and raises energy recharge rate with 50%)
 
Determines if a ship has the coveted shield enhancer. (enlarges max energy with 256 and raises energy recharge rate with 50%)
  
 
Example:
 
Example:
  <key>has_shield_enhancer</key>
+
  "has_shield_enhancer" = 0.45;
<real>0.45</real>
 
  
== has_shipyard ==
+
== heat_insulation ==
Determines if a station or carrier has a shipyard. By chance factor as number between 0 and 1, but it can also be an array of conditions. (Name is valid starting with Oolite 1.74. Before it was called "hasShipyard".)
+
This real number gives the amount of heat insulation of a ship. Default is 1.0 (2.0 for ships equipped with EQ_HEAT_SHIELD). Values below 0.125 will be increased to that minimum. This parameter is only for NPC ships and stations. Player ships ignore this and always start with 1.0 heat insulation and can add an additional 1.0 (for a total of 2.0) with the ship equipment EQ_HEAT_SHIELD. Heat insulation for NPCs is only a factor when close to the sun. Energy damage does not cause overheating (because otherwise it would be too easy to overheat NPC ships with missiles or lasers), but it can raise ships' temperature to the maximum safe level. Overheating occurs when a ship's temperature exceeds the safe level, which is determined by the heat insulation level. External temperature is determined by distance from the sun. Larger suns are hotter. Suns that are going nova are, unsurprisingly, even warmer.  
  
 
Example:
 
Example:
  <key>has_shipyard</key>
+
  "heat_insulation" = "2.0";
<real>0.75<real/>
 
  
== heat_insulation ==
+
NPC ships launched from stations are given the same heat insulation as the station if the station's is greater than the ship's. Courier ships generated by the core system populator are given a heat insulation level of 6.0. Escort ships (if any) receive at least the same heat insulation as the ship they are escorting. See [https://bb.oolite.space/viewtopic.php?p=177357#p177357 BB Thread] (2012)
This real number gives the amount of heat insulation of a ship. Default is 1.0 Only for NPC ships. Playes ships can have the equipment EQ_HEAT_SHIELDING with gives the player than a heat_insulation of 2.0
 
  
Example:
+
Player ships use the same model as NPC ships for external temperature from the sun, but additionally simulate heat from air friction when inside planetary atmospheres, which is a factor that NPC ships ignore.
<key>heat_insulation</key>
 
<real>2.0</real>
 
  
 
== hud ==
 
== hud ==
Used for a playership, to assign another HUD than the default one.
+
Used for a playership, to assign another HUD than the default one. Note that small ships get the second default - the hud-small.plist
  
 
Example:
 
Example:
  <key>hud</key>
+
  "hud" = "specialhud.plist";
<string>specialhud.plist</string>
 
  
 
== hyperspace_motor ==
 
== hyperspace_motor ==
Line 459: Line 488:
  
 
Examples:
 
Examples:
  <key>hyperspace_motor</key>
+
  "hyperspace_motor" = no;
<false/>
 
  
 
  hyperspace_motor=NO;
 
  hyperspace_motor=NO;
 
  
 
== hyperspace_motor_spin_time ==
 
== hyperspace_motor_spin_time ==
Line 469: Line 496:
  
 
Examples:
 
Examples:
  <key>hyperspace_motor_spin_time</key>
+
  "hyperspace_motor_spin_time" = "15";
<integer>15</integer>
+
 
 +
==injector_burn_rate==
 +
{{oolite-prop-added|1.81}}
  
hyperspace_motor_spin_time=15;
+
The default fuel burn rate of injectors on this ship, in deci-LY per second. The default is 0.25.
  
==is_carrier==
+
"injector_burn_rate" = 0.25;
Added as a tag for making the model be considered a carrier or stationAn alternative to including ''carrier'' or ''station'' among the [[Shipdata.plist#roles|roles]]. When present this key even overrules station/carrier settings with roles. (Name is valid starting with Oolite 1.74. Before it was called "isCarrier".)
+
 
 +
==injector_speed_factor==
 +
{{oolite-prop-added|1.81}}
 +
 
 +
The multiplier applied to the ship's maximum speed when it is using injectors. The default is 7.
 +
 
 +
  "injector_speed_factor" = 7;
 +
 
 +
==is_external_dependency==
 +
This key should be added to ships that use like_ship references to ships in other oxps but don't depend on them. Normally will Oolite write errors in the log when it can't resolve a like_ship reference. When this key is set to YES, it will suppress the error generation.<br>WARNING: only set this key to YES when the model won't get added to the system without the other oxp installed or you will miss a valuable warning.
  
 
Example:
 
Example:
  <key>is_carrier</key>
+
  "is_external_dependency" = yes;
<true/>
 
  
 
==is_submunition==
 
==is_submunition==
Line 485: Line 522:
  
 
Example:
 
Example:
  <key>is_submunition</key>
+
  "is_submunition" = yes;
<true/>
 
  
 
==is_template==
 
==is_template==
Set this to yes/<true/> for ships which are only used through like_ships and are not intended to be used directly. If your (otherwise working) OXP generates warnings about ships with no roles or model attribute, you probably need this.
+
Set this to yes for ships which are only used through like_ships and are not intended to be used directly. If your (otherwise working) OXP generates warnings about ships with no roles or model attribute, you probably need this.
  
 
Example:
 
Example:
  <key>is_template</key>
+
  "is_template" = yes;
<true/>
 
  
 
== laser_color ==
 
== laser_color ==
 
Determines a ship's laser colour.
 
Determines a ship's laser colour.
  
In Oolite 1.69 and later, this is any [[Materials in Oolite#Colour specifiers|colour specifier]]. In earlier versions, it must be a [[Materials in Oolite#Named colours|named colour]]. Also as of 1.69, the game requires laser colours to be reasonably bright; if the brightest colour component is less than 0.5, the colour will be brightened.
+
As colour you can use a [[Materials in Oolite#Colour specifiers|colour specifier]] or a [[Materials in Oolite#Named colours|named colour]]. The game requires laser colours to be reasonably bright; if the brightest colour component is less than 0.5, the colour will be brightened.
  
 
Example:
 
Example:
  <key>laser_color</key>
+
  "laser_color" = "cyanColor"
<string>cyanColor</string>
 
  
  
Line 511: Line 545:
  
 
  Example:
 
  Example:
  "role = trader"
+
  "role = trader";
  <key>launch_actions</key>
+
  "launch_actions" = (
  <array>
+
   "setAITo: pirateAI.plist"
   <string>setAITo: pirateAI.plist</string>
+
   );
   </array>
 
  
  
Line 524: Line 557:
  
 
Example:
 
Example:
  <key>like_ship</key>
+
  "my_ship" = {
  <string>adder</string>
+
  "like_ship" = "adder";
  <key>max_flight_speed</key>
+
  "max_flight_speed" = "700";
<real>700</real>
+
  "name" = "Freak Turbo Adder";
  <key>name</key>
+
},
<string>Freak Turbo Adder</string>
 
  
 
== likely_cargo ==
 
== likely_cargo ==
Line 535: Line 567:
  
 
Example:
 
Example:
  <key>likely_cargo</key>
+
  "likely_cargo" = "2";
<integer>2</integer>
 
 
 
== market ==
 
Key that sets the market for stations and carriers. The name defines the key in [[commodities.plist]] that will be used as local market. Without a market key, the stations primaryRole is used as market.  Added with test release 1.74
 
 
 
Example:
 
<key>market</key>
 
<string>none</string>
 
 
 
  
 
== materials ==
 
== materials ==
Line 554: Line 577:
  
 
Example:
 
Example:
  <key>max_cargo</key>
+
  "max_cargo" = "5";
<integer>5</integer>
 
 
 
== max_defense_ships ==
 
Designates how many ships a dockable entity (station, carrier) can launch in defense. See also [[Station Ships]]
 
 
 
Example:
 
<key>max_defense_ships</key>
 
<integer>10</integer>
 
  
 
== max_energy ==
 
== max_energy ==
Line 568: Line 583:
  
 
Example:
 
Example:
  <key>max_energy</key>
+
  "max_energy" = "300";
<real>300</real>
 
  
 +
See [https://bb.oolite.space/viewtopic.php?f=4&t=12152 Energy rates and recharge] for more detail (2012). Divide by 64 to get the rough number of energy banks.
  
 
== max_flight_pitch ==
 
== max_flight_pitch ==
Line 576: Line 591:
  
 
Example:
 
Example:
  <key>max_flight_pitch</key>
+
  "max_flight_pitch" = "2.2";
<real>2.2</real>
 
  
  
Line 584: Line 598:
  
 
Example:
 
Example:
  <key>max_flight_roll</key>
+
  "max_flight_roll" = "4.2";
<real>4.2000000000000002</real>
 
  
  
Line 592: Line 605:
  
 
Example:
 
Example:
  <key>max_flight_speed</key>
+
  "max_flight_speed" = "320";
<real>320</real>
 
  
 
== max_flight_yaw ==
 
== max_flight_yaw ==
Line 599: Line 611:
  
 
Example:
 
Example:
  <key>max_flight_yaw</key>
+
  "max_flight_yaw" = "2.2";
<real>2.2</real>
 
  
 
== max_missiles ==
 
== max_missiles ==
Line 606: Line 617:
  
 
Example:
 
Example:
  <key>max_missiles</key>
+
  "max_missiles" = "1";
<integer>1</integer>
 
== max_police ==
 
Designates how many police or patrol ships a dockable entity (station, carrier) can launch.  See also [[Station Ships]]
 
 
 
Example:
 
<key>max_police </key>
 
<integer>10</integer>
 
 
 
== max_scavengers ==
 
Designates how many scavengers or miners a dockable entity (station, carrier) can launch. See also [[Station Ships]]
 
 
 
Example:
 
<key>max_scavengers</key>
 
<integer>10</integer>
 
  
 
== missile_launch_position ==
 
== missile_launch_position ==
Line 626: Line 623:
  
 
Example:
 
Example:
  <key>missile_launch_position</key>
+
  "missile_launch_position" = "0.0 -2.25 10.0";
<string>0.0 -2.25 10.0</string>
 
  
 +
This position should lie outside the bounding box of the core entity and not just outside of the ships mesh.  Default value: (0, -4, 1)<br>
 +
If the position does lie inside the bounding box, the launch position is shifted along its direction until the launched missile lies outside the bounding box of the central entity. (Bounding boxes of subentities are ignored) The collision radius of the launched missile is taken into account. The collision radius for a plain missile is 4.52 meter.
  
 
== missile_load_time ==
 
== missile_load_time ==
Defines the time in seconds before a new missile is ready to fire after one is fired. Mainly useful for npc ships that have many missiles. Added with test release 1.74
+
Defines the time in seconds before a new missile is ready to fire after one is fired. Mainly useful for npc ships that have many missiles.
  
 
Example:
 
Example:
  <key>missile_load_time</key>
+
  "missile_load_time" = "2.1";
<string>2.1</string>
 
  
  
 
== missiles ==
 
== missiles ==
Sets a ship's probable number of missiles.
+
Sets the number of missiles the ship is equipped with on ship creation. e.g. you can set this at zero and than use a dedicated script to fill up the bay with specific missiles.
  
 
Example:
 
Example:
  <key>missiles</key>
+
  "missiles" = "0";
<integer>0</integer>
 
  
 
== missile_role ==
 
== missile_role ==
Defines the entity that is launched as missile. Can specify a certain missile-type or any other ship-entity by role. Only applies to NPC's, player-ship dependacies must be defined in the [[shipyard.plist]]. If no missile_role is defined and a NPC ship launches a missile he most often chooses the default missile but sometimes chooses one at random from all ships with role missile inside one of the installed OXP's.  
+
Defines the type of missiles (or mines) an NPC ship is provided with. Default is "EQ_MISSILE". When missiles are loaded on ship creation, 90% will be of this type and 10% will be random, chosen from all possible NPC missiles and mines. Also affects the javascript [[Oolite_JavaScript_Reference:_Ship#selectNewMissile|selectNewMissile()]] command.
 +
The string defined inside missile_role needs both to be defined inside [[equipment.plist]], and be inside the '''roles''' property of the missile/mine shipdata entry.  
 +
 
 +
To assign a specific missile type to a newly bought player ship, its dependancies must be defined inside [[shipyard.plist]].
  
 
Example:  
 
Example:  
  <key>missile_role</key>
+
  "missile_role" = "EQ_THARGON";
<string>thargon</string>
 
  
 
== model ==
 
== model ==
Line 656: Line 654:
  
 
Example:
 
Example:
  <key>model</key>
+
  "model" = "example_ship.dat";
  <string>example_ship.dat</string>
+
 
 +
== model_scale_factor ==
 +
1.81 or later only.
 +
 
 +
If this is set, the model specified in the <code>model</code> property will be scaled by this factor (the default is 1.0, of course). Additionally, all subentities will have both their positions and sizes scaled (recursively if necessary), and the weapon positions will also be multiplied by the scale factor.
 +
 
 +
Player ships will also have their internal and external view positions multiplied by the scale factor.
 +
 
 +
model_scale_factors on subentities will be ignored - the value for the main entity will be used instead.
 +
 
 +
Example:
 +
  "model_scale_factor" = 2.0;
  
 
== name ==
 
== name ==
Line 663: Line 672:
  
 
Example:
 
Example:
  <key>name</key>
+
  "name" = "ExampleShip Mark IX";
<string>ExampleShip Mark IX</string>
+
 
 +
See also [[Shipdata.plist#display_name|display name]], [[Shipdata.plist#ship_name|ship_name]] & [[Shipdata.plist#ship_class_name|ship_class_name]]
  
 
== no_boulders ==
 
== no_boulders ==
Line 670: Line 680:
  
 
Example:
 
Example:
  <key>no_boulders</key>
+
  "no_boulders" = yes;
<true/>
 
  
 
== pilot ==
 
== pilot ==
Line 678: Line 687:
 
    
 
    
 
Example:
 
Example:
  <key>pilot</key>
+
  "pilot" = "constrictor-mission-thief";
<string>constrictor-mission-thief</string>
 
<!-- key to entry in characters.plist -->
 
  
== port_dimensions ==
+
When no pilot is defined, Oolite will create a random pilot based on the ships role. For custom roles this means that Oolite has no clue and the pilot might have other bounties/insurances than desired. For this reason contains Oolite, starting with v 1.75, some predefined pilots: "oolite-trader", "oolite-pirate", "oolite-hunter", "oolite-police", "oolite-miner", "oolite-passenger" and "oolite-slave". When using one of these pilots, a random bounty/insurance will be set appropriate for this pilot role. Pilot bounty is different as ship bounty but on ejecting the pilot inherits the highest of both values. (actually a bitwise OR of both values)
Defines the size of the docking port and takes 3 numbers, separated by "x". This key is generally of little use and can be skipped as it becomes overwritten by the actual size of the bounding box of the dock subentity when a correct dock subentity is defined.
+
 
 
+
== port_weapon_type ==
Example:
+
{{oolite-prop-added|1.77}}
<key>port_dimensions</key>
+
 
<string>65x30x500</string>
+
Assigns the ship's port laser.
 +
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE).
  
Size of Oolites main-station dock is: 64.00 x 192.00 x 250.00  while the dimension of a rock-hermit dock is: 138.001 x 138.001 x 250.12 (W x H x L)<br>
+
While not essential, you should generally assign the same weapon to [[#starboard_weapon_type|starboard_weapon_type]].
These sizes may be relevant for ship dimensions as since Oolite 1.75 ships must fit in these docks to be allowed docking or launching.
 
  
== port_radius ==
 
Defines the size of the docking port radius. Or more precise, this is the distance from the station centre to the port location. Default value is 500. This key is generally of little use and can be skipped as it will be overwritten by the real position of the dock subentity.
 
 
 
 
Example:
 
Example:
  <key>port_radius</key>
+
  "port_weapon_type" = "WEAPON_BEAM_LASER";
<string>500</string>
 
  
== requires_docking_clearance ==
+
== reaction_time ==
Sets the requirement for docking clearance. Default is false. See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|DockingClearance]]
+
Sets the reaction time of the pilot of this ship. The default is 1.5 seconds.
  
 
Example:
 
Example:
  <key>requires_docking_clearance</key>
+
  "reaction_time" = 1.0; // this pilot is superhuman! or a cat
</true>
 
  
 
== roles ==
 
== roles ==
 
Assigns which [[role]](s) the entity should have, that can correspond to one specific, exclusive use, or several.
 
Assigns which [[role]](s) the entity should have, that can correspond to one specific, exclusive use, or several.
  
The game engine constantly calls for generic roles to populate the universe.  In the example below the ship in question will be considered twice as often (2.0) when a trader is called for, only one quarter as often (0.25) when looking for a hunter, and as often as any other pirate ships when looking for a pirate.
+
The game engine constantly calls for generic roles to populate the universe.  In the example below the ship in question will be considered twice as often (2.0) when a trader is called for, only one quarter as often (0.25) when looking for a hunter, and as often as any other pirate ships when looking for a pirate. Multiple roles are space separated. An explanation of the generic roles available in Oolite 1.79 or later is at [[Oolite_Ship_Roles]].
  
 
'''NB:''' If the ship cannot be docked to, extra care should be taken to avoid using the words '''station''' or '''carrier''' as part of any of the ship's role names. When either of these words are inside the roles key, the ship is automatically given station attributes. Other ships might even fruitless try to dock with it, and it will affect how some ships / entities are shown on the scanner.
 
'''NB:''' If the ship cannot be docked to, extra care should be taken to avoid using the words '''station''' or '''carrier''' as part of any of the ship's role names. When either of these words are inside the roles key, the ship is automatically given station attributes. Other ships might even fruitless try to dock with it, and it will affect how some ships / entities are shown on the scanner.
  
 
Example:
 
Example:
  <key>roles</key>
+
  "roles" = "hunter(0.25) trader(2.0) pirate";
<string>hunter(0.25) trader(2.0) pirate</string>
 
  
 
or an exclusive role, simply:
 
or an exclusive role, simply:
  
  <key>roles</key>
+
  "roles" = "uniquely_named_role";
<string>uniquely_named_role</string>
 
  
 
This has the benefit of being the only ship to be selected when a [[Script.plist|script]] calls for the ''uniquely_named_role'' ship.
 
This has the benefit of being the only ship to be selected when a [[Script.plist|script]] calls for the ''uniquely_named_role'' ship.
Line 727: Line 727:
  
 
Example:
 
Example:
  <key>roles</key>
+
  "roles" = "Gold";
<string>Gold</string>
 
  
 
Some roles are used by the game engine to populate systems, detect and define properties. (see also the [[System Populator]])
 
Some roles are used by the game engine to populate systems, detect and define properties. (see also the [[System Populator]])
Line 734: Line 733:
 
Externally used equipment also needs specific mention of role, for example EQ_*_MINE and EQ_*_MISSILE.
 
Externally used equipment also needs specific mention of role, for example EQ_*_MINE and EQ_*_MISSILE.
  
==rotating==
+
* [https://bb.oolite.space/viewtopic.php?p=98050#p98050 1 1/2 pages of discussion of station population percentages] (2010)
Given to a station when rotation is desired.
 
 
 
Example:
 
<key>rotating</key>
 
<true/>
 
 
 
  
 
== rotational_velocity ==
 
== rotational_velocity ==
Line 747: Line 740:
  
 
Example:
 
Example:
  <key>rotational_velocity</key>
+
  "rotational_velocity" = "0.707 0.0 0.0 0.707";
<string>0.707 0.0 0.0 0.707</string>
 
  
 +
An explaining example taken from the Oolite Bulletin board.
 +
 +
The rotational velocity key is rotation per second. For instance, if you want to rotate once per 20 seconds around the Z axis:
 +
 +
a = 360 ° / 20 = 18 °
 +
 +
[x, y, z] = [0, 0, 1]
 +
 +
sin a ˜ 0.30902
 +
 +
cos a ˜ 0.95106
 +
 +
Q = (0.95106, 0, 0, 0.30902)
 +
 +
'''shipdata.plist entry:'''
 +
"rotational_velocity"="0.95106 0.0 0.0 0.30902";
 +
 +
In practical terms, one can therefore use
 +
"rotational_velocity"="3 0 0 1"
 +
To alter the speed of rotation increase number 3, for slower rotations, decrease for higher speed. For opposite rotational direction, change 1 to -1.[https://bb.oolite.space/viewtopic.php?f=4&t=6899&p=93038&hilit=rotational+velocity+key#p93038 (ref: Arhuman BB 1/11-09)]
  
 
== scan_class ==
 
== scan_class ==
Will alter the model's appearance on the [[IFF system]].  If this line is omitted, it will become by default a standard ship entity, appearing as yellow flag on the radar.  There are other options.
+
Will alter the model's appearance on the [[IFF system]].  If this line is omitted, it will usually become by default a standard ship entity (CLASS_NEUTRAL), appearing as a yellow flag on the radar (red if hostile to the player), but may be given a different scan class if added with other roles.  There are other options.
* CLASS_BUOY
+
* CLASS_BUOY - green/yellow on scanner, will rotate in idle state, does not masslock
* CLASS_CARGO
+
* CLASS_CARGO - white on scanner, can be scooped, does not masslock
* CLASS_MILITARY
+
* CLASS_MILITARY - purple on scanner, better pilots, will not attack other military ships, flashes purple/magenta if hostile to player
* CLASS_MISSILE
+
* CLASS_MISSILE - cyan on scanner, will not avoid collisions
* CLASS_POLICE
+
* CLASS_POLICE - purple on scanner, will not attack other police ships, legal penalties for attacking, never has bounty, flashes purple/magenta if hostile to player
* CLASS_ROCK
+
* CLASS_ROCK - white on scanner, launched defense ships do not inherit scan class, does not masslock
* CLASS_STATION
+
* CLASS_STATION - green on scanner, launched defense ships do not inherit scan class
* CLASS_THARGOID
+
* CLASS_THARGOID - green/red on scanner, considered hostile to any non-thargoid ship
* CLASS_NO_DRAW
+
* CLASS_NO_DRAW - invisible on scanner, cannot be targeted by missiles, does not masslock
(Name is valid starting with Oolite 1.74. Before it was called "scanClass". Also starting with 1.74 is that scripts can define custom colours for ships on the [[IFF system]] so ships might have an other scan_class as is seams.)
+
* CLASS_MINE - red/yellow on scanner, automatically set on mines launched by player to override existing scan class, does not masslock
 +
(This property was called "scanClass" before Oolite 1.74.)
 +
Scan classes marked as "does not masslock" will masslock the player anyway if they are hostile to the player (as condition will be Red)
 +
 
 +
Scripts can define custom colours for ships on the [[IFF system]] so ships may have a scanner appearance different to the default for their scan class.
 +
 
 +
Example:
 +
"scan_class" = "CLASS_ROCK";
  
 
==== Developer Note ====
 
==== Developer Note ====
 
Oolite uses scan_class internally to determine the behaviour of some ships (particularly with regard to who may shoot whom without incurring legal penalties). Bear this in mind and don't allocate CLASS_POLICE or CLASS_THARGOID to ships lightly!
 
Oolite uses scan_class internally to determine the behaviour of some ships (particularly with regard to who may shoot whom without incurring legal penalties). Bear this in mind and don't allocate CLASS_POLICE or CLASS_THARGOID to ships lightly!
 +
 +
== scan_description ==
 +
{{oolite-prop-added|1.81}}
 +
 +
The description of the ship's legal status on the [[Scanner Targeting Enhancement]]. If this is absent, the default text for the scan class will be used.
 +
 +
"scan_description" = "Unclaimed rock";
 +
 +
== scanner_display_color1 ==
 +
Overrides the color that would normally be set by scanClass.
 +
 +
Example:
 +
"scanner_display_color1" = "greenColor";
 +
 +
== scanner_display_color2 ==
 +
Overrides the color that would normally be set by scanClass. If this is set, the ship will flash between the two colours.
 +
 +
Example:
 +
"scanner_display_color2" = "redColor";
 +
 +
== scanner_hostile_display_color1 ==
 +
{{oolite-prop-added|1.81}}
 +
 +
Overrides the color that would normally be set by scanClass when the ship is hostile and targeting the player.
 +
 +
If no hostile colours are set, but normal colours are set, then the normal colours, not the scan class colours, will be used for a hostile ship.
 +
 +
Example:
 +
"scanner_hostile_display_color1" = "greenColor";
 +
 +
== scanner_hostile_display_color2 ==
 +
{{oolite-prop-added|1.81}}
 +
 +
Overrides the color that would normally be set by scanClass when the ship is hostile and targeting the player. If this is set, the ship will flash between the two colours.
  
 
Example:
 
Example:
  <key>scan_class</key>
+
  "scanner_hostile_display_color2" = "redColor";
<string>CLASS_ROCK</string>
 
  
 
== scanner_range ==
 
== scanner_range ==
 
Sets a custom scanner range. Standard is 25.6 km, thargoids have 50 km. Only applies to NPCs. However, at least since oolite 1.65 all defined scanner ranges are limited to 25.6 km, even for thargoids. This means it only makes sense defining shorter ranges than the maximum range.
 
Sets a custom scanner range. Standard is 25.6 km, thargoids have 50 km. Only applies to NPCs. However, at least since oolite 1.65 all defined scanner ranges are limited to 25.6 km, even for thargoids. This means it only makes sense defining shorter ranges than the maximum range.
 +
 +
Example:
 +
"scanner_range" = "25600";
  
 
== scoop_position ==
 
== scoop_position ==
Line 778: Line 833:
  
 
Example:
 
Example:
  <key>scoop_position</key>
+
  "scoop_position" = "0.0 -4.5 -23.0"
<string>0.0 -4.5 -23.0</string>
+
 
 +
Scooping for a player ship starts when the cargo collides with the front half of the bottom of the ship. Any other place of first contact leads to smashing the cargo in pieces. A good y-value for the position would therefor be half the size of the lowest body part of this area of the ship. For the z-value a point in the back side would be better.
 +
 
 +
[https://bb.oolite.space/viewtopic.php?p=55413#p55413 2008 note] by Eric Walsh on what this ''does''.
  
 
== script ==
 
== script ==
Specifies a [[Scripting Oolite with JavaScript|JavaScript script]] to attach to the ship. Ship scripts were introduced with Oolite test release 1.70, and are the preferred approach to scripting ships in new versions of Oolite.
+
Specifies a [[Oolite_JavaScript_Reference:_Ship_script_event_handlers |Ship Script]] (through it's filename) to attach to the ship. Ship scripts written in [[Scripting Oolite with JavaScript|JavaScript]] are the preferred approach for scripting ships in current Oolite.
  
 
== script_info ==
 
== script_info ==
 
A property list whose contents are available to JavaScript scripts, for whatever use they desire. It is exposed to JavaScript as the <code>[[Oolite JavaScript Reference: Ship#scriptInfo|scriptInfo]]</code> property of <code>Ship</code> objects.<br>
 
A property list whose contents are available to JavaScript scripts, for whatever use they desire. It is exposed to JavaScript as the <code>[[Oolite JavaScript Reference: Ship#scriptInfo|scriptInfo]]</code> property of <code>Ship</code> objects.<br>
 
Take note that when using an ascii plist, the JS engine will read in all entries as strings. When you need an entry as number, you might need to explicit convert it to a number. This is specially true for booleans as a "NO" string will be read as true. For all normal keys its Oolite that does the conversion for you.
 
Take note that when using an ascii plist, the JS engine will read in all entries as strings. When you need an entry as number, you might need to explicit convert it to a number. This is specially true for booleans as a "NO" string will be read as true. For all normal keys its Oolite that does the conversion for you.
 +
 +
A short overview about used [[OXP_scriptInfo|script_info keys in OXPs]].
  
 
== script_actions ==
 
== script_actions ==
Line 792: Line 852:
  
 
Example:
 
Example:
  <key>script_actions</key>
+
  "script_actions" =
  <array>
+
  (
     <string>debugOn</string>
+
     "testForEquipment: EQ_CLOAKING_DEVICE",
    <string>testForEquipment: EQ_CLOAKING_DEVICE</string>
+
     {
     <dict>
+
         "conditions"
         <key>conditions</key>
+
         (
         <array>
+
           "foundEquipment_bool equal NO"
           <string>foundEquipment_bool equal NO</string>
+
         )
         </array>
+
         "do"
         <key>do</key>
+
         (
         <array>
+
           "awardEquipment: EQ_CLOAKING_DEVICE"
           <string>awardEquipment: EQ_CLOAKING_DEVICE</string>
+
         )
         </array>
+
         "else"
         <key>else</key>
+
         (
         <array>
+
           "awardCargo: 100 Gold"
           <string>awardCargo: 100 Gold</string>
+
         )
         </array>
+
     }
    </dict>
+
  );
     <string>debugOff</string>
 
  </array>
 
  
 
== setup_actions ==
 
== setup_actions ==
Line 817: Line 875:
  
 
Example:
 
Example:
  <key>setup_actions</key>
+
  "setup_actions" =
  <array>
+
  (
     <string>initialiseTurret</string>
+
     "initialiseTurret"
  </array>
+
  );
  
  
Line 826: Line 884:
 
The ''shaders'' dictionary has the same structure as the ''[[#materials|materials]]'' dictionary. When [[Shaders in Oolite|shaders]] are available, the contents of the ''shaders'' dictionary are used in preference to those in ''materials''. If shaders are not available, the ''shaders'' dictionary is ignored.
 
The ''shaders'' dictionary has the same structure as the ''[[#materials|materials]]'' dictionary. When [[Shaders in Oolite|shaders]] are available, the contents of the ''shaders'' dictionary are used in preference to those in ''materials''. If shaders are not available, the ''shaders'' dictionary is ignored.
  
 +
== ship_name ==
 +
{{oolite-prop-added|1.79}}
 +
 +
The name of this individual ship (e.g. Pride of Lave), which is placed in [[Oolite_JavaScript_Reference:_Ship#shipUniqueName|ship.shipUniqueName]]. It rarely makes sense to set this property in <code>shipdata.plist</code>, except perhaps for a unique mission ship.
 +
 +
== ship_class_name ==
 +
{{oolite-prop-added|1.79}}
 +
 +
The name of this ship's class (e.g. Sidewinder), which is placed in [[Oolite_JavaScript_Reference:_Ship#shipClassName|ship.shipClassName]]. If this is not set, it will default to [[#name|name]], which is usually suitable.
 +
 +
== show_damage ==
 +
{{oolite-prop-added|1.81}}
 +
 +
Whether to show sparks and other damage effects when this ship is hit.
 +
 +
Defaults to on if energy recharge rate is greater than zero, off otherwise, for compatibility with previous hard-coded behaviour.
  
 
== smooth ==
 
== smooth ==
Line 835: Line 909:
  
 
Example:
 
Example:
  <key>smooth</key>
+
  "smooth" = yes;
<true/>
 
  
 
== spawn ==
 
== spawn ==
Line 842: Line 915:
  
 
Example
 
Example
  <key>spawn</key>
+
  "spawn"
  <dict>
+
  {
       <key>facing_position</key>
+
       "facing_position" = "spu 0 0 0";
      <string>spu 0 0 0</string>
+
       "position" = "wpu 0 0 0.2";
       <key>position</key>
+
  }
      <string>wpu 0 0 0.2</string>
+
 
  </dict>
+
 
 +
== starboard_weapon_type ==
 +
{{oolite-prop-added|1.77}}
 +
 
 +
Assigns the ship's starboard laser.
 +
Any weapon type from the [[equipment.plist]] can be used (and WEAPON_NONE).
  
== station_roll ==
+
While not essential, you should generally assign the same weapon to [[#port_weapon_type|port_weapon_type]].
Determines the rotation speed of a station. Default value is determined by the systemwide station_roll in planetInfo.plist. If that is not defined, the default is 0.4. Negative values are also possible for a rotation in the other direction. (Key is added in Oolite 1.74.2)
 
  
 
Example:
 
Example:
  <key>station_roll </key>
+
  "starboard_weapon_type" = "WEAPON_BEAM_LASER";
<string>-1.5</string>
 
  
 
== subentities ==
 
== subentities ==
Line 861: Line 937:
 
* ''Static subentities'', the default type, are simply extra models. They are defined as separate shipdata.plist entries, so technically they’re ships, but they don’t have a mind of their own. If the main ship is [[#frangible|frangible]], static subentities can take damage and blow up separately from the main ship. They can also be individually exploded or removed by scripts.
 
* ''Static subentities'', the default type, are simply extra models. They are defined as separate shipdata.plist entries, so technically they’re ships, but they don’t have a mind of their own. If the main ship is [[#frangible|frangible]], static subentities can take damage and blow up separately from the main ship. They can also be individually exploded or removed by scripts.
 
* ''Docks'' are recognized when setting up a station or carrier, and used to determine the station’s docking port parameters. After set-up, they work just like normal static subentities. The string "dock" in lowercase must be part of the old style name in order to get recognised as the dock subEntity.
 
* ''Docks'' are recognized when setting up a station or carrier, and used to determine the station’s docking port parameters. After set-up, they work just like normal static subentities. The string "dock" in lowercase must be part of the old style name in order to get recognised as the dock subEntity.
* 'Ball turrets'' turn to track the ship’s current target, and shoot plasma balls if the target is within range (6000 metres). A ball turret’s field of fire is a 157 ° cone centred on its original facing. Currently, ball turrets make no effort not to shoot their own ship, so it is up to the designer to ensure this field of fire is clear. Like a static subentity, a ball turret is based on a shipdata.plist entry so its appearance can be customized. Oolite 1.72 or later provides a built-in shipdata entry for ball turrets called, imaginatively, '''ballturret'''.
+
* ''Ball turrets'' turn to track the ship’s current target, and shoot plasma balls if the target is within range (6000 metres). A ball turret’s field of fire is a 157 ° cone centred on its original facing. Currently, ball turrets make no effort not to shoot their own ship, so it is up to the designer to ensure this field of fire is clear. Like a static subentity, a ball turret is based on a shipdata.plist entry so its appearance can be customized. Oolite provides a built-in shipdata entry for ball turrets called, imaginatively, '''ballturret'''.
 +
: For discussion on the effective range (before the reduction from the original 7500 to 7200) see [https://bb.oolite.space/viewtopic.php?p=198854#p198854 here].
 +
:Note that the [[Vortex]] turrets can be switched off. This involved special scripting (basically removing and restoring the turrets by script). Needs a little fancy footwork when docked though or else if you dock with removed sub-entities (even deliberately removed ones) you'll get a maintenance overhaul offered which will put them back if purchased.
 
* ''Flashers'' are blobs which glow with a pulsating light. From Oolite 1.74 onwards, constant light will also be an option. Note that while flashers appear luminous – they are unaffected by shadows – they do not cast light on other objects.
 
* ''Flashers'' are blobs which glow with a pulsating light. From Oolite 1.74 onwards, constant light will also be an option. Note that while flashers appear luminous – they are unaffected by shadows – they do not cast light on other objects.
 +
* Random number of Subentities (''eg'' Cargo pods): see [https://bb.oolite.space/viewtopic.php?f=4&t=18743 Can the number of entities a ship be randomized?] (2017)
  
 
=== New-style subentity definition ===
 
=== New-style subentity definition ===
 
Oolite 1.73 introduced a more flexible, dictionary-based way of specifying subentities. A new-style subentity is a dictionary using the following keys:
 
Oolite 1.73 introduced a more flexible, dictionary-based way of specifying subentities. A new-style subentity is a dictionary using the following keys:
{| class="wikitable" border="1" cellpadding="3" cellspacing="0"
+
{| class="wikitable" border="1" cellpadding="3" cellspacing="0" style="width:100%"
 
|+ Subentity definition properties
 
|+ Subentity definition properties
 
! Name !! Type !! Description
 
! Name !! Type !! Description
Line 878: Line 957:
 
| '''orientation''' || [[quaternion]] || The orientation of the subentity. Ignored for flashers. (This can be specified as a string with four numbers in it, or an array of four numbers, or a dictionary with '''w''', '''x''', '''y''' and '''z''' entries.) Default: (1, 0, 0, 0), which corresponds to no rotation.
 
| '''orientation''' || [[quaternion]] || The orientation of the subentity. Ignored for flashers. (This can be specified as a string with four numbers in it, or an array of four numbers, or a dictionary with '''w''', '''x''', '''y''' and '''z''' entries.) Default: (1, 0, 0, 0), which corresponds to no rotation.
 
|-
 
|-
| '''is_dock''' || boolean || True if the subentity is a dock; false by default. Only applies to '''standard''' subentities. '''Note:''' this is ''not'' implied by having “dock” in the '''subentity_key''', as it is for old-style subentity definitions.
+
| '''is_dock''' || boolean || True if the subentity is a dock; false by default. Only applies to '''standard''' subentities. '''Note:''' this is ''not'' implied by having “dock” in the '''subentity_key''', as it is for old-style subentity definitions. In Oolite 1.76 or earlier a station may only have at most one dock subentity.
 +
|}
 +
 
 +
{| class="wikitable" border="1" cellpadding="3" cellspacing="0" style="width:100%"
 +
|+ Subentity definition properties for dock subentities (1.77 or later)
 +
! Name !! Type !! Description
 +
|-
 +
| '''allow_docking''' || boolean || ''In Oolite 1.77 or later'', whether the dock allows docking. Defaults to true. (and always true in 1.76). Ignored for non-docks.
 +
|-
 +
| '''allow_launching''' || boolean || ''In Oolite 1.77 or later'', whether the dock allows launching. Defaults to true. (and always true in 1.76).  Ignored for non-docks.
 +
|-
 +
| '''disallowed_docking_collides''' || boolean || ''In Oolite 1.77 or later'', if this is true, ships attempting to dock here will collide with the dock if <code>allow_docking</code> is false. If it is false, ships attempting to dock here will be docked with the station anyway. Defaults to false. (and always false in 1.76).  Ignored for non-docks.
 +
|-
 +
| '''dock_label''' || string || ''In Oolite 1.77 or later'', the name given to the dock by traffic control (overrides the display_name of the dock subentity). Defaults to "the docking bay", and ignored for non-docks. In Oolite 1.76 or earlier the concept of dock names is meaningless.
 +
|}
 +
See [[Multiple Docks]] for more information on dock subentities and stations with more than one dock in Oolite 1.77 or later.
 +
 
 +
{| class="wikitable" border="1" cellpadding="3" cellspacing="0" style="width:100%"
 +
|+ Subentity definition properties for ball turrets
 +
! Name !! Type !! Description
 
|-
 
|-
 
| '''fire_rate''' || number || Interval between shots in seconds, for '''ball_turret''' subentities. Default: 0.5; minimum: 0.25.
 
| '''fire_rate''' || number || Interval between shots in seconds, for '''ball_turret''' subentities. Default: 0.5; minimum: 0.25.
 +
|-
 +
| '''weapon_range''' || number || Range for '''ball_turret''' subentities. Default: 6000; maximum 7200.
 +
|-
 +
| '''weapon_energy''' || number || Weapon energy for '''ball_turret''' subentities. Default: 25; maximum 100.
 +
|}
 +
See [https://bb.oolite.space/viewtopic.php?f=4&t=12085 New range of turrets] for more information on turret subentities (2012 discussion about modelling, quaternions, ''etc'').
 +
 +
{| class="wikitable" border="1" cellpadding="3" cellspacing="0" style="width:100%"
 +
|+ Subentity definition properties for flashers
 +
! Name !! Type !! Description
 
|-
 
|-
 
| '''color''' || [[Materials in Oolite#Colour specifiers|colour specifier]] || Single colour for a flasher. Ignored for non-flashers. Default value: '''redColor'''.
 
| '''color''' || [[Materials in Oolite#Colour specifiers|colour specifier]] || Single colour for a flasher. Ignored for non-flashers. Default value: '''redColor'''.
Line 893: Line 1,001:
 
|-
 
|-
 
| '''size''' || positive number || Diameter of a flasher in metres. Ignored for non-flashers. Default: 8. (Why 8? I don’t remember.)
 
| '''size''' || positive number || Diameter of a flasher in metres. Ignored for non-flashers. Default: 8. (Why 8? I don’t remember.)
 +
|-
 +
| '''bright_fraction''' || number || ''In Oolite 1.77 or later'', a number between 0 and 1 defining the proportion of the flasher's cycle that the flasher is bright for. Ignored for non-flashers. The default (which mimics the behaviour of all flashers in 1.76 or earlier) is 0.5.
 
|-
 
|-
 
|}
 
|}
Line 926: Line 1,036:
  
 
'''is_dock''' is implied by having the string “dock” (in lowercase) in the ''key''.
 
'''is_dock''' is implied by having the string “dock” (in lowercase) in the ''key''.
 +
 +
=== Links ===
 +
*[https://bb.oolite.space/viewtopic.php?f=3&t=19091 How are subentity scripts supposed to work ?] (2017)
 +
*[https://bb.oolite.space/viewtopic.php?f=4&t=11716 Ball turrets] (2012)
 +
*[https://bb.oolite.space/viewtopic.php?f=4&t=7222 Docking bay problems] (2009) - covers a range of issues
 +
*Some OXP's with subentities:
 +
:Thargoids: [[Stellar Serpents OXP]] (2010), [[Animated Ships]]/Butterflies (2011), [[Aquatics]] (2011: Hammerhead bulk carrier & the Aqualina stations), [[WildShips OXP]] (2012-14: moving elevators inside station struts)
 +
:[[Z GrOovy HPC pack]] (2014 - bought equipment is visible on ship!); [[Scrub]] (2022 - rotating rings)
 +
 +
== sun_glare_filter ==
 +
{{oolite-prop-added|1.79}}
 +
 +
The default strength of the sun glare filter on this ship. A number between 0 and 1, with the default being 0 (no filter)
 +
 +
  "sun_glare_filter" = 0.3;
  
 
== track_contacts ==
 
== track_contacts ==
Line 931: Line 1,056:
  
 
Example:
 
Example:
  <key>track_contacts</key>
+
  "track_contacts" = yes;
<true/>
 
  
 
== throw_sparks ==
 
== throw_sparks ==
Each new ship should start in seemingly good operating condition, unless specifically told not to. (Added with oolite 1.73, false by default)
+
{{oolite-prop-added|1.73}}
 +
 
 +
Each new ship should start in seemingly good operating condition, unless specifically told not to. (false by default)
  
 
Example:
 
Example:
  <key>throw_sparks</key>
+
  "throw_sparks" = yes;
<true/>
 
  
 
== thrust ==
 
== thrust ==
Line 945: Line 1,070:
  
 
Example:
 
Example:
  <key>thrust</key>
+
  "thrust" = "25"
<real>25</real>
 
  
 
== unpiloted ==
 
== unpiloted ==
Line 954: Line 1,078:
  
 
Example:
 
Example:
  <key>unpiloted</key>
+
  "unpiloted" = yes;
<true/>
 
  
 
== view_position_.. ==
 
== view_position_.. ==
Line 961: Line 1,084:
  
 
Example:
 
Example:
  <key>view_position_aft</key>
+
  "view_position_aft" = "0.0 5.0 -20.0";
<string>0.0 5.0 -20.0</string>
+
  "view_position_forward" = "0.0 1.9375 5.0";
  <key>view_position_forward</key>
+
  "view_position_port" = "-11.85 2.825 -3.5";
<string>0.0 1.9375 5.0</string>
+
  "view_position_starboard" = "11.85 2.825 -3.5";
  <key>view_position_port</key>
 
<string>-11.85 2.825 -3.5</string>
 
  <key>view_position_starboard</key>
 
<string>11.85 2.825 -3.5</string>
 
  
  
Line 975: Line 1,094:
  
 
<b>Missiles.</b> Changes the damage inflicted by the missile. Any value accepted.
 
<b>Missiles.</b> Changes the damage inflicted by the missile. Any value accepted.
 +
 +
<b>NPC ships.</b> Changes the forward weapon damage to a value different to the default one. Values higher than 50 will be clamped to 50. Does not change the value for aft weapons or subEntity weapons.<br>
 +
<i><b>N.B.</b> It does not have any effect on player ships.</i>
 +
 +
<b>turrets.</b> Unused for turrets. Set the turret weapon_energy in its [[Shipdata.plist#New-style_subentity_definition|subEntity directory]].
 +
 +
Default values are: WEAPON_PLASMA_CANNON = 6.0; WEAPON_PULSE_LASER = 15.0; WEAPON_BEAM_LASER = 15.0; WEAPON_MINING_LASER = 50.0; WEAPON_THARGOID_LASER = 12.5; WEAPON_MILITARY_LASER = 23.0
  
 
Example:
 
Example:
  <key>weapon_energy</key>
+
  "weapon_energy" = "17";
<real>180</real>
+
 
 +
== weapon_facings ==
 +
{{oolite-prop-added|1.77}}
 +
 
 +
What weapon mounts are available on the ship. This is a bit-mask, so pick the mounts and add the numbers:
  
 +
1 - Forward<br />
 +
2 - Aft<br />
 +
4 - Port<br />
 +
8 - Starboard<br />
  
<b>NPC ships.</b> Changes the forward weapon damage to a value different to the default one. Values higher than 50 will be ignored.
+
Example: <br />
 +
Fore and aft weapon mounts only.
 +
  <key>weapon_facings</key>
 +
  <integer>3</integer>
  
Default values are: WEAPON_PLASMA_CANNON = 6.0; WEAPON_PULSE_LASER = 15.0; WEAPON_BEAM_LASER = 15.0; WEAPON_MINING_LASER = 50.0; WEAPON_THARGOID_LASER = 12.5; WEAPON_MILITARY_LASER = 23.0
+
If omitted, defaults to 15 (all mounts). If a player ship has this specified, and the same property specified in shipyard.plist, the shipyard.plist property takes precedence.
 +
 
 +
Weapons assigned to a mount that the ship does not have will be ignored. Scripting cannot be used to add weapons to these mounts later, either.
 +
 
 +
== weapon_mount_mode ==
 +
{{oolite-prop-added|1.83}}
 +
 
 +
This controls how multiple weapon mount points work. It has three possible values:
 +
* '''"single"''': this is the default, and replicates 1.82 and previous behaviour. In this mode, <code>weapon_position_*</code> properties are simple vector expressions, and there is exactly one mount per facing.
 +
* '''"split"''': In this mode, <code>weapon_position_*</code> properties are an array of vector expressions. A weapon fitted to this facing has the same heat and energy cost as a single standard weapon, and the damage output is divided equally between all mount points. (in other words, the distinction is mainly cosmetic)
 +
* '''"multiply"''': In this mode, <code>weapon_position_*</code> properties are an array of vector expressions. A weapon fitted to this facing has N times the heat and energy cost as a single standard weapon, and each mount point does normal damage. (in other words, the weapon is fitted N times at once)
  
Example:
+
For best results with AI and the "target reticle sensitive" feature, if there are several weapon positions in a (rough) line, the middle one should be listed first.
<key>weapon_energy</key>
 
<real>17</real>
 
  
<i><b>N.B.</b> It does not have any effect on player ships.</i>
+
See [https://github.com/OoliteProject/oolite/pull/161 this comment] or [[Multiple Lasers]] for examples.
  
 
== weapon_offset ==
 
== weapon_offset ==
Line 996: Line 1,141:
 
== weapon_position_.. ==
 
== weapon_position_.. ==
 
Plots the 'gunmouth' points of the model's 4 potential lasers.
 
Plots the 'gunmouth' points of the model's 4 potential lasers.
 +
 +
In 1.82 and earlier, and in 1.83 and later in the "single" <code>weapon_mount_mode</code>, these are vector expressions.
 +
 +
Example:
 +
"weapon_position_aft" = "0.0 -5.0 -20.0";
 +
"weapon_position_forward" = "0.0 0.0417 16.6667";
 +
"weapon_position_port" = "-13.75 -2.0625 -1.875";
 +
"weapon_position_starboard" = "13.75 -2.0625 -1.875";
 +
 +
In 1.83 and later, with "split" or "multiply" <code>weapon_mount_mode</code>, these values are specified as arrays of vector expressions. For example:
 +
"weapon_position_forward" = ( "0.0 3.0 32.0" , "-15.0 0.0 32.0" , "15.0 0.0 32.0" )
 +
 +
= Station keys=
 +
The following keys are only used by stations or carriers.
 +
 +
== allegiance ==
 +
An advisory flag that informs AIs how they should expect to be treated near or when attempting to dock with this station. See [[Oolite_JavaScript_Reference:_Station#allegiance|station.allegiance]] for the allowable values. If this is not set, the game will guess based on other station properties.
 +
 +
Example:
 +
allegiance = "neutral";
 +
 +
== allows_auto_docking ==
 +
{{oolite-prop-added|1.75}}
 +
 +
When set false for a station, this station will not allow the use of a docking computer. Default value in "yes".
 +
 +
Example:
 +
allows_auto_docking = "no";
 +
 +
== allows_fast_docking ==
 +
{{oolite-prop-added|1.75}}
 +
 +
When set true for a station, this station will allow fast docking with the docking computer. Default value in "no".
 +
 +
Example:
 +
allows_fast_docking = "yes";
 +
 +
== defense_ship ==
 +
Gives an oportunity to designate a particular ship by name that will defend a station/carrier. See also [[Shipdata.plist#defense_ship_role|defense_ship_role]]
 +
 +
Example:
 +
defense_ship" = "my_defender";
 +
 +
== defense_ship_role ==
 +
Gives an oportunity to designate a particular (group of) ships that will defend a station/carrier. This has to be specified in the [[Shipdata.plist#roles|roles]] of the ship(s) that are assigned to defend. When launched from a carrier the scan_class becomes that of the carrier. Default role is "police"/"interceptor" for normal stations and "hermit-ship" for stations of CLASS_ROCK. Defense ships with scanclass police or with a hermit-ship role launch with a policeInterceptAI.plist. All other ships use the ai_type as defined in shipdata.plist. After launch, all primary roles are changed into: "defense_ship"
 +
 +
Example:
 +
"defense_ship_role" = " carrier_defenders";
 +
 +
== equipment_price_factor ==
 +
Equipment price mask for dockables.
 +
 +
Example:
 +
"equipment_price_factor" = "4.5";
 +
 +
== equivalent_tech_level ==
 +
Sets shipyard tech level for dockables, different to the local system tech_level. Default value is the system tech_level.
 +
 +
Example:
 +
"equivalent_tech_level" = 1;
 +
 +
== has_npc_traffic ==
 +
Determines if a station launches NPC traffic. Default is "yes" for stationary stations, and "no" for stations with a non-zero maximum speed. When set to "no" the station will not launch random ships as part of the main Oolite system repopulator (though OXP scripts may still launch ships from it).
 +
 +
The type of traffic launched depends on the [[#allegiance|allegiance]] property of the station (which also determines what, if any, ships may try to dock at it).
 +
 +
Example:
 +
"has_npc_traffic" = yes;
 +
 +
== has_patrol_ships ==
 +
{{oolite-prop-added|1.75}}
 +
 +
Determines if a station launches periodic patrol ships. Default is "no". Main stations always have patrol ships.
 +
 +
Example:
 +
"has_patrol_ships" = yes;
 +
 +
== has_shipyard ==
 +
Determines if a station or carrier has a shipyard. By chance factor as number between 0 and 1, but it can also be an array of conditions. Default is "no", but for main stations has_shipyard is always "yes". (Name is valid starting with Oolite 1.74. Before it was called "hasShipyard".)
 +
 +
Example:
 +
"has_shipyard" = "0.75";
 +
 +
or
 +
 +
"has_shipyard" = (
 +
                  "systemGovernment_number morethan 3",
 +
                  "systemEconomy_number lessthan 4"
 +
                  )
 +
 +
== interstellar_undocking ==
 +
{{oolite-prop-added|1.75}}
 +
 +
When set true for a station, this station will allow interstellar docking and undocking in interstellar space. When set to "no" the player docks in nearby normal space. Default value in "no".
 +
 +
Example:
 +
interstellar_undocking = "yes";
 +
 +
==is_carrier==
 +
Added as a tag for making the model be considered a carrier or station.  An alternative to including ''carrier'' or ''station'' among the [[Shipdata.plist#roles|roles]]. When present this key even overrules station/carrier settings with roles. (Name is valid starting with Oolite 1.74. Before it was called "isCarrier".)
 +
 +
Example:
 +
"is_carrier" = yes;
 +
 +
== market ==
 +
Key that sets the market for stations and carriers. The name defines the key in [[commodities.plist]] that will be used as local market. Without a market key, the stations primaryRole is used as market.  Added with test release 1.74 and no longer used in 1.81 or later, where it is replaced by the market_* properties below.
 +
 +
Example:
 +
"market" = "none";
 +
 +
== market_broadcast ==
 +
{{oolite-prop-added|1.81}}
 +
 +
If this is enabled the station's market will appear on the F8 screen if the player is in flight and has the station targeted. The default is enabled. This is ignored (and always true) if the station is the main station.
 +
 +
"market_broadcast" = no;
 +
 +
== market_capacity ==
 +
{{oolite-prop-added|1.81}}
 +
 +
The capacity in units per trade good of the station market. If omitted, the default market capacity of 127 units will be used. This is ignored if the station is the main station as it will use the system market, not its own.
 +
 +
"market_capacity" = 31;
 +
 +
== market_definition ==
 +
{{oolite-prop-added|1.81}}
 +
 +
An array of [[trade-goods.plist#Secondary_Market_Definitions|secondary market rules]] which modify some or all of the price, quantity, capacity and legal status of a good relative to the primary system market. This is ignored if the station is the main station as it will use the system market, not its own.
 +
 +
"market_definition" = (
 +
{
 +
// export cheap clothes
 +
"type" = "class";
 +
"name" = "oolite-wearable";
 +
"price_multiplier" = 0.8;
 +
"price_randomiser" = 0.1;
 +
"quantity_multiplier" = 3.5;
 +
"quantity_randomiser" = 3.0;
 +
},
 +
{
 +
// not really interested in other goods
 +
"type" = "default";
 +
"price_multiplier" = 0.55;
 +
"price_randomiser" = 0.25;
 +
"quantity_multiplier" = 0.0;
 +
"capacity" = 3;
 +
}
 +
);
 +
 +
If the capacity set by a rule is larger than the market_capacity of the station, the market_capacity of the station is used instead.
 +
 +
A blank array
 +
"market_definition" = ();
 +
will give a market identical to the primary system market.
 +
 +
If this key is omitted, the station will have no market. This is roughly equivalent to
 +
"market_definition" = (
 +
{
 +
"type" = "default";
 +
"price_multiplier" = 0;
 +
"quantity_multiplier" = 0;
 +
"capacity" = 0;
 +
}
 +
);
 +
 +
'''Note:''' There is some discussion about this at [https://bb.oolite.space/viewtopic.php?f=2&t=21512 Secondary Market Definitions Defined] (2023)
 +
 +
== market_monitored ==
 +
{{oolite-prop-added|1.81}}
 +
 +
If this is true, the market is subject to Cooperative law for the import and export of trade goods, and the player will gain the usual bounties for smuggling contraband. The default value is no. This is ignored (and effectively always true) if the station is the main station.
 +
 +
market_monitored = yes;
 +
 +
== market_script ==
 +
{{oolite-prop-added|1.81}}
 +
 +
Allows a [[Oolite Market Scripts|market script]] to be used to modify trade prices. This overrides market_definition, if it is present.
 +
 +
market_script = "myoxp_marketchanges.js";
 +
 +
'''Note:''' [https://bb.oolite.space/viewtopic.php?p=235837#p235837 What's the difference between the market script specified in planetinfo.plist and the one called for by trade-goods.plist?] (2015)
 +
 +
== max_defense_ships ==
 +
Designates how many ships a dockable entity (station, carrier) can launch in defense. Default value is 3. See also [[Station Ships]]
 +
 +
Example:
 +
"max_defense_ships" = "10";
 +
 +
== max_police ==
 +
Designates how many police or patrol ships a dockable entity (station, carrier) can launch.  Default value is 8. See also [[Station Ships]]
 +
 +
Example:
 +
"max_police " = "10";
 +
 +
== max_scavengers ==
 +
Designates how many scavengers or miners a dockable entity (station, carrier) can launch. Default value is 3. See also [[Station Ships]]
 +
 +
Example:
 +
"max_scavengers" = "10";
 +
 +
== port_dimensions ==
 +
Defines the size of the docking port and takes 3 numbers, separated by "x". This key is generally of little use and can be skipped as it becomes overwritten by the actual size of the bounding box of the dock subentity when a correct dock subentity is defined.
 +
 
 +
Example:
 +
"port_dimensions" = "65x30x500";
 +
 +
Size of Oolites main-station dock is: 64.00 x 192.00 x 250.00  while the dimension of a rock-hermit dock is: 138.001 x 138.001 x 250.12 (W x H x L)<br>
 +
These sizes may be relevant for ship dimensions as since Oolite 1.75 ships must fit in these docks to be allowed docking or launching.
 +
 +
== port_radius ==
 +
Defines the size of the docking port radius. Or more precise, this is the distance from the station centre to the port location. Default value is 500. This key is generally of little use and can be skipped as it will be overwritten by the real position of the dock subentity.
 +
 
 +
Example:
 +
"port_radius" = "500";
 +
 +
== requires_docking_clearance ==
 +
Sets the requirement for docking clearance. Default is "no". See also [[Oolite_Docking_Clearance_Protocol_%28v1.72_or_later%29|DockingClearance]]
 +
 +
Example:
 +
"requires_docking_clearance" = yes;
 +
 +
==rotating==
 +
Given to a station when rotation is desired. Default is "no".
 +
 +
Example:
 +
"rotating" = yes;
 +
 +
== station_roll ==
 +
{{oolite-prop-added|1.74.2}}
 +
 +
Determines the rotation speed of a station. Default value is determined by the systemwide station_roll in planetInfo.plist. If that is not defined, the default is 0.4. Negative values are also possible for a rotation in the other direction.
 +
 +
'''Note''': unlike the other turn rate properties, for historical reasons <code>station_roll</code> is measured in right-angles/second, ''not'' radians/second.
 +
 +
Example:
 +
"station_roll" = "-1.5"
 +
 +
==tunnel_corners==
 +
{{oolite-prop-added|1.75}}
 +
 +
Defines the number of corners in the docking tunnel. Ranges from 4 to 128. Default is "4".
 +
 +
Example:
 +
"tunnel_corners" = 6;
 +
 +
==tunnel_start_angle==
 +
{{oolite-prop-added|1.75}}
 +
 +
Defines the position of the first corner of the docking tunnel in degrees. 0 means the first corner is straight up. Default is "45".
 +
 +
Example:
 +
"tunnel_start_angle" = 0;
 +
 +
==tunnel_aspect_ratio==
 +
Defines the proportion of the tunnel’s width to its height. Default is "2.67".
  
 
Example:
 
Example:
  <key>weapon_position_aft</key>
+
  "tunnel_aspect_ratio" = 1;
<string>0.0 -5.0 -20.0</string>
 
<key>weapon_position_forward</key>
 
<string>0.0 0.0417 16.6667</string>
 
<key>weapon_position_port</key>
 
<string>-13.75 -2.0625 -1.875</string>
 
<key>weapon_position_starboard</key>
 
<string>13.75 -2.0625 -1.875</string>
 
  
 +
----
 +
= Links =
 +
*[https://bb.oolite.space/viewtopic.php?f=4&t=6232 understanding shipdata.plist] (2009)
 +
*[https://bb.oolite.space/viewtopic.php?f=4&t=3355 Orientation Issues] (Asteroid turns 180°, and want it to face planet, 2007)
 +
*[https://bb.oolite.space/viewtopic.php?f=4&t=20959 Empty System] (Removing stations and rock hermits from a system, 2021)
 +
*[https://bb.oolite.space/viewtopic.php?f=6&t=4729 Changing compass values of ships (from white to red)] (Hiding ships on the scanner, 2008)
 +
*[https://bb.oolite.space/viewtopic.php?f=3&t=15831&start=735#p247369 Problems with Explosions] - metal plates birthing bigger plates when exploded (2016) -as [https://bb.oolite.space/viewtopic.php?p=247280#p247280 here].
  
  
--------------------------------------------------------------------------------
 
 
[[Category:Oolite]]
 
[[Category:Oolite]]
 
[[Category:Oolite scripting]]
 
[[Category:Oolite scripting]]

Revision as of 11:47, 15 April 2024

The shipdata.plist would be more accurately called objectdata nowadays - a "ship" in Oolite might be a ship, a station, a rock, basically any solid object smaller than a planet (or moon)
(Cim)

Contents

Format

Shipdata.plist is in Property list format. The shipdata document is a dictionary of ships. Example:

   {
     "rsvh_adder" = {
       like_ship = "adder";
       is_external_dependency = yes;
       pilot = "oolite-hunter";
       roles = "rrs-vicious-hunter(1)";
       "missile_role" = "EQ_HARDENED_MISSILE";
   	"script_info" = {
   		"randomshipnames" = "hunter";
   		"skilled_npc_role" = "hunter";
   	};
     };
   
     "rsvh_asp" = {
       like_ship = "asp";
       is_external_dependency = yes;
       pilot = "oolite-hunter";
       roles = "rrs-vicious-hunter(1)";
       "aft_weapon_type" = "WEAPON_BEAM_LASER";
   	"script_info" = {
   		"randomshipnames" = "hunter";
   		"skilled_npc_role" = "hunter";
   	};
     };
   }

shipdata.plist will provide Oolite with all the definitions necessary to include it as an entity in the game, be it ship, station, freak object or sub-entity (extra). The following (property) entries are, for order's sake, listed alphabetically:

Ship keys

The following keys are used by all ships

accuracy

Used with missiles it has influence on tracking of target. Allowed values with missiles are between 0.0 and 10.0. When not defined, the system assigns to the missile the accuracy value of 0.0, which corresponds to the standard missile tracking behaviour.

In 1.76 or earlier, when used with NPC ships it slightly enlarges the chance of shooting at greater distances, and makes a small improvement to their aim. Value with NPC ships is between -5 and 10 though all values between -5 and +1 will be increased to +1. When not defined, NPCs will be assigned a random value in the range +1 to +10.

In 1.77 or later, when used with NPC ships it affects various aspects of the ship AI. Values can be assigned between -5 and +10. When not defined, a random value between -5 and +5 will be used. NPC accuracy significantly affects the quality of the AI in combat.

Example:

"accuracy" = 8.3;
See Cim's detailed explanation here (2012)
Compare with reaction_time

aft_eject_position

Determines the XYZ point on the model from which cargo is ejected.

Example:

"aft_eject_position" = "0.0 -4.5 -23.0";

aft_weapon_type

Assigns the ship's aft laser. Any weapon type from the equipment.plist can be used (and WEAPON_NONE).

Example:

"aft_weapon_type" = "WEAPON_BEAM_LASER";

ai_type

Assigns an AI to the entity. This may be a previously existing AI, or one custom made for the occasion.

Example:

"ai_type" = "pirateAI.plist";

auto_ai

This will autoswitch the ai to the appropriate one if a ship was added in one of its standard roles like trader or pirate. (true by default). See also the comment in the autoAIMap.plist inside Oolite. Defining auto_ai is only necessary when using one of the standard roles mentioned in the autoAIMap.plist for your ship. auto_ai does nothing for ships with custom roles. Example:

"auto_ai" = yes;

This auto_ai switch is also used for bounties. When auto_ai is false the ship will keep the bounty as defined for the ship but, when true and the ship is added in one of the populator roles, the ship will get the default bounty for that role.

auto_weapons

This property was added in Oolite test release 1.79.

This parameter if true (the default is false) indicates to the Oolite system populator (and potentially to OXPs) that they may change the weapons, missile load, equipment and other such parameters of this ship to make it better fit its role. This allows you to specify a single hull for multiple roles, and have the ship re-equipped to suit those roles. Ships intended for general addition to the spacelanes in standard roles and not intended to be significantly different in difficulty to the core ships should probably turn this on.

Example:

"auto_weapons" = yes;

See here for more detail

beacon

A special feature for beacons and navigation aids. The string can be anything - the first letter was what was displayed in the advanced space compass before Oolite v.1.79. It is still the only display for the older HUD's.

Example:

"beacon" = "X";

Characters that are known to be used as identifiers for stations and other fixed objects are found on the page for the Advanced Space Compass. Most letters have been used multiple times in various OXPs.

Since v.1.79 the HUD also displays a longer label; before that several HUD OXPs were available to do something similar (see Advanced Space Compass).

We can also use custom icons with the compass. For that you must define a key in descriptions.plist with the same name as the beacon definition. Than define the icon in the same way as missile icons. (An array of x/y-coordinates that will be connected by lines). You can find more info at the Oolite BB.
Example in shipdata:

"beacon" = "fuelStation_location";

Example in descriptions.plist

"fuelStation_location" =  (1, 2, -3, 2, -3, -4, 3, -4, 3, 4,  -3, 4, -3, 3, 2, 3, 2, -3, 1, -3 );

Before 1.75 the ships primary role was used for defining the icon name in descriptions.plist, but since 1.75 the beacon name itself is used.

There are several devices which detect things from great distance: the Vanilla game's Advanced Space Compass, The Galactic Almanac OXZ, Telescope and the Long Range Scanner. The last is a cheat OXP useful for programmers. See the HIMSN thread for details of making things invisible to them.

beacon_label

This property was added in Oolite test release 1.79.

A full label for the beacon. If this is not set, it will default to be the same as beacon, but it may be useful to have a beacon with a full label starting with a different letter than its code. The beacon label text will be expanded using the standard description rules

"beacon_label" = "%H Station"; // Lave Station, Diso Station, etc.

bounty

Sets a Cr. reward on the NPC's head, and is bound to give it trouble with the law . This bounty setting is overruled when adding ships in one of the populator roles like pirate, trader etc. Pirates are default added with a small bounty and traders are added clean. However, like the player, also the npc bounty can raise when attacking other clean ships or police vessels.

Example:

"bounty" = 50;

cargo_carried

Determines the type of cargo carried as described in commodities and commodities.plist. Only one type can be specified. This key can be used for both ships and barrels.

Example:

"cargo_carried" = "Gold";

When used for barrels, it is also possible to add several units in a pod by preceding the commodity name with a space separated number. Adding more than a ton in a pod is not possible. Defining a quantity for ships is not possible this way.
It is possible to define a mix of random cargo for ships by using the string "SCARCE_GOODS" or "PLENTIFUL_GOODS", instead of a commodity name. The first selects random goods that are scarce at the main station, the second selects goods that are plentiful present at the main station. (Populator added traders heading toward the station always have scarce goods while traders heading from the main station always have plentiful goods on board. It would be wise to stick to this rule with custom ships.)
To make cargo_carried working for ships, the cargo_type must be "CARGO_NOT_CARGO" to define the ship not being cargo itself. (see below)

Note: A bug introduced in 1.82 means that only commodity keys from the Trade-goods.plist are recognised here. That is "gold" will be recognised, whereas "Gold" will not. This bug is fixed in the 1.83/1.84 release.

cargo_type

Determines if object is indeed cargo (CARGO_RANDOM, CARGO_SLAVES, CARGO_THARGOID, CARGO_ALLOY, CARGO_MINERALS, CARGO_CARRIED) or a ship, as below, which is not cargo. (CARGO_RANDOM is not fully random but means that a container can hold any kind of commodity.)

Example:

"cargo_type" = "CARGO_RANDOM";

Will create random cargo, often based on availability in the system. When you want fixed cargo you can use:

Example:

"cargo_type" = "CARGO_CARRIED";
"cargo_carried" = "4 Gold";

You can also specify the cargo of a ship. use "cargo_type" = CARGO_NOT_CARGO and define the contents of the barrels it will give with "cargo_carried". In that case there must be no quantity defined, only the type of commodity.

Example:

"cargo_type" =  "CARGO_NOT_CARGO";
"cargo_carried" = "Computers";

Another notable type of cargo is the scripted item CARGO_SCRIPTED_ITEM, as exemplified by the cloaking device. When CARGO_SCRIPTED_ITEM is defined, the barrels will trigger scooping events for the ship-scripts. Other barrels don't trigger scooping events.
The cargo barrels are stored in the ships hold like normal barrels when a cargo was defined for them with the JS method "setCargo". Without defined content, scripted barrels are removed after scooping. Scripted cargo works with any object that can be scooped. When you have scripted escape pods that must be preserved after scooping, fill it with one ton of Slaves.

cloak_automatic

This property was added in Oolite test release 1.75.

When false, the cloak of npc ships will never get activate automatic during combat, but is only activated by JS script commands. (True by default)

Example:

"cloak_automatic" = no;

cloak_passive

When true, any firing of laser will deactivate the cloak. (False by default in 1.76 or earlier, true by default in 1.77 or later)

Example:

"cloak_passive" = yes;

conditions

With this option you can include an array of extra conditions when to add a ship. When the conditions are not met, the ship does not appear in a selection list by role. Useful when you have a standard ship like a trader that should only be added in certain systems.

Example:

"conditions" = (
                "systemGovernment_number equal 3",
                "systemEconomy_number lessthan 4"
               );

condition_script

Available from Oolite 1.77 onwards

This option specifies a Javascript file which controls the addition of this ship. The allowSpawnShip function in that condition script will then be tested before the ship is added. Several ships can share a condition script.

Example:

"condition_script" = "myoxp_conditions.js";

counts_as_kill

This property was added in Oolite test release 1.75.

Killing this ship will not count as a kill by the player when set to false. (Default is true). Using this key prevents awarding kills to all kind of cargo, debris etc.

Example:

"counts_as_kill" = no;

custom_views

Will add the ability to display custom POVs of the player ship, in game toggled by pressing v.

This is an array with any number of entries, one for each view, each with:

  • a view_description - giving a textual description of the view.
  • a view_position - relative to the origin of the ship model.
  • a view_orientation - this is a quaternion expressing a rotation from directly forwards.
  • a weapon_facing - FORWARD, AFT, PORT or STARBOARD. The weapon that will fire when that view is selected.

The view_position is best chosen by selecting a facet, line or point in Wings and copying down the coordinates.

For the view_orientation you will probably need a calculator but the basic method is to choose a unit vector (x y z) as the axis for a rotation then calculate the four values W X Y and Z for the quaternion as follows:

W = the cosine of half the angle rotated about the axis xyz
X = the sine of half the angle rotated about xyz, multiplied by x
Y = the sine of half the angle rotated about xyz, multiplied by y
Z = the sine of half the angle rotated about xyz, multiplied by z

Four decimal places are probably enough accuracy for these values.

Example:

 custom_views =
(
    {
        view_description = "Front View";
        view_orientation = "0.0 0.0 1.0 0.0";
        view_position = "0.0 30.0 200.0";
        weapon_facing = "FORWARD";
    }
);

death_actions

Gives an opportunity to have a ship's death trigger one or a set of script_actions. It contains an array of legacy script expressions.

Example:

"death_actions" = ("spawn: explosive_shrapnel 1");

debris_role

This property was added in Oolite test release 1.74.

Specifies the kind of debris an asteroid or boulder generates. When not defined they default to generating 'ships' with role "boulder" or "splinter".

Example:

"debris_role" = "my_boulder_foo";

See the discussion here: (RELEASE) Icesteroids V2 (2011-12) - about role circularity and about the vanilla game code creating alloys whenever anything big explodes!

density

This real value is used to calculate a ships total mass. Default is 1.0. The mass of the ship is then 20 * density * volume.

Ship's mass does not affect its flight under the non-inertial engines - see thrust. It does affect:

  • changes in momentum, and damage done, in a collision
  • the minimum distance needed from this ship for another ship to open a witchspace wormhole (the blocking radius is the square root of a tenth of the mass)
  • the length of time a witchspace wormhole opened by this ship will remain open, and the radius of that wormhole.

Example:

"density" = 1.5;

• See Eric Walch's comment on vanilla-game Coriolis stations here (2010)

display_name

States the model's name as it will be known to the ID computer. By default this is the same as "name". Added for multilingual oolite.

Example:

"display_name" = "ExampleShip Mark IX";

energy_recharge_rate

The rate at which energy is replenished. Stations are at 100, Adders at 2. (Default value: 1)

Example:

"energy_recharge_rate" = "3.5";

See Energy rates and recharge for more detail (2012)

escape_pod_model

With this entry ships can have custom escape pods. Defaults to "escape-capsule".

Since v1.65: You have to specify the role of your custom escape pod (not its entry-name).

Since v1.77: Deprecated in favour of escape_pod_role.

Example:

"escape_pod_model" = "custom_pod_role";

Note: Each shipdata entry has an implicit unique role in the form of a shipdata key enclosed in square brackets - e.g. "[entry-name]". It might be useful if you want to use a specific escape pod that has no unique role.

escape_pod_role

With this entry ships can have custom escape pods. It's almost the same as escape_pod_model, but has a less ambiguous name. Added in v1.77.

The game first tries to spawn a pod using escape_pod_role, but if the property isn't set or a spawn fails, the game uses escape_pod_model. If the latter fails too, the game tries the "escape-capsule" role.

Example:

"escape_pod_model" = "custom_pod_role";

escorts

Determines how many escorts an NPC shall have. Maximum is 16.

Example:

"escorts" = 4;

Warning: Ships with scanClass = CLASS_POLICE should always have escorts set to zero. Oolite will set this value here and add wingmans instead of escorts. Without special scripting escorts won't escort a mother with CLASS_POLICE.
For ships that are added in a trader role, the populator can decide to subtract escorts from the defined value when the system is estimated as safe.

escort_role

Assigns the specific ship type to be the escort, by the ship's role. (Before Oolite 1.74 only the name "escort-role" is accepted.)

Example:

"escort_role" = "my_custom_escort_role";

Escort ships will use the escortAI.plist unless "auto_ai" is set to false.


escort_roles

This property was added in Oolite test release 1.79.

This property overrules escorts, escort_role and escort_ship to allow more flexible specification of a ship's escorts. It takes the form of a list of dictionaries, each containing a "role", "min" and "max" key. The ship will then get between "min" and "max" of that role of escort ship (specific ships can be added using the "[dataKey]" style of role), with "max" more likely in Anarchy systems and "min" more likely in Corporate States.

  escort_roles = (
     { role = "escort"; min = -2; max = 2; },
     { role = "escort-medium"; min = 0; max = 4; },
     { role = "escort-heavy"; min = -4; max = 2; },
     { role = ""; min = 0; max = 2; } // spare slots for wandering escorts
  );

A negative number can be used for "min" - this makes it more likely that none of this type of escort will be used in safer systems, and makes the maximum number less likely in the more dangerous systems. In the example above, the ship will mainly be escorted by "escort-medium" ships, with a couple of "escort" ships likely in unsafe systems, and a small chance of "escort-heavy" ships also appearing in more dangerous systems.

Leaving the role key blank allows the ship to have spare slots for escorts which are left unfilled when the ship is spawned. This can be used to simulate a willingness to hire additional escorts, or to indicate that the ship has already lost some of its escorts.

The maximum number of escorts remains 16, and the list will be processed from top to bottom. Once 16 escorts are added no further entries will be considered.

escort_ship

Assigns the specific ship type to be the escort, by the ship's name. (Before Oolite 1.74 only the name "escort-ship" is accepted.)

Example:

"escort_ship" = "cobramk1";

Escort ships will use the escortAI.plist unless "auto_ai" is set to false.

In Oolite 1.77 and later it is also possible to use "escort_role" = "[cobramk1]"

exhaust

The XYZ position(s) of exhaust plume(s), and the XYZ of the plume shape, ergo

x y z width height length

x y z is the position relative to the origin of the main model.

width in meters, how far a plume extends on x axis, on each side of plume position. (x radius)

height in meters, how far a plume extends on y axis, above and below of plume position. (y radius)

length in meters, how long a plume is on z axis. (This value is in current Oolite versions ignored. Length is now derived from the ships speed)


Below are 2 assigned plumes at coords 5, 0, -25 and -5, 0, -25, and each plume is 6 m wide and 4 m tall. (length info is ignored)

Example:

"exhaust" = (
    "5 0.0 -25 3.0 2.0 10.0",
    "-5 0.0 -25 3.0 2.0 10.0"
);

exhaust_emissive_color

This property was added in Oolite test release 1.79.

Determines the colour of the exhausts.

For the colour you can use either a colour specifier or a named colour.

Example:

"exhaust_emissive_color" = "redColor";

or

"exhaust_emissive_color" = "1 0 0";

explosion_type

This property was added in Oolite test release 1.81.

A list of explosions.plist entries describing how the ship explodes if destroyed.

Example:

"explosion_type" = ("oolite-default-asteroid-explosion");

extra_cargo

Cargobay extension size can be customised. This is the amount the cargo capacity increases when an extra cargobay is installed. Default value is 15. It is only used with player ships.

Example:

"extra_cargo" = 25;

forward_weapon_type

Assigns the ship's forward laser. Any weapon type from the equipment.plist can be used.
e.g.: WEAPON_PULSE_LASER, WEAPON_BEAM_LASER, WEAPON_MILITARY_LASER, WEAPON_MINING_LASER, WEAPON_PLASMA_CANNON, WEAPON_THARGOID_LASER and WEAPON_NONE.

Example:

"forward_weapon_type" = "WEAPON_BEAM_LASER";

frangible

Determines if eventual sub-entities are "loose". By default any given object is already frangible, so the use of this line must be to negate that. If set to false, the object plus subentities will be regarded as a single object. If set to true, sub entities can be destroyed seperately from the main object. Frangible sub-entities can have a max_energy and an energy_recharge_rate that is independently set from the main entity.

Example:

"frangible" = no;

fragment_chance

Determines if a ship breaks apart into fragments and generates parts with role "wreckage". By chance factor, or true/false. Default is 90% chance. The amount of wreckage is based on the ships mass with a maximum of 3. Wreckage is scaled to match the ships size but is very short living. (0.25s -> 1.25s)

Example:

"fragment_chance" = no;

fuel

Determines an NPC ship's fuel storage, which will affect how it uses its Fuel Injectors and how far it can jump. If unspecified the default is zero (though ships added via the system populator will often be given some fuel anyway)

Example:

"fuel" = 70;

has_cloaking_device

Determines if a ship has a cloacking device installed. By chance factor, or true/false.

Example:

"has_cloaking_device" = 0.5;

has_ecm

Determines if a ship has the E.C.M system installed. By chance factor, or true/false.

Example:

"has_ecm" = 0.5;

or

"has_ecm" = no;

has_energy_bomb

Determines if a ship has an energy bomb. If it has one, it might launch a mine with role "energy_bomb" as part of his fleeing behavior. currently the only build-in mine with this role is the q-bomb.
A ship will only deploy the bomb when it has also fuel-injectors and some fuel left to avoid getting killed by its own bomb. On average it will try to deploy the bomb once every 100 seconds during fleeing.

Example:

"has_energy_bomb" = yes;

has_escape_pod

Determines if a ship has an escape pod. Can be either a boolean value, or a number from 0 to 1 expressing the likelihood of the equipment being present. Starting with version 1.65 ships can have multiple escape pods. To specify more than one escape pod, has_escape_pod must be set to a numeric value corresponding to the escape pods present on board.

Examples:

has_escape_pod = no;
has_escape_pod = 0.75;
has_escape_pod = 3;

has_fuel_injection

Determines if a ship has the witchdrive fuel injector.

Example:

"has_fuel_injection" = 0.99;

has_military_jammer

Determines if a ship has a military jammer. Ships equipped with this item become invisible on the radar. Example:

"has_military_jammer" = 0.75;

has_military_scanner_filter

Determines if a ship has a military jammer filter. Ships equipped with this item can see ships equipped with a military jammer on the radar. Example:

"has_military_scanner_filter" = 0.50;

has_scoop

Determines if a ship has a fuel/cargo scoop.

Example:

"has_scoop" = no;

has_scoop_message

A key for cargo. Determines if a barrel generates a default scoop message when scooped. Default is true, but setting it to false suppresses any messages, so a scripts can generate its custom messages on scooping. (Added with Oolite 1.74)

Example:

"has_scoop_message" = no;

has_shield_booster

Determines if a ship has the shield booster. (enlarges max energy with 256)

Example:

"has_shield_booster" = 0.80;

has_shield_enhancer

Determines if a ship has the coveted shield enhancer. (enlarges max energy with 256 and raises energy recharge rate with 50%)

Example:

"has_shield_enhancer" = 0.45;

heat_insulation

This real number gives the amount of heat insulation of a ship. Default is 1.0 (2.0 for ships equipped with EQ_HEAT_SHIELD). Values below 0.125 will be increased to that minimum. This parameter is only for NPC ships and stations. Player ships ignore this and always start with 1.0 heat insulation and can add an additional 1.0 (for a total of 2.0) with the ship equipment EQ_HEAT_SHIELD. Heat insulation for NPCs is only a factor when close to the sun. Energy damage does not cause overheating (because otherwise it would be too easy to overheat NPC ships with missiles or lasers), but it can raise ships' temperature to the maximum safe level. Overheating occurs when a ship's temperature exceeds the safe level, which is determined by the heat insulation level. External temperature is determined by distance from the sun. Larger suns are hotter. Suns that are going nova are, unsurprisingly, even warmer.

Example:

"heat_insulation" = "2.0";

NPC ships launched from stations are given the same heat insulation as the station if the station's is greater than the ship's. Courier ships generated by the core system populator are given a heat insulation level of 6.0. Escort ships (if any) receive at least the same heat insulation as the ship they are escorting. See BB Thread (2012)

Player ships use the same model as NPC ships for external temperature from the sun, but additionally simulate heat from air friction when inside planetary atmospheres, which is a factor that NPC ships ignore.

hud

Used for a playership, to assign another HUD than the default one. Note that small ships get the second default - the hud-small.plist

Example:

"hud" = "specialhud.plist";

hyperspace_motor

If set to false / NO, it will stop ships from executing normal hyperspace jump (player ships will still be able to execute galactic jumps). Default = true / YES. (Planned for Oolite 1.75)

Examples:

"hyperspace_motor" = no;
hyperspace_motor=NO;

hyperspace_motor_spin_time

Used to modify jump countdown time. Default = 15.

Examples:

"hyperspace_motor_spin_time" = "15";

injector_burn_rate

This property was added in Oolite test release 1.81.

The default fuel burn rate of injectors on this ship, in deci-LY per second. The default is 0.25.

"injector_burn_rate" = 0.25;

injector_speed_factor

This property was added in Oolite test release 1.81.

The multiplier applied to the ship's maximum speed when it is using injectors. The default is 7.

"injector_speed_factor" = 7;

is_external_dependency

This key should be added to ships that use like_ship references to ships in other oxps but don't depend on them. Normally will Oolite write errors in the log when it can't resolve a like_ship reference. When this key is set to YES, it will suppress the error generation.
WARNING: only set this key to YES when the model won't get added to the system without the other oxp installed or you will miss a valuable warning.

Example:

"is_external_dependency" = yes;

is_submunition

Key added for missiles with multiple warheads. When this key is set and the entity is spawn or fired by a missile, it inherits its parent as owner. This key must be set so the player will be awarded for a kill by submunition.

Example:

"is_submunition" = yes;

is_template

Set this to yes for ships which are only used through like_ships and are not intended to be used directly. If your (otherwise working) OXP generates warnings about ships with no roles or model attribute, you probably need this.

Example:

"is_template" = yes;

laser_color

Determines a ship's laser colour.

As colour you can use a colour specifier or a named colour. The game requires laser colours to be reasonably bright; if the brightest colour component is less than 0.5, the colour will be brightened.

Example:

"laser_color" = "cyanColor"


launch_actions

Triggers a script on the entity just after setup, also when called by spawn and addShip methods. Can be used to change to a custom AI, when a ship is generated by standard role. script_actions

Example:
"role = trader";
"launch_actions" = (
  "setAITo: pirateAI.plist"
 );


like_ship

Allows a shipdata entry (of a ship with many matching characteristics to another) to be short and sweet. With like_ship you can reference to another existing shipdata entry, and then only specify the differences to the 'original'. It takes the unique entry-identifier as argument. Of course you have to make sure that the 'original' you are referring to actually exists, or Oolite won't be able to create your ship.

Works well together with the is_template-key.

Example:

"my_ship" = {
"like_ship" = "adder";
"max_flight_speed" = "700";
"name" = "Freak Turbo Adder";
},

likely_cargo

This is only used for ships with role asteroid and pirate. With asteroids it gives the likely number of boulders it breaks into. With pirates added by the System Populator: when lower than 16 it is the cargo, when higher than 15, it is changed in a random value between 0 and 15. This value is overridden by the actual scooped cargo if the pirate had scooped something.

Example:

"likely_cargo" = "2";

materials

See Materials in Oolite.


max_cargo

Sets the ship's cargo limit. On explosion of trader ships added by the System Populator, 10% of this value is used as likely cargo. When the result is lower than 16 it is the cargo, when higher than 15, it is changed in a random value between 0 and 15.

Example:

"max_cargo" = "5";

max_energy

Sets the ship's energy value. (Default value: 200)

Example:

"max_energy" = "300";

See Energy rates and recharge for more detail (2012). Divide by 64 to get the rough number of energy banks.

max_flight_pitch

Sets pitch factor. Will usually range from a sluggish 0.6 to a very sensitive 3.0

Example:

"max_flight_pitch" = "2.2";


max_flight_roll

Sets roll factor. Will usually range from 0.8 to 4.6.

Example:

"max_flight_roll" = "4.2";


max_flight_speed

Sets the model's top speed. Interceptors fly at 520 (0.52 LM), Shuttles at 80.

Example:

"max_flight_speed" = "320";

max_flight_yaw

Sets yaw factor. Will usually range from a sluggish 0.6 to a very sensitive 3.0 When no value is defined it will use the same value as max_flight_pitch

Example:

"max_flight_yaw" = "2.2";

max_missiles

Sets a ship's missile limit. Maximum allowable value for the player is 16 and for npc ships 32. When not defined, the value with "missiles" is used as max_missiles. When defining more than a few missiles, it could be wise to also define value for "missile_load_time" to avoid massive missile launches. npc ships are more likely to fire missiles the more they carry.

Example:

"max_missiles" = "1";

missile_launch_position

Determines the XYZ point on the model from which a missile is launched.

Example:

"missile_launch_position" = "0.0 -2.25 10.0";

This position should lie outside the bounding box of the core entity and not just outside of the ships mesh. Default value: (0, -4, 1)
If the position does lie inside the bounding box, the launch position is shifted along its direction until the launched missile lies outside the bounding box of the central entity. (Bounding boxes of subentities are ignored) The collision radius of the launched missile is taken into account. The collision radius for a plain missile is 4.52 meter.

missile_load_time

Defines the time in seconds before a new missile is ready to fire after one is fired. Mainly useful for npc ships that have many missiles.

Example:

"missile_load_time" = "2.1";


missiles

Sets the number of missiles the ship is equipped with on ship creation. e.g. you can set this at zero and than use a dedicated script to fill up the bay with specific missiles.

Example:

"missiles" = "0";

missile_role

Defines the type of missiles (or mines) an NPC ship is provided with. Default is "EQ_MISSILE". When missiles are loaded on ship creation, 90% will be of this type and 10% will be random, chosen from all possible NPC missiles and mines. Also affects the javascript selectNewMissile() command. The string defined inside missile_role needs both to be defined inside equipment.plist, and be inside the roles property of the missile/mine shipdata entry.

To assign a specific missile type to a newly bought player ship, its dependancies must be defined inside shipyard.plist.

Example:

"missile_role" = "EQ_THARGON";

model

Assigns the entity's corresponding .dat file that will be found with the exact same name in the Models folder.

Example:

"model" = "example_ship.dat";

model_scale_factor

1.81 or later only.

If this is set, the model specified in the model property will be scaled by this factor (the default is 1.0, of course). Additionally, all subentities will have both their positions and sizes scaled (recursively if necessary), and the weapon positions will also be multiplied by the scale factor.

Player ships will also have their internal and external view positions multiplied by the scale factor.

model_scale_factors on subentities will be ignored - the value for the main entity will be used instead.

Example:

"model_scale_factor" = 2.0;

name

States the model's name as it will be known to the ID computer.

Example:

"name" = "ExampleShip Mark IX";

See also display name, ship_name & ship_class_name

no_boulders

With older versions, scripted asteroids had no boulders by default. Starting with 1.70 all asteroids produce boulders when hit by a mining laser. no_boulders can overwrite this to emulate the old situation. By chance factor, or true/false.

Example:

"no_boulders" = yes;

pilot

Gives the ship a predefined pilot, defined in characters.plist. Can eject in pod, if available, and be captured.
By default every object starts with a pilot except buoys, missiles, cargo and rocks. By defining a specific pilot, any default pilot is replaced or a pilot is added to previously unpiloted objects.

Example:

"pilot" = "constrictor-mission-thief";

When no pilot is defined, Oolite will create a random pilot based on the ships role. For custom roles this means that Oolite has no clue and the pilot might have other bounties/insurances than desired. For this reason contains Oolite, starting with v 1.75, some predefined pilots: "oolite-trader", "oolite-pirate", "oolite-hunter", "oolite-police", "oolite-miner", "oolite-passenger" and "oolite-slave". When using one of these pilots, a random bounty/insurance will be set appropriate for this pilot role. Pilot bounty is different as ship bounty but on ejecting the pilot inherits the highest of both values. (actually a bitwise OR of both values)

port_weapon_type

This property was added in Oolite test release 1.77.

Assigns the ship's port laser. Any weapon type from the equipment.plist can be used (and WEAPON_NONE).

While not essential, you should generally assign the same weapon to starboard_weapon_type.

Example:

"port_weapon_type" = "WEAPON_BEAM_LASER";

reaction_time

Sets the reaction time of the pilot of this ship. The default is 1.5 seconds.

Example:

"reaction_time" = 1.0; // this pilot is superhuman! or a cat

roles

Assigns which role(s) the entity should have, that can correspond to one specific, exclusive use, or several.

The game engine constantly calls for generic roles to populate the universe. In the example below the ship in question will be considered twice as often (2.0) when a trader is called for, only one quarter as often (0.25) when looking for a hunter, and as often as any other pirate ships when looking for a pirate. Multiple roles are space separated. An explanation of the generic roles available in Oolite 1.79 or later is at Oolite_Ship_Roles.

NB: If the ship cannot be docked to, extra care should be taken to avoid using the words station or carrier as part of any of the ship's role names. When either of these words are inside the roles key, the ship is automatically given station attributes. Other ships might even fruitless try to dock with it, and it will affect how some ships / entities are shown on the scanner.

Example:

"roles" = "hunter(0.25) trader(2.0) pirate";

or an exclusive role, simply:

"roles" = "uniquely_named_role";

This has the benefit of being the only ship to be selected when a script calls for the uniquely_named_role ship.

An item from the commodities can also be named as a role, for when that commodity is floating in space and called upon, to be represented by a particular model.

Example:

"roles" = "Gold";

Some roles are used by the game engine to populate systems, detect and define properties. (see also the System Populator) Such roles include 'thargoid', 'missile' and 'energybomb'. Externally used equipment also needs specific mention of role, for example EQ_*_MINE and EQ_*_MISSILE.

rotational_velocity

May be applied to a sub-entity, like the following entry to the subentity spines of the Weeviloid Hunter. Takes the form of quaternions. The following example enables rotation around the Z-axis.

Example:

"rotational_velocity" = "0.707 0.0 0.0 0.707";

An explaining example taken from the Oolite Bulletin board.

The rotational velocity key is rotation per second. For instance, if you want to rotate once per 20 seconds around the Z axis:

a = 360 ° / 20 = 18 °

[x, y, z] = [0, 0, 1]

sin a ˜ 0.30902

cos a ˜ 0.95106

Q = (0.95106, 0, 0, 0.30902)

shipdata.plist entry:

"rotational_velocity"="0.95106 0.0 0.0 0.30902";

In practical terms, one can therefore use

"rotational_velocity"="3 0 0 1"

To alter the speed of rotation increase number 3, for slower rotations, decrease for higher speed. For opposite rotational direction, change 1 to -1.(ref: Arhuman BB 1/11-09)

scan_class

Will alter the model's appearance on the IFF system. If this line is omitted, it will usually become by default a standard ship entity (CLASS_NEUTRAL), appearing as a yellow flag on the radar (red if hostile to the player), but may be given a different scan class if added with other roles. There are other options.

  • CLASS_BUOY - green/yellow on scanner, will rotate in idle state, does not masslock
  • CLASS_CARGO - white on scanner, can be scooped, does not masslock
  • CLASS_MILITARY - purple on scanner, better pilots, will not attack other military ships, flashes purple/magenta if hostile to player
  • CLASS_MISSILE - cyan on scanner, will not avoid collisions
  • CLASS_POLICE - purple on scanner, will not attack other police ships, legal penalties for attacking, never has bounty, flashes purple/magenta if hostile to player
  • CLASS_ROCK - white on scanner, launched defense ships do not inherit scan class, does not masslock
  • CLASS_STATION - green on scanner, launched defense ships do not inherit scan class
  • CLASS_THARGOID - green/red on scanner, considered hostile to any non-thargoid ship
  • CLASS_NO_DRAW - invisible on scanner, cannot be targeted by missiles, does not masslock
  • CLASS_MINE - red/yellow on scanner, automatically set on mines launched by player to override existing scan class, does not masslock

(This property was called "scanClass" before Oolite 1.74.) Scan classes marked as "does not masslock" will masslock the player anyway if they are hostile to the player (as condition will be Red)

Scripts can define custom colours for ships on the IFF system so ships may have a scanner appearance different to the default for their scan class.

Example:

"scan_class" = "CLASS_ROCK";

Developer Note

Oolite uses scan_class internally to determine the behaviour of some ships (particularly with regard to who may shoot whom without incurring legal penalties). Bear this in mind and don't allocate CLASS_POLICE or CLASS_THARGOID to ships lightly!

scan_description

This property was added in Oolite test release 1.81.

The description of the ship's legal status on the Scanner Targeting Enhancement. If this is absent, the default text for the scan class will be used.

"scan_description" = "Unclaimed rock";

scanner_display_color1

Overrides the color that would normally be set by scanClass.

Example:

"scanner_display_color1" = "greenColor";

scanner_display_color2

Overrides the color that would normally be set by scanClass. If this is set, the ship will flash between the two colours.

Example:

"scanner_display_color2" = "redColor";

scanner_hostile_display_color1

This property was added in Oolite test release 1.81.

Overrides the color that would normally be set by scanClass when the ship is hostile and targeting the player.

If no hostile colours are set, but normal colours are set, then the normal colours, not the scan class colours, will be used for a hostile ship.

Example:

"scanner_hostile_display_color1" = "greenColor";

scanner_hostile_display_color2

This property was added in Oolite test release 1.81.

Overrides the color that would normally be set by scanClass when the ship is hostile and targeting the player. If this is set, the ship will flash between the two colours.

Example:

"scanner_hostile_display_color2" = "redColor";

scanner_range

Sets a custom scanner range. Standard is 25.6 km, thargoids have 50 km. Only applies to NPCs. However, at least since oolite 1.65 all defined scanner ranges are limited to 25.6 km, even for thargoids. This means it only makes sense defining shorter ranges than the maximum range.

Example:

"scanner_range" = "25600";

scoop_position

Determines the XYZ point on the model from which cargo is scooped. (default is 0,0,0)

Example:

"scoop_position" = "0.0 -4.5 -23.0"

Scooping for a player ship starts when the cargo collides with the front half of the bottom of the ship. Any other place of first contact leads to smashing the cargo in pieces. A good y-value for the position would therefor be half the size of the lowest body part of this area of the ship. For the z-value a point in the back side would be better.

2008 note by Eric Walsh on what this does.

script

Specifies a Ship Script (through it's filename) to attach to the ship. Ship scripts written in JavaScript are the preferred approach for scripting ships in current Oolite.

script_info

A property list whose contents are available to JavaScript scripts, for whatever use they desire. It is exposed to JavaScript as the scriptInfo property of Ship objects.
Take note that when using an ascii plist, the JS engine will read in all entries as strings. When you need an entry as number, you might need to explicit convert it to a number. This is specially true for booleans as a "NO" string will be read as true. For all normal keys its Oolite that does the conversion for you.

A short overview about used script_info keys in OXPs.

script_actions

Gives an oportunity to insert events such as in script.plist, to involve a specific shipdata entity. As seen in the following example, this particular object checks if Player has a cloaking device, and if not, will award it. Should Player already have it, the gift will be in gold. See also scripts within shipdata for more detailled info.

Example:

"script_actions" =
(
    "testForEquipment: EQ_CLOAKING_DEVICE",
    {
       "conditions"
       (
          "foundEquipment_bool equal NO"
       )
       "do"
       (
          "awardEquipment: EQ_CLOAKING_DEVICE"
       )
       "else"
       (
          "awardCargo: 100 Gold"
       )
    }
);

setup_actions

Arranges a process that may be necessary for some objects, like ball turrets.

Example:

"setup_actions" =
(
   "initialiseTurret"
);


shaders

The shaders dictionary has the same structure as the materials dictionary. When shaders are available, the contents of the shaders dictionary are used in preference to those in materials. If shaders are not available, the shaders dictionary is ignored.

ship_name

This property was added in Oolite test release 1.79.

The name of this individual ship (e.g. Pride of Lave), which is placed in ship.shipUniqueName. It rarely makes sense to set this property in shipdata.plist, except perhaps for a unique mission ship.

ship_class_name

This property was added in Oolite test release 1.79.

The name of this ship's class (e.g. Sidewinder), which is placed in ship.shipClassName. If this is not set, it will default to name, which is usually suitable.

show_damage

This property was added in Oolite test release 1.81.

Whether to show sparks and other damage effects when this ship is hit.

Defaults to on if energy recharge rate is greater than zero, off otherwise, for compatibility with previous hard-coded behaviour.

smooth

Determines if the model will use glLightModel(GL_FLAT) or glLightModel(GL_SMOOTH).

If true, then lighting effects will be interpolated across the polygons of the model, giving a more 'rounded' effect.

Asteroids, Boulders and Splinters use this effect as do some other models.

Example:

"smooth" = yes;

spawn

The spawn directory is only used when a ship is added with the command: "spawnShip: shipname". This command only allows to add one ship by name (not role!). The position and orientation are taken from a spawn directory that describes the position it is placed and the position it is looking at.

Example

"spawn"
{
      "facing_position" = "spu 0 0 0";
      "position" = "wpu 0 0 0.2";
}


starboard_weapon_type

This property was added in Oolite test release 1.77.

Assigns the ship's starboard laser. Any weapon type from the equipment.plist can be used (and WEAPON_NONE).

While not essential, you should generally assign the same weapon to port_weapon_type.

Example:

"starboard_weapon_type" = "WEAPON_BEAM_LASER";

subentities

An array of subentity definitions. A subentity is an object attached to your ship. There are several types of subentity:

  • Static subentities, the default type, are simply extra models. They are defined as separate shipdata.plist entries, so technically they’re ships, but they don’t have a mind of their own. If the main ship is frangible, static subentities can take damage and blow up separately from the main ship. They can also be individually exploded or removed by scripts.
  • Docks are recognized when setting up a station or carrier, and used to determine the station’s docking port parameters. After set-up, they work just like normal static subentities. The string "dock" in lowercase must be part of the old style name in order to get recognised as the dock subEntity.
  • Ball turrets turn to track the ship’s current target, and shoot plasma balls if the target is within range (6000 metres). A ball turret’s field of fire is a 157 ° cone centred on its original facing. Currently, ball turrets make no effort not to shoot their own ship, so it is up to the designer to ensure this field of fire is clear. Like a static subentity, a ball turret is based on a shipdata.plist entry so its appearance can be customized. Oolite provides a built-in shipdata entry for ball turrets called, imaginatively, ballturret.
For discussion on the effective range (before the reduction from the original 7500 to 7200) see here.
Note that the Vortex turrets can be switched off. This involved special scripting (basically removing and restoring the turrets by script). Needs a little fancy footwork when docked though or else if you dock with removed sub-entities (even deliberately removed ones) you'll get a maintenance overhaul offered which will put them back if purchased.
  • Flashers are blobs which glow with a pulsating light. From Oolite 1.74 onwards, constant light will also be an option. Note that while flashers appear luminous – they are unaffected by shadows – they do not cast light on other objects.
  • Random number of Subentities (eg Cargo pods): see Can the number of entities a ship be randomized? (2017)

New-style subentity definition

Oolite 1.73 introduced a more flexible, dictionary-based way of specifying subentities. A new-style subentity is a dictionary using the following keys:

Subentity definition properties
Name Type Description
type string One of: “standard”, “ball_turret”, “flasher”. If not specified, “standard” is assumed.
subentity_key string The key of a shipdata.plist entry. Required for standard and ball_turret subentities, ignored for flashers.
position vector The position of the subentity relative to its parent. (This can be specified as a string with three numbers in it, or an array of three numbers, or a dictionary with x, y and z entries.) Default: (0, 0, 0).
orientation quaternion The orientation of the subentity. Ignored for flashers. (This can be specified as a string with four numbers in it, or an array of four numbers, or a dictionary with w, x, y and z entries.) Default: (1, 0, 0, 0), which corresponds to no rotation.
is_dock boolean True if the subentity is a dock; false by default. Only applies to standard subentities. Note: this is not implied by having “dock” in the subentity_key, as it is for old-style subentity definitions. In Oolite 1.76 or earlier a station may only have at most one dock subentity.
Subentity definition properties for dock subentities (1.77 or later)
Name Type Description
allow_docking boolean In Oolite 1.77 or later, whether the dock allows docking. Defaults to true. (and always true in 1.76). Ignored for non-docks.
allow_launching boolean In Oolite 1.77 or later, whether the dock allows launching. Defaults to true. (and always true in 1.76). Ignored for non-docks.
disallowed_docking_collides boolean In Oolite 1.77 or later, if this is true, ships attempting to dock here will collide with the dock if allow_docking is false. If it is false, ships attempting to dock here will be docked with the station anyway. Defaults to false. (and always false in 1.76). Ignored for non-docks.
dock_label string In Oolite 1.77 or later, the name given to the dock by traffic control (overrides the display_name of the dock subentity). Defaults to "the docking bay", and ignored for non-docks. In Oolite 1.76 or earlier the concept of dock names is meaningless.

See Multiple Docks for more information on dock subentities and stations with more than one dock in Oolite 1.77 or later.

Subentity definition properties for ball turrets
Name Type Description
fire_rate number Interval between shots in seconds, for ball_turret subentities. Default: 0.5; minimum: 0.25.
weapon_range number Range for ball_turret subentities. Default: 6000; maximum 7200.
weapon_energy number Weapon energy for ball_turret subentities. Default: 25; maximum 100.

See New range of turrets for more information on turret subentities (2012 discussion about modelling, quaternions, etc).

Subentity definition properties for flashers
Name Type Description
color colour specifier Single colour for a flasher. Ignored for non-flashers. Default value: redColor.
colors array Array of colour specifiers for a flasher. Ignored for non-flashers. Before 1.74, only the first entry was used. If not present, see color. Note: like laser_color, flasher colours must be “reasonably bright”.
frequency number Pulse rate for flashers, in cycles per second. Ignored for non-flashers. If 0, the flasher will have full intensity all the time in Oolite 1.74 and later, but half intensity in earlier releases. Default: 2.
initially_on boolean Specifiers whether a flasher is turned on when created. Ignored for non-flashers. Default: yes.
phase number Pulse phase offset for flashers, in seconds. Ignored for non-flashers. (This value is simply added to the time to get the pulse parameter.) Default: 0.
size positive number Diameter of a flasher in metres. Ignored for non-flashers. Default: 8. (Why 8? I don’t remember.)
bright_fraction number In Oolite 1.77 or later, a number between 0 and 1 defining the proportion of the flasher's cycle that the flasher is bright for. Ignored for non-flashers. The default (which mimics the behaviour of all flashers in 1.76 or earlier) is 0.5.

Old-style subentity definition

Prior to Oolite 1.73, this was the the only way to specify a subentity.

An old-style subentity definition is a string with eight items separated by spaces. In the description below, words in bold correspond to keys in new-style definitions. There are two variants:

Flashers

For a flasher, the entry takes the form:

*FLASHER* x y z hue frequency phase size

*FLASHER* must be precisely the string “*FLASHER*”, in capitals.

x, y and z form the position.

hue specifies the HSV hue component (in degrees) of color. Saturation and value are always 1.

frequency, phase and size are the same as in the new-style format.

initially_on is false.

Other subentities

For a non-flasher, the entry takes the form:

key x y z qw qx qy qz

key corresponds to subentity_key.

x, y and z form the position.

qw, qx, qy and qz form the orientation.

type is standard unless the command initialiseTurret is present in the setup_actions of the subentity, in which case it is ball_turret. Note that the initialiseTurret no longer does anything when executed in a script; its presence is only used as an indicator to set the is_turret property when old-style definitions are translated. If initialiseTurret is inside a condition, it will be ignored. The initialiseTurret command is not required or useful for turrets which are only referenced using new-style subentity definitions.

is_dock is implied by having the string “dock” (in lowercase) in the key.

Links

Thargoids: Stellar Serpents OXP (2010), Animated Ships/Butterflies (2011), Aquatics (2011: Hammerhead bulk carrier & the Aqualina stations), WildShips OXP (2012-14: moving elevators inside station struts)
Z GrOovy HPC pack (2014 - bought equipment is visible on ship!); Scrub (2022 - rotating rings)

sun_glare_filter

This property was added in Oolite test release 1.79.

The default strength of the sun glare filter on this ship. A number between 0 and 1, with the default being 0 (no filter)

 "sun_glare_filter" = 0.3;

track_contacts

Tracks the movement of the ship and sends a "CLOSE CONTACT" message to other ship AI's. It uses a time consuming tracking, so only set to true when actually used.

Example:

"track_contacts" = yes;

throw_sparks

This property was added in Oolite test release 1.73.

Each new ship should start in seemingly good operating condition, unless specifically told not to. (false by default)

Example:

"throw_sparks" = yes;

thrust

Gives the entity an 'inertia' value, telling how fast it can increase or reduce speed (in m/s^2). 0 for rocks and cargo, 50 for a very fast ship, 100 for a station. When used with turrets it defines the turn rate in revolutions per second (with 1 being an average value).

Example:

"thrust" = "25"

unpiloted

Used to designate items that will never have a pilot, thus never turn aggressive and never eject a pod. By chance factor, or true/false.
It will not add a pilot when set to false, but will remove any existing pilot when set to true. commsMessages can only be broadcasted by piloted ships. Ships are by default piloted. cargo , rocks, missiles etc. are not piloted by default.

Example:

"unpiloted" = yes;

view_position_..

Sets the ship's 4 point-of-view positions in XYZ relative to the model.

Example:

"view_position_aft" = "0.0 5.0 -20.0";
"view_position_forward" = "0.0 1.9375 5.0";
"view_position_port" = "-11.85 2.825 -3.5";
"view_position_starboard" = "11.85 2.825 -3.5";


weapon_energy

This setting works differently depending on the type of entity it's used for:

Missiles. Changes the damage inflicted by the missile. Any value accepted.

NPC ships. Changes the forward weapon damage to a value different to the default one. Values higher than 50 will be clamped to 50. Does not change the value for aft weapons or subEntity weapons.
N.B. It does not have any effect on player ships.

turrets. Unused for turrets. Set the turret weapon_energy in its subEntity directory.

Default values are: WEAPON_PLASMA_CANNON = 6.0; WEAPON_PULSE_LASER = 15.0; WEAPON_BEAM_LASER = 15.0; WEAPON_MINING_LASER = 50.0; WEAPON_THARGOID_LASER = 12.5; WEAPON_MILITARY_LASER = 23.0

Example:

"weapon_energy" = "17";

weapon_facings

This property was added in Oolite test release 1.77.

What weapon mounts are available on the ship. This is a bit-mask, so pick the mounts and add the numbers:

1 - Forward
2 - Aft
4 - Port
8 - Starboard

Example:
Fore and aft weapon mounts only.

 <key>weapon_facings</key>
 <integer>3</integer>

If omitted, defaults to 15 (all mounts). If a player ship has this specified, and the same property specified in shipyard.plist, the shipyard.plist property takes precedence.

Weapons assigned to a mount that the ship does not have will be ignored. Scripting cannot be used to add weapons to these mounts later, either.

weapon_mount_mode

This property was added in Oolite test release 1.83.

This controls how multiple weapon mount points work. It has three possible values:

  • "single": this is the default, and replicates 1.82 and previous behaviour. In this mode, weapon_position_* properties are simple vector expressions, and there is exactly one mount per facing.
  • "split": In this mode, weapon_position_* properties are an array of vector expressions. A weapon fitted to this facing has the same heat and energy cost as a single standard weapon, and the damage output is divided equally between all mount points. (in other words, the distinction is mainly cosmetic)
  • "multiply": In this mode, weapon_position_* properties are an array of vector expressions. A weapon fitted to this facing has N times the heat and energy cost as a single standard weapon, and each mount point does normal damage. (in other words, the weapon is fitted N times at once)

For best results with AI and the "target reticle sensitive" feature, if there are several weapon positions in a (rough) line, the middle one should be listed first.

See this comment or Multiple Lasers for examples.

weapon_offset

Removed after version 1.65 (it was used to change the offsetpoint of a plasma cannon.)

weapon_position_..

Plots the 'gunmouth' points of the model's 4 potential lasers.

In 1.82 and earlier, and in 1.83 and later in the "single" weapon_mount_mode, these are vector expressions.

Example:

"weapon_position_aft" = "0.0 -5.0 -20.0";
"weapon_position_forward" = "0.0 0.0417 16.6667";
"weapon_position_port" = "-13.75 -2.0625 -1.875";
"weapon_position_starboard" = "13.75 -2.0625 -1.875";

In 1.83 and later, with "split" or "multiply" weapon_mount_mode, these values are specified as arrays of vector expressions. For example:

"weapon_position_forward" = ( "0.0 3.0 32.0" , "-15.0 0.0 32.0" , "15.0 0.0 32.0" )

Station keys

The following keys are only used by stations or carriers.

allegiance

An advisory flag that informs AIs how they should expect to be treated near or when attempting to dock with this station. See station.allegiance for the allowable values. If this is not set, the game will guess based on other station properties.

Example:

allegiance = "neutral";

allows_auto_docking

This property was added in Oolite test release 1.75.

When set false for a station, this station will not allow the use of a docking computer. Default value in "yes".

Example:

allows_auto_docking = "no";

allows_fast_docking

This property was added in Oolite test release 1.75.

When set true for a station, this station will allow fast docking with the docking computer. Default value in "no".

Example:

allows_fast_docking = "yes";

defense_ship

Gives an oportunity to designate a particular ship by name that will defend a station/carrier. See also defense_ship_role

Example:

defense_ship" = "my_defender";

defense_ship_role

Gives an oportunity to designate a particular (group of) ships that will defend a station/carrier. This has to be specified in the roles of the ship(s) that are assigned to defend. When launched from a carrier the scan_class becomes that of the carrier. Default role is "police"/"interceptor" for normal stations and "hermit-ship" for stations of CLASS_ROCK. Defense ships with scanclass police or with a hermit-ship role launch with a policeInterceptAI.plist. All other ships use the ai_type as defined in shipdata.plist. After launch, all primary roles are changed into: "defense_ship"

Example:

"defense_ship_role" = " carrier_defenders";

equipment_price_factor

Equipment price mask for dockables.

Example:

"equipment_price_factor" = "4.5";

equivalent_tech_level

Sets shipyard tech level for dockables, different to the local system tech_level. Default value is the system tech_level.

Example:

"equivalent_tech_level" = 1;

has_npc_traffic

Determines if a station launches NPC traffic. Default is "yes" for stationary stations, and "no" for stations with a non-zero maximum speed. When set to "no" the station will not launch random ships as part of the main Oolite system repopulator (though OXP scripts may still launch ships from it).

The type of traffic launched depends on the allegiance property of the station (which also determines what, if any, ships may try to dock at it).

Example:

"has_npc_traffic" = yes;

has_patrol_ships

This property was added in Oolite test release 1.75.

Determines if a station launches periodic patrol ships. Default is "no". Main stations always have patrol ships.

Example:

"has_patrol_ships" = yes;

has_shipyard

Determines if a station or carrier has a shipyard. By chance factor as number between 0 and 1, but it can also be an array of conditions. Default is "no", but for main stations has_shipyard is always "yes". (Name is valid starting with Oolite 1.74. Before it was called "hasShipyard".)

Example:

"has_shipyard" = "0.75";

or

"has_shipyard" = (
                  "systemGovernment_number morethan 3",
                  "systemEconomy_number lessthan 4"
                 )

interstellar_undocking

This property was added in Oolite test release 1.75.

When set true for a station, this station will allow interstellar docking and undocking in interstellar space. When set to "no" the player docks in nearby normal space. Default value in "no".

Example:

interstellar_undocking = "yes";

is_carrier

Added as a tag for making the model be considered a carrier or station. An alternative to including carrier or station among the roles. When present this key even overrules station/carrier settings with roles. (Name is valid starting with Oolite 1.74. Before it was called "isCarrier".)

Example:

"is_carrier" = yes;

market

Key that sets the market for stations and carriers. The name defines the key in commodities.plist that will be used as local market. Without a market key, the stations primaryRole is used as market. Added with test release 1.74 and no longer used in 1.81 or later, where it is replaced by the market_* properties below.

Example:

"market" = "none";

market_broadcast

This property was added in Oolite test release 1.81.

If this is enabled the station's market will appear on the F8 screen if the player is in flight and has the station targeted. The default is enabled. This is ignored (and always true) if the station is the main station.

"market_broadcast" = no;

market_capacity

This property was added in Oolite test release 1.81.

The capacity in units per trade good of the station market. If omitted, the default market capacity of 127 units will be used. This is ignored if the station is the main station as it will use the system market, not its own.

"market_capacity" = 31;

market_definition

This property was added in Oolite test release 1.81.

An array of secondary market rules which modify some or all of the price, quantity, capacity and legal status of a good relative to the primary system market. This is ignored if the station is the main station as it will use the system market, not its own.

"market_definition" = (
	{
		// export cheap clothes
		"type" = "class";
		"name" = "oolite-wearable";
		"price_multiplier" = 0.8;
		"price_randomiser" = 0.1;
		"quantity_multiplier" = 3.5;
		"quantity_randomiser" = 3.0;
	}, 			
	{
		// not really interested in other goods
		"type" = "default";
		"price_multiplier" = 0.55;
		"price_randomiser" = 0.25;
		"quantity_multiplier" = 0.0;
		"capacity" = 3;
	}
);

If the capacity set by a rule is larger than the market_capacity of the station, the market_capacity of the station is used instead.

A blank array

"market_definition" = ();

will give a market identical to the primary system market.

If this key is omitted, the station will have no market. This is roughly equivalent to

"market_definition" = (
	{
		"type" = "default";
		"price_multiplier" = 0;
		"quantity_multiplier" = 0;
		"capacity" = 0;
	}
);

Note: There is some discussion about this at Secondary Market Definitions Defined (2023)

market_monitored

This property was added in Oolite test release 1.81.

If this is true, the market is subject to Cooperative law for the import and export of trade goods, and the player will gain the usual bounties for smuggling contraband. The default value is no. This is ignored (and effectively always true) if the station is the main station.

market_monitored = yes;

market_script

This property was added in Oolite test release 1.81.

Allows a market script to be used to modify trade prices. This overrides market_definition, if it is present.

market_script = "myoxp_marketchanges.js";

Note: What's the difference between the market script specified in planetinfo.plist and the one called for by trade-goods.plist? (2015)

max_defense_ships

Designates how many ships a dockable entity (station, carrier) can launch in defense. Default value is 3. See also Station Ships

Example:

"max_defense_ships" = "10";

max_police

Designates how many police or patrol ships a dockable entity (station, carrier) can launch. Default value is 8. See also Station Ships

Example:

"max_police " = "10";

max_scavengers

Designates how many scavengers or miners a dockable entity (station, carrier) can launch. Default value is 3. See also Station Ships

Example:

"max_scavengers" = "10";

port_dimensions

Defines the size of the docking port and takes 3 numbers, separated by "x". This key is generally of little use and can be skipped as it becomes overwritten by the actual size of the bounding box of the dock subentity when a correct dock subentity is defined.

Example:

"port_dimensions" = "65x30x500";

Size of Oolites main-station dock is: 64.00 x 192.00 x 250.00 while the dimension of a rock-hermit dock is: 138.001 x 138.001 x 250.12 (W x H x L)
These sizes may be relevant for ship dimensions as since Oolite 1.75 ships must fit in these docks to be allowed docking or launching.

port_radius

Defines the size of the docking port radius. Or more precise, this is the distance from the station centre to the port location. Default value is 500. This key is generally of little use and can be skipped as it will be overwritten by the real position of the dock subentity.

Example:

"port_radius" = "500";

requires_docking_clearance

Sets the requirement for docking clearance. Default is "no". See also DockingClearance

Example:

"requires_docking_clearance" = yes;

rotating

Given to a station when rotation is desired. Default is "no".

Example:

"rotating" = yes;

station_roll

This property was added in Oolite test release 1.74.2.

Determines the rotation speed of a station. Default value is determined by the systemwide station_roll in planetInfo.plist. If that is not defined, the default is 0.4. Negative values are also possible for a rotation in the other direction.

Note: unlike the other turn rate properties, for historical reasons station_roll is measured in right-angles/second, not radians/second.

Example:

"station_roll" = "-1.5"

tunnel_corners

This property was added in Oolite test release 1.75.

Defines the number of corners in the docking tunnel. Ranges from 4 to 128. Default is "4".

Example:

"tunnel_corners" = 6;

tunnel_start_angle

This property was added in Oolite test release 1.75.

Defines the position of the first corner of the docking tunnel in degrees. 0 means the first corner is straight up. Default is "45".

Example:

"tunnel_start_angle" = 0;

tunnel_aspect_ratio

Defines the proportion of the tunnel’s width to its height. Default is "2.67".

Example:

"tunnel_aspect_ratio" = 1;

Links