Jump to content

[WIP][v0.9.3] Less Real Test Flight: TestFlight for stock and stockalike parts (KSP 1.12.x)


Pehvbot

Recommended Posts

Less Real Test Flight uses and extends the TestFlight failure Mod, and is intended for stock and stock-alike games. 

Download: https://github.com/pehvbot/LRTF/releases

Prereqs:  TestFlight, ModuleManager.
KSP version 1.12.x

Player Tips:

Spoiler

TestFlight is a fairly  complex mod and LRTF adds a new layer to this.  To get started here are a few pointers:

  • The core number for any part is the data unit or 'du'.  You gather du by running a part in flight conditions (engines need to run, parachutes need to be deployed, etc).
  • Engine parts do have a limited expected run time.  This is a fixed number for each engine and is a bit different from the MTBF (mean time between failures) number in the TestFlight window.  Once a part goes beyond this time, failures go up dramatically, even for fully tested parts.  Be careful not to 'over burn' engines.
  • Initial failure rates for new parts are quite high (by design) and it takes around 10 flights or so to fully debug a part.  If you are using the stock tech tree you should probably disabled parachute failures to at least give your Kerbals a fighting chance. 
  • Some avionics failures can be crippling.  If you can't repair a failed probe core, put it into hibernation.  This will at least stop the avionics issues.  Putting a backup probe core on a craft can save your mission.  The mod will enable hibernation for failed parts even if a mod like Kerbalism normally keeps it disabled.
  • Do 'staged repairs', trying the simplest thing first then going to more extreme measures.  This gives you the best chance of a repair.  For example, hardware can be repaired without  EVA or a repair kit so the best approach is to attempt a repair from inside the capsule, then EVA, and finally EVA with a repair kit.
  • If a repair fails you can wait until you have a better understanding of the part (more data units or 'du'), upgrade your mission control, or have a more experienced astronaut.  
  • reliability curves are now somewhat randomized.  You can set the randomization level from the KSP Settings->TestFlight tab.
  • You can now repair or rebuild parts when you roll back a craft using Kerbal Construction Time.  Pressing the TestFlight button in the VAB/SPH will display the Part Action Window for each of the failed parts. 

LRTF builds on StarStrider42's experimental (and likely abandoned) stock part configs:  https://github.com/Starstrider42/TestFlight-Configs

If you are unfamiliar with TestFlight, it is a parts failure mod mostly used by RealismOverhaul/RP-1.   

https://github.com/KSP-RO/TestFlight

It has a nice set of features and is insanely configurable, but it comes at the cost of being complex to configure each part.  I wanted to use TestFlight but I am far too lazy to actually write configs for every part.  I also wanted to extend it a bit by adding in some more recording and failure modes.  It turns out being lazy is hard work!

Instead of writing TF configurations for each part this mod tries to sort parts into one of several configuration profiles, then makes a few adjustments to the parts as needed, generating the actual TF profiles using modified versions of the StarStrider42 scripts.

Currently it configures engines, command parts, fuel tanks, parachutes, rcs, wheels, reaction wheels, parachutes, and antenna.  Although it *should* work well enough for most stock-alike mods, it's completely untested and there are almost certainly specific parts that won't work or will be badly configured.

It includes the ability to repair LRTF failures, including engine repairs for LRTF configured engines but not TestFlight 'stock' configured engines.

My goals: near, far, and blue sky:

  • Near
    • Bug fixes.  Always bug fixes
    • Balance the failure rates and curves for the profiles 
    • Balance repair probabilities
    • Test RealFuel and Kerbalism support (currently preliminary)
  • Far
    • Real Antenna support Done!
    • FAR support  FAR Parachutes are done!
    • RealChute support Done!
    • Support for other parts mods
  • Blue Sky
    • Add somewhat randomized failure rates and curves for each part for each save.  This means when you start a new save, each part will have its own failure rate and curve, simulating the fact that you don't always know how smooth development will be nor how good the ultimate product may be. Done!
    • Use TestFlights ability to boost research for part families based on flight data from previous parts.  See if this can be done by using manufacturers, engine class (booster, vacuum, solids, etc), etc instead of previous parts  Done!

The mod doesn't overwrite existing TF profiles, or at least it shouldn't.

Give it a shot!  What's the worst that can happen?

 

 

Edited by Pehvbot
Link to comment
Share on other sites

My two cents on general design 

Booster type engines could have a max burn time of 220 seconds

Hydrolox type engines could be 8.5 minutes

Any monoprop engine could have unlimited ignitions and no max burn time for simplicity and flexibility of design

Glad to see you taking this on!

Link to comment
Share on other sites

Version 0.2 is out.  It adds RCS support and changes how fuel tanks are 'recorded' plus a bunch of other changes to the failure modes and failure curves.  

https://github.com/pehvbot/LRTF/releases/tag/v0.2

I've moved to a design goal of only tracking parts while in active use as much as practical.  TestFlight is primarily an engine failure mod and seems to work best when parts can only fail while being used.  In practice this means MTBF will look fairly bad for parts like tanks, rcs, etc simply because the mod won't check for failures unless they are being actively used.  

This is very much a work in progress and these releases are just snapshots when things seem to be stable and working.  Any part of it can change at any time.  Obviously not suitable for an ongoing career game.

If you have never played around with Test Flight and don't mind the rough edges, it's a good chance to see how it plays, without the full experience of RealismOverhaul.

Link to comment
Share on other sites

On 12/4/2021 at 8:21 PM, Xt007 said:

My two cents on general design 

Booster type engines could have a max burn time of 220 seconds

Hydrolox type engines could be 8.5 minutes

Any monoprop engine could have unlimited ignitions and no max burn time for simplicity and flexibility of design

Glad to see you taking this on!

Thanks!  For the engines I've just kept the numbers from StarStrider42's base mod which are about half that.  I think you are right though, these may be a bit punishing.  I'm trying to balance things so a first flight gives something like a 50/50 chance for a successful launch, depending on how many new parts are used.

So far most of my focus has been adding in a few new failure types, in particular for fuel tanks and RCS.   Some of the stock TF failure types don't look like they were ever fully tested (in particular the avionics/ModuleCommand stuff) so those may need more work as well.

Link to comment
Share on other sites

I'll be adding a substantial update sometime over the weekend but this is definitely more work than I was expecting.  TestFlight is a really interesting failure mod but it's quite incomplete and everything except engine failures is badly broken.  I guess that shouldn't be a surprise since more realistic engine failures was the main goal with everything else an afterthought.  I think most of the non-engine stuff was written for testing but not fully implemented.

The biggest issues is that TestFlight has no built in mechanism for saving failure states, so reloading a craft erases most (but not all!) failure effects.   Fortunately it's super extendable.   It's fairly easy to create new failure mods that include the ability to save and restore failures.  My current focus will be to add and improve non-engine related failures and just use the 'stock' engine failures.  So far I've created or updated:

  • RCS failures
  • Tank(resource) failures
  • Avionics failures
  • ReactionWheel failures

The mod works best for instantaneous or in flight failures so the things I'm adding will only look at parts being actively used.

Another big issues is it doesn't really have a repair mechanism.  It has 'stub' functions that I think the devs were hoping would get used at a later date.  It doesn't look like it would be super difficult to add in a fairly simple repair mechanism so this may be next on my list after creating a core of non-engine failures and getting things in a more or less playable state.  Extending this mod to beyond just stock (RealFuels, Procedurals, etc) is likely a far future task.

Link to comment
Share on other sites

Version 0.3 is available.  This is a pretty big update and is more or less the first playable release.  It's still only tested for stock games and doesn't support some fairly critical mods yet (RealFuels, procedurals for example). 

https://github.com/pehvbot/LRTF/releases/tag/v0.3

Full features list for this version:

  • Adds a submenu to the TestFlight Game Difficulty menu:
    • Supported failures can send a message to the Messages menu
    • Supported failures can halt time warp
    • Supported failure types can be enabled or disabled (Wheels will be added later)
      • Resources/Tanks
      • Avionics/Command
      • RCS
      • Reaction Wheels
      • Parachutes
  • Adds failure types to the PAW of each part that fails.
  • Engine failures are still using the stock TestFlight failures.  Engines are divided into 'types' with rated burn times, failure modes, and failure probabilities applied to each type:
    • Solids
    • Boosters
    • Sustainers
    • Vacuum
    • Maneuvering
    • High Efficiency
    • Jets
    • Nuclear
    • Electric
  • Rewrites and refactors non-engine failures so they are properly applied if a craft is reloaded in flight (missing feature in stock TestFlight)
    • Resources/Tank failures (leaks and access failures such as pressurization failures or battery failures)
    • Avionics failures (SAS failures, alignment errors, etc)
    • RCS failures (currently disableds entire RCS block, others may follow)
    • Reaction wheel failures (torque failures and total failures)
    • Parachutes (reefing (full deployment)  failures and total failures)
    • Wheels (brake, motor, and steering failures)

The actual failure rates are still being adjusted since these really require some playtesting and most of my time has been used adding features and testing for bugs.  I've removed solar panel failures for now.  TestFlight really works best when applied to 'in flight' failures and doesn't really work for long term failures.

There is still a whole bunch of things that need to be done so this still isn't 'Save Game' ready yet.  The next things on my list are:

  • Begin adding a 'repair' function.  This is a longer term project so the first version will likely only be for debugging/cheating at first.
  • Balancing failures probabilities for the various parts and failure modes.
  • Bug fixes
  • Bug fixes for the bug fixes above
  • More bug fixes

After that it's expanding support to non-stock mods but I don't know how far I can take this yet.

Link to comment
Share on other sites

  • 2 weeks later...

Another update coming as soon as I can nail down a few glitches.  This one has a bunch of bug fixes and adds repairs!  At least for non-engine failure modes.  Core TestFlight is missing a few key features.  One is remembering its 'state' when a craft is reloaded, the other is a functioning repair feature.  I'm avoiding messing with the core engine failures for now, so these won't have a repair feature or remember their failure state, but all the other failure modes have these features now.

Repairs will have a probability of success based on the type of failure (hardware or software for now, others are possible), the number of 'data units' (du) gathered for that part, and ciucrmstatinal adjustments based on the failure type combined with:

  • Comms connection to the ground and the level of Mission Control
  • Whether a trained astronaut is aboard and their experience level
  • The least stupid astronaut aboard
  • Whether an Engineer is aboard, and their level 
  • If an astronaut is on EVA
  • If there is a repair kit available

The base repair probability is more or less the inverse of the failure chance (i.e. it uses the same number of du and the same failure curve).  This number is modified based on the above adjustments.   In practice this means parts are unlikely to be repaired until you have nearly maxed out the du for that part (i.e. fully tested and debugged it).

Software repairs for example are almost entirely based on contact with Mission Control and its level, with a small bonus for an astronaut, their brains (i.e. inverse of their Stupidity), and if there's an engineer, but with no bonus for EVA or repair kits.  Hardware repairs do best with an Engineer on EVA with a repair kit and contact with Mission Control but still get some bonuses for astronaut level and brains.

Repairs can be retried but only if the repair probability is better than the last attempt.  There is always at least a 1% of repair and it's never higher than 99%.  In practice situations are never ideal and repair chances are lower than this.   Early in a career you can expect repair rates in the 2-3% range.  Late career can give something like 95% under optimal conditions.

There's a difficulty slider in the Settings window that can adjust the repair chance a bit.

Link to comment
Share on other sites

Version 0.4 is available.  It includes some bug fixes but mostly it adds part repairs.  As noted above this is currently only for non-engine failures (although you may notice that gimbal failures can be repaired as the stock gimbal failure is broken so I added this in using the LRTF extension to TestFlight).  I originally planned on just adding a basic repair ability for testing but... I don't know.  Things got out of hand I guess.

https://github.com/pehvbot/LRTF/releases/tag/v0.4

The mod in approaching usability, but isn't quite there yet.  It's playable but probably not for a save game you care about.  There are still quite a few issues that need to be fixed or adjusted, including:

  • Currently resource failure modes can only happen on one resource at a time (or ALL resources).  This is a limitation of the TestFlight core mod.  It needs to be able to fail multiple times (e.g. both LiquidFuel and Oxidizer should be able to both fail independently on each part).
  • Avionics failures are not well balanced or thought out.  They should probably be pared down and possibly modified a bit.
  • Failure probabilities still need a lot of work.
  • Repairs are brand new and almost certainly buggy.  It's a bit complex and I'm still not sure if it shouldn't be simplified.

So the next step will be to fix how resources are handled and maybe add in control surfaces. 

Link to comment
Share on other sites

  • 2 weeks later...

Version 0.5 is available.  This is the first version I would consider playable in a career game.  It updates all the engine failures so they now enable repairs and keep their failure state if the game is reloaded.

https://github.com/pehvbot/LRTF/releases/tag/v0.5

Significant updates for v0.5

  • Engine failures can now be repaired
  • More than one resource can fail per part
  • Preliminary support for Kerbalism and RealFuels

As of now LRTF has the following failure types:

  • Engines
    • Coolant (overheating)
    • Performance Loss (lower ISP)
    • Shutdown (in flight engine failure)
    • Gimbal alignment errors
    • Gimbal failure (locks the gimbal)
    • Gimbal speed (slows gimbal reactions)
    • Ignition Failure (engines fail to start)
    • Explosion (engine rich combustion)
  • Avionics (still not sure it makes sense to have all these failures.  will playtest to see which ones are the most ... interesting)
    • Axis failure (one of the 6 axes [pitch,roll,yaw,transx/y/z] failed)
    • Axis clamped (one of the 6 axes does not have full control)
    • Axis deadzone (one of the 6 axes is missing control for a section of the axis)
    • Avionics glitch (random dropouts on one of the axes)
    • Inverted (one of the axes is reversed)
    • Partial avionics (one of the axes does not have full range)
    • SAS failure (SAS module has failed)
    • Jammed Thruster (no control over the thrusters)
    • Total failure (no avionics control at all)
  • Resources
    • Resource leaks (slow leak of a resource)
    • Resource failures (resource will no longer flow but can be pumped to a working part)
  • Aerodynamics
    • Disabled control surfaces
    • Deployed control surfaces (partial deployment of surface)
  • Parachutes
    • Reefing failure (parachute will not fully inflate)
    • Deployment failure (parachute fails to stage or deploy)
    • Failure (parachute completely detaches or won't deploy at all)
  • RCS
    • RCS block fails
  • Reaction Wheels
    • Alignment errors (pitch, roll, and yaw will not align correctly)
    • Failure (reaction wheel fails completely
  • Wheels
    • Brake failure
    • Steering failure
    • Motor failure

 

Edited by Pehvbot
Link to comment
Share on other sites

1 hour ago, MoeKitsune said:

I've been looking for a good engine/parts failure mod, I think I've found it!

Thanks!  It's still a work in progress, but I'm happy with things so far.  I'll be posting a minor update soon to remove the force failure button since that's just for testing plus a couple of minor fixes.

I expect there are a bunch of hidden bugs and it hasn't been tested against very many mods yet.  There's one known bug from the TestFlight core.  It will throw some [EXC] errors in the log when you recover a vessel.  It looks to be harmless but you may see it when you leave or recover a craft.

Link to comment
Share on other sites

12 hours ago, CessnaSkyhawk said:

This mod seems like a really interesting project - I'll be keeping an eye on this! I might need to look into adding an SSS support patch for this at some point.

Sadly, there's very little documentation yet.  It's still in flux a bit.  I guess (...sigh...) that's next on my list of things to do. 

If you have any questions about how to customize the failure modules let me know.

Link to comment
Share on other sites

Version 0.6 is now available.   This adds two major features.  It adds antenna/communications failures and it adds in data unit (du) bonuses based on category and manufacturer.  In practice this means du recording will be a bit faster and later parts will start out more reliable than earlier parts.  The failure rates have been rebalanced a bit to reflect this.

https://github.com/pehvbot/LRTF/releases/tag/v0.6

Link to comment
Share on other sites

I've experimentally added decouplers to the failure modes.  I'm not sure about them yet because they use a slightly modified version of the stock ModuleDecouple and ModuleAnchorDecoupler modules.  They definitely need more testing but if you want to look at them, they are in the latest master branch on the GitHub (not the latest 0.6 release).  The failures are:

  • Fail to decouple
  • Pyros failure (0 force on decouple)
  • Premature decouple
Edited by Pehvbot
Link to comment
Share on other sites

  • 2 weeks later...

Version 0.6.1 is out.  This officially adds in decoupler failures.  It also optimizes du bonus code to run a bit faster and adjusts failure probabilities for a few categories.

https://github.com/pehvbot/LRTF/releases/tag/v0.6.1

Not sure what's next for failures.  I still want to add in the ability have  somewhat randomized failure curves so each new save game has unique failure probabilities for each part.

Link to comment
Share on other sites

  • 3 weeks later...

IMPORTANT:  TestFlight has been updated to 2.2.0.1 but the update breaks the current version of Less Real Test Flight.  I should have an update of LRTF over the weekend to fix this issue.  In the mean time you may not want to upgrade TestFlight.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Version 0.7 is out!  This is a fairly major update and reworks the reliability curve which determines the parts failure chance.

https://github.com/pehvbot/LRTF/releases/tag/v0.7

The mod now creates a unique reliability curve for each part in each new game save.  In practice this means each part will have its own development path during your game.  Some parts will have a relatively smooth development, with fewer early failures, others may be more difficult to perfect but eventually offer a highly reliable part, and some parts will just be trouble and never get fully perfected.  You won't know until you try!

You can set the random-ness from the KSP Settings-TestFlight tab

Here's a good example of two similar parts with different development cycles:

9Xd2R8m.jpeg
(special thinks to sarbian for the AmazingCurveEditor mod)

The left part starts out a bit less reliable but quickly settles down and in the end is pretty reliable.  The right part on the other hand has quite a troubled development and takes a while to iron out all the issues but never quite solving all of them.

In general parts take about 10 flights to fully debug.   The X axis is the chance of a failure for the full flight time and the Y axis is how many du (development units) you have gathered.  You can see that the left part is mostly debugged by flight 2 while the right part takes 3 flights and still has issues.

While this shouldn't break existing saves, the mod is still a work in progress, so keep that in mind when upgrading.

Link to comment
Share on other sites

  • 3 months later...

I ran into errors using Bluedog DB and Realfuels-Stock. In profiles_engine.cfg lrtfBurntime computation failed due to missing baseVolume for a few solid motors.

I replaced the line

@PART[*]:HAS[#lrtfConfName[Solid],~lrtfBurntime,@MODULE[ModuleB9PartSwitch]/baseVolume]:NEEDS[LRTFConfig]:BEFORE[zTestFlight]

with

@PART[*]:HAS[#lrtfConfName[Solid],~lrtfBurntime,@MODULE[ModuleB9PartSwitch],#baseVolume[*]]:NEEDS[LRTFConfig]:BEFORE[zTestFlight]

which seems to work.

 

I haven't played much yet, but in a glance the testflight configs seem fine. Thanks for your work.

Edited by hermano
Link to comment
Share on other sites

17 hours ago, hermano said:

I ran into errors using Bluedog DB and Realfuels-Stock. In profiles_engine.cfg lrtfBurntime computation failed due to missing baseVolume for a few solid motors.

I replaced the line

@PART[*]:HAS[#lrtfConfName[Solid],~lrtfBurntime,@MODULE[ModuleB9PartSwitch]/baseVolume]:NEEDS[LRTFConfig]:BEFORE[zTestFlight]

with

@PART[*]:HAS[#lrtfConfName[Solid],~lrtfBurntime,@MODULE[ModuleB9PartSwitch],#baseVolume[*]]:NEEDS[LRTFConfig]:BEFORE[zTestFlight]

which seems to work.

 

I haven't played much yet, but in a glance the testflight configs seem fine. Thanks for your work.

Good catch!  Yeah, that was a typo and your fix is correct.  I'll roll it into the next update. 

 Let me know how it goes.  Any feedback is super useful.  This is still deep in the 'work in progress' phase. 

Link to comment
Share on other sites

So I don't know if this is an issue with TF, or LRTF, or both, or just me being a plain old imbecile.   I can see the TF button in the KSC screen, and also the in-flight button and window.  What I CAN'T see is anything while inside the VAB - no button, no R&D window, nothing TF related in the right-click part-window.  I'm running TF v2.2.0.1 and LRTF v0.7.1.

As an aside, the mod itself does appear to be working properly - I launch a rocket with a new engine and I can see the UI for TF, the data accrual, failure reporting etc.  I've also been able to confirm that the failures are persistent.  Returning the vehicle to the VAB (using KCT here) and then returning it to the launchpad shows the parts are still malfunctioning.  What I'm not clear on is whether there is a clean way of fixing these failures while in the VAB - can I see a list of the parts that are malfunctioning, can I repair/replace them from within a UI, or do I have to remember the malfunctioning part/s and manually replace them one by one?  Apologies for the questions, I just haven't been able to find any screenshots / videos of people using the mod to give me an understanding of what to expect.

Link to comment
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.

×
×
  • Create New...