severedsolo

[1.7.x] Oh Scrap!- A ScrapYard based Part Failure and Reliability Mod 1.6.3 (22/06/2019)

Recommended Posts

22 minutes ago, Cheesecake said:

is it a possible feature for the next update to deactivate the part highlighting via button?

Per part? or do you want it off altogether? The second would be easier.

Share this post


Link to post
Share on other sites
11 hours ago, Cheesecake said:

I would prefer the second too.

Done for next release.

Just need to find a new icon for the toolbar button and it should be ready to go.

Edited by severedsolo

Share this post


Link to post
Share on other sites

A little change to the EngineFailureModul.cfg:

Quote

@PART[*]:HAS[@MODULE[ModuleEngines*]]
{
    MODULE
    {
        name = EngineFailureModule
    }
}

MODULE
{
    name = Broken
}

Because some engines uses ModuleEnginesFX.

Share this post


Link to post
Share on other sites
1 hour ago, Cheesecake said:

A little change to the EngineFailureModul.cfg:

Because some engines uses ModuleEnginesFX.

Ah, I noticed some engines weren't working. That explains it. Good catch thanks!

Share this post


Link to post
Share on other sites

BETA 7 (0.7) is now available

  • Added ability to access EditorWarnings from the flight scene (icon by OCHA at http://www.flaticon.com)
  •  Added option in Difficulty Settings to turn part failure highlighting off globally.
  • Fixed EngineFailureModule to also target ModuleEngineFX (thanks @Cheesecake)

Yes the icon sucks. It's a placeholder.

Edited by severedsolo

Share this post


Link to post
Share on other sites
On 6/25/2017 at 1:07 AM, severedsolo said:

BETA 7 (0.7) is now available

  • Added ability to access EditorWarnings from the flight scene (icon by OCHA at http://www.flaticon.com)
  •  Added option in Difficulty Settings to turn part failure highlighting off globally.
  • Fixed EngineFailureModule to also target ModuleEngineFX (thanks @Cheesecake)

Yes the icon sucks. It's a placeholder.

I've been playing with your mod and really excited to watch it develop. Finally have a use for Abort besides me fat-fingering the keyboard on launches :)

Two comments:

1) on part highlighting I read above that per-part would be more difficult. I believe it would be worth it (depending on how hard it is) because the visual notice of failure is really helpful - especially when you have many of the same part. Ideally I'd like a new failure to highlight and then have an option to turn off the highlight. A second solution would be an on/off button in-game (rather than settings) so I could quickly toggle highlights on when I got a new part failure.

2) parts re-use is confusing me and I may just be doing something wrong. I loaded UPFM and SY, left all settings at default and launched a simple rocket (booster stage and recovery stage) a few times. I noted that the second and third launches still showed a 50% failure rate, so went looking for settings I needed to tweak. I found that if I switched on "auto re-use" in SY I would see lower failure rates - even from parts in the booster, which obviously weren't actually getting re-used. The new problem though is that auto re-use keeps populating old recovered capsules/parachutes/heat shields and those parts quickly decline in quality if re-used. I'd like to have the benefits of previous launches without being forced to re-use recovered capsules. Is there a way to do this? If not, how about a setting that won't reuse a part from inventory that's past it's useful life?

thanks for all the work!

Share this post


Link to post
Share on other sites
1 hour ago, Tyko said:

1) on part highlighting I read above that per-part would be more difficult. I believe it would be worth it (depending on how hard it is) because the visual notice of failure is really helpful - especially when you have many of the same part. Ideally I'd like a new failure to highlight and then have an option to turn off the highlight. A second solution would be an on/off button in-game (rather than settings) so I could quickly toggle highlights on when I got a new part failure.

Not so much "more difficult" as "the global toggle took three lines of code, and I couldn't think of the proper way to do it at the time".

It wouldn't actually be that difficult, I could add it to the right-click menu to turn it off per-part. I need to do some work on the events anyway, so that will fit in nicely with that.

1 hour ago, Tyko said:

I noted that the second and third launches still showed a 50% failure rate, so went looking for settings I needed to tweak.

