Page 1 of 1

Include equipment from another OXP as standard

Posted: Thu May 10, 2012 5:38 pm
by Crush
After a break of about two years I've started playing again, and I want to have another go at creating an OXP.

I want to specify a piece of equipment from another OXP as standard on a new ship. Specifically a "Small Railgun"/"EQ_RAILGUN_1" from the Railgun OXP.

I'm using the XML style of plisting, and can't see how I specify this piece of equipment as standard in the shipdata.plist.

BTW, are there any plans to deprecate the plist style of scripting?

Cheers,

Crush

Re: Include equipment from another OXP as standard

Posted: Thu May 10, 2012 5:44 pm
by Smivs
You will firstly need to check the licence on the railgun OXP to make sure you can use it, then either specify it as a dependency or incorporate it into your OXP.
If it will be standard fitment for your ship, you will need to list it in the shipyard.plist
plists will be a part of Oolite for the forseeable future, although generally OpenStep is prefered over XML these days.

Re: Include equipment from another OXP as standard

Posted: Thu May 10, 2012 6:00 pm
by Crush
Hmmm...ok, assuming that the license is OK, what would the XML entry in the shipdata file look like look like?

And is OpenStep the same as JavaScript?

Re: Include equipment from another OXP as standard

Posted: Thu May 10, 2012 6:30 pm
by Capt. Murphy
shipyard.plist not shipdata.plist for defining optional/standard equipment on a player flyable ship. Openstep isn't Javascript it's an alternative plist format which is more human readable and in my opinion less prone to typos.

http://wiki.alioth.net/index.php/Shipyard.plist

XML

Code: Select all

<key>optional_equipment</key>
      <array>
         <string>EQ_FUEL_SCOOPS</string>
         <string>EQ_CARGO_BAY</string>
         <string>EQ_ECM</string>
      </array>
Openstep

Code: Select all

"optional_equipment" =
		(
			"EQ_ECM",
			"EQ_FUEL_SCOOPS",
			"EQ_ESCAPE_POD",
		);

Re: Include equipment from another OXP as standard

Posted: Thu May 10, 2012 9:46 pm
by Switeck
Far as I know, the last item in the list must not have a comma after the quote. Like so:

Code: Select all

"optional_equipment" =
      (
         "EQ_ECM",
         "EQ_FUEL_SCOOPS",
         "EQ_ESCAPE_POD"
      );

Re: Include equipment from another OXP as standard

Posted: Fri May 11, 2012 4:53 am
by Capt. Murphy
Capt. Murphy wrote:
and in my opinion less prone to typos.
Perhaps I should have said easier to spot the typos that Capt Murphy inevitably makes... :wink:

Re: Include equipment from another OXP as standard

Posted: Fri May 11, 2012 7:37 am
by Crush
Thanks :-)