stevehead

[1.0.2] Kerbal Launch Failure v1.0.0 (5/29/2015)

Recommended Posts

Kerbal Launch Failure - v1.0.0

Introducing my second KSP mod: Kerbal Launch Failure is a lightweight, random launch failure mod for Kerbal Space Program. You might want to start using that Launch Escape System with this installed.

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. In fact, to save funds on safety 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 alternative 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. Seems to be some audio FX issue with multiple explosions simultaneously. This was recorded with a pre-release version, but no changes have been made since except for the addition of the settings.

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 can be set to auto-trigger once the initial failure occurs (custom setting; see below).
  • 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.
  • Custom settings (please see the README for instructions).

Possible Upcoming Features

  • More "descriptive" flight logs using optional and random technobabble.
  • More organic method of propagating failures using the stock heating model when it becomes more finalized.
  • Optional random failure of heat shield during re-entry, maybe.
  • Maybe more varying types of failures specific to ascent (e.g. loss of yaw control).

Thanks

Much thanks to Ippo and Coffeeman for some inspiration behind a couple places in the code, and stupid_chris, whose source code on RealChutes helped me learn how to do the settings.

Links

Download from Kerbal Stuff

Download from GitHub

Source Code on GitHub

Original development thread

Changelog


v1.0.0
- First production release.
- Added custom settings.

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
thanks

Share this post


Link to post
Share on other sites

WHOA

This is GREAT!

I've been secretly hoping for a mod like this!

N1, get ready to fail!

Share this post


Link to post
Share on other sites

Awesome!

Though the obvious joke is that we hardly need a mod to introduce random launch failure situations, but I *do* get the difference. ;)

It'll be good to actually *need* the abort button.

Share this post


Link to post
Share on other sites

Does this apply to spaceplanes that launch via the runway as well?

Share this post


Link to post
Share on other sites

Link to Kerbal Stuff download now available. CKAN support should come soon.

Does this apply to spaceplanes that launch via the runway as well?

It currently does. I should probably look into different settings for planes, or maybe different logic with the jet engines. This mod was created mostly with rockets in mind (I personally don't use planes much), but my current save I have been using planes a good bit to get around Kerbin for surveying without any issues.

Share this post


Link to post
Share on other sites

Neat: this mod adds more use to the LES we already have.

Share this post


Link to post
Share on other sites

This is wonderful! Much more fun (for me) than the more complex failure mods! (Except Engine Ignitor - I miss that one! )

Question: Does the mod affect launches from *other* planets? Whether landing/take-off or using Extra-Planetary Launchpads? The config text seemed to imply that it would generate failures on any planet with an atmosphere, but it's a little unclear.

Share this post


Link to post
Share on other sites
Question: Does the mod affect launches from *other* planets? Whether landing/take-off or using Extra-Planetary Launchpads? The config text seemed to imply that it would generate failures on any planet with an atmosphere, but it's a little unclear.

To be honest I don't know. I designed the mod so that whenever the "onLaunch" game event occurs, it will start the failure script if the current planet has an atmosphere. I programmed it that way in hopes my mod will just work if other mods such as EL actually triggers this "onLaunch" event, but if they don't, then my mod does nothing (i.e. doesn't break anything). I have never played with EL, but I have been wanting to get into it; once I do, I'll definitely look at compatibility if there currently is none.

In a nutshell: it "should" work, but it may not.

Edit:

There may be issues launching from orbit around a planet that has an atmosphere, which could involve instant explosions (does EL allow in-orbit construction and launches? cannot remember). Anyways, if that is the case I have a fix already in mind that I can add for the next release.

Edited by stevehead

Share this post


Link to post
Share on other sites

On your idea for heat shield failures, you could have a heat shield failure occur when launching, be able to be discovered by a kerbal examining the heat shield on EVA, and then only take effect during re-entry. Of course, it's pretty hard to examine a heat shield covered up by a decoupler and shroud, so the only easy opportunity for examining it is when you're already on a re-entry trajectory.

Share this post


Link to post
Share on other sites
On your idea for heat shield failures, you could have a heat shield failure occur when launching, be able to be discovered by a kerbal examining the heat shield on EVA, and then only take effect during re-entry. Of course, it's pretty hard to examine a heat shield covered up by a decoupler and shroud, so the only easy opportunity for examining it is when you're already on a re-entry trajectory.

I see three possible ways of doing it without getting out of scope of my mod (i.e. repairs and such):

1) The easiest solution would just have a chance that the ablator resource on a heat shield gets reduced by a random percentage. Of course this would be easily visible in the resources tab.

2) Program a new part module that would have a chance to attach itself to the heat shield during ascent. The part module would display a message such as "Heat shield damaged" if you are able to inspect the part during EVA. Then I would detect when the spacecraft is reentering or undergoes a certain amount of stress (e.g. g-forces), and trigger the part module to reduce the ablation resource as in 1).

