OXP Newbie - my Puff Adder flys but the display is messed up

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

Moderators: winston, another_commander

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

OXP Newbie - my Puff Adder flys but the display is messed up

Post by Crush »

OK, I knew it would happen one day - I'd decide to dip my toes into OXPs.

I decided I'd try to start by adapting an existing ship - the Adder.

Step 1 is to try and just check I can create something just like an Adder and then modify it.

So I created the directory tree C:\Oolite\AddOns\PuffAdder.oxp\Config

And in this directory created a shipdata.plist...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>puff_adder-player</key>
<dict>
<key>like_ship</key>
<string>adder-player</string>
<key>name</key>
<string>Puff Adder</string>
<key>roles</key>
<string>player</string>
</dict>
</dict>
</plist>

...and a shipyard.plist...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>puff_adder-player</key>
<dict>
<key>chance</key>
<real>1.0</real>
</dict>
</dict>
</plist>

So the aim is that at the moment a Puff Adder should be exactly the same as an Adder but with a different name.

The good news is that I can buy a Puff Adder (price zero), and fly it but the bad news is I'm not seeing what I see if I'm flying an Adder.

The aft view is messed up. From the Adder I see flames, but from the Puff Adder I just see two big blue blobs in the middle of screen.

Also when I fire I don't get a laser beam, although I get sounds and can register hits.

Any advice?

Cheers,

Crush
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Post by NorthenderPNE »

Someone may expand this a little more than me, but if you look in the shipdata.plist in oolite.apps config folder and look at the adders section, there you will find all you need, view positions etc etc. Just copy the bits you need.

Someone correct me if i'm wrong. :wink:
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Post by NorthenderPNE »

I did the same mate, i downloaded the supercobra but didn't like the textures. So i used the cobra3_redux.dat model. Edited the texures, edited the dat file, edited the plist files, and now i have my own supercobra. Works a charm.

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

Post by Crush »

OK, I can see how to do a cut - and - paste job, but I was trying to use the like_ship tag. I was expecting it to take all of the views from the adder-player in the OOTB shipdata.

So I guess the question is what are the limitations of the like_ship tag?
What gets inherited and what requires re - implementation?

Cheers,

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

Post by Crush »

You couldn't ping me the modified files for the supercobra could you?
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Post by NorthenderPNE »

I sent you a link, let me know if you have problems with the link etc. Please don't circulate it as it's a private edit of someone else's oxp! :wink:
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

Post by Kaks »

It looks like the position of the viewing ports didn't get copied across when you like_shipped the adder. The two blue blobs are the engine exhaust flames seen from behind. If the front view port is directly behind the laser, you'll see a red + in the middle of the screen when you fire, as opposed to nothing at all.

Anyway, to answer the question: apart from player only settings, like view port positions, everything else should be copied faithfully from one ship to the other.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Kaks wrote:
It looks like the position of the viewing ports didn't get copied across when you like_shipped the adder.
That’s… rather odd. It doesn’t happen in trunk for me.

For the record, the only keys that are supposed to be dropped when like_shipping are is_template (for obvious reasons) and display_name (because it could unexpectedly override the child’s name). Thinking about it, display_name should probably only be dropped if the child actually has a name.
Crush
Competent
Competent
Posts: 35
Joined: Tue Oct 20, 2009 2:07 pm

Post by Crush »

Hmmm...I've copied all the view stuff, and it still isn't working:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

<dict>
<key>puff_adder-player</key>
<dict>
<key>like_ship</key>
<string>adder</string>
<key>name</key>
<string>Puff Adder</string>
<key>roles</key>
<string>player</string>

<key>exhaust</key>
<array>
<string>-5.75 0.0 -22.5 6.0 4.0 4.0</string>
<string>5.75 0.0 -22.5 6.0 4.0 4.0</string>
</array>

<!-- view positions copied from Adder -->
<key>view_position_aft</key>
<string>0.0 2.5 -22.5</string>
<key>view_position_forward</key>
<string>0.0 2.5 14.0</string>
<key>view_position_port</key>
<string>-12.0 1.5 -1.0</string>
<key>view_position_starboard</key>
<string>12.0 1.5 -1.0</string>

