Page 1 of 2

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

Posted: Thu May 13, 2010 3:44 pm
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

Posted: Thu May 13, 2010 4:54 pm
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:

Posted: Thu May 13, 2010 5:02 pm
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:

Posted: Thu May 13, 2010 5:05 pm
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

Posted: Thu May 13, 2010 5:11 pm
by Crush
You couldn't ping me the modified files for the supercobra could you?

Posted: Thu May 13, 2010 5:31 pm
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:

Posted: Thu May 13, 2010 7:30 pm
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.

Posted: Thu May 13, 2010 9:24 pm
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.

Posted: Thu May 13, 2010 10:00 pm
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 :-(

Posted: Fri May 14, 2010 2:38 am
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>

Posted: Fri May 14, 2010 6:20 am
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?

Posted: Fri May 14, 2010 6:39 am
by ADCK
OH I just got the name now... Puff Adder... as in Puff Addy... A subtle reference to Puff Daddy? :P

Posted: Fri May 14, 2010 6:59 am
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.

Posted: Fri May 14, 2010 7:32 am
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

:-/

Posted: Fri May 14, 2010 8:51 am
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