Flaming Wreckage! - Possible with scripting?

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

Moderators: winston, another_commander

User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post by JazHaz »

maik wrote:
I cannot find the OXP on the Wiki, is this merely an oversight or is it outdated?
Actually it IS on the wiki! It's on Griff's page, at the bottom of the page:

http://wiki.alioth.net/index.php/Griff_Industries
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
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 »

Great, thanks! I was only searching for it on the OXP overview page...
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post by JazHaz »

maik wrote:
Great, thanks! I was only searching for it on the OXP overview page...
EDIT: have just added it to the table. :)
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

What I wanted to ask the java script gurus: Is there any way to make a worldscript from the ship script with the flaming wreckage, so that all ships and stations destroyed ingame get their flaming wreckage?

I would like to try that, but don't know how (or if it's possible at all).
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: ..

Post by Commander McLane »

Lestradae wrote:
What I wanted to ask the java script gurus: Is there any way to make a worldscript from the ship script with the flaming wreckage, so that all ships and stations destroyed ingame get their flaming wreckage?
You don't need to do that through a script.

Just give the generic role of the flaming wreckage a high role probability, so it gets regularly chosen when Oolite looks for wreckage. Something like 1000 or 10000 should make sure that hardly every any other wreckage is produced.

EDIT: Oops! Never answer a question if you haven't seen the OXP. :oops: Just downloaded it, and it is obviously more complicated than I thought. So—until I've dug deeper—please discard my advice.

EDIT2: Okay, now I have dug deeper. What you need to do is to attach "griff_explosionScript.js" as a ship script to each ship that you want to explode this way. Which is no trouble as long as the ship in question doesn't have its own script (which you probably don't want to override). However, a while ago somewhere on the board (I've forgotten in which thread) Ahruman lined out a way to add the contents of one script to another script, while leaving the rest of the "hijacked" script intact.

One problem I see with hijacking virtually all ship scripts (and producing a lot of beautiful yet resource-hungry explosions) is that it may slow down the game.

What you could do is to put the content of griff_explosionScript into the shipDied-part of the Oolite default ship script. Then at least all ships that don't have a script of their own would have this explosion.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

This was discussed at the time, and one point is that it's not actually appropriate for all ships. For example if you did it automagically you'd probably end up with asteroids, cargo pods, ship sub-entities and to the extreme even ship sub-entities or ships which are removed by script for various reasons all going up in clouds of wreckage.

As McLane says the hooking up is simply a matter of having the ship call the script when it dies, but I deliberately didn't make it universal for the above reason.
Metal Hippy
Mostly Harmless
Mostly Harmless
Posts: 2
Joined: Sun Mar 28, 2010 9:45 am

Post by Metal Hippy »

Thanks for that. I already love Griff's work - I'm looking forward to seeing yours too. :)
wthomas33065
Average
Average
Posts: 15
Joined: Tue May 29, 2012 8:49 pm

Re: Flaming Wreckage! - Possible with scripting?

Post by wthomas33065 »

I downloaded this oxp and installed it, but I must be a real noob because I can't tell any difference between explosions when the oxp is installed and when it is on.

I tried following the readme in the package and put the config file in the addons folder and I must be doing something wrong.

Thanks for your assist in getting this work.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Flaming Wreckage! - Possible with scripting?

Post by Thargoid »

You need to edit shipdata.plist files to have the ships use the new explosions rather than their standard ones. To do so make a back-up of the relevant shipdata.plist file(s), then open them in your text editor of choice and add the line:


Code: Select all

      script = "griff_explosionScript.js";
for openStep format files, or

Code: Select all

<key>script</key>
<string>griff_explosionScript.js</string>
for XML ones. Note that this will only work for ships that don't already have a script associated with them, and won't work well if applied to ship sub-entities.

Once that's done, restart the game with the shift key held down and then shoot some ships to see the effects. There are more details earlier in this thread, so maybe have a review of it for some more tips.[/color]
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: Flaming Wreckage! - Possible with scripting?

Post by JazHaz »

I'm now working my way through Griff's Shipset shipdata.plist adding in the script reference. It seems to me that Griff ought to include this OXP in the Shipset, as when the Shipset gets updated I'll have to do it all again!
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
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

Re: Flaming Wreckage! - Possible with scripting?

Post by Griff »

yeah, it is a fiddly oxp to get working, not that it helps you that much JazHaz but it might be useful to know - if you use the 'addition' version of my shipset and the griff_alloys_and_wreckage oxp (found here http://www.box.com/shared/rpkms25cc9 ) you don't need to edit the shipdata.plist to add in the script line, there's a shipdata-overrides.plist file in the oxp that adds it in automatically for you
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Flaming Wreckage! - Possible with scripting?

Post by Smivs »

Non-shader equivalent

Just a reminder to non-shader players that dramatic explosions with fiery debris are built into Smivs'Shipset, so just because you do not have shaders available doesn't mean you have to miss out on this and other sexy features :D

Apologies to Griff for (briefly) borrowing your thread :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: Flaming Wreckage! - Possible with scripting?

Post by JazHaz »

Griff wrote:
yeah, it is a fiddly oxp to get working, not that it helps you that much JazHaz but it might be useful to know - if you use the 'addition' version of my shipset and the griff_alloys_and_wreckage oxp (found here http://www.box.com/shared/rpkms25cc9 ) you don't need to edit the shipdata.plist to add in the script line, there's a shipdata-overrides.plist file in the oxp that adds it in automatically for you
Ah, but I use the "replace" shipset! :D Still, I had to add it to Staer9's shipset too. :)
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Flaming Wreckage! - Possible with scripting?

Post by Cody »

I'd forgotten about this OXP, but I still had the .zip archived so I reinstalled it and added the script tweaks as per above, as I use the replace version of the shipset. I now remember why I uninstalled it - it can cause some stuttering, as it briefly throws the entity-count way up. Several ships blowing at the same time, or an extra large explosion, can freeze the display. Even blowing a Viper can cause some stutter on my machine.
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
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

Re: Flaming Wreckage! - Possible with scripting?

Post by Griff »

yeah, this oxp definately has some problems, a lot of the junk pieces are not very well designed, there's too many of them and the effect map to control the dissolving effect was a real pain to paint out, in the end i took the best bits out of it and added some clever scripts written by the forum javascript wizards to make the "alloy and wreckage oxp". It's probably best to treat this oxp as an interesting curiosity
Post Reply