Jump to content

[1.0.x]Destruction Effects (flames and smoke on joint breaks)


BahamutoD

Recommended Posts

2 hours ago, SpannerMonkey(smce) said:

Hi nice work on getting an update out, I'm wondering if alongside wing, fuselage, engine etc as parts affected could you possibly add Bow, stern , hull ?  (Can't remember the last time i requested something from another mod maker)  No biggy if it's more hassle than it appears.

  I'm thinking  with the current proliferation of ship mods it could be a worthwhile addition (in fact I've just had a look through the source and can see how it would be done, I'll take a swing at it myself, and let you know if it works out as expected)

A short while later...

It was fairly uncomplicated to do and has so far been successful, no errors relating etc, and as mentioned by others if it lasted a little longer it would be perfect. Below bow hull and superstructure ablaze

cs2GstA.png

 

How is there so much flames? Did a A6M Zero kamakazie you or something?

Link to comment
Share on other sites

25 minutes ago, Murican_Jeb said:

How is there so much flames? Did a A6M Zero kamakazie you or something?

Nope just an identical sister ship that put up a very  spirited defense of KSC island,  i think it was the 122mm rocket salvo that set it alight, which in turn destroyed everything forward of the main superstructure, finally blew up sending all but the aft hangar  to the bottom. (I'm still working on balancing those LBP parts so at least they are destructible now.)

Spoiler

pJyDhTa.png

 

Edited by SpannerMonkey(smce)
Link to comment
Share on other sites

21 hours ago, Murican_Jeb said:

Did you make the burn time longer?

No sorry I didn't but I will do it

20 hours ago, SpannerMonkey(smce) said:

Hi nice work on getting an update out, I'm wondering if alongside wing, fuselage, engine etc as parts affected could you possibly add Bow, stern , hull ?  (Can't remember the last time i requested something from another mod maker)  No biggy if it's more hassle than it appears.

  I'm thinking  with the current proliferation of ship mods it could be a worthwhile addition (in fact I've just had a look through the source and can see how it would be done, I'll take a swing at it myself, and let you know if it works out as expected)

A short while later...

It was fairly uncomplicated to do and has so far been successful, no errors relating etc, and as mentioned by others if it lasted a little longer it would be perfect. Below bow hull and superstructure ablaze

cs2GstA.png

 

Hey! You are more than welcome to change the code :) . I would suggest to create a fork from https://github.com/jrodrigv/DestructionEffects, commit your changes and create a new pull request so I can review it and merge it.  I will release a new version with your changes and with an extended burning time.

Edited by jrodriguez
Link to comment
Share on other sites

5 minutes ago, jrodriguez said:

 

Hey! You are more than welcome to change the code :) . I would suggest to create a fork from https://github.com/jrodrigv/DestructionEffects, commit your changes and create a new pull request so I can review it and merge it.  I will release a new version with your changes and with an extended burning time.

Cool if that is the case then i've thought of some other parts that would be liable to destruction damage, as a plugin noob (though improving ) can i ask if the following items are game defined strings, or will this particular bit of code look for parts with the string included in the name, from my basic understanding they are defined in the game code, but better to check with someone who knows more :)

 public static List<string> PartTypesTriggeringUnwantedJointBreakEvents = new List<string>(8)
        {
            "decoupler",
            "separator",
            "docking",
            "grappling",
            "landingleg",
            "clamp",
            "gear",
            "wheel"
        };

Plenty of other ways to get this done so either way it's no biggy, but still nice to know

Link to comment
Share on other sites

7 minutes ago, SpannerMonkey(smce) said:

Cool if that is the case then i've thought of some other parts that would be liable to destruction damage, as a plugin noob (though improving ) can i ask if the following items are game defined strings, or will this particular bit of code look for parts with the string included in the name, from my basic understanding they are defined in the game code, but better to check with someone who knows more :)


 public static List<string> PartTypesTriggeringUnwantedJointBreakEvents = new List<string>(8)
        {
            "decoupler",
            "separator",
            "docking",
            "grappling",
            "landingleg",
            "clamp",
            "gear",
            "wheel"
        };

Plenty of other ways to get this done so either way it's no biggy, but still nice to know