<!-- weapon positions copied from Adder -->
<key>weapon_position_aft</key>
<string>0.0 0.0 -22.5</string>
<key>weapon_position_forward</key>
<string>0.0 0.0 22.5</string>
<key>weapon_position_port</key>
<string>-15.0 0.0 -14.5</string>
<key>weapon_position_starboard</key>
<string>15.0 0.0 -14.5</string>

<!-- custom views copied from Adder -->
<!-- these are the views from outside the ship -->
<key>custom_views</key>
<array>
<dict>
<key>view_description</key>
<string>Rear View</string>
<key>view_orientation</key>
<string>1.0 0.0 0.0 0.0</string>
<key>view_position</key>
<string>0.0 15.0 -100</string>
<key>weapon_facing</key><string>FORWARD</string>

</dict>
<dict>
<key>view_description</key>
<string>Rear Right View</string>
<key>view_orientation</key>
<string>0.9239 0.0 0.3827 0.0</string>
<key>view_position</key>
<string>70.71 15.0 -70.71</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Right View</string>
<key>view_orientation</key>
<string>0.7071 0.0 0.7071 0.0</string>
<key>view_position</key>
<string>100.0 15.0 0.0</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Front Right View</string>
<key>view_orientation</key>
<string>0.3827 0.0 0.9239 0.0</string>
<key>view_position</key>
<string>70.71 15.0 70.71</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Front View</string>
<key>view_orientation</key>
<string>0.0 0.0 1.0 0.0</string>
<key>view_position</key>
<string>0.0 15.0 100.0</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Front Left View</string>
<key>view_orientation</key>
<string>0.3827 0.0 -0.9239 0.0</string>
<key>view_position</key>
<string>-70.71 15.0 70.71</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Left View</string>
<key>view_orientation</key>
<string>0.7071 0.0 -0.7071 0.0</string>
<key>view_position</key>
<string>-100.0 15.0 0.0</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Rear Left View</string>
<key>view_orientation</key>
<string>0.9239 0.0 -0.3827 0.0</string>
<key>view_position</key>
<string>-70.71 15.0 -70.71</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Top View</string>
<key>view_orientation</key>
<string>-0.7071 0.7071 0.0 0.0</string>
<key>view_position</key>
<string>0.0 100.0 -10.0</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
<dict>
<key>view_description</key>
<string>Bottom View</string>
<key>view_orientation</key>
<string>0.0 0.0 0.7071 0.7071</string>
<key>view_position</key>
<string>0.0 -100.0 -10.0</string>
<key>weapon_facing</key>
<string>FORWARD</string>
</dict>
</array>
</dict>
</dict>
</plist>

