Include equipment from another OXP as standard

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Crush
Competent
Competent
Posts: 35
Joined: Tue Oct 20, 2009 2:07 pm

Include equipment from another OXP as standard

Post 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
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Include equipment from another OXP as standard

Post 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.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Crush
Competent
Competent
Posts: 35
Joined: Tue Oct 20, 2009 2:07 pm

Re: Include equipment from another OXP as standard

Post 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?
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Include equipment from another OXP as standard

Post 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",
		);
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Include equipment from another OXP as standard

Post 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"
      );
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Include equipment from another OXP as standard

Post 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:
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Crush
Competent
Competent
Posts: 35
Joined: Tue Oct 20, 2009 2:07 pm

Re: Include equipment from another OXP as standard

Post by Crush »

Thanks :-)
Post Reply