Occasionally UPFM will ask ScrapYard for the information before ScrapYard is ready to give it. The only time I know of that this happens is where a vessel is automatically loaded when you enter the VAB. In that situation UPFM assumes that the number of builds is 0, and will default to the 50% failure rate (I figure it's better to overestimate failure rates than underestimate). This only happens in the editor as there are additional checks we can do in the flight scene that make sure SY is ready before the failure rates are populated. As you've noticed, the easiest way around this is to apply the inventory.

1 hour ago, Tyko said:

I found that if I switched on "auto re-use" in SY I would see lower failure rates - even from parts in the booster, which obviously weren't actually getting re-used.

Yup, this is by design. Every time you build a "new" part that part is more reliable than the one you built last time. By coincidence it happens to be that the "first time failure" rate is exactly the "optimal failure rate" (ie launch 2) of the previous generation.

1 hour ago, Tyko said:

The new problem though is that auto re-use keeps populating old recovered capsules/parachutes/heat shields and those parts quickly decline in quality if re-used. I'd like to have the benefits of previous launches without being forced to re-use recovered capsules. Is there a way to do this? If not, how about a setting that won't reuse a part from inventory that's past it's useful life?

You can sell old parts back to ScrapYard by dragging them onto the ScrapYard icon. NOTE: You will need to re-apply your inventory when you do this, as UPFM has no way of knowing that you've sold parts, so it waits for ScrapYard to tell it that an inventory change has happened.

If a part fails in flight, and it's at the end of it's life, UPFM will tell ScrapYard to not bother recovering it. Having said that, this comes up alot, so I think I will add an option to not recover parts that are above the safety threshold.

Edited by severedsolo

Share this post


Link to post
Share on other sites
1 hour ago, severedsolo said:

Not so much "more difficult" as "the global toggle took three lines of code, and I couldn't think of the proper way to do it at the time".

It wouldn't actually be that difficult, I could add it to the right-click menu to turn it off per-part. I need to do some work on the events anyway, so that will fit in nicely with that.

Occasionally UPFM will ask ScrapYard for the information before ScrapYard is ready to give it. The only time I know of that this happens is where a vessel is automatically loaded when you enter the VAB. In that situation UPFM assumes that the number of builds is 0, and will default to the 50% failure rate (I figure it's better to overestimate failure rates than underestimate). This only happens in the editor as there are additional checks we can do in the flight scene that make sure SY is ready before the failure rates are populated. As you've noticed, the easiest way around this is to apply the inventory.

Yup, this is by design. Every time you build a "new" part that part is more reliable than the one you built last time. By coincidence it happens to be that the "first time failure" rate is exactly the "optimal failure rate" (ie launch 2) of the previous generation.

You can sell old parts back to ScrapYard by dragging them onto the ScrapYard icon. NOTE: You will need to re-apply your inventory when you do this, as UPFM has no way of knowing that you've sold parts, so it waits for ScrapYard to tell it that an inventory change has happened.

If a part fails in flight, and it's at the end of it's life, UPFM will tell ScrapYard to not bother recovering it. Having said that, this comes up alot, so I think I will add an option to not recover parts that are above the safety threshold.

Wow. Thanks for the quick and thorough replies. 

so I don't need "auto re-use" turned on? I just have to reload the craft file instead of using the rocket version that preloads when I go back into VAB?

ill try that tonight Thanks! :) 

Edited by Tyko

Share this post


Link to post
Share on other sites
12 minutes ago, Tyko said:

Wow. Thanks for the quick and thorough replies. 

The "sell back" option isn't really ideal. If you've spent a couple of hours designing a rocket and carefully placing each part you can't just drag a part off the ship and not undo all the work spent building it. 

If you load a saved craft file it would be much easier to have another way to define which parts are or aren't re-used.

my preference would be to be able to turn off all reuse by default and then be able to right-click select parts and specify they should be reused. If I was flying spaceplanes I'd probably want reuse on by default, but for traditional rockets parts are rarely reused. 

Thanks! :) 

Inventory management is all handled by ScrapYard. All UPFM does is use the info that SY supplies it with (and occasionally tells ScrapYard not to recover a certain part). I think magico has plans to add a GUI to do pretty much what you are describing, but you'd need to ask on the SY thread about that.

