Hamadryad (newships.oxp)

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

Moderators: winston, another_commander

User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Hamadryad (newships.oxp)

Post 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?
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 »

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! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post 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>
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 »

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!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post 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?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post 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.
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 »

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...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post 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.
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 »

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
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post 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 :)
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2310
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post 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
The truth, revealed!!
Image
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post 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.
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:
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.
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Re: Hamadryad (newships.oxp)

Post 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 :)
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
Post Reply