OXP Newbie - my Puff Adder flys but the display is messed up
Moderators: winston, another_commander
OXP Newbie - my Puff Adder flys but the display is messed up
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
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
-
- Deadly
- Posts: 132
- Joined: Tue Jul 25, 2006 2:32 pm
-
- Deadly
- Posts: 132
- Joined: Tue Jul 25, 2006 2:32 pm
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
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
-
- Deadly
- Posts: 132
- Joined: Tue Jul 25, 2006 2:32 pm
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.
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)
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
That’s… rather odd. It doesn’t happen in trunk for me.Kaks wrote:It looks like the position of the viewing ports didn't get copied across when you like_shipped the adder.
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.
E-mail: [email protected]
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
<?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
Well if Like Ship isn't working, don;t use it.
Here it is without likeship:
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>
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- Commander McLane
- ---- 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:
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.
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.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
I thought it was an explicit reference to the snake…ADCK wrote:OH I just got the name now... Puff Adder... as in Puff Addy... A subtle reference to Puff Daddy? :P
E-mail: [email protected]