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

3 minutes ago, gap said:

I can be very much mistaken, but I thing that "generation" is how many times you have built a certain part during your career. It not advancing after a flight might be perfectly normal: If SY's auto-apply function is checked, every time a craft is assembled/loaded in the VAB/SPH, the mod tries using already built parts if they are available. The result is that at each new launch, usage number increases, while generation number keeps constant.
Recycling parts is a cost- and time-effective method if you are using SY's (experimental) fund override method and KCT, but every time  you re-use a part after the second usage the reliability of that part will decrease and, even worst, you will miss the advantages of increasing the generation number.

P.S: SrapYard v1.1.3 is out for testing. You might want to install that version instead of  v.1.1.1 :)

But I am not recovering most of my rocket, so the number of times I am building those parts should increase, no?

Link to comment
Share on other sites

3 minutes ago, subyng said:

But I am not recovering most of my rocket, so the number of times I am building those parts should increase, no?

If you already built a given part and you didn't recover it (or you recovered it but you did not re-use it), and the next time you built a rocket including that part its generation number didn't increase, then something seems to be wrong. But, as I said before, if you want severedsolo to track down the problem, I think you should run another test using the last SrapYard version released today...

Link to comment
Share on other sites

On 5/7/2019 at 8:39 PM, gap said:

the safety rating calculation seems messed up. If I assemble a craft in the VAB or load a saved one, OhScrap's windows always gives me a safaty rating of 0 (horrible). In order to get the actual rating I must leave the craft loaded in the VAB, exit and enter it again.

 

On 5/7/2019 at 10:20 PM, severedsolo said:

it's under ScrapYard/3 and will be fixed before I go away :) For now, I highly recommend using SY 1.1.1 - literally the only change was the KRASH wrapper, which has messed things up.

I updated to ScrapYard 1.1.3 and the bug above still persists. All my old parts were originally built using SY 1.1.2 though. Could it be the reason why craft's safety rating is miscalculated in the VAB?

Link to comment
Share on other sites

8 hours ago, gap said:

 

I updated to ScrapYard 1.1.3 and the bug above still persists. All my old parts were originally built using SY 1.1.2 though. Could it be the reason why craft's safety rating is miscalculated in the VAB?

Could I get a log for that?

So you are saying the rating gets calculated if you exit and re-enter? Is this an auto-loaded vessel (pre-loaded when the Editor starts)? Or one that you are loading via the load menu when the Editor starts?

A craft file wouldn't hurt either (preferably something I can load into a stock-ish game)

Edit: Scratch that, I just ran into it myself. Will use my own logs :P

Edited by severedsolo
Link to comment
Share on other sites

@gap - I found the issue. It's cache invalidation.

Basically, the process of calculating the safety ratings is quite expensive, processing wise. So I do it once, cache the result, and then only update it when the EditorConstruct (your craft) changes. It looks like when you load a craft, it's grabbing the EditorConstruct before it's actually finished loading. The UI is then (correctly) noting that the cache is in an invalid state and aborting. Hey, at least I know that my error checking works :P

I've fixed that, and the UI will now actually point out that it's cache is bad, rather than just telling you your vessel is falling apart.

Edited by severedsolo
Link to comment
Share on other sites

25 minutes ago, severedsolo said:

@gap - I found the issue. It's cache invalidation.

Basically, the process of calculating the safety ratings is quite expensive, processing wise. So I do it once, cache the result, and then only update it when the EditorConstruct (your craft) changes. It looks like when you load a craft, it's grabbing the EditorConstruct before it's actually finished loading. The UI is then (correctly) noting that the cache is in an invalid state and aborting. Hey, at least I know that my error checking works :P

I've fixed that, and the UI will now actually point out that it's cache is bad, rather than just telling you your vessel is falling apart.

Sorry for the late reply and glad that you managed tracking down the error!
Let me know if you need anything else from my part, otherwise I will be patiently waiting for the next version :)

Link to comment
Share on other sites

4 minutes ago, gap said:

Sorry for the late reply and glad that you managed tracking down the error!
Let me know if you need anything else from my part, otherwise I will be patiently waiting for the next version :)

Nah, all fixed. I've got a couple of bits I want to put in, but I'll get the fix out soon.

Link to comment
Share on other sites

Oh Scrap 1.6.2 Released

  • Fixed issue where Editor Ship was being cached before it had any parts.
  • UI will now point out that the Editor Ship has no parts, rather than just reporting Safety Rating 0
Link to comment
Share on other sites

On 6/19/2019 at 10:52 PM, severedsolo said:

Oh Scrap 1.6.2 Released

  • Fixed issue where Editor Ship was being cached before it had any parts.
  • UI will now point out that the Editor Ship has no parts, rather than just reporting Safety Rating 0

Just tested the last version. It works... more or less: when I enter the VAB and load a saved craft,  its safety rating is calculated correctly. Nonetheless if, after loading/assembling a craft, I push the "New craft" button and then I load another craft, I get again the usual "0" safety rating, even though tested parts are applied to the rocket. In order to make the safety rating calculation to work again, I need to exit the VAB and enter it again.

Replicating this bug should be easy enough, but if you prefer I can send you the logs of my last gaming session :)

 

Link to comment
Share on other sites

10 hours ago, gap said:

