Griff's normalmapped ship remakes
Moderators: winston, another_commander
Re: Griff's normalmapped ship remakes
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!
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!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Griff's normalmapped ship remakes
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
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Griff's normalmapped ship remakes
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!
And any survivors, their debts I will certainly pay. There's always a way!
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Griff's normalmapped ship remakes
I think that Griff must start with giving all his subents an unique name or the script has no way of telling them apart . Currently the name is identical as the ship its used for. e.g. front-gun and missile should be differently named.Kaks wrote:It all sounds doable, if 'a bit' of work!
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Griff's normalmapped ship remakes
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).
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).
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Griff's normalmapped ship remakes
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"
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
- McDjanoff
- Competent
- Posts: 33
- Joined: Fri Apr 16, 2010 11:13 am
- Location: Space Bars or somewhere in space
Re: Griff's normalmapped ship remakes
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.
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"
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Griff's normalmapped ship remakes
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).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.
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"; };
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"; };
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!
And any survivors, their debts I will certainly pay. There's always a way!
- 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:
Re: Griff's normalmapped ship remakes
Because that's the number of missiles a Cobra III can have since the days of Elite?McDjanoff wrote:Look at Cobra MarkIII's size , why only 4 missiles ???
- McDjanoff
- Competent
- Posts: 33
- Joined: Fri Apr 16, 2010 11:13 am
- Location: Space Bars or somewhere in space
Re: Griff's normalmapped ship remakes
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.
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"
Re: Griff's normalmapped ship remakes
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"
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
Re: Griff's normalmapped ship remakes
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...
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- 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:
Re: Griff's normalmapped ship remakes
I would consider that one a (long standing) bug. Does anyone know how it was in 8-bit Elite?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 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_ship
ping or c&p'ing the NPC Cobras from the player Cobra.- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: Griff's normalmapped ship remakes
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.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
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....!
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
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
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Griff's normalmapped ship remakes
I’m not going to change it at this point, but I have set NPCCommander 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 havemissiles = 3
for the player version. It definitely should bemissiles = 4
for the NPC versions IMO.
max_missiles
to 4 as a sort of symbolic gesture. :-)Commander McLane wrote:I guess this is the result of an oversight whenlike_ship
ping or c&p'ing the NPC Cobras from the player Cobra.
like_ship
would be a bit of an anachronism there.E-mail: [email protected]