Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Griff's normalmapped ship remakes

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

Moderators: winston, another_commander

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

Re: Griff's normalmapped ship remakes

Post 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
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post 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
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Ooh... that looks promising, Griff... as does Kaks' 'bit of work'.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Griff's normalmapped ship remakes

Post 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.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Griff's normalmapped ship remakes

Post 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).
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Re: Griff's normalmapped ship remakes

Post by TGHC »

I love it when you guys collaborate like this, great stuff.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
McDjanoff
Competent
Competent
Posts: 33
Joined: Fri Apr 16, 2010 11:13 am
Location: Space Bars or somewhere in space

Re: Griff's normalmapped ship remakes

Post 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.
"In the space bar, the barbarians of all races"
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Re: Griff's normalmapped ship remakes

Post 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?
User avatar
McDjanoff
Competent
Competent
Posts: 33
Joined: Fri Apr 16, 2010 11:13 am
Location: Space Bars or somewhere in space

Re: Griff's normalmapped ship remakes

Post 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.
"In the space bar, the barbarians of all races"
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Re: Griff's normalmapped ship remakes

Post 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.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Griff's normalmapped ship remakes

Post 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...
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Re: Griff's normalmapped ship remakes

Post 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.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Griff's normalmapped ship remakes

Post 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....!
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Griff's normalmapped ship remakes

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