Jump to content

[1.12.4] OhScrap! (OHS) A ScrapYard (SYD) based Part Failure and Reliability Mod - 2.2.99.0-prerelease `<允许降落伞损坏>` edition [28 Dec 2022


zer0Kerbal

Recommended Posts

Is there a way to prevent parts from failing when not in use? For example, I get landing gear failures while my space plane is just sitting in orbit docked to a station

Link to comment
Share on other sites

  • 2 weeks later...

Most parts last about 6 uses before failing. Although this is about right for a Falcon 9 booster, it can become very annoying if parts are reused but not flown. For instance, I recently had a shuttle prototype that needed to be rolled back to the VAB several times before launch. This reduced the reliability as if it had flown 6 full missions. The story ended with 2 ssmes and all control surfaces out. A couple of ideas for improvements @zer0Kerbal:

•Have scrapyard track flight time instead of flights. This is simpler for the user but more code to write/change for you.

•In the vab, let players pay about 30% of the parts cost (and kct, if installed, build time) to restore reliability. I prefer this option. (of course, im not demanding anything. its great as it is.

Link to comment
Share on other sites

  • 4 weeks later...

If I do static fire tests for a part, will it become more reliable as a whole, or only that specific part if I reuse it?

e8P56g5.png

Because I've tested this engine already and I've noticed it saying it hasn't been tested.

Edited by NateDaBeast
Link to comment
Share on other sites

3 hours ago, loverevolutionary said:

I really like this mod and the other Scrapyard based mods but it does not play well with Allista's Hangar mod. Specifically, any craft launched from a hangar gets all parts set as generation 1. Any way to work around this issue?

oh, foo! that's not great. I'd definitely ping Allista too -- it seems entirely based on how the craft is "restored" from the hangar. It's seeming to be more of a teleporting/cloning situation.

Maybe the original craft wakes up in a far away cornfield along with a pile of other similar craft, as that new, fresh clone takes its place :) 

Link to comment
Share on other sites

Quote

Maybe the original craft wakes up in a far away cornfield along with a pile of other similar craft, as that new, fresh clone takes its place

Well, I have not yet tested it on craft stored in hangars after launch, just on craft put into hangars from the VAB/SPH. I have hopes that it will work correctly for craft stored in hangars after launch and will test this tonight. Perhaps the answer is to load the hangars on the pad...

Link to comment
Share on other sites

On 7/20/2020 at 11:58 AM, loverevolutionary said:

I really like this mod and the other Scrapyard based mods but it does not play well with Allista's Hangar mod. Specifically, any craft launched from a hangar gets all parts set as generation 1. Any way to work around this issue?

I was just thinking about this again today. It's probably going to be the same problem with mods like Global Construction, as well -- if they don't hook into Scrapyard or Oh Scrap to "pull" parts or generation data, everything  will be untested 1st-run parts, and totally unreliable.

When a craft gets restored from a hangar, it's probably just rebuilding the craft from a part recipe, and only *looks* like the craft you stored there previously. I'm going to check the "hangar" feature of Kerbal Konstructs to see if it does the same thing. It could just be an unfortunate limitation of Oh Scrap + craft storage.

[edit] -- It looks like the Kerbal Konstructs hangars store the literal craft, and restore it complete with all the proper part generations and safety ratings upon retrieval. I'll do a test with a Hangar hangar next.

[edit2] -- In-flight, Hangar loads and restores the identical craft, in the exact state and resource levels, etc. as it was entered. So what remains is to try launching a hangar with a craft using scrapyard items? I couldn't figure out how to load the hangar in the VAB/SPH.

 

Edited by Beetlecat
Link to comment
Share on other sites

And now, posting this in the correct topic:

Hey @zer0Kerbal and possibly @severedsolo,

Something may have become very screwy with the generation and safety rating increments.

[edit] I set up a much more limited install of KSP 1.10 to serve as a better test. Using the latest (pre)releases from Scrapyard and Oh Scrap repos along with KRASH, and whatever mods are required to support those three.

I can't seem to replicate the generation skipping/doubling I noticed; with this minimal install, a KRASH sim launch does *not* seem to affect anything with part generations.

The Safety Ratings all jumping to 9 on every part after one test launch is weird, though:

  • Built and launched a engine test block (engine, tank, probe, launch clamp).
  • Ran the test and recovered the craft.
  • Hopped right back into the VAB, and the craft is there, with those same generation 1 parts, tested, 1 previous use, but safety rating is now 9s across the board--including the rocket that had a failure and never fired.

Doing a separate test on an aircraft in SPH was interesting, I *mostly* landed the test plane, and when I recovered, and went back to the SPH, all the previously used parts were Gen 1, One use, Safety 9. The new parts to replace the ones I broke were now Gen 2, but only a Safety Rating of 2. This seems much more in line with expectations.

Being in KSPv1.10, I can certainly accept that I'm outside the scope of support, but this seems like the formula to calculate safety ratings on gen 1, flown parts is weird?

Edited by Beetlecat
Link to comment
Share on other sites

13 hours ago, Beetlecat said:

with this minimal install, a KRASH sim launch does *not* seem to affect anything with part generations.

That's a bug that's been fixed for a long time. - if it comes up again definitely report it with logs etc though.

13 hours ago, Beetlecat said:

Hopped right back into the VAB, and the craft is there, with those same generation 1 parts, tested, 1 previous use, but safety rating is now 9s across the board--including the rocket that had a failure and never fired.

That doesn't sound like unexpected behaviour to me. A safety rating is relative. Running the maths (and assuming you haven't changed the patches)
baseChanceOfFailure = 0.11 (we'll use this as initial failure, as it's Gen 1 so no generation modifiers, so I can skip part of the math)

