Jump to content

[1.8.x] Oh Scrap!- A ScrapYard based Part Failure and Reliability Mod 2.0.1 (07/12/2019)


severedsolo

Recommended Posts

7 hours ago, BobTheRocketeer said:

So all existing ships have their parts reset to gen 0 failure rates? What about parts themselves (i.e. does a simple probe core that would be like gen 50 or so on the old version get reset to gen 0 failure rate on a new ship?) 

If you've used OhScrap before you should see very little change (gens/builds wise that is). I've not tested backwards compatibility yet, so can't say 100% but I didn't touch the tracker, so it should still be fine.

If you haven't, then yeah your parts would become Gen 0 on existing ships, because ScrapYard would never have registered a build.

4 hours ago, Beetlecat said:

For a second I was worried decouplers were going to start malfunctioning. Or do they not yet already? :D

Not yet :D but that is something I want to add at some point. You are safe for now - 1.4 is feature locked, I need to get it out the door.

Link to comment
Share on other sites

16 hours ago, DasValdez said:

1) Do you know any workaround which would allow me to increment the generations given that they don't increment on active vessel recovery?

I think I misunderstood what you are asking. From watching your streams, generations are incrementing fine on new parts, it's when you apply existing parts in the inventory that things are getting weird.

I have a couple of theories - testing them now.

Edit: OK I figured it out.

Edit2; I just realised that that this sounds a bit standoffish - not intended to be, I'm just trying to set expectations.

@DasValdez - the good news is, there's no bug. The bad news is, that doesn't help you.

So, the problem is this - ScrapYard does not know or care about generations.

This is what happened during your "engine rig" test at the beginning of your stream last night:

You had a bunch of parts that were Gen 4 - 1 previous use, and a bunch that were Gen 5 - 1 previous use in your inventory. ScrapYard doesn't know about generations, that's an OhScrap thing. So it was basically saying "you have these parts that have been used once here, they are all equivalent". When you were selecting your part from the inventory it was operating on FIFO (First in, First Out) The Gen 4 part went in first, that's the one that gets pulled out first. It's not a bug, because ScrapYard doesn't know that OhScrap exists, or that it's treating those parts differently. To ScrapYard they are equivalent.

Oh Scrap was correctly taking the part ID of the part ScrapYard gave you, looking in it's database and going "oh that's Gen 4". Again, not a bug.

The reason this doesn't help you, is because the only way you would have gotten to that Gen 5 part, was by discarding parts from the inventory until you got to the Gen 5 one.

So it's a UI problem. You need a way of selecting individual parts, not "one part from a set that's probably equivalent, but it's not really because OhScrap treats them differently". Which probably means that ScrapYard needs to handle Generations directly. Which is a feature request for ScrapYard - which means that it's going to have to wait until I get to it.

To give you an idea of how long it will take my list looks like this:

1) Release Oh Scrap 1.4 (ETA: Within a week)

2) Update all my other mods that haven't been updated to 1.5 (ETA: about another week)

3) Big feature update to Monthly Budgets (ETA: Not sure)

4) Add this to ScrapYard (ETA: When it's done).

And of course the above timeframe assumes that something doesn't blow up at home with my kid etc (which happens semi-regularly, because non-verbal autistic kid with behavioural issues).

ScrapYard is already 1.5 compatible, so that's why it's at the bottom of the list.

Edited by severedsolo
Link to comment
Share on other sites

Maybe this is less of an Oh Scrap! question and more of a Scrap Yard question... and partially Stage Recovery question:

But what happens with my Falcon 9 type stages? Are they recovered as actual vehicles? Or just broken down into parts? How would I assemble it back into a Falcon 9 (or F9 Heavy) type vehicle? Does it just all end up as parts?

Link to comment
Share on other sites

Just now, Starwaster said:

Maybe this is less of an Oh Scrap! question and more of a Scrap Yard question... and partially Stage Recovery question:

But what happens with my Falcon 9 type stages? Are they recovered as actual vehicles? Or just broken down into parts? How would I assemble it back into a Falcon 9 (or F9 Heavy) type vehicle? Does it just all end up as parts?

At the most basic level, it's all stored as parts. When you load the vessel into the VAB and apply the inventory, the parts will be replaced with the recovered ones. If you are using KCT, the build times reduce accordingly.

Short answer: it deals with it at a part level.

Link to comment
Share on other sites

10 hours ago, severedsolo said:

So it's a UI problem. You need a way of selecting individual parts, not "one part from a set that's probably equivalent, but it's not really because OhScrap treats them differently". Which probably means that ScrapYard needs to handle Generations directly. Which is a feature request for ScrapYard - which means that it's going to have to wait until I get to it.

Ahhh, so this goes back to my previous feedback, displaying part generation in the scrapyard UI. Sounds like it may be a little more involved, as scrapyard isn't grouping by the gen, on the part type and number of uses. Good to know that we can discard or just stack out all the parts in the mean time... just requires understanding whats happening.

We also figured a workable workaround for the "use new part" not incrementing gen when recovered via craft inventory (as you probably saw)... we can run it out on an engine "test stand, fire up the engines and scoot so we get an MET, and then recover using stock recovery. That puts the used and tested engines in inventory so they can be swapped onto an existing aircraft with edit, and the next time you build a new engine you get the next gen. Have to RP it a bit, because you could cheese to max generation, but that's ok, not everything has to be enforced by code. 

Link to comment
Share on other sites

4 minutes ago, DasValdez said:

Have to RP it a bit, because you could cheese to max generation, but that's ok, not everything has to be enforced by code. 

Tbh I'm ok with this, as a) like you said it's nearly impossible to do via code, and b) it was hilarious watching you try to control a hedgehog on skids :p (ps - how many times did you want to try to hit that mountain?)