Just tested the last version. It works... more or less: when I enter the VAB and load a saved craft,  its safety rating is calculated correctly. Nonetheless if, after loading/assembling a craft, I push the "New craft" button and then I load another craft, I get again the usual "0" safety rating, even though tested parts are applied to the rocket. In order to make the safety rating calculation to work again, I need to exit the VAB and enter it again.

Replicating this bug should be easy enough, but if you prefer I can send you the logs of my last gaming session :)

 

So, legitimate bug (I hate caches so much), but does it not work if you make a change to the vessel? Like, remove a part and reattach it etc

Link to comment
Share on other sites

1 hour ago, severedsolo said:

So, legitimate bug (I hate caches so much), but does it not work if you make a change to the vessel? Like, remove a part and reattach it etc

Good question. When editing crafts (adding/removing parts) the safety rating is calculated correctly but, during my tests,  every time I made a change to the vessel, SY kept selecting a new core part (a capsule) rather than using a pretested one even though I had not changed that part and the "auto apply"  option was checked. In order to use that capsule on my vessel, I had to re-apply it manually whenever I added/removed any other part.

Link to comment
Share on other sites

43 minutes ago, gap said:

Good question. When editing crafts (adding/removing parts) the safety rating is calculated correctly but, during my tests,  every time I made a change to the vessel, SY kept selecting a new core part (a capsule) rather than using a pretested one even though I had not changed that part and the "auto apply"  option was checked. In order to use that capsule on my vessel, I had to re-apply it manually whenever I added/removed any other part.

Ooh I need a log of that please. That sounds like the "scrapyard doesn't like the root part" bug that I've never been able to track down

Link to comment
Share on other sites

3 minutes ago, severedsolo said:

Ooh I need a log of that please. That sounds like the "scrapyard doesn't like the root part" bug that I've never been able to track down

Okay, besides the log files, should I send you my save files?

Link to comment
Share on other sites

2 hours ago, gap said:

Okay, besides the log files, should I send you my save files?

Here you go:

https://www.mediafire.com/file/kmvaogmold4snnf/Files_for_Severedsolo_1.rar/file

I have include a CKAN file with the main mods I have currently installed. The VAB craft that I have played with for testing your mod should be the one called "Gliding Lizard V", but I think using any other rocket won't make much difference.

For now I think that's all from my part, but let me know if I can help you in any other way :)

Link to comment
Share on other sites

3 minutes ago, severedsolo said:

Oh Scrap 1.6.3 Released

  • Force Editor Ship cache to refresh when it gets itself into an invalid state.

Great news, thanks! Will the new version solve both the problems that we have discussed yesterday? (Safety rating calculation not working after pressing the 'New craft' button, and the root part resetting to new when a change to any other part is done)

Link to comment
Share on other sites

Just now, gap said:

Great news, thanks! Will the new version solve both the problems that we have discussed yesterday? (Safety rating calculation not working after pressing the 'New craft' button, and the root part resetting to new when a change to any other part is done)

Just the first one. The second is a ScrapYard bug.

This exercise has told me that I need to insert alot more logging into that Method though. Every one of those issues was caused because my error checking was working but just not actually printing anything to say it had caught the error.

Link to comment
Share on other sites

3 minutes ago, severedsolo said:

Just the first one. The second is a ScrapYard bug.

This exercise has told me that I need to insert alot more logging into that Method though. Every one of those issues was caused because my error checking was working but just not actually printing anything to say it had caught the error.

Okay, I will test the new version as soon as possible and I will let you know if I see any other problem with it. Hopefully the experience you have gained with this fix will help you ironing out similar small bugs.

Talking about the SY-related issue, do you think it can be solved as well? It is not a big problem indeed, but removing it would make ScrapYard a more polished and user-friendly product :)

Link to comment
Share on other sites

Just now, gap said:

Talking about the SY-related issue, do you think it can be solved as well? It is not a big problem indeed, but removing it would make ScrapYard a more polished and user-friendly product :)

Assuming I can reproduce it, I should be able to yes (or at least work around it). I've got a vague idea of what it is, I just don't have time to dive into it today. This was low hanging fruit (literally a one line fix).

Link to comment
Share on other sites

1 minute ago, severedsolo said:

Assuming I can reproduce it, I should be able to yes (or at least work around it). I've got a vague idea of what it is, I just don't have time to dive into it today.

With the save game I sent you yesterday, reproducing the bug should be quite straightforward. Should you need my directions to do it, I will gladly assist you when/if you decide to address the problem.

Link to comment
Share on other sites

10 hours ago, severedsolo said:

Oh Scrap 1.6.3 Released

  • Force Editor Ship cache to refresh when it gets itself into an invalid state.

It works! With this new version, vessel's safety rating is always updated even after having closed a previously assembled/loaded vessel and having started a new craft.

There is one remaining bug though: some parts seem to be ignored as "worst part" in the OhScrap window. You can notice that if you run the save game I sent you yesterday and you load the "Gliding Lizard Mk. III" in the VAB; its SRB (safety rating = 4) is always reported as the worst part, even though one of the Mk 16 parachutes has a worst safety rating (=2). Curiously, if I replace any of the tested/used parts (including the Mk 16 chutes) with a completely new one (safety rating = 1), the new part will be correctly considered the worst part rather than the said RT-10 solid fuel booster. Any idea on why that might happen?

Link to comment
Share on other sites

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