{
"nix_97dakota_tailgate": {
    "information":{
        "authors":"BeamNG",
        "name":"Tailgate",
        "value":600,
    },
    "slotType" : "nix_97dakota_tailgate",
    "slots": [
        ["type", "default", "description"],
        ["nix_97dakota_tailgate_trim","nix_84s10_tailgate_trim", "Tailgate Trim"],
    ],
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["nix_97dakota_tailgate", ["pickup_tailgate"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}}],
		 ["nix_97dakota_tailgate_parts", ["pickup_tailgate"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         //--TAILGATE--
         {"collision":true},
         {"selfCollision":true},
         {"group":["pickup_tailgate","pickup_tailgate_standard"]},
         {"nodeWeight":1.55},
         ["t1rr", -0.65641, 2.54667, 1.17349],
         {"nodeWeight":0.94},
         ["t1r", -0.33621, 2.54667, 1.17349],
         ["t1", 0.00000, 2.54667, 1.17349],
         ["t1l", 0.33621, 2.54667, 1.17349],
         {"nodeWeight":1.55},
         ["t1ll", 0.65641, 2.54667, 1.17349],

         ["t2rr", -0.65641, 2.56667, 0.71676],
         ["t2r", -0.33621, 2.56667, 0.71676],
         ["t2", 0.00000, 2.56667, 0.71676],
         ["t2l", 0.33621, 2.56667, 0.71676],
         ["t2ll", 0.65641, 2.56667, 0.71676],
         //rigidifier
         {"selfCollision":false},
         {"collision":false},
         {"group":""},
         {"nodeWeight":0.94},
         ["t3", 0.00000, 2.26000, 0.97000],
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1777390,"beamDamp":244.4},
          {"beamDeform":21525,"beamStrength":"FLT_MAX"},
          //tailgate main shape
          {"deformLimitExpansion":1.2},
          ["t1rr","t1r"],
          ["t1r","t1"],
          ["t1","t1l"],
          ["t1l","t1ll"],

          ["t2rr","t2r"],
          ["t2r","t2", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t2","t2l", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t2l","t2ll"],

          ["t1rr","t2rr"],
          ["t1r","t2r"],
          ["t1","t2", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t1l","t2l"],
          ["t1ll","t2ll"],

          //surficial crossing
          {"deformLimitExpansion":""},
          {"beamDeform":8225,"beamStrength":"FLT_MAX"},
          ["t1rr","t2r"],
          ["t1r","t2rr"],
          ["t1r","t2", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t1","t2r"],
          ["t1","t2l"],
          ["t1l","t2", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t1l","t2ll"],
          ["t1ll","t2l"],

          //rigidifier
          {"beamSpring":1213390,"beamDamp":244.4},
          {"beamDeform":8050,"beamStrength":"FLT_MAX"},
          ["t1rr","t3"],
          ["t1r","t3"],
          ["t1","t3"],
          ["t1l","t3"],
          ["t1ll","t3"],
          ["t2rr","t3"],
          ["t2r","t3"],
          ["t2","t3", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t2l","t3"],
          ["t2ll","t3"],

          //hinge
          {"disableTriangleBreaking":true},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1213390,"beamDamp":244.4},
          {"beamDeform":10500,"beamStrength":29904},
          {"breakGroup":"tailgatehinge_a"},
          ["t2rr","bd10rr"],
          ["t2rr","bd5rr"],
          ["t2l","bd10ll"],
          ["t2","bd10rr", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],

          ["t2rr","bd9rr"],
          ["t2l","bd9ll"],
          ["t2ll","bd9ll"],

          {"breakGroup":"tailgatehinge_b"},
          ["t2","bd10ll", {"deformGroup":"duallysignal_R_break", "deformationTriggerRatio":0.01}],
          ["t2r","bd10rr"],
          ["t2ll","bd10ll"],
          ["t2ll","bd5ll"],

          ["t2","bd9ll"],
          ["t2r","bd9rr"],
          ["t2","bd9rr"],
          {"breakGroup":""},

          //latch
          {"beamSpring":1777390,"beamDamp":244.4},
          {"beamDeform":9975,"beamStrength":18067},
          {"breakGroup":"tailgatelatch"},
          ["t1rr","b5rr"],
          ["t1ll","b5ll"],
          ["t1rr","b4rr"],
          ["t1ll","b4ll"],
          ["t2rr","b5rr"],
          ["t2ll","b5ll"],
          {"breakGroup":""},

          //--TAILGATE SUPPORT BEAMS--
          {"beamType":"|SUPPORT","beamLongBound":4},
          {"beamSpring":470940,"beamDamp":244.4},
          {"beamDeform":3500,"beamStrength":199360},
          ["t2rr", "bd9rr"],
          ["t2r", "bd9r"],
          ["t2l", "bd9l"],
          ["t2ll", "bd9ll"],
          ["t2rr", "bd10rr"],
          ["t2rr", "bd14rr"],
          ["t2ll", "bd10ll"],
          ["t2ll", "bd14ll"],
          ["t2r", "bd10rr"],
          ["t2l", "bd10ll"],
          ["t1rr", "bd4rr"],
          ["t1ll", "bd4ll"],
          ["t1ll", "bd5ll", {"beamLongBound":25}],
          ["t1rr", "bd5rr", {"beamLongBound":25}],
          ["t1l", "bd5ll"],
          ["t1r", "bd5rr"],
          {"disableTriangleBreaking":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //tailgate
            {"groundModel":"metal"},
            {"group":"pickup_tailgateouter"},
            {"dragCoef":7.5},
            ["t2rr","t1rr","t2r"],
            ["t1rr","t1r","t2r"],
            ["t2r","t1r","t2"],
            ["t1r","t1","t2"],
            ["t1l","t2l","t2"],
            ["t1l","t2","t1"],
            ["t1ll","t2ll","t2l"],
            ["t1ll","t2l","t1l"],
            {"dragCoef":0},
    ],
},
}
