Jump to content

[KSP 1.0.X] Kerbal Mechanics: Part Failures and Repairs v0.6.4.1


IRnifty

Recommended Posts

Hello all ('-')/,

I'd like to present my mod:

9bTPF3J.png

Kerbal Mechanics: Part Failures and Repairs

V0.6.4.1: Alpha

This software is provided "as-is" with no warranties.

Presented under the GPL v3 license.

Creation and/or publication of media (images, videos, etc.) while using this software is authorized.

Created by: Nifty255

Copyright 2014 All rights reserved.

This mod is in ALPHA. There will likely be bugs. The parts are not balanced. If you have a bug, or a suggestion, please leave your feedback in a mature manner.

Also, all parts currently included in the mod are NOT the IP of Nifty255 and will change before final release.

DOWNLOAD: MediaFire

SOURCE: GitHub

Get Kerbal Mechanics on CKAN!

Dev Thread: KSP Forums

[Moderator removed defunct website link]

FEATURES:

Parts that can fail are tested based on their "reliability", which drains faster or slower, depending on the "quality".

The quality of a part also affects the cost of that part. Lower quality makes it cheaper, but also makes failure more likely.

Some parts also rely on not being shaken up too badly (excessively high g forces) to remain operational.

Each kind of failure is individually tested against the appropriate module.

As an example, an engine will have up to 4 different pieces that can fail:

- The ignition coil

- The cooling system

- The gimbal motor

- The alternator

Most failures have two options for fixing:

A standard fix, which will cost Rocket Parts, and a second, more silly option, which is free, but provides a risk of further damage.

The free option may need to be clicked more than once.

Engines can fail:

- Ignition failures while throttling up from 0, preventing the engine from firing.

- Cooling failures while the engine is running, causing greatly increased heat production.

- Gimbal freezes while the engine is running, reducing maneuverability of the craft.

- Alternators can fail due to engine burns or excessively high g forces.

Decouplers can fail:

- While decoupling in any way, the decoupler may either decouple, do nothing, or explode.

Lights can fail:

- Once a light has begun to fail, it will begin flickering for a few seconds, and then burn out.

Tanks can leak:

- Over time, tank walls can weaken, leading to leaks. The size of a leak is random, and the leak is quickest the fuller the tank is, simulating pressure.

The altimeter can fail:

- Excessively high g forces can damage the altimeter, causing it to display incorrect height data.

The thrust gauge can fail:

- Excessively high g forces can damage the thrust gauge, causing it to display an incorrect thrust value.

A Reliability Monitor has been added:

- The monitor also has quality and reliability, but cannot "break". Instead, reliability information becomes more inaccurate as reliability drains.

- Through the Monitor GUI, parts with failed modules can be set to highlight red.

- Through the Monitor GUI, a color map of the ship's status can be placed on the ship. Green for high reliability, yellow for aging, and red for very low.

Failures can be fixed by going on EVA, getting some spare Rocket Parts, right-clicking the part, and attempting the fix.

Most failure types have two repair options, one which costs Rocket Parts and is more reliable, and another, more silly option that is free, but may make the problem worse.

Be warned, though. Most proper repairs require an experienced Kerbal Engineer.

CHANGELOG:

v0.6.4.1:

- Fixed icon duplication bug.

v0.6.4:

- KSP 1.0 "Kompatibility" update ;3

v0.6.3:

- Fixed App window bug on resolutions other than 1080p.

v0.6.2:

- Fixed KSP App Launcher bug when switching to the main menu and back.

- Fixed bug with App window not showing when an alert is showing.

v0.6.1:

- Fixed part highlighting compatibility issue with Ship Manifest (and any other mod that highlights parts).

v0.6:

- Added settings option to stop time warp when a failure occurs. Default on.

- Added settings option to display an alert dialog when a failure occurs. Default on.

- Added settings option to highlight in red the failing part while the alert is open. Default on.

- Added icon to the KSP toolbar (A.K.A the "App Launcher") which handles the new settings and the ship status highlighing.