That list matches Part names defined on the cfg part files (eg; 

roverWheelM1.cfg contains:

PART
{
    name = roverWheel1

Link to comment
Share on other sites

2 hours ago, SpannerMonkey(smce) said:

Cool if that is the case then i've thought of some other parts that would be liable to destruction damage, as a plugin noob (though improving ) can i ask if the following items are game defined strings, or will this particular bit of code look for parts with the string included in the name, from my basic understanding they are defined in the game code, but better to check with someone who knows more :)


 public static List<string> PartTypesTriggeringUnwantedJointBreakEvents = new List<string>(8)
        {
            "decoupler",
            "separator",
            "docking",
            "grappling",
            "landingleg",
            "clamp",
            "gear",
            "wheel"
        };

Plenty of other ways to get this done so either way it's no biggy, but still nice to know

Could you also add anything with electricity?

Link to comment
Share on other sites

2 minutes ago, Murican_Jeb said:

Could you also add anything with electricity?

i Like that idea, lots of things that would be otherwise difficult to define contain EC, unless someone can point out a valid reason not to add EC, fuel and oxidizer are already defined so it completes the set.

disclaimer :)

(I do not have any ties or connection to this mod (or it's maintenance, i have enough projects of my own)  and my experiments are purely that of a curious c# illiterate and as such are likely to unexpected unintended results)

Link to comment
Share on other sites

1 hour ago, SpannerMonkey(smce) said:

i Like that idea, lots of things that would be otherwise difficult to define contain EC, unless someone can point out a valid reason not to add EC, fuel and oxidizer are already defined so it completes the set.

disclaimer :)

(I do not have any ties or connection to this mod (or it's maintenance, i have enough projects of my own)  and my experiments are purely that of a curious c# illiterate and as such are likely to unexpected unintended results)

So what you mean is we can't add EC? ;.;

Link to comment
Share on other sites

6 minutes ago, SpannerMonkey(smce) said:

Added!   and  about to find out if there are any repercussions, also added ammo and cannon shells :)

 

It's added right now? :D! So now all I have to do is wait for @jrodriguez to add the stuff you made?

Edit: Btw I built an A6M2 Zero, so I'll ram it using some of your boat parts :) (And maybe some of the parts from the Large Boats Parts pack :D)

Edited by Murican_Jeb
Link to comment
Share on other sites

P-51 Mustangs go boom (Ok maybe not always XD)

Yes, I know, there are alot of flamable parts on here :rolleyes:B6725E29F2E11E6E2CEDFDDFDC1584DC36FF51DC (1280×1024)

Edit: Here is another picture with Destruction Effects

Edit 2: Deleted 2nd picture because it was basically an explosion with a smoke trail behind it

Edited by Murican_Jeb
I just gave you a hint in there dude...
Link to comment
Share on other sites

@jrodriguez Hi just created PR for reviewing small changes I've made, added hull, bow,stern for ships, Added turrets.  Added resources to be checked for Ammo and EC.  I don't know how you are with c#' but could really do with a disable option via gui or app launcher. It's impossible to build stock turbo shafts with this installed as the way they operate the plugin sees as a collision. I'd add one but honestly i only have the barest clue :)

 

Link to comment
Share on other sites

39 minutes ago, SpannerMonkey(smce) said:

@jrodriguez Hi just created PR for reviewing small changes I've made, added hull, bow,stern for ships, Added turrets.  Added resources to be checked for Ammo and EC.  I don't know how you are with c#' but could really do with a disable option via gui or app launcher. It's impossible to build stock turbo shafts with this installed as the way they operate the plugin sees as a collision. I'd add one but honestly i only have the barest clue :)

 

Hi! I will review the code. Why do you want the disable option?

 

Link to comment
Share on other sites

2 minutes ago, jrodriguez said:

Hi! I will review the code. Why do you want the disable option?

 

50 minutes ago, SpannerMonkey(smce) said:

It's impossible to build stock turbo shafts with this installed as the way they operate the plugin sees as a collision. I'd add one but honestly i only have the barest clue :)

 

 

 

 

 

Link to comment
Share on other sites

54 minutes ago, SpannerMonkey(smce) said:

It's impossible to build stock turbo shafts with this installed as the way they operate the plugin sees as a collision. I'd add one but honestly i only have the barest clue :)

public static List<string> PartTypesTriggeringUnwantedJointBreakEvents = new List<string>(8)
        {
            "decoupler",
            "separator",
            "docking",
            "grappling",
            "landingleg",
            "clamp",
            "gear",
            "wheel"
        };

You need to check which part is triggering the event using the callback

 public void OnPartJointBreak(PartJoint partJoint) and then calling to

 private static bool ShouldFlamesBeAttached(PartJoint partJoint)

- If you know that part should not trigger any destruction effects you should add the name to the list PartTypesTriggeringUnwantedJointBreakEvents

It just a decision to make - I always prefer to have "less" destruction effects on some parts than abnormal effects. The landing gear is one example, they have "bugs" and they triggers OnPartJoinBreak events when they shouldn't

 

Link to comment
Share on other sites

1 minute ago, jrodriguez said:

public static List<string> PartTypesTriggeringUnwantedJointBreakEvents = new List<string>(8)
        {
            "decoupler",
            "separator",
            "docking",
            "grappling",
            "landingleg",
            "clamp",
            "gear",
            "wheel"
        };

You need to check which part is triggering the event using the callback

 public void OnPartJointBreak(PartJoint partJoint) and then calling to

 private static bool ShouldFlamesBeAttached(PartJoint partJoint)

- If you know that part should not trigger any destruction effects you should add the name to the list PartTypesTriggeringUnwantedJointBreakEvents

It just a decision to make - I always prefer to have "less" destruction effects on some parts than abnormal effects. The landing gear is one example, they have "bugs" and they triggers OnPartJoinBreak events when they shouldn't

 

I shall do that although in all probability I'm in the minority here as most players building stock turboshafts are mostly stock, no mod enthusiasts so this will only come up rarely i know, the killer is that it is the application of the part not the actual part that's the problem, after all Squad never designed the game with the uses to which we are putting parts in mind, so this is well off the beaten track type stuff, no worries though I'll just build them in one of my many other installs :)

 

Link to comment
Share on other sites

On 2/8/2015 at 11:12 PM, BahamutoD said:

Destruction Effects:

pyPu6G7.png

This mod adds flames and smoke to certain parts' joint break event.

At the moment, these parts include:

-anything with "wing" in the name

-anything with "fuselage" in the name

-anything with fuel or oxidizer as resources.

-engines.

Note to modders: I'm trying to minimize the quantity of my mods, so I will not be working on this any further. It could use a bit of polishing though, so I am releasing it under the CC0 license, which means anyone can take it and change it and re-release it without even asking me.

Download from GitHub

Source

License: CC0

Video by Space Scumbag:

 

 

More videos:

 

 

 

 

When will you update this?

Link to comment
Share on other sites

7 minutes ago, Vonnmillard said:

When will you update this?

You had to quote the entire OP did you? 

Could have just asked your question,  the mod is implied seeing as how you are on the thread.  

To answer your question,  it looks like the mod was recently,  possibly taken over and is currently being worked on. In this case it's better to have patience than a release date. It will happen when it happens. 

Link to comment
Share on other sites

5 hours ago, Berlin said:

You had to quote the entire OP did you? 

Could have just asked your question,  the mod is implied seeing as how you are on the thread.  

To answer your question,  it looks like the mod was recently,  possibly taken over and is currently being worked on. In this case it's better to have patience than a release date. It will happen when it happens. 

Thanks Berlin :) (BTW nice work with SVE!) 

 

