Jump to content

[1.0][WIP] Kerbal Launch Failure v0.1.0 (5/1/2015)


stevehead

Recommended Posts

[WIP] Kerbal Launch Failure - v0.1.0

This mod has been released! Go here instead: http://forum.kerbalspaceprogram.com/threads/123590

Introducing my second KSP mod: Kerbal Launch Failure is a lightweight, random launch failure mod for Kerbal Space Program.

DISCLAIMER - The intention of this mod is to destroy your spacecraft. Use with caution!

About

NASA requires that human-rated spacecraft have a probability of loss on ascent of no more than 1 in 500. The Kerbals of planet Kerbin think of this requirement as silly, so they have instead adopted a less strict policy of a loss on ascent of no more than 1 in 50 for their Kerbal Space Program (Kerbin is one-tenth the size of Earth, makes perfect sense to use 50...). In fact, to save funds on safefty measures, they have made their spacecraft to fail exactly 1 in 50 times.

This mod is not meant to compete with other part failure mods (I personally enjoy using DangIt! with Entropy), but to be an option for those that want that living on the edge feel for launches without having to worry about part failures and repairs beyond the initial launch.

Javascript is disabled. View full album

Sorry for the audio issues above with the explosions. Don't know if it's just me, but sound FX for multiple explosions simultaneously is real choppy.

Instructions

The ZIP marked with debug in its name is a special version that almost guarantees a failure rate of 100% and usually sooner during flight for debugging. Your spacecraft will likely explode. Use this if you want to see the mod doing its thing without having to launch many spacecraft.

Current Features

  • Launch has a small chance (1 in 50) of failure with explosions during ascent.
  • Failure originates in an engine, which will begin to overheat and have extra thrust applied to cause instability.
  • The abort action group is auto-triggered once the initial failure occurs (this will be an option in the future).
  • Explosion has a chance to propagate to surrounding parts, varying how catastrophic the failure is.
  • Tanks containing fuel are more likely to explode.
  • Failure checks end once the spacecraft has reached space (IRL, disasters mostly happen during ascent anyways). This is to prevent frustration for longer missions, to reduce the complexity of the mod, and to lessen the CPU usage for game ticks.

Upcoming Features

  • Custom settings.
  • Optional random failure of heat shield during re-entry.

Links

Download from GitHub

Source Code on GitHub

Changelog


v0.1.0
- Alpha release.
- The part that starts the failure overheats and overthrusts to allow people time to react.
- Auto abort action group trigger added.

v0.0.1
- Alpha test release for KSP 1.0.

License

This work is released under the GNU General Public License: http://www.gnu.org/licenses/.

Edited by stevehead
release
Link to comment
Share on other sites

Nice idea.

One problem I have with career mode is that end-game there's no use for science other than to convert it to cash. What about a strategy provision to invest science points to decrease failure rates? Better yet, make the rate somewhat dependent on vehicle part counts so you have an incentive to simplify the craft, or need to invest more science to increase reliability.

Link to comment
Share on other sites

Added screenshots in the OP from one of my tests with the Kerbal X. The failure started with the LV-T45 of one of the liquid fuel boosters, which propagated through much of the spacecraft, including the fuel tank of the main stack.

Link to comment
Share on other sites

Really interesting.

I always wished a failure mod for ascents only, this will actually provide a mean for escape tower systems and safety planning ;)

And because I like pressure, when you know something bad can happen at anytime...

Link to comment
Share on other sites

Another thought. In the event of a failure, can the plug-in automatically hit the abort control? Might as well give an incentive to install a proper LES.

Another great idea, shouldn't be a problem to implement. It seems more Kerbal-ish to have to manually active the Abort sequence, so it would be an option and disabled by default. I plan to work on the custom settings stuff later today so I'll see what I can do.

Really interesting.

I always wished a failure mod for ascents only, this will actually provide a mean for escape tower systems and safety planning ;)

And because I like pressure, when you know something bad can happen at anytime...

