{
"revuelto_differential_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Torquevectoring Rear Differential",
        "value":1250,
    },
    "slotType" : "revuelto_differential_R",
    "slots": [
        ["type", "default", "description"],
        ["revuelto_halfshafts_R","revuelto_halfshafts_R", "Rear Half Shafts"],
        ["revuelto_finaldrive_R","revuelto_finaldrive_R", "Rear Final Drive", {"coreSlot":true}],
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        //["differential", "differential_R", "driveshaft", 1, {"diffType":"open", "friction":8, "uiName":"Front Differential","defaultVirtualInertia":0.25}],
        ["differential", "differential_R", "driveshaft", 1, {"deformGroups":["differential_R"], "diffType":"torqueVectoring", "gearRatio": 3.07, "uiName":"Rear Differential","defaultVirtualInertia":0.25}],
    ],
    "differential_R": {
        "friction": 1.23,
        "dynamicFriction": 0.00195,
        "torqueLossCoef": 0.030,
    },
    "controller": [
        ["fileName"],
        ["drivingDynamics/actuators/activeDiffBias" {"name":"lockRear", "differentialName":"differential_R", "maxBiasOffset": 0.3}]
        //["drivingDynamics/actuators/electronicDiffLock" {"name":"lockRear", "differentialName":"differential_R"}]
    ]
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"selfCollision":false},
         {"collision":true},
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},

         //rear differential
         {"nodeWeight":12.0},
         {"group":"revuelto_differential_R"},
         ["rdiff",0.0,1.32,0.329],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},

          //rear differential
          {"beamSpring":4501000,"beamDamp":550},
          {"beamDeform":120000,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.2},
          {"deformGroup":"differential_R", "deformationTriggerRatio":0.001}
          ["rdiff", "e2l"],
          ["rdiff", "e2r"],
          ["rdiff", "e4l"],
          ["rdiff", "e4r"],
          ["rdiff", "tra2"],
          ["rdiff", "tra1r"],
          ["rdiff", "tra1l"],
          {"deformGroup":""}
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"revuelto_differential_R_race": {
    "information":{
        "authors":"BeamNG",
        "name":"Race Limited Slip Rear Differential",
        "value":1850,
    },
    "slotType" : "revuelto_differential_R",
    "slots": [
        ["type", "default", "description"],
        ["revuelto_halfshafts_R","revuelto_halfshafts_R", "Rear Half Shafts"],
        ["revuelto_finaldrive_R","revuelto_finaldrive_R_race", "Rear Final Drive", {"coreSlot":true}],
    ],
    "variables": [
        ["name", "type", "unit", "category", "default", "min", "max", "title", "description"],
        ["$lsdpreload_R", "range", "N/m", "Differentials", 140, 0, 250, "Pre-load Torque", "Initial locking torque between left and right wheels", {"subCategory":"Rear"}]
        ["$lsdlockcoef_R", "range", "", "Differentials", 0.185, 0, 0.5, "Power Lock Rate", "Additional locking torque proportional to engine torque", {"minDis":0, "maxDis":100, "subCategory":"Rear"}],
        ["$lsdlockcoefrev_R", "range", "", "Differentials", 0.0, 0, 0.5, "Coast Lock Rate", "Additional locking torque proportional to engine braking", {"minDis":0, "maxDis":100, "subCategory":"Rear"}],
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["differential", "differential_R", "transfercase", 1, {"deformGroups":["differential_R"], "diffType":"lsd", "lsdPreload":"$lsdpreload_R", "lsdLockCoef":"$lsdlockcoef_R", "lsdRevLockCoef":"$lsdlockcoefrev_R", "uiName":"Rear Differential","defaultVirtualInertia":0.25}],
    ],
    "differential_R": {
        "friction": 5.16,
        "dynamicFriction": 0.00295,
        "torqueLossCoef": 0.030,
    },
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"selfCollision":false},
         {"collision":true},
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},

         //rear differential
         {"nodeWeight":9.0},
         {"group":"revuelto_differential_R"},
         ["rdiff",0.0,1.32,0.329],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},

          //rear differential
          {"beamSpring":4501000,"beamDamp":550},
          {"beamDeform":120000,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.2},
          {"deformGroup":"differential_R", "deformationTriggerRatio":0.001}
          ["rdiff", "e2l"],
          ["rdiff", "e2r"],
          ["rdiff", "e4l"],
          ["rdiff", "e4r"],
          ["rdiff", "tra2"],
          ["rdiff", "tra1r"],
          ["rdiff", "tra1l"],
          {"deformGroup":""}
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"revuelto_finaldrive_R": {
    "information":{
        "authors":"BeamNG",
        "name":"4.63:1 Rear Final Drive",
        "value":250,
    },

    "slotType" : "revuelto_finaldrive_R",

    "differential_R" : {
        "gearRatio":4.63,
    },
},
"revuelto_finaldrive_R_race": {
    "information":{
        "authors":"BeamNG",
        "name":"Race Adjustable Rear Final Drive",
        "value":750,
    },

    "slotType" : "revuelto_finaldrive_R",

    "variables": [
        ["name", "type", "unit", "category", "default", "min", "max", "title", "description"],
        ["$finaldrive_R", "range", ":1", "Differentials", 4.89, 2.0, 6.0, "Final Drive Gear Ratio", "Torque multiplication ratio", {"subCategory":"Rear", "stepDis":0.01}],
    ],

    "differential_R" : {
        "gearRatio":"$finaldrive_R",
    },
},
"revuelto_halfshafts_R": {
    "information":{
        "authors":"BeamNG",
        "name":"Rear Halfshafts",
        "value":200,
    },
    "slotType" : "revuelto_halfshafts_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"radhose_R_damage", "deformMaterialBase":"revuelto_engine", "deformMaterialDamaged":"invis"},
         ["revuelto_halfshaft_RR", ["revuelto_differential_R","revuelto_upperarm_R","revuelto_lowerarm_R"]],
         {"deformGroup":"radhose_R_damage", "deformMaterialBase":"revuelto_engine", "deformMaterialDamaged":"invis"},
         ["revuelto_halfshaft_RL", ["revuelto_differential_R","revuelto_upperarm_R","revuelto_lowerarm_R"]],
         {"deformGroup":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //halfshafts
          {"beamType":"|BOUNDED", "beamLongBound":0.04, "beamShortBound":0.04,"boundZone":0.1},
          {"beamSpring":0,"beamDamp":0,"beamDeform":4500,"beamStrength":6000},
          {"beamLimitSpring":5001000,"beamLimitDamp":250},
          ["rw1r","rdiff", {"name":"halfshaft_RR", "breakGroup":"wheel_RR", "breakGroupType":1, "deformGroup":"wheelaxleRR", "deformationTriggerRatio":0.1, "optional":true}],
          ["rw1l","rdiff", {"name":"halfshaft_RL", "breakGroup":"wheel_RL", "breakGroupType":1, "deformGroup":"wheelaxleRL", "deformationTriggerRatio":0.1, "optional":true}],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0, "boundZone":""}
    ],
    "powertrain" : [
        ["type", "name", "inputName", "inputIndex"],
        ["shaft", "wheelaxleRL", "differential_R", 1, {"deformGroups":["wheelaxleRL"], "breakTriggerBeam":"halfshaft_RL", "uiName":"Rear Left Halfshaft", "friction":1.65, "dynamicFriction":0.00407}],
        ["shaft", "wheelaxleRR", "differential_R", 2, {"deformGroups":["wheelaxleRR"], "breakTriggerBeam":"halfshaft_RR", "uiName":"Rear Right Halfshaft", "friction":1.65, "dynamicFriction":0.00407}],
    ],
},
}