Flaming Wreckage! - Possible with scripting?

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

Moderators: winston, another_commander

User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Post by ZygoUgo »

Damnit, sorry Griff didn't see your post there..
I've fixed the shaders & re-uploaded the oxp, same link as above, sorry about that - maybe this was what was causing the crashes ZygoUgo?
EDIT Okay I've reinstalled the newer version, started up Oolite and cleared out the cache. Now It doesn't crash but I didn't get any special effects, even off the Allstars which had just been working.
I'm sure somewhere Ahruman has mentioned this as Oolite not reading all the scripts in the addon folders properly, atleast pre 1.73?
*Looks to sky qizzically*
I have noticed it's a bit of a lucky dip when you clean out the cache, sometimes I get random hits but my settings for Orbits seem to have gone out the window, that sort of malarky.
User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Post by ZygoUgo »

Ah, evenink Thargoid, yes just removed all the incidents of player ship.
This is just down to me being a numpty and not knowing there was any difference
:oops:
It does seem however to load up fine with the script attached to the subentities, so I'll wait for one to kill it to see if it crashes.
Hopefully not, so in blowing the bigger bits off larger ships you get a shower of parts, it would be nice to know you can do that.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

It should work for the sub-ents, but it will probably look rather odd as you will have small things generating large amounts of wreckage.

Also if the ship is non-frangible then you'll effectively have the same script attached twice to the ship. Not sure what that'll do, hence the recommendation to drop it.

Also if the ship already has a script key (e.g. for the constrictor) then you can't add it directly. You'd have to merge one script into the other, which is a little more complex (although not hugely so).
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

I've made another tiny, purely cosmetic change to the no normal map version of the oxp, some of the objects (such as the burst open cargo canister) had some weird lighting problems due to the way that wings3d deals with double sided polygons, with a tiny bit of fiddling i've managed to use obj files directly out of another 3d modeller to make the Oolite .dat files with and these are looking much better in game, i've re-exported all the problem objects and re-uploaded the oxp to the same link as above.
is the oxp working for you now ZygoUgo, i'm totally puzzled as to why the fixed shaders made the glow effects vanish on your computer, is there anything in the log? because it sounds as though i've broken the shaders even more than they were before, yet they're working OK on my pc.
User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Post by ZygoUgo »

You've no worries Griff, it was me assigning the effect to player ships without realising it would have an effect which was causing the crashes.
I have left, out of interest, your script attached to various sub entities to see if it still works, nothings crashed yet. I was curious if the effect could be applied to larger subentities such as the Lampyrius boot (and any larger parts of bigger vessels that are counted as sub-entities) without the same crashing, unfortunately I haven't come across one since to test this so it may be stopping those vessels from appearing, but this is pure speculation.
I'll keep it set up this way for a while, and if none of them appear I'll say something about it, otherwise, don't worry.

The only change I would suggest so far is that the amount of parts spawned are related to the size or mass of the object.
It would then be possible (I think) to attach the effect to all subentities too, with only the larger scoopable parts appearing with destroyed engines/cargo holds, even stations. Some of the smaller ships don't need half as many that appear.

If this is likely to slow down the spawning of the parts then perhaps this could be preset individually for vessels/subentities in the addition that is made;
<key>script</key>
<string>griff_explosionScript.js</string>
(<quantity of parts spawned for this assignment-under certain amount no scoopable parts>)

Is that possible or uneccessary?

EDIT This is very good you know, makes it much more satisfying especially when your in an up-close chase and all the bits bounce off yer bonnet :D
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Question for Griff:

This amazing nibbling effect - could it be used on other things? What I was thinking about was the tetra-screens from YAH - could a series of special adverts be created where the poly was nibbled away except for a few specific points - creating a kind of holographic billboard? (as seen in the later (earlier? :? ) Star Wars movie).

If yes and to take the effect one stage further - if some polys could be spaced out but stacked up behind one another and then nibbled away (over time) then the effective animation would move in 3 Dimensions - so your dancing robot could walk towards (or probably away - since the top poly would show frame one and then be (fully) nibbled away - revealing frame 2 (which is then (fully) nibbled away, etc) the player inside the special tetra-screen as each of his frames would be on a separate poly timed to come on only after the previous one was displayed.

On read back, I'm not completely convinced I've asked that very well...
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

That's a cool idea about cutting around the pixels in the boards so that you could see through them, it could be done quite easily i think with the current shaders, they'd just need a clip map of black and white dots in the appropriate pattern. i'm not sure how nice it would look though, since there is no real transparency it might end up strobing horribly like someones nasty suit on 80's television
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Hi,

Is there a particular reason the 'script = "griff_explosionScript.js";' line is added twice for every ship in the example shipdata.plist?

Cheers,
- Micha.
The glass is twice as big as it needs to be.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Ah, that looks like i've made a mistake when writing out the .plist - it doesn't need to be there twice, i'll get fixing
edit: fixed and re-uploaded
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Cool - wasn't 100% sure so I thought I'd ask first.

Incidentally, was it just coincidence, or does adding your script also tend to generate lots more ejecta? As in, not just the burning wreckage which dissipates, but also more scoopable wreckage and cargo?

My first test-flight with your OXP installed last night certainly made it seem like there was more.
The glass is twice as big as it needs to be.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Yes, i think it does. Thargoid wrote a brilliant script that worked fantastically, but like the massive control freak i am i could stop myself from fiddling with it trying to spawn more of the tiny shards that dissolve away, i think i broke it though - It's so clever how T's script chooses wreckage that i think leverls of one type of space junk influence the levels of all the other types of space junk - it's all too complex for me to follow - i just dived in and added BIGGER NUMBERS - might have gone a bit too far, although i do like that big puff of burning bits that you can fly through hearing them bounce off your hull as you line up another innocent trader pirate in your gunsights :)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The script doesn't change the cargo pods that are spawned when things go bang.

What it does (or did ;) ) do is generate three different types of debris. There are large lumps of wreckage, which remain behind and do not explode (and can be scooped), smaller lumps of debris (which do explode after a period of time) and burning fuel (which explodes almost immediately).

These were spawned in increasing numbers, so if Griff's tweaked the balance and added bigger ones then yes there is a higher chance that you'll get scoopable wreckage.
Metal Hippy
Mostly Harmless
Mostly Harmless
Posts: 2
Joined: Sun Mar 28, 2010 9:45 am

Post by Metal Hippy »

Sadly, my old iBook G4 can't display shaders, so is there a normalmapped version of this fine sounding OXP?
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

I cannot find the OXP on the Wiki, is this merely an oversight or is it outdated?

Cheers,
-Maik
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

If I remember correctly, there's a link to it near the bottom of my wiki page.

Also it will work on a non-shader machine, just won't look as pretty.

Direct link is here.
Post Reply