{
"s4b8_differential_F": {
    "information":{
        "authors":"BeamNG",
        "name":"Open Front Differential",
        "value":1200,
    },
    "slotType" : "s4b8_differential_F",
    "slots": [
        ["type", "default", "description"],
        ["s4b8_driveshaft_F","s4b8_driveshaft_F", "Front Driveshaft"],
        ["s4b8_halfshafts_F","s4b8_halfshafts_F", "Front Halfshafts"],
        ["etk_finaldrive_F","etk_finaldrive_F_323", "Front Final Drive", {"coreSlot":true}],
    ],
    "controller": [
        ["fileName"],
        ["drivingDynamics/actuators/electronicDiffLock" {"name":"lockFront", "differentialName":"differential_F"}]
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["torsionReactor", "torsionReactorF", "driveshaft_F", 1,],
        ["differential", "differential_F", "torsionReactorF", 1, {"diffType":"open", "gearRatio": 1, "uiName":"Front Differential","defaultVirtualInertia":0.25}],
    ],
    "differential_F": {
        "friction": 3.56
        "dynamicFriction": 0.00166,
        "torqueLossCoef": 0.03,
        "visualPositionRelativeChildren":[[-0.31,0,0]]
    },
    "torsionReactorF": {
        "torqueReactionNodes:":["fx2l","fx2r","fx4l"],
        "visualPositionRelativeParent":[0,-0.4,0]
    },
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["s4b8_diff_F", ["s4b8_subframe_F","s4b8_diff_F"]],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--diff weight--
         {"selfCollision":false},
         {"collision":false},
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         {"group":"s4b8_diff_F"},
         {"nodeWeight":31},
         ["fdiff", 0.0, -1.40, 0.36],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":4500600,"beamDamp":460},
          {"beamDeform":30000,"beamStrength":"FLT_MAX"},
          {"deformGroup":"differential_F", "deformationTriggerRatio":0.001},
          ["fdiff","fx2r"],
          ["fdiff","fx2l"],
          ["fdiff","fx5r"],
          ["fdiff","fx5l"],
          ["fdiff","f10ll"],
          ["fdiff","f12ll"],
          {"deformGroup":""},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"s4b8_differential_F_active_LSD": {
    "information":{
        "authors":"BeamNG",
        "name":"ttSport Front Differential",
        "value":2500,
    },
    "slotType" : "s4b8_differential_F",
    "slots": [
        ["type", "default", "description"],
        ["s4b8_driveshaft_F","s4b8_driveshaft_F", "Front Driveshaft"],
        ["s4b8_halfshafts_F","s4b8_halfshafts_F", "Front Halfshafts"],
        ["etk_finaldrive_F","etk_finaldrive_F_323", "Front Final Drive", {"coreSlot":true}],
    ],
    "controller": [
        ["fileName"],
        ["drivingDynamics/actuators/activeDiffLock" {"name":"lockFront", "differentialName":"differential_F"}]
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["torsionReactor", "torsionReactorF", "driveshaft_F", 1, ],
        ["differential", "differential_F", "torsionReactorF", 1, {"deformGroups":["differential_F"], "diffType":"activeLock", "gearRatio": 1, "uiName":"Front Differential","defaultVirtualInertia":0.25}],
    ],
    "differential_F": {
        "friction": 3.56
        "dynamicFriction": 0.00166,
        "torqueLossCoef": 0.03,
        "visualPositionRelativeChildren":[[-0.31,0,0]]
    },
    "torsionReactorF": {
        "torqueReactionNodes:":["fx2l","fx2r","fx4l"],
        "visualPositionRelativeParent":[0,-0.4,0]
    },
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["s4b8_diff_F", ["s4b8_subframe_F","s4b8_diff_F"]],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--diff weight--
         {"selfCollision":false},
         {"collision":false},
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         {"group":"s4b8_diff_F"},
         {"nodeWeight":31},
         ["fdiff", 0.0, -1.40, 0.36],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":4500600,"beamDamp":460},
          {"beamDeform":30000,"beamStrength":"FLT_MAX"},
          {"deformGroup":"differential_F", "deformationTriggerRatio":0.001},
          ["fdiff","fx2r"],
          ["fdiff","fx2l"],
          ["fdiff","fx5r"],
          ["fdiff","fx5l"],
          ["fdiff","f10ll"],
          ["fdiff","f12ll"],
          {"deformGroup":""},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"s4b8_differential_F_race": {
    "information":{
        "authors":"BeamNG",
        "name":"Race Limited Slip Front Differential",
        "value":3000,
    },
    "slotType" : "s4b8_differential_F",
    "slots": [
        ["type", "default", "description"],
        ["s4b8_driveshaft_F","s4b8_driveshaft_F", "Front Driveshaft"],
        ["s4b8_halfshafts_F","s4b8_halfshafts_F", "Front Halfshafts"],
        ["etk_finaldrive_F","etk_finaldrive_F_race", "Front Final Drive", {"coreSlot":true}],
    ],
    "variables": [
        ["name", "type", "unit", "category", "default", "min", "max", "title", "description"],
        ["$lsdpreload_F", "range", "N/m", "Differentials", 25, 0, 500, "Pre-load Torque", "Initial locking torque between left and right wheels", {"subCategory":"Front"}]
        ["$lsdlockcoef_F", "range", "", "Differentials", 0.10, 0, 0.5, "Power Lock Rate", "Additional locking torque proportional to engine torque", {"minDis":0, "maxDis":100, "subCategory":"Front"}],
        ["$lsdlockcoefrev_F", "range", "", "Differentials", 0.01, 0, 0.5, "Coast Lock Rate", "Additional locking torque proportional to engine braking", {"minDis":0, "maxDis":100, "subCategory":"Front"}],
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["torsionReactor", "torsionReactorF", "driveshaft_F", 1,],
        ["differential", "differential_F", "torsionReactorF", 1, {"deformGroups":["differential_F"], "diffType":"lsd", "gearRatio":1, "lsdPreload":"$lsdpreload_F", "lsdLockCoef":"$lsdlockcoef_F", "lsdRevLockCoef":"$lsdlockcoefrev_F", "uiName":"Front Differential","defaultVirtualInertia":0.25}],
    ],
    "differential_F": {
        "friction": 3.56
        "dynamicFriction": 0.00166,
        "torqueLossCoef": 0.03,
        "visualPositionRelativeChildren":[[-0.31,0,0]]
    },
    "torsionReactorF": {
        "torqueReactionNodes:":["e1l","e1r","e2r"],
        "visualPositionRelativeParent":[0,-0.4,0]
    },
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["s4b8_diff_F", ["s4b8_subframe_F","s4b8_diff_F"]],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--diff weight--
         {"selfCollision":false},
         {"collision":false},
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         {"group":"s4b8_diff_F"},
         {"nodeWeight":34},
         ["fdiff", 0.0, -1.40, 0.36],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":4500600,"beamDamp":460},
          {"beamDeform":30000,"beamStrength":"FLT_MAX"},
          {"deformGroup":"differential_F", "deformationTriggerRatio":0.001},
          ["fdiff","fx2r"],
          ["fdiff","fx2l"],
          ["fdiff","fx5r"],
          ["fdiff","fx5l"],
          ["fdiff","f10ll"],
          ["fdiff","f12ll"],
          {"deformGroup":""},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"s4b8_driveshaft_F": {
    "information":{
        "authors":"BeamNG",
        "name":"Front Driveshaft",
        "value":300,
    },
    "slotType" : "s4b8_driveshaft_F",
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["shaft", "driveshaft_F", "transfercase", 2, {"deformGroups":["driveshaft_F"], "breakTriggerBeam":"driveshaft_F", "uiName":"Front Driveshaft", "electricsName":"driveshaft_F", "friction":0.33, "dynamicFriction": 0.00071, "visualPositionRelativeParent":[0.3,0,0]}],
    ],
    "props": [
        ["func"      , "mesh"           , "idRef:", "idX:", "idY:", "baseRotation"        , "rotation"            , "translation"        , "min", "max", "offset", "multiplier",],
        ["driveshaft_F", "s4b8_driveshaft_F", "fdiff", "fx2l", "tra1",    {"x":90, "y":-6, "z":0}, {"x":0, "y":1, "z":0} , {"x":0, "y":0, "z":0}, -360, 360, 0, 1,{"breakGroup":"driveshaft_F","deformGroup":"driveshaft_F","optional":true}],
    ],
    "beams": [
          ["id1:", "id2:"],
          //front driveshaft
          {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.01, "beamShortBound":0.01},
          {"beamSpring":0,"beamDamp":0,"beamDeform":1500,"beamStrength":3500},
          {"beamLimitSpring":10001000,"beamLimitDamp":250},
          ["fdiff","tcase", {"name":"driveshaft_F","optional":true,"breakGroup":"driveshaft_F","deformGroup":"driveshaft_F"}],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"s4b8_halfshafts_F": {
    "information":{
        "authors":"BeamNG",
        "name":"Front Halfshafts",
        "value":300,
    },
    "slotType" : "s4b8_halfshafts_F",
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["s4b8_halfshaft_F_wide", ["s4b8_lowerarm_F_b","s4b8_subframe_F","s4b8_diff_F"]],
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},

          //halfshafts
          {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.04, "beamShortBound":0.04},
          {"beamSpring":0,"beamDamp":0,"beamDeform":6000,"beamStrength":16000},
          {"beamLimitSpring":2501000,"beamLimitDamp":100},
          ["fw1r","fdiff", {"name":"halfshaft_FR", "breakGroup":"wheel_FR", "breakGroupType":1, "deformGroup":"wheelaxleFR", "deformationTriggerRatio":0.001, "optional":true}],
          ["fw1l","fdiff", {"name":"halfshaft_FL", "breakGroup":"wheel_FL", "breakGroupType":1, "deformGroup":"wheelaxleFL", "deformationTriggerRatio":0.001, "optional":true}],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["shaft", "wheelaxleFL", "differential_F", 1, {"deformGroups":["wheelaxleFL"], "breakTriggerBeam":"halfshaft_FL", "uiName":"Front Left Halfshaft", "friction":1.42, "dynamicFriction": 0.0034, "visualPositionRelativeChildren":[[-0.3,0,0]]}],
        ["shaft", "wheelaxleFR", "differential_F", 2, {"deformGroups":["wheelaxleFR"], "breakTriggerBeam":"halfshaft_FR", "uiName":"Front Right Halfshaft", "friction":1.42, "dynamicFriction": 0.0034,"visualPositionRelativeChildren":[[0.3,0,0]]}],
    ],
},
}