expectedLifetime = 6 (assuming it's a lifter engine)

chanceOfFailure = CalculateInitialFailureRate() * (SYP.TimesRecovered / (float) expectedLifetime)

0.11 * (1/6) = 0.11 * 0.166666667 (rounded) = 0.018333333

SafetyRating is relative, safety rating 10 = 10* less likely to fail than a safety rating 1 part. Safety Rating 8 = a failure rating of about 0.022+

This is broadly in line with expectations, as test flights are supposed to iron out the kinks in a part, and a part on it's second flight is always at the top of the bathtub curve

So Rating 9 is correct, but it's borderline Rating 8.

As for the "failed part also got better" - OhScrap doesn't differentiate, if the vessel is launched, all parts get the buff. There is code to have a failed part do a saving roll to see if it's recovered (ie if it's not fixable, let ScrapYard drop it) - but I'm not entirely sure that's working (Trash Part is not working either according to reports I've heard)
 

 

Edited by severedsolo
Misplaced a decimal place
Link to comment
Share on other sites

8 hours ago, severedsolo said:

That doesn't sound like unexpected behaviour to me. A safety rating is relative. Running the maths (and assuming you haven't changed the patches)
baseChanceOfFailure = 0.11 (we'll use this as initial failure, as it's Gen 1 so no generation modifiers, so I can skip part of the math)

expectedLifetime = 6 (assuming it's a lifter engine)

chanceOfFailure = CalculateInitialFailureRate() * (SYP.TimesRecovered / (float) expectedLifetime)

0.11 * (1/6) = 0.11 * 0.166666667 (rounded) = 0.018333333

SafetyRating is relative, safety rating 10 = 10* less likely to fail than a safety rating 1 part. Safety Rating 8 = a failure rating of about 0.022+

This is broadly in line with expectations, as test flights are supposed to iron out the kinks in a part, and a part on it's second flight is always at the top of the bathtub curve

So Rating 9 is correct, but it's borderline Rating 8.

Okay -- thanks for talking the time to step through that -- I know I've groked this long before, yet each time returning to the game familiar systems seem a bit different.
I've set up a bunch of "pre-flights" for engines and motors and the like in previous iterations, and just don't remember them skipping all the way to the "9s" so quickly.

8 hours ago, severedsolo said:

As for the "failed part also got better" - OhScrap doesn't differentiate, if the vessel is launched, all parts get the buff. There is code to have a failed part do a saving roll to see if it's recovered (ie if it's not fixable, let ScrapYard drop it) - but I'm not entirely sure that's working (Trash Part is not working either according to reports I've heard)

After posting that, I realized that yeah, there's likely no mechanism to determine/care if a part failed or not, other than if it possibly wasn't recovered, but this can certainly be determined later on (and can be justified in-game since a part that failed is going to get extra attention/ learn from the failure). 

Appreciate the (re)clarification!

Link to comment
Share on other sites

  • 3 weeks later...

Has anyone tested this with KSP 1.10.X? Or is there an update in the works?

Trying to use it, I get an enormous spam of FlowGraph errors on launch, and again every time there's a staging - or I think any event which causes the game to calculate fuel flows? Will try to test it on a clean install when I get a chance - could well be a conflict.

EDIT: Wait. Need to do some more testing. It might be a ScrapYard issue.


EDIT2: Okay, confirmed this is actually ScrapYard. Sorry about the confusion.

Edited by baldamundo
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...
  • 2 weeks later...

Hi!!

 

Could you please advice how to fix the following:

1. My ships a a piece of you-know-what. And by saying that I neither mean that my hands are growing from the wrong place, nor that I dont know how to use the mod. The problem is - this stuff is breaking dramatically even after long and vigorous testing. I make a craft, test it for about 5-6 short flights, using new parts each time, Then I test it once again with new parts, then apply these parts to the vessel. As a result I have a vessel safety rating of 9 (Excellent!!!), all parts the same (9), generation 4-5.  Now. I have to fly  this aircraft for a 600 miles... and... this is an impossible task! I have half of the ship broken my midway! half engines blown up, half tanks leaking, control surface failures all over the place, short circuits etc. This is just too much for an "excellent" safety rating ship! I cant get through 1 hour journey without a crash...

2. Sepatrons, They just dont work. at all. 100% ignition fail.  If I put 20 of them to the rocket, all 20 will fail.  But thats OK (a can of soda with a dynamite in it - anything may happen). BUT! No safety rating improvement even after dozens of flights. 

Edited by Lan_Morehell
Link to comment
Share on other sites

What is the criteria for repairing parts? It seems whenever I try to repair a part, I receive a message that the part is "beyond repair", regardless of the part or malfunction. I am using Level 1 engineers to try to effect repairs; do they need to be higher level? Is this something adjustable? Do I need another drink? :)