That's actually what gave me the idea not long ago. I had a modded install that a grew quite a bit out of hand as far as the number of mods installed, so I had sacrifice a good number including part failure mods (Chatterer was not on that list of removals... huge fan btw, cannot play without it :)). I was still using LES parts and thinking to myself "it sure would be nice to actually use the abort action group that I always setup".

By the way, for anyone out there, I highly recommend at least the LES for small capsules from Novapunch, perfect to use with the Mk1 Command Pod. I also grab the Odin radial parachutes from the same pack since they don't cover half the capsule like the stock Mk2-R Radial-Mount Parachutes.

ktuyr.jpg

Link to comment
Share on other sites

Got the auto abort action group working, and I also added a little bit of time delay between the part explosions to make the overall effect more chaotic. I'm going to work a little bit more on it and I'll try to get a another test release out tonight.

- - - Updated - - -

Just setup my Github commits so that any of the development builds I use for testing in-game can be easily distributed: just replace the DLL in the release with this one.

Link to comment
Share on other sites

Could it be possible to end the propagation of explosions upwards through staging? I'm thinking it one was using kOS and throttle controlled avionics that a script could be written to decouple exploding boosters and try to compensate for the variable thrust.

Lofty idea for someone who hasn't yet started learning kerbscript. But still, being able to drop exploding stages to save the rest of the craft would be useful.

Link to comment
Share on other sites

hahaha this is quite a clever little idea. Not sure if it's quite down my path as i like the concept of fixing it and having a reason to EVA, but none the less brilliant little approach to the simplified realism idea. Hope the mod goes well for you, good luck!

Link to comment
Share on other sites

Could it be possible to end the propagation of explosions upwards through staging? I'm thinking it one was using kOS and throttle controlled avionics that a script could be written to decouple exploding boosters and try to compensate for the variable thrust.

Lofty idea for someone who hasn't yet started learning kerbscript. But still, being able to drop exploding stages to save the rest of the craft would be useful.

It's something to think about and relates to a situation I already have. I determine a list of parts that are to fail (doomed parts as I call them in the code) right when the failure is triggered, and I then loop through each and force the explosion: this allows for doomed parts that get detached due to earlier explosions to also explode. This creates a more spectacular overall explosion, but also creates the situation that if the failure is determined to propagate all the way to the command pod, even if you manage to get the command pod away (through LES for example), the command pod will still explode no matter what; I actually sort of like this as the command pod could have "suffered structural damage" from the explosion and even a proper abort cannot save it. I could attempt to remove remaining parts from the doomed parts list if they manage to get a certain distance from the explosions (that is currently beyond my knowledge at the time). That with trying to figure out a way to send a signal to kOS that a failure has occurred would be a solution to the idea that you have presented. It's an interesting idea that I will definitely look into.

Link to comment
Share on other sites

I guess my feeling is that it'd be nice if it happened in a more organic way. For instance, you would get failures on engines, because that's really where the failure would happen. The engine could fail in two ways:

1) It stops producing thrust, which either causes you to not go to space today, or if you have multiple engines causes your thrust to go out of angle and you spin off and you can or can't recover or maybe break up/burn up under the stock aero model.

2) It explodes, and you increase the heat of that part to something suitably high before you remove it, and let the stock heat transfer model determine if that should cause the adjoining fuel tank to fail, which gets the same treatment - suitable amount of heat on explosion, and on up the stage. Parts without fuel don't explode arbitrarily, but may fail under the aero model. Kerbals may die due to g-loading, etc. but the command pod itself wouldn't spontaneously explode.

This gives you both an understanding of the failure and presumably some opportunity to abort, but also possibly some ability to design craft that can better protect the crew. Might be a fair bit harder to code, though. While 'structural damage' is certainly realistic, 'you died and there was nothing you could do about it' isn't terribly fun.

Link to comment
Share on other sites

The failures actually do originate from a single engine as is, and the engine must be currently actively thrusting. I didn't even think of the stock heat transfer, I'll mess around with it the next time I get a chance to work on the mod. Thanks!

