Jump to content

[WIP] Part Failure 0.8.3


Recommended Posts

Part Failure is a mod to introduce a potential for certain types of parts to fail in-flight.  Currently, all engines, parachutes, and decouplers are automatically given a chance of failure.  You can override this by adding these modules to a part of the corresponding type:

  • ModuleChuteFailure (failure: semideployment; catastrophic: no deployment)
  • ModuleDecouplerFailure (failure: explosion; catastrophic: no seperation)
  • ModuleEngineFailure (failure: no activation; catastrophic: violent explosion)

Each one of these modules inherits from ModulePartFailure, which has the following properties:

MODULE
{
    name = ModulePartFailure
    FailChance = [0 - 1]   // Chance that the part will be bad.
    HardFailChance = [0 - 1]   // Chance that, if the part has failed, the failure will be catastrophic.  The raw chance is FailChance * HardFailChance.
    ExaminationChanceDumb = [0 - 1]   // The odds that a level 0 Engineer or non-Engineer with full Stupidity will detect a failure.
    ExaminationChanceSmart = [0 - 1]   // The odds that a level 0 Engineer or non-Enginner with empty Stupidity will detect a failure.
    ExaminationLevelMult = [0 - 1]   // The increase in odds for each Engineer level - 0 is no increase, 1 will make all Engineers of level 1+ always find any failures.
    RepairChanceDumb = [0 - 1]   // The odds that a level 0 Engineer with full Stupidity will successfully repair a failure.
    RepairChanceSmart = [0 - 1]   // The odds that a level 0 Enginner with empty Stupidity will successfully repair a failure.
    RepairLevelMult = [0 - 1]   // The increase in odds for each Engineer level - 0 is no increase, 1 will make all Engineers of level 1+ always repair any failures.
}

 

The default chances of failure are defined by PartFailure.cfg, and are as follows:

  • Solid Rocket Boosters: 1% failure, 0.1% catastrophic failure
  • Liquid-Fuel Engines: 0.1% failure, 0.001% catastrophic failure
  • Decouplers: 1% failure, 0.01% catastrophic failure
  • Parachutes: 1% failure, 0.01% catastrophic failure

Kerbals can also now go on EVA to examine or attempt to repair a damaged part.  However, trying to repair an undamaged part can actually make it become damaged, so spamming the repair button is probably not a good strategy.  Also, if an engineer fails to successfully examine or repair the part, future attempts to examine that part must overcome their engineer level.  So spamming the examine button also won't work.

The source and license (GNU GPL 3) can both be found in the download for the mod.

Download Part Failure 0.8.3

This mod is still in the testing phase, and should not be considered stable just yet.  As such, while it is doubtful that this mod would corrupt saves, it would be prudent to not use it with saves you do not wish to be corrupted, or to back up your saves in case they are.  Please give feedback about balance, suggestions, bugs, etc.

Edited by Ontresanas
Link to post
Share on other sites

@MK3424

I'm sure this mod, or mods similar to it, has been done plenty of times before, but that's not the sole purpose of the mod - it's also to allow me to learn how to properly mod KSP.  No one starts writing a totally novel program as their first attempt to learn a new environment.  After all, why else would we have so many "Hello World!" programs?

Also, KLF specifically says that it only causes failures on ascent.  This mod can cause a failure in a part at any stage.  So you could be landing on the Mun, and you ditch the second-to-last stage only to find the landing engine is a dud.  And yes, I'm aware that not everyone would like that type of thing, but that's probably part of the reason there are so many different mods for it - different people want different things from otherwise very similar mods.

Link to post
Share on other sites
2 hours ago, Ontresanas said:

@MK3424

I'm sure this mod, or mods similar to it, has been done plenty of times before, but that's not the sole purpose of the mod - it's also to allow me to learn how to properly mod KSP.  No one starts writing a totally novel program as their first attempt to learn a new environment.  After all, why else would we have so many "Hello World!" programs?

Also, KLF specifically says that it only causes failures on ascent.  This mod can cause a failure in a part at any stage.  So you could be landing on the Mun, and you ditch the second-to-last stage only to find the landing engine is a dud.  And yes, I'm aware that not everyone would like that type of thing, but that's probably part of the reason there are so many different mods for it - different people want different things from otherwise very similar mods.

Oh, okay.. that might be something that could happen in real life... didn't thought of it before 

Link to post
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...