- Removed "Highlight Failed Parts" ship status option. Failed parts now automatically display as red when ship status highlighting is active.

v0.5:

- KSP 0.9 compatibility update. Fixed IPartCostModifier bug and part highlighting bug resulting from changes between 0.25 and 0.9.

- All proper repairs require a Kerbal with the Engineer skill, with varying degrees of experience. Improper repairs remain accessible by any Kerbal.

- All proper repairs can be done by any Kerbal of any experience if not in Career Mode.

- Reduced Decoupler chance of silent failure from 20% to 10%.

- Module Injector now searches all config files for injections, allowing separated injection files.

- Modified reliability drain logic to properly reflect the Kerbin 6 hour day.

v0.4.2:

- Fixed Decouplers not completing contract tests when either exploding or silently failing.

- Lowered decoupler default chance to explode from 12.5% to 6.25%.

- Lowered decoupler default chance to silently fail from 50% to 20%.

- Fixed fuel tanks with more than one resource initially leaking one resource, and occasionally reloading with a different one leaking.

- Fixed more variables not loading properly.

- Changed "reliabilityDrain" variable names to "lifeTime" to coincide with the fact that they hold the number of days a part will take to hit 0% reliability.

- Added Small Spare Parts Container to tech tree under "General Construction" and fixed the base price to 100 FUNds.

- Set RocketParts resource unit cost to 1 FUNd per unit of RocketParts, making a full Small Spare Parts Container cost 600 FUNds.

v0.4.1:

- Fixed the inability to fix the Altimeter and the Thrust Gauge.

- Fixed the Alternator fix action saying "Fix Altimeter" instead of "Fix Alternator".

- Fixed being able to perform additional actions on a spent decoupler.

- Changed Maintenance context action to read "Maintain <Module>" instead of the generic "Perform Maintenance".

- Changed the ship color map such that a part with a failed module will always appear red, regardless of the average reliability.

v0.4:

- Updated mod to KSP version 0.24.1. (Compatible with 0.24.2)

- Added Funds support. Terrible quality parts (all modules 0%) cost 50% of the part's default cost. Default quality parts (all modules 75%) cost 100% of the default.

- Added thrust gauge failures. Excessively high g forces will cause the thrust gauge to display incorrect data. If multiple parts with gauge capabilities are present, all must fail to cause true failure.

- Added Reliability Monitor to all command parts. Has both quality and reliability, but no true failure. Low reliability results in inaccurate reliability data across the ship.

- Added a control panel to the Reliability Monitor that allows highlighting of parts with failed modules. Also allows the player to map the status of the ship's parts on the ship. (Green is good, red is bad.)

- Added option for quality changes in the editor to also affect parts in symetry with original part.

v0.3.1:

- Updated mod to KSP version 0.24.

- Fixed instant and automatic altimeter failures on all but one pod.

- IMPORTANT NOTE: Due to a fault in how part costs work, this version DOES NOT support funds. An urgent email to Squad support has already been sent.

v0.3:

- Modified reliability drain algorithm to use a curve, such that increases in quality past a certain point gives less and less decrease in reliability drain. The same about quality decrease is also true.

- Reliability drain now goes by Kerbin days instead of tiny percentages per 10 seconds, but the drains are still calculated every 10 seconds.

- Most modules now drain a small initial amount while idle, and an increased amount if the part is considered in operation.

- Added preventative maintenance. This allows the player to increase the reliability of old parts before failure occurs or after repairs at a cheap Rocket Parts cost.

- Added fuel tank leaks. Leaks become more likely the longer a craft remains. Once a leak is started, the amount leaked is initially large and leaks less as time goes on, simulating pressure.

- Added engine alternator failures. The alternator may fail as its reliability drains, or at a vastly increased likelyhood under excessively high g forces.

- Added altimeter failures. Excessively high g forces will cause the altimeter to display incorrect data. If multiple parts with altimeter capabilities are present, all must fail to cause true failure.

v0.2.3:

- Fixed bug that allowed use of lights while broken via the Lights button at the top of the flight screen.