Link to comment
Share on other sites

v0.1.0 Released

GitHub Download

Changes:

- The part that starts the failure overheats and overthrusts to allow people time to react.

- Auto abort action group trigger added. (this will be optional in the future)

This should be v0.2.0, but I was tired when I did the first release and accidentally called it v0.0.1.

Edited by stevehead
Link to comment
Share on other sites

really liking this take on failures. The others were a bit too involved for my liking, and this method could just take out any of my ships but leave me a good deal of freedom in explaining how it happened my own way, which works great for my twitter fiction. Will be tossing this in with my 1.0 game...

Link to comment
Share on other sites

Added a video demonstration in the OP.

really liking this take on failures. The others were a bit too involved for my liking, and this method could just take out any of my ships but leave me a good deal of freedom in explaining how it happened my own way, which works great for my twitter fiction. Will be tossing this in with my 1.0 game...

Awesome, thanks! Makes me happy to see people like it already.

Link to comment
Share on other sites

Just thought of having the option to force a failure. This would be for testing abort sequences. Thought came to mind when I was doing a Kerbal Construction Time simulation. In fact, I may have it where if you have KCT installed, there could be options for the simulations: normal (random failure could occur as normal), disabled (no failures), forced failure (when it occurs is random), or forced failure at a specific time or altitude.

Link to comment
Share on other sites

I haven't forgotten about this mod... I've just been busy actually playing KSP :D! I do have this installed (the proper release version, not the debug test version) to make sure everything works fine with other mods, and so far so good. Have yet to get hit by that 1 in 50 failure chance yet though... hoping it will happen soon. I have to launch 114 times to have a 90% chance of at least one failure, 228 times for 99%.

Edited by stevehead
Link to comment
Share on other sites

I guess my feeling is that it'd be nice if it happened in a more organic way. For instance, you would get failures on engines, because that's really where the failure would happen. The engine could fail in two ways:

1) It stops producing thrust, which either causes you to not go to space today, or if you have multiple engines causes your thrust to go out of angle and you spin off and you can or can't recover or maybe break up/burn up under the stock aero model.

2) It explodes, and you increase the heat of that part to something suitably high before you remove it, and let the stock heat transfer model determine if that should cause the adjoining fuel tank to fail, which gets the same treatment - suitable amount of heat on explosion, and on up the stage. Parts without fuel don't explode arbitrarily, but may fail under the aero model. Kerbals may die due to g-loading, etc. but the command pod itself wouldn't spontaneously explode.

This gives you both an understanding of the failure and presumably some opportunity to abort, but also possibly some ability to design craft that can better protect the crew. Might be a fair bit harder to code, though. While 'structural damage' is certainly realistic, 'you died and there was nothing you could do about it' isn't terribly fun.

Update on the above:

I've been messing with the stock heating model, and I'm just not able to force the explosion propagation anywhere near what I had in mind through heating alone (mostly because I cannot get the heat to radiate fast enough). I think the way I have it coded in the most recent version released is pretty good at mimicking this organic propagation though. I've literally spent a couple of hours just launching over and over with various rocket designs using my debug version of the DLL and the explosions are definitely varied, everything from a puny side booster to the entire rocket exploding. If the stock heating model ever changes to allow me to accomplish the same with it, I will convert over to it.

Also, the parts that are used in the propagation are calculated at the moment of the initial part being destroyed, so if you have a proper abort sequence and are quick enough at noticing the rapidly overheating engine and abnormal thrust from it (or use the auto-abort on failure feature I will have), you should be able to survive (unless you are randomly struck by debris, as I have a couple of times in my testing, but at that point my mod has no control of your Kerbals' fates).

With that said, my next goal is to create the code to handle the custom settings, which at that point I think the mod will be ready for a proper release. The KCT stuff and forcing failures for testing I had mentioned will come at a later time.

Edited by stevehead
Link to comment
Share on other sites

  • 3 weeks later...
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...