Edited by severedsolo
Link to comment
Share on other sites

4 hours ago, Starwaster said:

Maybe this is less of an Oh Scrap! question and more of a Scrap Yard question... and partially Stage Recovery question:

But what happens with my Falcon 9 type stages? Are they recovered as actual vehicles? Or just broken down into parts? How would I assemble it back into a Falcon 9 (or F9 Heavy) type vehicle? Does it just all end up as parts?

If you're using the KCT/OhScrap/Scrapyard combo, you can also land them, use the "Recover to Craft Inventory" feature, and then edit that craft and reintegrate a new payload just by adding the missing parts. Gives you the opportunity to refill the fuel tanks, add a new fairing, etc. You can even "prebuild" the payload, scrap it from the vessel inventory (which puts all the payload parts into your part inventory), then use those parts to add the payload to the rocket from a sub assembly (that's what I'm doing with my air-dropped GSGS ground relays).

Only slight annoyance there is that you have to manually click each part in the payload and use scrapyard to use the part from inventory instead of a new part. Would be beautiful if craft from inventory could be merged into craft in the editor, or appear as a subassembly, or something. :D

5 minutes ago, severedsolo said:

Tbh I'm ok with this, as a) like you said it's nearly impossible to do via code, and b) it was hilarious watching you try to control a hedgehog on skids :p (ps - how many times did you want to try to hit that mountain?)

Haha we did finally hit that plateau, lost count of the attempts. Its pretty rough when every drop attempt means you have to refly the entire mission, but I was "testing the aircraft failure rates". Promise. :D

Here's one way to hit the target area...

Spoiler

I dunno what to tell you...

 

 

Edited by DasValdez
Link to comment
Share on other sites

Nobody seems to be shouting at me... so can I assume it's safe to call 1.4 stable?

Also, I REALLY need to hear from someone who has tried going from 1.3.5 to 1.4 on the same save. Does it work out ok? (aside from the obvious part failure rate changes) - does it break anything. I think you mentioned earlier that you'd tried both on the same save didn't you @Beetlecat?

Link to comment
Share on other sites

2 hours ago, severedsolo said:

Nobody seems to be shouting at me... so can I assume it's safe to call 1.4 stable?

Also, I REALLY need to hear from someone who has tried going from 1.3.5 to 1.4 on the same save. Does it work out ok? (aside from the obvious part failure rate changes) - does it break anything. I think you mentioned earlier that you'd tried both on the same save didn't you @Beetlecat?

When I did that initially, I wiped my part tracking from the persistent file before I installed 1.4, because I didn't want my next flight test to be of "newer/better" parts. Maybe not the best way to have done that. ;)

The game itself had no troubles switching versions of O,S! though.

Edited by Beetlecat
Link to comment
Share on other sites

5 hours ago, severedsolo said:

Nobody seems to be shouting at me... so can I assume it's safe to call 1.4 stable?

Also, I REALLY need to hear from someone who has tried going from 1.3.5 to 1.4 on the same save. Does it work out ok? (aside from the obvious part failure rate changes) - does it break anything. I think you mentioned earlier that you'd tried both on the same save didn't you @Beetlecat?

I’ll have a bit of time off from Uni in a day or two and an existing save with 1.3.5 on it (I think). I’ll test it soon and report back, but it might be in a couple of days (if someone can do it sooner they can though)

Link to comment
Share on other sites

Well, I had time last night so I jumped in and did some testing.

The results were better than I expected. I didn’t do much, but the failure ratings and generation numbers were correct (i.e. an antenna that I’ve used on almost every mission was a safety rating of 10 and a generation of 50). The numbers seemed right with new parts, parts stored in the ScrapYard inventory, parts on vessels that are being built in KCT, and (surprisingly) vessels that have already launched.

One thing I did notice though, is that the SRB failure rates still seemed odd. When I was doing some testing for a kOS script in a sandbox game, even as the SRBs were nearing generation 7, at least one of the four of them would fail on each launch except one. I can test some more but it might be a couple of days (although the SRB thing shouldn’t be existing-save dependent).

Link to comment
Share on other sites

3 hours ago, BobTheRocketeer said:

The numbers seemed right with new parts, parts stored in the ScrapYard inventory, parts on vessels that are being built in KCT, and (surprisingly) vessels that have already launched.