- Reduced reliability drain of lights.

v0.2.2:

- Fixed bug that prevented proper loading of quality and reliability data.

- Fixed bugs in ModuleReliabilityIgnitor and ModuleReliabilityCooling that prevented proper fixing.

v0.2:

- The entire system has been rewritten, such that failure modules no longer inherit the module they cause to fail.

- Parts can have multiple failure capabilities.

- The mod no longer replaces stock parts, but instead injects its modules once the game starts.

- The engine's failure module has been split into three: Gimbal, Ignition, and Cooling

- The information on all failure modules on a given part can be viewed by right clicking the part and selecting "Reliability Stats"

- The quality of a part can be modified in the editor through the same window.

- A part with a broken module will now glow red until fixed.

v0.1:

- INITIAL RELEASE

Edited by James Kerman
link removed
Link to comment
Share on other sites

Thanks! And actually, the creator of DangIt and I are talking, and are feeding off each other's ideas. It's my hope that we will one day merge our projects, pulling all of our ideas into one great mod. So I wouldn't call us competitors at the moment.

Link to comment
Share on other sites

The altimeter failure feature seems to be suffering an error.

All pods except the mk1 instantly suffer altimeter failure on the launch pad, and the failure is impossible to repair. This happens for pods attached to ships or standing alone on the pad.

Link to comment
Share on other sites

I'll check it out. Thanks for the report!

EDIT: I've found the problem, but I want to fix it right and don't have the time for a few days. Meanwhile, the problem is basically that the system thinks all the other pods have failed, when in reality they don't even have the module installed. Open up Injections.cfg, find the node that injects the altimeter module into the mk1 pod, and duplicate it for the other pods, renaming each to the cfg name of the pod. I'll post when it's fixed! Thanks again!

Edited by IRnifty
Link to comment
Share on other sites

Updated!

v0.3.1:

- Updated mod to KSP version 0.24.

- Fixed instant and automatic altimeter failures on all but one pod.

- IMPORTANT NOTE: Due to a fault in how part costs work, this mod currently DOES NOT support funds. An urgent email to Squad support has already been sent.

Edited by IRnifty
Link to comment
Share on other sites

As much as I wish I could say yes... No.

There's a big problem with modifying an individual part's cost in the editor: it also modifies the default cost.

I've already sent an urgent email to Squad support for this.

Link to comment
Share on other sites

How about fixing costs FUNDs or a Specific part used as a placeholder which can be carried in a KAS container ? And using funds could be expensive vs using part that is cheap but you need to take as a cargo .

Link to comment
Share on other sites

How about fixing costs FUNDs or a Specific part used as a placeholder which can be carried in a KAS container ? And using funds could be expensive vs using part that is cheap but you need to take as a cargo .

No good. It's just too much trouble for both me and the users of my mod. It's better to just wait for an answer from Squad.

Link to comment
Share on other sites

Updated!

Welcome to Funds support in version 0.4!

Changes:

- Updated mod to KSP version 0.24.1. (Compatible with 0.24.2)

- Added Funds support. Terrible quality parts (all modules 0%) cost 50% of the part's default cost. Default quality parts (all modules 75%) cost 100% of the default.

- Added thrust gauge failures. Excessively high g forces will cause the thrust gauge to display incorrect data. If multiple parts with gauge capabilities are present, all must fail to cause true failure.

- Added Reliability Monitor to all command parts. Has both quality and reliability, but no true failure. Low reliability results in inaccurate reliability data across the ship.

- Added a control panel to the Reliability Monitor that allows highlighting of parts with failed modules. Also allows the player to map the status of the ship's parts on the ship. (Green is good, red is bad.)

- Added option for quality changes in the editor to also affect parts in symetry with original part.

Edited by IRnifty
Link to comment
Share on other sites

I`ll raise a couple of my observed balance issues, mainly with the lv-t45 engine and the first stack decoupler, the name of which I have forgotten, the 1.25m one

first on the decoupler, I`m finding that it fails almost as often as it works. A bit hard to balance failure on a part that has no longevity anyway, it only has to do its job once, but anyway my failures are always of the same pattern.

