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

2 minutes ago, severedsolo said:

I think FailureRepair is something to do with Missions. As far as I can tell, it doesn't actually do anything in game. Chutes and Wheels use RepairSkill IIRC (I was looking at this a couple of weeks ago for a different project).

Looks like MKS Mechanics have the RepairSkill but not FailureRepairSkill so if you were to do that (and I agree it would make sense) it would need to be patched in.

patching is easy. :D

FailureRepairSkill it will be: unless reason not to is brought up - also providing I can determine the code needed to implement.

currently:

if (p.experienceTrait.Description == "FailureRepairSkill")

wait - it is a list so would have to step through it somehow -

Spoiler

public List<ExperienceEffect> Effects { get; }

 

 

Edited by zer0Kerbal
Link to comment
Share on other sites

this new method also gives access to:

p.experienceTrait.Effects[ ].Level
p.experienceTrait.Effects[ ].LevelModifiers

so this is the end result *fingers crossed*

Spoiler

                    ProtoCrewMember p = FlightGlobals.ActiveVessel.GetVesselCrew().ElementAt(i);
                    for(int ii = 0; ii < p.experienceTrait.Effects.Count(); ii++)
                        if  (p.experienceTrait.Effects[ii].Name == "FailureRepairSkill")
                        {
                            if (p.experienceTrait.Effects[ii].LevelModifiers.Length > 0)
                            { 
                                repairChance += p.experienceTrait.Effects[ii].LevelModifiers[p.experienceLevel];
                                Debug.Log(String.Format("[OhScrap]: name {0) experiencetrait {1) level {2) modifier {3)", p.name, p.experienceTrait.ToString(), p.experienceLevel.ToString(), p.experienceTrait.Effects[ii].LevelModifiers[p.experienceLevel].ToString()));
                            }
                            else repairChance += p.experienceLevel * 0.1f;
                            break;
                    }

 

I will put it on  It is now on Github as a special build for @Dirk to beta test. Includes new patch for Mechanics (and Engineers). Feedback requested, will not proceed without it.

@Dirk kindly put in an issue request (feature request) in GitHub for this.

 

***

Open beta for KSP 1.9.1 coming soon.

Like now:

https://github.com/zer0Kerbal/OhScrap/releases/tag/2.1.0.0

SOURCE: GitHub
License:
68747470733a2f2f696d672e736869656c64732e

Edited by zer0Kerbal
Link to comment
Share on other sites

1 hour ago, dlrk said:

Pretty neat experience I had with OhScrap: Gear failed in flight, so I wound up gliding my SSTO to a very low speed water landing, with total sucess.

nice!

so I take it that Mechanics are happier in your version? If so I will add it to the next release.

Link to comment
Share on other sites

PRE-RELEASE
DO NOT USE ON LIVE SAVES!
YOU.HAVE.BEEN.WARNED.
 
OPEN BETA

@zer0Kerbal zer0Kerbal released this 12 Mar 2020

Version 2.1.1.0

More ways to Fail, and more Kerbals allowed to fix it

  • folder restructuring
  • improved workflow
  • added 'Validate AVC .version files' workflow by @ DasSkelett (thank you @hebar)
Allow 'Mechanics' from USI to affect effets
  • suggested by @dirk
  • current code allowed Engineers (and only Engineers) a bonus to repairs
  • adjusted code to allow any Kerbal with the "FailureRepairSkill" to receive a bonus to repairs
  • FailureRepairSkill is a Stock skill that all Engineers have
  • added a patch that adds FailureRepairSkill to USI MKS Mechanics
  • easy to add "FailureRepairSkill" to other careers if requested by users
New parts can fail!
  • Implement engine under-thrust/under-Isp failures in a way that doesn't depend on thrust limiter.
  • thank you to @bfrobin446
  • code from TestFlight (thank you @Agathorn @linuxgurugamer and et al)
  • section covering this code (CC BY-NC-SA 4.0) inserted into license file
Edited by zer0Kerbal
Link to comment
Share on other sites

  • 3 weeks later...
35 minutes ago, gooseapple5 said:

I couldn't find any information about it but, do parts still get worse after they're not new, like the bathtub curve? And if so, is there a way to disable that?

better to ask at the new thread:

 

 

Link to comment
Share on other sites

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