Page 1 of 1

OXP General queries

Posted: Sat Jul 21, 2012 10:15 pm
by Shipbuilder
I thought that it could be useful to have a thread for general queries regarding oxp documentation and available info. This could be used to both query what is provided on the wiki and perhaps also be used to highlight if any change/updates to this information may be required.

To kick things off I am in the process of studying Openstep for writing the config files for a new OXP that I am working on. Whilst carrying out this exercise I have however come across a few items that I would be interested to get resolved if possible.

1 What effect does the density key in the shipdata.plist have ? Does it effect the rate of acceleration and deceleration.

2 What is the default value for accuracy in the shipdata.plist ?

3 What is the default value for fuel in the shipdata.plist ?

4 Is their a list of available conditions ?

5 Is their a list of available death actions ?

Clarification of any of the above would be much appreciated.

Re: OXP General queries

Posted: Sat Jul 21, 2012 10:43 pm
by cim
Shipbuilder wrote:
1 What effect does the density key in the shipdata.plist have ? Does it effect the rate of acceleration and deceleration.
Mass is proportional to density * volume. This does not affect non-inertial acceleration by ship's engines (see "thrust" for that), but does affect the amount of inertial velocity applied in the event of a collision, as well as the damage done to the object collided with. Mass also affects the distance an object will prevent wormholes forming at, though this is generally only relevant for very large or very dense objects, and the size of the wormhole formed (and therefore time to decay) if this object enters witchspace.
Shipbuilder wrote:
What is the default value for accuracy in the shipdata.plist ?
As documented at [wiki]shipdata.plist[/wiki]
For missiles, 0
For non-missiles, in Oolite 1.76, a random number in the range 1 <= accuracy <= 10
For non-missiles, in trunk, a random number in the range -5 <= accuracy < 5

Note that the meaning of "accuracy" for non-missiles also changes between 1.76 and trunk. It doesn't do a lot in 1.76 for non-missiles, though, so you can probably ignore it.
Shipbuilder wrote:
3 What is the default value for fuel in the shipdata.plist ?
Zero.
Shipbuilder wrote:
4 Is their a list of available conditions ?
Conditions are the legacy scripting engine, which is best avoided for new OXPs. Unfortunately, in this case, you can't, because there's no JS equivalent yet ... okay, another thing for the to-do list, then.
Such documentation as there is: [wiki]Methods[/wiki] (the "Querying states" section, specifically)
Shipbuilder wrote:
5 Is their a list of available death actions ?
Death actions are the legacy scripting engine, which is best avoided for new OXPs. Instead, give the ship a ship script, and put whatever you like in the shipDied handler.

Re: OXP General queries

Posted: Sat Jul 21, 2012 11:13 pm
by Shipbuilder
Thanks cim.