Page 78 of 160

Re: Griff's normalmapped ship remakes

Posted: Sun Mar 06, 2011 4:23 pm
by Kaks
There's a very simple way of removing fired missiles from both player & NPCs: reposition the subent representing the unfired missile. There's no collision detection done between different parts of the same ship, including subentities, so putting them inside the ship will take them out of harm's way as well as out of sight...

However, we now have the interesting option of removing a missile if the external pylon is shot, plus I've got the feeling we might want to differentiate between missiles & various pods/mines...

To do all that we'd need

2 script associated to missiles subents:
- when missile is launched, one subent gets moved inside the ship's frame
- when a missile subent is shot, remove missile associated to it, recreate the subent, and move it inside the ship's frame

2 external pylon models:
- generic missile shape, to represent various missiles, plus various skins - aka materials - one for each missile type
- generic payload shape, with skins for various mines & assorted external equipment pods

It all sounds doable, if 'a bit' of work! :D

Re: Griff's normalmapped ship remakes

Posted: Sun Mar 06, 2011 4:31 pm
by Griff
KW's suggestion to put the missiles at the wingtips works a treat, the angle of the hull seems a lot less steep there, so they can point straight down the Z axis and fit up against the hull nice and cosy
Image

Re: Griff's normalmapped ship remakes

Posted: Sun Mar 06, 2011 4:34 pm
by Cody
Ooh... that looks promising, Griff... as does Kaks' 'bit of work'.

Re: Griff's normalmapped ship remakes

Posted: Sun Mar 06, 2011 5:26 pm
by Eric Walch
Kaks wrote:
It all sounds doable, if 'a bit' of work! :D
I think that Griff must start with giving all his subents an unique name or the script has no way of telling them apart :wink: . Currently the name is identical as the ship its used for. e.g. front-gun and missile should be differently named.

Re: Griff's normalmapped ship remakes

Posted: Sun Mar 06, 2011 8:12 pm
by Thargoid
Griff has had a script from me since last week which does it quite nicely for NPCs, and could also do the trick for player ships with a little extra work.

If the missile sub-ent gets shot off the ship loses the missile, and if it's fired off then its fired and away. It is slightly limited that the ship only has a single missile-type, but again for NPCs that doesn't really matter and could be expanded on again if this becomes something more than a little play-around.

Oh and it can tell things apart, only the missiles are removed even if the ship has additional sub-ents (done by role). The only drawback is it doesn't seem to work for EQ_THARGON, due seemingly to some glitch in trunk (reported on Berlios).

Re: Griff's normalmapped ship remakes

Posted: Mon Mar 07, 2011 8:13 am
by TGHC
I love it when you guys collaborate like this, great stuff.

Re: Griff's normalmapped ship remakes

Posted: Tue Mar 08, 2011 5:20 pm
by McDjanoff
Hello,

Look at Cobra MarkIII's size , why only 4 missiles ???
Is that missiles are "spaceproof" to be placed under the ship itself ?
Is the missiles size is standard, I can't beleive them racked on a Cobra MkI, neither an ASP MkII.

Unles these points, the work is great ... Thank you Griff.


I have another question. For mod puproses, I am trying to hacking Griffed ships to have some customs ones, playing only with shipdatas definitions without modifying any textures.

I've tried to have a CobraMK3 black, white and Navy blue. Is anybody have some hint to share, because I am a little stuck with these shipdatas definitions.

Thank in advance,
Regards.

B.

Re: Griff's normalmapped ship remakes

Posted: Tue Mar 08, 2011 5:57 pm
by Cody
McDjanoff wrote:
I've tried to have a CobraMK3 black, white and Navy blue. Is anybody have some hint to share, because I am a little stuck with these shipdatas definitions.
Are you using the Griff all-in-one shipset? If you want to customise your Cobra MKIII player ship's paint job and decals, the Griff multi-decal player Cobra MkIII is the best option (i.e. it's the one I know most about).

You can have two colours, but not three, and these can be customised in the 'uniforms' section of the shipdata.plist:

Code: Select all

hull_heat_level = "hullHeatLevel";	 				
engine_power = "speedFactor"; 
PaintColor1 = { type = vector; value = "0.0 0.0 0.0"; }; 
PaintColor2 = { type = vector; value = "0.0 0.0 0.0"; }; 
The three colour values in the PaintColor lines are R, G and B... tinker with those until you get the colour scheme you require.

This is my colour set as an example:

Code: Select all