@Vonnmillard In order to update the OP there is two options: 1. @BahamutoD can update the OP to reference my last release from the fork https://github.com/jrodrigv/DestructionEffects/releases .

2. I can create a new thread.

The main reason why I haven't created one yet is because I'm not doing any new development of this mod. I'm just doing the basic maintenance: bug fixing and recompiling for new KSP versions.

Link to comment
Share on other sites

Since I can't seem to submit an issue via Github (maybe because it's a fork? I don't quite understand why somethings have Issues and some don't, not looked into it) I'll report this here.  I'm using version 1.0 beta because that's what CKAN gave me (and also because 1.0.1 is tagged pre-release).

 

When using Kerbalism and Deadly Reentry and FAR and dozens of other hopefully unrelated things, whenever I attach a heatshield to the bottom of a command pod (tested for sure with 1.25m basic command you start with, but I'm pretty sure I've seen it with other sizes and types from mods) it spawns flames when decoupled.

 

Given that normal behaviour at least early game is to eject the heat shield once you're through the hot part so the pod weighs less for landing, this looks a bit weird.

 

Edit: Having a quick look at the code, maybe this could be fixed by adding "heatshield" to the list of part name filters that often trigger a planned separation?  I'm not 100% certain or I'd send you a pull request...

Edited by darloth
Suggestion
Link to comment
Share on other sites

6 minutes ago, Murican_Jeb said:

@jrodriguez What is happening to this mod now?

Hi. Nothing really. I'll do bug fixing from time to time and I'm going to release a new version today with the changes from @SpannerMonkey(smce) and the fix for @darloth.

At the moment I'm quite busy developing things for BDArmory but I'll take care of the basic maintenance of this.

But if someone wants to take over the maintenance of this mod, please feel free to do it :)

 

 

Link to comment
Share on other sites

Hi all,

I'm glad to announce a new release of this mod.

Change log:

  • Avoid heat-shield and mast part to trigger effects.
  • Add parts effects for Bow, Stern, Hull and Superstructures.
  • Add part effects for resources : electric, ammo and cannon.
  • No destruction effects if atmosphere density is below 1%.
  • Duration time for effects increased (2x).

Release:

https://github.com/jrodrigv/DestructionEffects/releases/tag/v1.1.0

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...