Update: Yesterday I successfully repaired a failed antenna. So it is working, but I'm still curious as to the criteria. Is it totally random, and is it dependent on my engineer level?

Edited by eightiesboi
Updated information
Link to comment
Share on other sites

6 hours ago, baldamundo said:

Finding I'm not getting any engine failures (other parts seem to be failing properly) with the latest version of KSP. Has anyone else noticed this?

I have had failures of SRBs and liquid (LF and Cryo) engines. On 1.10.1, modded.

Link to comment
Share on other sites

I've really enjoyed the choices this mod brings to strategising in career. It seems to work just fine in 10.1.1 with CKAN's versions of Scrap Yard, Stage Recovery, and KCT. Thanks!

Some thoughts for whatever they're worth: I enjoy a rare, truly surprising failure that I have to figure out how to recover from and I enjoy choices like needing a ship launched now, damn the torpedoes, vs having the luxury of waiting for a more reliable cryo tank. After a few times of novelty, doing many tests of each part, clicking through Scrap Yard's click-intensive UI to ensure I'm upping the gen rather than just reusing a gen 1 over and over, I feel like I'm doing some serious busy/make work. Then later I find myself doing serious extra clicking (and forgetting to do so) with Scrap Yard to make sure I'm not reusing very old parts. So, I'd love to get rid of the beginning and ending of the curve and have parts be reliable, with failures still happening at a rare, "oh scrap! that was a surprise" rate. If there's a simple way I can do that now by editing files or whatever, I'd love to know.

There are issues in GitHub already talking about this likely with better thinking behind them, so I'll just briefly note my ideas: I'd be happy to get rid of the beginning of the curve by deciding in settings which generation parts start at or even which generation they start at plus a first manufacture penalty per part. For example, I might select that parts start at generation 5 and the first time I order each part, that first part takes 500% longer to manufacture or 500% more to make. Just changing the start gen without a time or price (likely complex to code) would be a great, 99% solution*. And, ideally, getting rid of the end of the curve would happen in the integration with Scrap Yard with a feature that let's me select the reuse count at which parts are automatically discarded.

Semi-related/unrelated: what think would be fun along the lines of "part testing" is seeing part gen jumping way ahead on failure ("lessons learned") and (out of scope and probably nigh impossible to mod) part performance increasing via usage counts, for example seeing ISP going up a tiny bit per launch with diminishing returns.

* I've been playing KSP since .23 as often modded as stock and never have I seen anything remotely like a balanced, rational career economy, which makes the complexity (of coding) of cost penalties highly optional from my point of view and time penalties far more interesting, since the latter actually impacts Kerbal survival, contract success, etc.

tldr; feeling of busy work eventually overruns added fun and so maybe add setting for initial gen X of parts, add setting for %Y time penalty for first part, add setting for auto-discard at uses count Z.

Link to comment
Share on other sites

On 12/2/2020 at 1:51 AM, eightiesboi said:

Update: Yesterday I successfully repaired a failed antenna. So it is working, but I'm still curious as to the criteria. Is it totally random, and is it dependent on my engineer level?

Assuming this hasn't changed since the days I was in charge:

20% of a remote (non-Kerbal) repair. 40% for a Kerballed repair. If said Kerbal is an Engineer +10% for every experience level.

Edited by severedsolo
Link to comment
Share on other sites

1 hour ago, severedsolo said:

Assuming this hasn't changed since the days I was in charge:

20% of a remote (non-Kerbal) repair. 40% for a Kerballed repair. If said Kerbal is an Engineer +10% for every experience level.

That makes sense, and is not out of line with my experience. Thanks for the response! 

Link to comment
Share on other sites

  • 3 weeks later...

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...