Edited by severedsolo

Share this post


Link to post
Share on other sites
1 minute ago, severedsolo said:

Inventory management is all handled by ScrapYard. All UPFM does is use the info that SY supplies it with. I think magico has plans to add a GUI to do pretty much what you are describing, but you'd need to ask on the SY thread about that.

I got it. I reread your reply and was editing my response when you typed this. It sounds like I don't need auto re-use enabled for parts to gain the benefit of previously built parts. I just have to reload the craft file to force UPFM to update. 

Is this correct?

Share this post


Link to post
Share on other sites
56 minutes ago, Tyko said:

I got it. I reread your reply and was editing my response when you typed this. It sounds like I don't need auto re-use enabled for parts to gain the benefit of previously built parts. I just have to reload the craft file to force UPFM to update. 

Is this correct?

Yes failure rates will naturally decrease with each launch if you don't apply the inventory.

Share this post


Link to post
Share on other sites
9 hours ago, severedsolo said:

Yes failure rates will naturally decrease with each launch if you don't apply the inventory.

Thanks, I tried it out tonight and reloading the ships does work to correct failure % readouts after I go to the launch pad. When i'm in the VAB the lowest number I'll see is 16% regardless of how many times I fly the part. If I launch that exact ship that show's 16% for the parts, it'll go to 1-3% when I get to the launch pad. So I think the issue is just within the VAB but doesn't affect actual tracking in flight. (using beta 0.7)

 

Share this post


Link to post
Share on other sites
1 minute ago, Tyko said:

Thanks, I tried it out tonight and reloading the ships does work to correct failure % readouts after I go to the launch pad. When i'm in the VAB the lowest number I'll see is 16% regardless of how many times I fly the part. If I launch that exact ship that show's 16% for the parts, it'll go to 1-3% when I get to the launch pad. So I think the issue is just within the VAB but doesn't affect actual tracking in flight. (using beta 0.7)

At least it works at the part that matters. I will look into the VAB issue though, as it shouldn't be that far off.

Share this post


Link to post
Share on other sites
6 minutes ago, severedsolo said:

At least it works at the part that matters. I will look into the VAB issue though, as it shouldn't be that far off.

yeah, this is awesome :) let me know if there's anything I can provide to help you out. Thanks!

Share this post


Link to post
Share on other sites

Here's a funny one...I pulled in a craft file from another save and even though I had parts I'd never used in this save I still had credits for flights from the other save  

EDIT: The 16% rate I saw in the VAB - indicating this had been flown before - reset to 50% (never been flown) when I went to the launch pad.

Edited by Tyko

Share this post


Link to post
Share on other sites
27 minutes ago, Tyko said:

Here's a funny one...I pulled in a craft file from another save and even though I had parts I'd never used in this save I still had credits for flights from the other save  

EDIT: The 16% rate I saw in the VAB - indicating this had been flown before - reset to 50% (never been flown) when I went to the launch pad.

I'm really not sure why it's sticking at 16% - would you mind providing a log where that happens please?

Share this post


Link to post
Share on other sites
55 minutes ago, severedsolo said:

I'm really not sure why it's sticking at 16% - would you mind providing a log where that happens please?

Here's my log file:  https://www.dropbox.com/s/pqt1pfa6qbft46g/KSP.log?dl=0

EDIT: Just loaded a ship in VAB, saw 12% failure rates on all parts independent of number of flights. I then rolled it out to the pad and verified that the failure rates had corrected to account for number of flights. Included a new log and a couple of screen shots.  https://www.dropbox.com/sh/h8xrnn9i63jmeio/AABL9NRgW99YELTSWa9OK2hza?dl=0

 

Edited by Tyko

Share this post


Link to post
Share on other sites

hey there! This mod looks realy promissing and i will keep an eye on it, but for now i am not sure if it is refined enough for my taste

How often does the game check for failures?

The main reason for me to ask this is that i have build an Airplane, and after 5 (or was it 6?) flights not a single flight so far, without failure, And i start wondering if i am just unlucky, or use the mod wrong, or some mod incmbatibility causes shenanigans, .... etc. etc.