Oh good :) Last time i tried this, it went spectacularly wrong. If your numbers look good, I would say it's working.

3 hours ago, BobTheRocketeer said:

even as the SRBs were nearing generation 7, at least one of the four of them would fail on each launch except one

Good catch. SRB failure rates are set much higher than everything else as they only have one roll, but they are using the same formula to increase the reliability - your Gen 7 SRB still had a 53% chance of failing :confused: - will fix that up for the official release. (workaround for now is to reduce the SRBFailureModules baseFailureChance to something more sensible.)

Well, in that case, if no-one else comes forward with any big issues, 1.4 is officially stable. I'll fix the SRB bug, and once Kerbal Changelog gets put onto indexed by the CKAN bot I will officially release (more on that later)

Edited by severedsolo
Link to comment
Share on other sites

8 minutes ago, Beetlecat said:

Oh no! I hope you didn't disappear for the weekend -- I've got a bunch of time this morning / tomorrow to play/test some Oh Scrap! :D   Maybe I can clone & compile in the mean-time. Looks like you've staged the changes on github.

Nah, here in blighty we don't celebrate this week like the colonies do ;) Although black Friday has worked out well for me, as my vpn subscription expired yesterday.

Feel free to compile. The only non standard reference is ScrapYard. I just need to submit a minor change to the metadata to CKAN and then I'll be releasing

Link to comment
Share on other sites

Oh Scrap 1.4 Released! - MASSIVE Thanks to all my testers and for all the feedback while this has been going on.

  • CKAN USERS ONLY: Kerbal Changelog by @Benjamin Kerman is now a required dependency
  • MANUALLY INSTALLED USERS: Kerbal Changelog by @Benjamin Kerman is bundled as an optional (but recommended) mod.
  • Recompile against KSP 1.5.1
  • Failures will no longer be calculated per part. Instead, we'll take into account the overall reliability of the vessel, and use that to determine failure rates. (Ie, if you stick a bunch of really good parts on your rocket, and one really crappy one, the rocket will still be less prone to fail than one with all crappy parts). A really cool side effect of this, is that if you stage away your bad parts, your vessel will become more reliable overall (ie, you can have a bad launch vehicle, but a tried and tested payload, and once the launch vehicle is gone, the payload will be uber reliable).
  • Failures will be rolled for constantly (but rate limited) instead of just on loading the vessel. At the moment, it's every 10 seconds in atmosphere for the first two minutes, every 2.5 minutes after that while in atmosphere (known as "plane mode") and every 30 kerbal minutes out of the atmosphere - to simulate the fact that things are much more likely to go wrong on launch.
  • All of the above parameters can be edited in DefaultSettings.cfg which is located at OhScrap/PluginData
  • Parts can only fail if they are actually in use (ie engines firing, Reaction wheels turning, etc) - this may have been technically in the last version, but I found a bunch of places where it wasn't actually turned on.
  • Overall rebalance of the reliability system
  • Remote Repair has been reduced to a 20% chance of success, EVA to 40% and engineers will give a 10%*their level boost to the repair chance (so a Lv5 Engineer will give you a 90% chance of repair on EVA).
  • MASSIVE code cleanup - handling the failures on a per vessel, rather than per part basis means less garbage, better performance and easier for me to maintain etc. I've also moved a BUNCH of duplicated code into their own common methods.
  • Parts that have not been tested/launched can now be recovered. The tradeoff for this is that those parts will receive NO bonuses for recovery. Ie, it will still have the failure rate of a "fresh off the factory line" part.
  • Parts that have not been tested/launched can now be recovered. The tradeoff for this is that those parts will receive NO bonuses for recovery. Ie, it will still have the failure rate of a "fresh off the factory line" part.
  • Randomisation is gone. Parts will have standard failure rates.
  • Safety Rating system now runs from 1-10 rather than 1-5
  • Safety Ratings are now relative rather than absolute (ie it's linked to the parts base reliability, not a fixed number)
  • Mod will log to the OhScrap/Logs folder
  • "Extra Logging" option will show you every roll and a guess at the probability of a part failing in the next 2 minutes/15 minutes/30 days (depending on the Vessels Situation). Note that this can be inaccurate in some situations.
  • You can also see this information in the UI by creating an empty text file called debug.txt in the Oh Scrap Directory (all lower case if your OS cares about such things)
  • Probably a bunch of other stuff I'm not remembering right now.
  • Added option to override Stage Recovery and recover parts but no funds. Please note this is highly experimental and may not even work at all.

 

 

Edited by severedsolo
Link to comment
Share on other sites

1 hour ago, HaydenTheKing said:

How do I turn it down a little? I get a fail like on every launch?

Gotta break some eggs to make an omelette... ;)

But seriously -- are you reverting or launching new craft? Once you start testing components and improving the generations of parts, failures should go way down. I always make sure to make simple test rigs of engines and boosters before launching craft with them. --and don't use the old engines/boosters if they have a low rating in scrapyard. Dump 'em! :D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...