Page 1 of 2

Hamadryad (newships.oxp)

Posted: Sat Mar 01, 2008 7:46 pm
by Cmdr James
I have just upgraded to a Hamadryad, which is an excellent ship.

However, thee are a couple of things.

You cannot see the laser (on trunk) from the cabin.

I have made some modification and simplifications to the plist such as remove some duplication and use like_ship instead. I have also added custom view data so that it is sensible rather than microscope view of the side :)

I either dont understand weapon_position_forward, or there is sometghing wrong with it. It seems to be 3 co-ordinates (lateral offset, vertical, and depth?) but changing them seems to have no effect. Can anyone fill me in on the secret of how to move the gun mount to the whole on the front of the ship?

Posted: Sat Mar 01, 2008 8:01 pm
by Kaks
You're right about the laser position being in x y z coordinates, but they're coordinates in meters from the centre of the ship.

To see the laser firing, try using similar coordinates from view_position_forward, with the weapon y coordinates 2 meters lower, z coordinates 10 meters forward (+10) from the viewing position.
If that doesn't work, try 25 meters forward, that should show the laser appearing from some distance in front of the ship!

Hope this helps! :)

Posted: Sat Mar 01, 2008 8:17 pm
by Cmdr James
Yeah, that was my basic plan. I think the problem is that I didnt realize quite how big the hamadryad is :)

Ive opened it in dry dock to get the dimensions, Ill play some more, thanks.


If I set large values like this, it still originates from the same point, am I missing something?

Code: Select all

                <key>weapon_position_forward</key>
                <string>100.0 250.0 75</string>

Posted: Sat Mar 01, 2008 9:47 pm
by Kaks
Hmmm, it looks like it's a matter of scale:

if you try

Code: Select all

                <key>weapon_position_forward</key>
                <string>80.0 250.0 375</string> 
you should be able to see some changes, if not then I'm stumped too!

Posted: Sat Mar 01, 2008 10:43 pm
by Cmdr James

Code: Select all

                <key>weapon_position_forward</key>
                <string>1000.0 2500.0 750</string>
still shows no noticeable difference. Although, I have to say, looking at the code, the values are read, but in initLaserFromShip I cant tell where the offset is used. Am I missing something or is this just not implemented?

Posted: Sat Mar 01, 2008 10:59 pm
by LittleBear
You've proabley already done this, but when you change something in a .plist you have to hold down SHIFT whilst you load up Oolite for the first time after making the changes. Otherwise they are not read.

Posted: Sat Mar 01, 2008 11:02 pm
by Cmdr James
Thanks, I have been doing that, but its good to remind me :)

I know my changes are being loaded, as other things like external view are changing.

Posted: Sat Mar 01, 2008 11:27 pm
by Kaks
I've been cleaning up the falcon oxp, and with the following settings:

Code: Select all

		<key>view_position_forward</key>	
		<string>24 4.5 16</string>

		<key>weapon_position_forward</key>
		<string>24 0.0 18</string>

the laser is coming from the left hand side of the viewing position. I haven't looked at that part of the code yet, but when if I'm done with the falcon...

Posted: Sat Mar 01, 2008 11:52 pm
by Cmdr James
Ah, if I use those settings, then from the cabin I see lasers from the left side, but on the external views the origin is still dead centre.

Posted: Sun Mar 02, 2008 12:02 am
by Kaks
Ok, it looks like we need a kind soul to volunteer looking into the external views code... ;)
Commander James, are you busy this weekend? :D

Posted: Sun Mar 02, 2008 1:14 am
by Cmdr James
Intereting, I made some changes, and now I can control where my laser comes from. Problem is, all the other guys have lasers coming from stupid places.

Ill take more of a look in the morning. thanks for your help :)

Posted: Sun Mar 02, 2008 1:59 am
by Captain Hesperus
Cmdr James wrote:
Intereting, I made some changes, and now I can control where my laser comes from. Problem is, all the other guys have lasers coming from stupid places.
Well, why not just like_ship the player version replacing the corrected laser position with the one that works for the NPC?

Captain Hesperus

Posted: Sun Mar 02, 2008 9:27 am
by Cmdr James
It does not work for the NPC version :p

If I add code to oolite to use the offset, then the hamadryad starts acting as I expect, but, for example, Vipers have lasers coming out of pace to the side of them.

Posted: Sun Mar 02, 2008 4:55 pm
by JensAyton
Kaks wrote:
Ok, it looks like we need a kind soul to volunteer looking into the external views code... ;)
Er… don’t. It will eat your brain. Also, I’m supposedly working on replacing the current code with the OOCamera class.

Re: Hamadryad (newships.oxp)

Posted: Sun Mar 02, 2008 5:26 pm
by Dr. Nil
Cmdr James wrote:
I have just upgraded to a Hamadryad, which is an excellent ship.
Yeah! I made a small fortune in that ship back in the early days :)