The design of the plane is more or less the same since the beginning, all parts say there is a 4% failure chance,  (except for two elevons which have 25% i dont count them, since i pretty much expected them to fail).

At this point it comes to my mind that, 15 times 4% every minute (just picking a random time factor here) is still huge, especially on 'longer' flights, (like a 40 min's flight to the pyramids.).

 

 

 

I am aware the mod is still beta, and i admit that i didntread the full tread yet, just feelt like sharing some thoughts here.

Share this post


Link to post
Share on other sites
7 minutes ago, Filigan said:

hey there! This mod looks realy promissing and i will keep an eye on it, but for now i am not sure if it is refined enough for my taste

How often does the game check for failures?

The main reason for me to ask this is that i have build an Airplane, and after 5 (or was it 6?) flights not a single flight so far, without failure, And i start wondering if i am just unlucky, or use the mod wrong, or some mod incmbatibility causes shenanigans, .... etc. etc.

The design of the plane is more or less the same since the beginning, all parts say there is a 4% failure chance,  (except for two elevons which have 25% i dont count them, since i pretty much expected them to fail).

At this point it comes to my mind that, 15 times 4% every minute (just picking a random time factor here) is still huge, especially on 'longer' flights, (like a 40 min's flight to the pyramids.).

 

There's a great discussion about how the failure model works back on may 21st in this thread. Here's one comment from @severedsolo that addresses your question

"It fudges it a little bit, everything is rolled when the vessel is loaded, and then any failures that are rolled are assigned a "failure time" - so the actual failure will occur at some point in the future."

Share this post


Link to post
Share on other sites

Ah, thats an interesting way of doing this, and 1 check per flight is more than reasonable in my book :D

so probably just bad luck.

Share this post


Link to post
Share on other sites
1 minute ago, Filigan said:

Ah, thats an interesting way of doing this, and 1 check per flight is more than reasonable in my book :D

so probably just bad luck.

LOL...yea random percentages have a way of grouping up for some reason...I've had many flights with zero issues and then I'll just have an Apollo 13 moment. Which, by the way, is really cool. Had to McGyver my way out of a couple of problems already

Share this post


Link to post
Share on other sites

Sorry for spaming the topic but i just realised some other issues, number 2 might actually be the reason for my first post.

1) there is a button mentioned to turn off the red glow of a broken part, but i cant find it, neither in the stock toobar nor in the toolbar plugin.

Edit: Forgett that one, i have misread the information

 

2) When i dont use the recovered parts, but new ones, the plane starts with 50% failure rate on them all, just as i f the parts where used the very first time. This is not the "in the hanger the wrong nubmers are shown" bug, but it also shows a 50% failure rate on ALL parts when i launch the plane. so it appears as if my game fails to take into acount how often a specific part was manufactured before.

"Fixed itself" after reinstalling UPFM and Scrapyard.

 

 

 

 

Quote

.I've had many flights with zero issues and then I'll just have an Apollo 13 moment.

Isn't this the reason we want a mod like this? =D

Edited by Filigan

Share this post


Link to post
Share on other sites
On 28/06/2017 at 6:29 PM, Tyko said:

Here's my log file:  https://www.dropbox.com/s/pqt1pfa6qbft46g/KSP.log?dl=0

EDIT: Just loaded a ship in VAB, saw 12% failure rates on all parts independent of number of flights. I then rolled it out to the pad and verified that the failure rates had corrected to account for number of flights. Included a new log and a couple of screen shots.  https://www.dropbox.com/sh/h8xrnn9i63jmeio/AABL9NRgW99YELTSWa9OK2hza?dl=0

 

Ah, I figured it out. It seems that when loading a craft file, KSP pulls old data from the persistence. It's basically cache invalidation. I've set it to reset the generation calcs on load, and it's working properly now.

On the plus side, it also fixed the issue with auto-loaded vessels too! I suspect it will also fix the issue that @Filigan was having with constant 50% failure rates in the flight scene too.

Edited by severedsolo

Share this post


Link to post
Share on other sites

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.