A most perplexing mystery :-(
User avatar
ADCK
---- E L I T E ----
---- E L I T E ----
Posts: 771
Joined: Thu Dec 24, 2009 12:30 am
Location: Sydney
Contact:

Post by ADCK »

Well if Like Ship isn't working, don;t use it.

Here it is without likeship:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>puff_adder-player</key>
	<dict>
		<key>aft_eject_position</key>
		<string>0.0 -4.5 -23.0</string>
		<key>custom_views</key>
		<array>
			<dict>
				<key>view_description</key>
				<string>Rear View</string>
				<key>view_orientation</key>
				<string>1.0 0.0 0.0 0.0</string>
				<key>view_position</key>
				<string>0.0 15.0 -100</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Rear Right View</string>
				<key>view_orientation</key>
				<string>0.9239 0.0 0.3827 0.0</string>
				<key>view_position</key>
				<string>70.71 15.0 -70.71</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Right View</string>
				<key>view_orientation</key>
				<string>0.7071 0.0 0.7071 0.0</string>
				<key>view_position</key>
				<string>100.0 15.0 0.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Front Right View</string>
				<key>view_orientation</key>
				<string>0.3827 0.0 0.9239 0.0</string>
				<key>view_position</key>
				<string>70.71 15.0 70.71</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Front View</string>
				<key>view_orientation</key>
				<string>0.0 0.0 1.0 0.0</string>
				<key>view_position</key>
				<string>0.0 15.0 100.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Front Left View</string>
				<key>view_orientation</key>
				<string>0.3827 0.0 -0.9239 0.0</string>
				<key>view_position</key>
				<string>-70.71 15.0 70.71</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Left View</string>
				<key>view_orientation</key>
				<string>0.7071 0.0 -0.7071 0.0</string>
				<key>view_position</key>
				<string>-100.0 15.0 0.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Rear Left View</string>
				<key>view_orientation</key>
				<string>0.9239 0.0 -0.3827 0.0</string>
				<key>view_position</key>
				<string>-70.71 15.0 -70.71</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Top View</string>
				<key>view_orientation</key>
				<string>-0.7071 0.7071 0.0 0.0</string>
				<key>view_position</key>
				<string>0.0 100.0 -10.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Bottom View</string>
				<key>view_orientation</key>
				<string>0.0 0.0 0.7071 0.7071</string>
				<key>view_position</key>
				<string>0.0 -100.0 -10.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
		</array>
		<key>energy_recharge_rate</key>
		<string>2</string>
		<key>exhaust</key>
		<array>
			<string>-5.75 0.0 -22.5 6.0 4.0 4.0</string>
			<string>5.75 0.0 -22.5 6.0 4.0 4.0</string>
		</array>
		<key>forward_weapon_type</key>
		<string>WEAPON_PULSE_LASER</string>
		<key>hud</key>
		<string>hud-small.plist</string>
		<key>max_cargo</key>
		<string>2</string>
		<key>max_energy</key>
		<string>85</string>
		<key>max_flight_pitch</key>
		<string>2</string>
		<key>max_flight_roll</key>
		<string>2.8</string>
		<key>max_flight_speed</key>
		<string>240</string>
		<key>max_missiles</key>
		<string>1</string>
		<key>missile_launch_position</key>
		<string>0.0 -2.5 16.0</string>
		<key>missiles</key>
		<string>1</string>
		<key>model</key>
		<string>adder_redux.dat</string>
		<key>name</key>
		<string>Puff Adder</string>
		<key>roles</key>
		<string>player</string>
		<key>thrust</key>
		<string>30</string>
		<key>view_position_aft</key>
		<string>0.0 2.5  -22.5</string>
		<key>view_position_forward</key>
		<string>0.0 2.5 14.0</string>
		<key>view_position_port</key>
		<string>-12.0 1.5 -1.0</string>
		<key>view_position_starboard</key>
		<string>12.0 1.5 -1.0</string>
		<key>weapon_position_aft</key>
		<string>0.0 0.0 -22.5</string>
		<key>weapon_position_forward</key>
		<string>0.0 0.0 22.5</string>
		<key>weapon_position_port</key>
		<string>-15.0 0.0 -14.5</string>
		<key>weapon_position_starboard</key>
		<string>15.0 0.0 -14.5</string>
	</dict>
</dict>
</plist>
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6671
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The thing is, like_ship is working. I would like to see comparison screenshots between the two rear views to get an idea what kind of problem this is about.

Also, what Oolite version are we talking here?
User avatar
ADCK
---- E L I T E ----
---- E L I T E ----
Posts: 771
Joined: Thu Dec 24, 2009 12:30 am
Location: Sydney
Contact:

Post by ADCK »

OH I just got the name now... Puff Adder... as in Puff Addy... A subtle reference to Puff Daddy? :P
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Another thing is: your shipyard.plist is incomplete. For instance it is lacking the definition of lasers. Therefore no wonder that you don't see any (I don't know why you still hear them, though).

My advice: take the shipyard.plist-entry of the existing Adder and c&p it wholesale into your own shipyard.plist. Then change only the name.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

ADCK wrote:
OH I just got the name now... Puff Adder... as in Puff Addy... A subtle reference to Puff Daddy? :P

:-/
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

ADCK wrote:
OH I just got the name now... Puff Adder... as in Puff Addy... A subtle reference to Puff Daddy? :P
I thought it was an explicit reference to the snake
Post Reply