PaintColor1 = { type = vector; value = "0.130 0.02 0.3"; }; 
PaintColor2 = { type = vector; value = "0.290 0.02 0.2"; };
Then of course, you can create your own decals (up to four)... that's explained in the OXP readme.

Hope that helps.

Re: Griff's normalmapped ship remakes

Posted: Tue Mar 08, 2011 8:23 pm
by Commander McLane
McDjanoff wrote:
Look at Cobra MarkIII's size , why only 4 missiles ???
Because that's the number of missiles a Cobra III can have since the days of Elite?

Re: Griff's normalmapped ship remakes

Posted: Tue Mar 08, 2011 9:05 pm
by McDjanoff
To El Viejo

Thank you for your help.

My (experimental) OXP use the feature like_ship and then, Griff's all_in_one or sole packages are dependancies.
I've already apply the PaintColorN directives, but I didn't know the limit. Unfortunely, the result isn't what I expect.
Thank also for the RGB confirmation.
I don't hack on decals yet, but it is planed. :)

To Commander McLane

Yes !!! It is the standard configuration, but some resourceful pilots may certainly install extra racking to have more missiles ... isn't it ?

Regards,
B.

Re: Griff's normalmapped ship remakes

Posted: Wed Mar 09, 2011 8:19 am
by TGHC
I think 4 missiles on a MKIII Cobbie should be a sacred cow, I see no reason why someone could not hack into their own file to change it for their own personal ship though. There is a case for the Supercobra to have more IMHO.

Re: Griff's normalmapped ship remakes

Posted: Wed Mar 09, 2011 8:34 am
by Thargoid
Just a shame NPC Cobbie3's only have 3 (like a new Jameson), although in their case it's a max limit rather than an empty slot. I fell over that one when I coded the script for Griff and then wondered why I had more sub-ents than missiles...

Re: Griff's normalmapped ship remakes

Posted: Wed Mar 09, 2011 9:26 am
by Commander McLane
Thargoid wrote:
Just a shame NPC Cobbie3's only have 3 (like a new Jameson), although in their case it's a max limit rather than an empty slot. I fell over that one when I coded the script for Griff and then wondered why I had more sub-ents than missiles...
I would consider that one a (long standing) bug. Does anyone know how it was in 8-bit Elite?

I think the player Cobbie has one empty missile slot in order to show the new Jameson also the different available missiles on the F3-screen. He wouldn't discover them if all his slots were filled already. Therefore it makes sense to have missiles = 3 for the player version. It definitely should be missiles = 4 for the NPC versions IMO.

I guess this is the result of an oversight when like_shipping or c&p'ing the NPC Cobras from the player Cobra.

Re: Griff's normalmapped ship remakes

Posted: Thu Mar 10, 2011 8:38 pm
by Capt. Murphy
Griff wrote:
sorry about all the hasstle El Viejo, thanks for taking all that time to work through what i was suggesting!
if you think about it it makes sense that this was the fault, when you start a new game you're put inside the cobra3-player ship, this was like_shipped to the griff one for some stuff, but since cobra3-player still has all it's own settings listed in it (including viewport settings) these then overwrite the ones inherited from the griff version and we end up with gun viewport weirdness, odd that the model stayed as the griff one and didn't get overwritten back to the default cobraIII. i suppose the fix would be to hack up the cobra3-player entry in the original shipdata so that it only contains the like_ship, role and model lines
To get the start-up ship to be Griff's Cobra with the views correct I edited the original Oolite shipdata.plist changing line 983 to like_ship = "griff_normalmapped_cobra_mkIII_player"; On it's own this creates the dodgy visible laser.

I then pasted the various view position lines from the griff shipdata.plist over the corresponding lines in the original. All seems fine and dandy so far - I also renamed the original demoships.plist to demoships.old so the original models that don't appear in game don't appear at start-up.

Original Oolite Files all backed up first of course....!

Re: Griff's normalmapped ship remakes

Posted: Thu Mar 10, 2011 8:55 pm
by JensAyton
Commander McLane wrote:
I think the player Cobbie has one empty missile slot in order to show the new Jameson also the different available missiles on the F3-screen. He wouldn't discover them if all his slots were filled already. Therefore it makes sense to have missiles = 3 for the player version. It definitely should be missiles = 4 for the NPC versions IMO.
I’m not going to change it at this point, but I have set NPC max_missiles to 4 as a sort of symbolic gesture. :-)
Commander McLane wrote:
I guess this is the result of an oversight when like_shipping or c&p'ing the NPC Cobras from the player Cobra.
like_ship would be a bit of an anachronism there.