3) A combination of 1) and 2) to vary the possibilities.

Unfortunately, the stock reentry heating is underwhelming at the time, so a reduction in ablator won't make much of a difference with non-interplanetary returns.

I like the idea of 2) since I have been thinking of converting a part of my code to a part module for the engine failures already. Doing so solves some of the issues I foresee going forward with new features and it will allow me to develop a core API to build more types of failures (or even scenarios) off of that people can decide to include or not... I wouldn't mind having an Apollo 13 style scenario that has a pre-set type of failures; something like this could be manually triggered for those that want to role play the situation.

Share this post


Link to post
Share on other sites

@stevehead, I think you should stick with the core functionality of launch failures. I like your idea because it makes launches fun without ruining my day after a long trip to Jool and back. If you want to expand the mod, maybe you could look at more types of launch failures:

  • Loss of Yaw/pitch.
  • Gain/Loss of thrust.
  • Decoupler malfunctions
  • Fuel lines not pumping

Share this post


Link to post
Share on other sites

Great mod, but I have just one suggestion that should be ridiculously hard to make (let's be honest here :P). Basically, the chance of a launch failure is initially high but gets lower and lower as you progress through your save. In Sandbox mode, this would mean the time elapsed since the save was first started. In Career, that would mean how far you've progressed through the tech tree (if that's even possible).

Share this post


Link to post
Share on other sites
I think you should stick with the core functionality of launch failures. I like your idea because it makes launches fun without ruining my day after a long trip to Jool and back.

Oh, don't worry. It would be more of an optional failure extension. In my last post I mentioned changing the code around a bit. I'm thinking of separating the core functionality out of what I currently have so that I (or anyone for that matter) can create their own failure plugins that would be loaded. This mod (Kerbal Launch Failure) would itself become an extension of that core API. Just some thoughts. More launch failure types are on their way though :)... there really needs to be an evil-grin emote.

Great mod, but I have just one suggestion that should be ridiculously hard to make (let's be honest here :P). Basically, the chance of a launch failure is initially high but gets lower and lower as you progress through your save. In Sandbox mode, this would mean the time elapsed since the save was first started. In Career, that would mean how far you've progressed through the tech tree (if that's even possible).

Glad you like the mod! I appreciate the suggestions. I'm not sure about the sandbox solution since so many people have different play styles that greatly vary the time between launches, but I do like the career mode suggestion. It makes sense to have some sort of reliability increase over time, but I don't want to over-complicate the mod or overlap other failure/reliability mods too much such as Test Flight. I've got to find the right balance between features and simplicity in addition to the extensibility I had mentioned in other comments. The tech tree suggestion would definitely be a simple approach to the problem. I'll have to think about it. Thanks!

Share this post


Link to post
Share on other sites

I have to say I really appreciate the simplicity of this mod. I am looking forward to the diversity of failure modes and necessary backend improvements (I'd like to be able to use MM to key failure rates for different part categories or something like that), but I like what the mod does in the simulation: sometimes things just go unexpectedly, unpredictably wrong. >_<

Share this post


Link to post
Share on other sites

lol, nice mod

but its the only mod I really dont need, that bad I play this game :P

Share this post


Link to post
Share on other sites

This may be the exact failure mod I needed. I've wanted to play with the risk of something going wrong during launch, but I'm also planning on using extra solar systems once the right mods get updated and it would be an enormous pain to have a ship literally 100 years away from the home system suddenly explode when I switch to it. This looks like the right balance of risk and not ruining the more important flights.

I personally would rather not have failure decrease throughout the playthrough time so that every Kerbin-bound launch still has that bit of randomness to it later in the game, so if that is added I'd enjoy an option to turn that off.

As for Extraplanetary Launchpads, it does allow orbital construction and launches; rather, it allows you to construct and launch vessels wherever you can maintain the base, so that's any orbit, on the ground, in the water, floating in mid-air...I have no idea if it triggers the "OnLaunch" event, however.

Share this post


Link to post
Share on other sites
Link to Kerbal Stuff download now available. CKAN support should come soon.

It currently does. I should probably look into different settings for planes, or maybe different logic with the jet engines. This mod was created mostly with rockets in mind (I personally don't use planes much), but my current save I have been using planes a good bit to get around Kerbin for surveying without any issues.

I love the idea behind this mod. If I can make a suggestion for jet engines. How about having them just fail (zero thrust) as opposed to overheat and explode. This gives you the option of gliding the plane into an emergency landing. I would also recommend those installing this mod also get Vanguard parachutes for emergency ejections.

Share this post


Link to post
Share on other sites

Is there any dependency on having researched / available a LAS before the failures become a possibility? Otherwise, Kerbals will die... ;.;

Share this post


Link to post
Share on other sites
Great mod, but I have just one suggestion that should be ridiculously hard to make (let's be honest here :P). Basically, the chance of a launch failure is initially high but gets lower and lower as you progress through your save. In Sandbox mode, this would mean the time elapsed since the save was first started. In Career, that would mean how far you've progressed through the tech tree (if that's even possible).

Have a look at TestFlight: http://forum.kerbalspaceprogram.com/threads/109901-1-0-2-TestFlight-v1-3-1-17-May-2015-Bring-Flight-Testing-to-KSP!

Share this post


Link to post
Share on other sites
Is there any dependency on having researched / available a LAS before the failures become a possibility? Otherwise, Kerbals will die... ;.;

you don't need an actual LAS part to create a LAS

Share this post


Link to post
Share on other sites
I personally would rather not have failure decrease throughout the playthrough time so that every Kerbin-bound launch still has that bit of randomness to it later in the game, so if that is added I'd enjoy an option to turn that off.

As for Extraplanetary Launchpads, it does allow orbital construction and launches; rather, it allows you to construct and launch vessels wherever you can maintain the base, so that's any orbit, on the ground, in the water, floating in mid-air...I have no idea if it triggers the "OnLaunch" event, however.

It would be optional if I choose to add something like this. Most (if not all) features I would add would be optional and adjustable via config if applicable. And thanks for the info on EL. I still haven't had a chance to really play around with it yet. Plan to soon.

I love the idea behind this mod. If I can make a suggestion for jet engines. How about having them just fail (zero thrust) as opposed to overheat and explode. This gives you the option of gliding the plane into an emergency landing. I would also recommend those installing this mod also get Vanguard parachutes for emergency ejections.

Good idea. I'll see what I can do in the next release about the jet engines (will have to figure out how to have it applied to the R.A.P.I.E.R. in air breathing mode).

Is there any dependency on having researched / available a LAS before the failures become a possibility? Otherwise, Kerbals will die... ;.;

There is no dependency, failures can happen with your very first rocket. More of an incentive to research it sooner :P. Death isn't guaranteed with a failure. During my tests, I've had such a wide variety of explosions, but only a handful resulted in death. Plus you have to do ~114 launches to have a 90% chance of at least one failure on the default settings. The chances of Kerbals dying before you get the LES is quite small. If you are that concerned, you can always make your own makeshift abort system somehow... as long as you can get the capsule separated from the rest of the craft (the failures only propagate to parts that are attached), though that doesn't stop other randomness that my mod has no control over such as part collisions. I would suggest girders + sepratrons (old school stock method) for a makeshift LES, but sepratrons are a higher tech level than the LES.

And, overall, I'm pleased that this mod has been well received so far! Thanks to everyone! I'll get to working on more features soon, hopefully. I've had a lot (and I do mean a lot) of RL stuff come up.

Edited by stevehead
tired... didn't fully answer question

Share this post


Link to post
Share on other sites
hihi.. I think this mods puts more KSP in your KSP :D

Yo dawg, I heard you like KSP so we put KSP in your KSP so you can KSP while you KSP.

Share this post


Link to post
Share on other sites

I can customize the failure rate right? Launches go too mundane (I'm too good at building lifters) so I need something ... explosive.

Share this post


Link to post
Share on other sites

I've been wanting to do the code overhaul I had mentioned that can easily add various types of launch failures, but I've had too much going on IRL to be able to sit down and write up this failure framework. So, currently, updates are on hold until I find some time. I don't want to spend time working on code that is going to be replaced or thrown out soon afterwards. It may be a week or so before I have extra free time. With the little bit of free time I'm getting right now, I'd honestly rather be playing KSP or some other game than be programming.

Hate to admit, I haven't even tested this mod on KSP 1.0.3/1.0.4 yet to see if it is completely compatible. I will do a quick check and if so, change the version compatibility on KerbalStuff and CKAN.

I can customize the failure rate right? Launches go too mundane (I'm too good at building lifters) so I need something ... explosive.

Sorry for the late response. Yes, currently you can change the config located at GameData/KerbalLaunchFailure/Plugins/PluginData/KLF_Settings.cfg. The setting you want to change is initialFailureProbability. In a future update, I'll add an in game GUI to change settings at the KSC scene.

Edited by stevehead

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.