I stage to separate, or rightclick to decouple, and nothing happens, no messages or anything. So I then proceed to spam the right-click menu decouple button 10 or 15 times, at which point the decoupler explodes and I get a failure message about improperly rigged explosives, I think.

So it`s odd.. I expect it to fail rather than work, but at the same time it works everytime because I just have to spam that button until it explodes, thus separating what it was supposed to .

The other is the lv-45 engine, I`ve had several occasions of it failing on launch, which is not a bad thing in and of itself (well, it`s pretty bad for the kerbal in the pod), but it seems a bit too frequent for the engine`s first service. It is always the ignition coil, and more often than not on the second throttle up of the engine`s lifetime.

My experience of gameplay under these conditions is of course limited, and I still can`t even say for sure what is too much. For sure the engine failures have led to some comical moments of panicked kerbals evaing over the kick the engine 12 times until it works again

It seems to me, it is also against the spirit of the mod for one to be certain of a part working even the first time. Space shuttles had false starts, and saturnV`s had engine failures on ascent.

Enjoying the gameplay at the moment however, and I`ll give what feedback I can going forward

Link to comment
Share on other sites

Thank you, soranno, for your feedback. While I do not wish to hide behind this, I must first state that nothing is balanced and almost everything in this mod has default values. That said, let's address some of these concerns.

The decoupler: All decouplers run off the same code, which runs completely independent of the reliability or quality, which means it always has the exact same chance of failing. This is something I wish to fix, but I have been too busy going back and forth between 3 total projects and a job. When I first designed the decoupler's failure, I intended it to be non-permanent and deal-with-able (if you know what I mean), such that it can eventually be detached, assuming you have the time. Someone recently requested that some things be more permanent, but more rare to balance. I did add this to a few things, like the engine cooling having a chance to explode if kicked, and the gimbal potentially permanently locking if kicked. So I ask for your opinion: how would you feel the decoupler should best fail and be repaired?

The engine: You say the engine ignition fails frequently? Interesting. In all my tests working with the g-force-based modules, never once has an ignition failure happened. Were you staging and then throttling, or throttling and then staging? I guess good ol' Jeb likes selling you some crappy engines... Actually, that's an interesting idea... Having companies that sell crap parts, and having to reprimand them for their parts' failures... Digression aside, I'll look at how it's working, run launch tests, and so forth to see how it's doing.

Again, thanks for bringing these up. I can't make a good mod without the players' opinions on what to fix.

Link to comment
Share on other sites

Regarding the decoupler, perhaps an alternate solution is to `manually separate` rather than repair. Similar to kicking the engine to get it working

Engine failing has been on a second ignition, first staging while throttled, cut power then with x key, and then throttling up with shift key.

I`ll do my best to gauge balance as I continue. Looking forward to the next unexpected failure, although the prospect of an engine failure during a landing cycle terrifies me! :D

Link to comment
Share on other sites

A few suggestions:

(I use and enjoy this mod. It botched a 40k funds rescue mission after I had to make many different burns on a poodle.)

1. Decouplers: These have been a problem since the earliest manned missions. Uri Gagarin's decoupler almost killed him during Vostok I's Re-entry. I suggest that when a decoupler fails and nothing happens there is a good chance that it fails "permanently" (you may only get 3 attempts to decouple and then it's done for.) however when in the failed state it becomes fragile and may break under load (G forces and heating)

2. Heating failure: It may be interesting to see parts that fail if they get too hot. This may not be as big a problem in stock as it is with deadly reentry however.

3. electronic failures: antennas, batteries, all of these can fail hilariously, and there even less forgiving of blunt force repairs. (maybe an electrocute kerbal failure where the kerbal gets knocked out as if he fell)

4. Control failures: RCS thrusters firing out of control, like during Gemini 8

5. Backup modules: paying extra money for a second ignition coil pre-installed. the reason is that you cannot EVA on a probe.

6. perhaps a set of failures that while not immediately dangerous may be if the part is activated, like a damaged fuel line to an engine. starting the engine may be fine, or you may blow up. forces you to make hard decisions.

Link to comment
Share on other sites

I love the idea then of electrical failures, and linking failures in cause and effect. Perhaps of the kind that, one failure doesn`t critically affect ship function, and so you may continue , however it significantly increases the chance of a subsequent failure if left unattended for too long.

Also, I am very much in favour of the backup modules suggestion, for exactly the reason given, probe controlled ships

I will also drop a link to a twitch stream highlight from a short time ago, showcasing the very two failures I was talking about earlier, and the wonderful enhancement to gameplay that has been this mod.

I have noted that it is only the 45 engine that has failed for me this easily. No other engine has done so, in spite of a dozen or more ignitions of multiple engines.

http://www.twitch.tv/hoshizora/c/4771898 (colourful use of language advisory)

I did get one strange behaviour though. On descent to minmus I had a drop stage with a 909 engine under my lander, which I let loose about 300m up (if you can believe it, the decoupler worked) anyway, when I throttled up on the next stage engines I got a failure message for the 909 I had just dropped.

Furthermore, at the time I didn{t realise it was the 909, and spent several seconds scanning my ship for which engine failed, to find they were all functioning, and so maybe the duration of the failure message could be extended, or perhaps highlighting the name of the part affected could make for easier acknowledgement of the message.

Link to comment
Share on other sites

Yeah it seems the first inline decoupler breaks 90% of the time, which isn't too bad because you can just spam until it explodes (which somehow doesn't damage anything)

The first radial decoupler you get though breaks just as often and has a habit of taking a few parts from the decoupled bit and the rocket when it goes

I'd like it if both exploded spectacularly but only did it 5-10% of the time. At this point it's a surprise when they DO work

Link to comment
Share on other sites

soranno, I know what caused that strange bit with the separated 909. The failure module uses the active vessel's main throttle instead of its own. Easy fix. You know you can allow the ship to highlight parts that have failed right?

Alias and Tripod, thanks for the suggestions and feedback. I'll be taking a look at everything in a few days. I'm currently rotating between this, 2 other projects, and a job, so I'm a bit busy, but luckily I can do some of these things while working.

Link to comment
Share on other sites

You've intrigued me with this mod. I haven't tried it yet, but I'm planning on installing it when I get my "modded" KSP up and going.

I think this will be a welcome addition to make things more difficult (which KSP needs desperately IMO).

Question, will this automatically find modded parts and cause them to break? For instance any part mods installed (B9, KSPI, etc).

Also, I don't know what you do for a living, but I'm sure writing some code while at work does in fact look like you're working. As anyone in the corporate world can tell you, looking like you're working is just as good as work itself. :wink:

Link to comment
Share on other sites

Question, will this automatically find modded parts and cause them to break? For instance any part mods installed (B9, KSPI, etc).

Also, I don't know what you do for a living, but I'm sure writing some code while at work does in fact look like you're working. As anyone in the corporate world can tell you, looking like you're working is just as good as work itself. :wink:

1: No, it doesn't, but it can be made to include them very easily as long as they use stock modules (engines, decouplers l, etc.) If you want, PM me a list of the mods you want me to try and work with and I'll get a config file set up that will include them.

2: Actually, I'm allowed to bring my computer and do what I want for most of the day, it's simply a matter that I've set a deadline of December for the game I'm making, and I also can't take too long making my tutorial episodes. So while I have a lot of time to do things at the moment, I also have a lot of things to do, on top of my DNS (Internet) failure issues.

Link to comment
Share on other sites

Let's not be hateful. Chances are he's too excited and didn't read. No harm, just point it out.

No, my mod doesn't yet add failures to others. But assuming other mods' parts use stock modules, it's very easy to make that happen. For adding failure to a mod's modules, I have to do a bit more. Let me know what mods you guys want failures added to most and I'll see what I can do, but the focus is currently to finish the features and then balance.

Edited by IRnifty
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...