Additional escape pods on player ships

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

Moderators: winston, another_commander

Post Reply
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Additional escape pods on player ships

Post by Shipbuilder »

Is it possible to define a player ship that can be fitted with 2 escape pods ?

I am thinking of possibly incorporating this in to my larger ship designs, probably at the expense of some cargo capacity and probably also limited to ships with a standard cargo capacity of 100T or greater.

The reasoning is to provide the pilot with a backup escape pod should the first pod be damaged during combat.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Additional escape pods on player ships

Post by cim »

You could define a piece of equipment called "Backup escape pod", and then monitor for damage to the real escape pod. If it gets damaged, and the backup escape pod is still okay, then repair the real escape pod, and damage the backup escape pod instead.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Additional escape pods on player ships

Post by Wildeblood »

No, you can't define it to be so in shipdata, the way you can for an npc ship. But as cim says, it would be a fairly easy thing to script.
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: Additional escape pods on player ships

Post by Shipbuilder »

It looks like at some stage I'm going to have to try to get my head around scripting :?
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: Additional escape pods on player ships

Post by Shipbuilder »

Is anyone able to advise me where I am going wrong ?

I am trying to define my own escape pod model on a test ship.

In the ship data.plist I have added the following to the code for the actual ship

Code: Select all

  		<key>escape_pod_model</key>
		<string>galtech_escape_pod_1.dat</string>
I have then added the following code in to the shipdata.plist

Code: Select all

		<key>>galtech_escape_pod_1</key>
		<dict>	
  			<key>model</key>
			<string>galtech_escape_pod_1.dat</string>
			<key>name</key>
			<string>GalTech Escape Pod</string>
			<key>roles</key>
			<string>escape_pod</string>
		</dict>
I have tried a number of other combinations but am only able to get a default escape capsule to appear.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Additional escape pods on player ships

Post by Wildeblood »

You have to specify the role of your custom escape pod (not its entry key).
Code:
        <key>escape_pod_model</key>      <string>galtech_escape_pod_1</string> <--- this refers to...
Code:
      <key>galtech_escape_pod_1</key> <--- not this,
      <dict>
         <key>model</key>         <string>galtech_escape_pod_1.dat</string> <--- not this,
         <key>name</key>         <string>GalTech Escape Pod</string>
         <key>roles</key>         <string>escape_pod(0.1) galtech_escape_pod_1</string> <--- but this!
      </dict>
Last edited by Wildeblood on Sun Sep 16, 2012 9:51 am, edited 1 time in total.
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: Additional escape pods on player ships

Post by Shipbuilder »

Thanks Wildeblood.

What I have done is set up a test script, (well adapted a script that smivs helped me with previously to be more exact), which spawns 5 ships each time you launch from a station. The shipdata.plist code for these ships are noted below. I have given them a nullAI so that they basically just hang around in space doing nothing.

I have then tried to update the code as per your earlier reply this using the code below but Oolite is still using the standard escape pod model :?

I'm sure that this is an easy one once you know what to do but I've been messing about with this for some time and any assistance getting this to work would be much appreciated.

Code: Select all

	<key>>galtech_escape_pod_1</key>
	<dict>	
  			<key>model</key>
			<string>galtech_escape_pod_1.dat</string>
			<key>name</key>
			<string>GalTech Escape Pod</string>
			<key>roles</key>
			<string>escape_pod(0.01) galtech_escape_pod_1</string>
	</dict>

	<key>serpent</key>
	<dict>	
  		<key>escape_pod_model</key>
		<string>galtech_escape_pod_1.dat</string>
		<key>auto_ai</key>
		<string>no</string>
		<key>ai_type</key>
		<string>nullAI.plist</string>		
		<key>model</key>
		<string>serpent.dat</string>
		<key>name</key>
		<string>Serpent</string>
		<key>roles</key>
		<string>serpent</string>
		<key>scan_class</key>
		<string>CLASS_NEUTRAL</string>
		<key>has_escape_pod</key>
		<string>6.0</string>
		<key>subentities</key>
		<array>
			<string>*FLASHER* 36.5 1.6 -66.0 0 0.5 1 1.5</string>
			<string>*FLASHER* -36.5 1.6 -67.0 500 0.5 0 1.5</string>
		</array>
		<key>materials</key>
		<dict>
		<key>Serpent_auv.png</key>
		<dict>
		<key>emission_map</key>
		<string>serpent_glow.png</string>
		</dict>
		</dict>
</dict>
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Additional escape pods on player ships

Post by Wildeblood »

the "escape_pod_model" key in the mothership's entry has to refer to the role, not the model. You've still got <key>escape_pod_model</key>
<string>galtech_escape_pod_1[b].dat[/b]</string>
. In a nutshell, lose the .dat part.

(See above post.)
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: Additional escape pods on player ships

Post by Shipbuilder »

Thanks Wildeblood I'll have a look at this. :wink:

EDIT - I have got this working now :D
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Additional escape pods on player ships

Post by Kaks »

Excellent news! :)

By the way, if you don't want your type of escape pod to be used by any old ship, you can always do

<key>roles</key> <string> galtech_escape_pod_1</string>

and they'll be used exclusively by the ones with <key>escape_pod_model</key> <string> galtech_escape_pod_1</string>

or, in 'new money':
roles = "galtech_escape_pod_1";

&

escape_pod_model = "galtech_escape_pod_1";


Come to think of it, escape_pod_model is quite counterintuitive as a property name.
Unless anyone objects, I'm thinking of introducing escape_pod_role as the equivalent (& more intuitive) property name, while still supporting (but deprecating) escape_pod_model for the next stable release, a bit like what's already happened to a handful of other ship properties between 1.65 & 1.76.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply