net-lisias-kspu / Kerbal-Joint-Reinforcement

Physics stabilizer plugin for Kerbal Space Program
http://ksp.lisias.net/add-ons/Kerbal-Joint-Reinforcement
GNU General Public License v3.0
10 stars 1 forks source link

Kerbal Joint Reinforcement /L Experimental

Lasciate ogne speranza, voi ch'intrate


Physics stabilizer plugin for Kerbal Space Program. Fork by Lisias.

This branch is confirmed to be KSP 1.2 to 1.7 compatible (and probably above!), with configuration/settings files saved to <KSP_ROOT>/PluginData and some new and fancy features.

This have no assured backward compatibility with ferram4's KJR neither wth any supported fork. It's intended to test new features that may or may not reach the mainstream later.

In a Hurry

This a "Take Over", where I will develop the plugin to meet my own needs. This will eventually break the expected behaviour from previous versions.

If you need an updated, consistent and stable version from the Ferram4's KJR, this is not the branch for you. See below for Supported forks that will be probably a best fit for your needs.

Description

This is still about the original fork. It's going to change. Eventually.

EXCITING FEATURES!

config value documentation:

There are three possible configuration files:

Example for a user.cfg file:

KJR
{
    debug = False
    breakTorqueMultiplier = 0.5
    Exempt
    {
        PartType = foo
        ModuleType = bar
        DecouplerStiffeningExtensionType = foobar
    }
    Exempt
    {
        DecouplerStiffeningExtensionType = barfoo
    }

}

General Values

Type Name Default Value Action
bool reinforceAttachNodes 1 Toggles stiffening of all vessel joints
bool multiPartAttachNodeReinforcement 1 Toggles additional stiffening by connecting parts in a stack one part further, but at a weaker strength
bool reinforceDecouplersFurther 1 Toggles stiffening of interstage connections
bool reinforceLaunchClampsFurther 1 Toggles stiffening of launch clamp connections
bool useVolumeNotArea 1 Switches to calculating connection area based on volume, not area; not technically correct, but allows a better approximation of very large rockets
bool debug 0 Toggles debug output to log; please activate and provide log if making a bug report
float massForAdjustment 0.01 Parts below this mass will not be stiffened
float stiffeningExtensionMassRatioThreshold 5 Sets mass ratio needed between parts to extend Decoupler Stiffening one part further than it normally would have gone; essentially, if the code would have stopped at part A, but part B that it is connected to is >5 times as massive as part A, include part B
float decouplerAndClampJointStrength -1 Sets breaking strength for joints involved in decoupler and clamp additional strengthening; -1 makes them unbreakable

Angular "Drive" Values (universally scales angular strength of connections)

Type Name Default Value Action
float angularDriveSpring 5e12 Factor used to scale stiffness of angular connections
float angularDriveDamper 25 Factor used to scale damping of motion in angular connections
float angularMaxForceFactor -1 Factor used to scale maximum force that can be applied before connection "gives out"; does not control joint strength; -1 makes this value infinite

Joint Strength Values

Type Name Default Value Action
float breakForceMultiplier 1 Factor scales the failure strength (for forces) of joint connections; 1 gives stock strength
float breakTorqueMultiplier 1 Factor scales the failure strength (for torque) of joint connections; 1 gives stock strength
float breakStrengthPerArea 1500 Overrides above values if not equal to 1; joint strength is based on the area of the part and failure strength is equal to this value times connection area
float breakTorquePerMOI 6000 Same as above value, but for torques rather than forces and is based on the moment of inertia, not area

Part and Module Exemptions

Type Name Default Value Action
string exemptPartType0 MuMechToggle Part stiffening not applied to this type of "Part"; exemption to avoid interference with Infernal Robotics
string exemptPartType1 MuMechServo Part stiffening not applied to this type of "Part"; exemption to avoid interference with Infernal Robotics
string exemptModuleType0 WingManipulator Part stiffening not applied to parts with this type of PartModule; exemption to prevent problems with pWings
string exemptModuleType1 SingleGroupMan Part stiffening not applied to parts with this type of PartModule; exemption to prevent problems with procedural adapter included with pWings
string exemptModuleType2 KerbalEVA Part stiffening not applied to parts with this type of PartModule; exemption to prevent problems with Kerbals in command seats
string exemptModuleType3 MuMechToggle Part stiffening not applied to parts with this type of PartModule; exemption to prevent problems with Kerbals in command seats
string exemptModuleType4 WingProcedural Part stiffening not applied to parts with this type of PartModule; exemption to prevent problems with Kerbals in command seats

Further part and module exemptions can be added using the same formating and changing the number

Decoupler Stiffening Extension Types

Type Name Default Value Action
string decouplerStiffeningExtensionType0 ModuleEngines Decoupler stiffening will look for parts beyond this part type to add to stiffening
string decouplerStiffeningExtensionType1 ModuleEnginesFX Decoupler stiffening will look for parts beyond this part type to add to stiffening
string decouplerStiffeningExtensionType2 ModuleHybridEngine Decoupler stiffening will look for parts beyond this part type to add to stiffening
string decouplerStiffeningExtensionType3 ModuleHybridEngines Decoupler stiffening will look for parts beyond this part type to add to stiffening
string decouplerStiffeningExtensionType4 ModuleEngineConfigs Decoupler stiffening will look for parts beyond this part type to add to stiffening

These types are currently not used, but removing the a in front of them will cause KJR to make use of them again; their lack should not affect stiffening appreciably but does help reduce overhead and strange stiffening situations

Type Name Default Value Action
string adecouplerStiffeningExtensionType5 ModuleDecouple Decoupler stiffening will look for parts beyond this part type to add to stiffening
string adecouplerStiffeningExtensionType6 ModuleAnchoredDecoupler Decoupler stiffening will look for parts beyond this part type to add to stiffening
string adecouplerStiffeningExtensionType7 ProceduralFairingBase Decoupler stiffening will look for parts beyond this part type to add to stiffening

Installation

Detailed installation instructions are now on its own file (see the In a Hurry section) and on the distribution file.

License

GPL3. See here.

Please note the copyrights and trademarks in NOTICE.

UPSTREAM