{
"revuelto_spoilersupport": {
    "information":{
        "authors":"BeamNG",
        "name":"Spoiler Support",
        "value":900,
    },
    "slotType" : "revuelto_spoilersupport",
    "slots": [
        ["type", "default", "description"],
        ["revuelto_spoiler","revuelto_spoiler", "Spoiler"],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         //--TAILGATE--
         {"collision":false},
         {"selfCollision":false},
         {"group":"revuelto_spoilersupport"},
         {"nodeWeight":1.4},
         
         
         

         
         

         ["spt3rr", -0.82076, 1.78506, 0.83493],
         ["spt3r", -0.32034, 1.84964, 0.85230],
         ["spt3", 0.00000, 1.85549, 0.85230],
         ["spt3l", 0.32034, 1.84964, 0.85230],
         ["spt3ll", 0.82076, 1.78506, 0.83493],

         ["spt4rr", -0.78955, 2.05014, 0.76261],
         ["spt4r", -0.34930, 2.17197, 0.77491, {"group":["revuelto_spoilersupport", "revuelto_spoilerpiston"]}],
         ["spt4", 0.00000, 2.17782, 0.77491],
         ["spt4l", 0.34930, 2.17197, 0.77491, {"group":["revuelto_spoilersupport", "revuelto_spoilerpiston"]}],
         ["spt4ll", 0.78955, 2.05014, 0.76261],

         {"collision":false},
         {"selfCollision":false},
         ["spt5", 0.00000, 1.81428, 0.68097],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1101000,"beamDamp":250},
          {"beamDeform":28000,"beamStrength":"FLT_MAX"},
          //tailgate main shape
          {"deformLimitExpansion":1.1},
          
          
          
          

          ["spt3rr","spt3r"],
          ["spt3r","spt3"],
          ["spt3l","spt3"],
          ["spt3l","spt3ll"],

          
          

          ["spt4rr","spt4r"],
          ["spt4r","spt4"],
          ["spt4l","spt4"],
          ["spt4l","spt4ll"],

          ["spt3rr","spt4rr"],
          ["spt3r","spt4r"],
          ["spt3","spt4"],
          ["spt3l","spt4l"],
          ["spt3ll","spt4ll"],

          //surficial crossing
          {"deformLimitExpansion":""},
          {"beamDeform":14000,"beamStrength":"FLT_MAX"},
          
          

          ["spt4rr","spt3r"],
          ["spt4r","spt3rr"],
          ["spt4r","spt3"],
          ["spt4","spt3r"],
          ["spt4l","spt3"],
          ["spt4","spt3l"],
          ["spt4l","spt3ll"],
          ["spt4ll","spt3l"],

          //rigids
          {"beamSpring":801000,"beamDamp":250},
          {"beamDeform":8000,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgateglass_break", "deformationTriggerRatio":0.02},
          
          
          
          
          
          
          
          
          ["spt3rr", "spt3"],
          ["spt3ll", "spt3"],
          ["spt4ll", "spt4"],
          ["spt4rr", "spt4"],
          ["spt4l", "spt4r"],

          //rigidifier
          {"beamSpring":801000,"beamDamp":250},
          {"beamDeform":6000,"beamStrength":"FLT_MAX"},
          
          
          
          
          
          ["spt3rr","spt5"],
          ["spt3r","spt5"],
          ["spt3","spt5"],
          ["spt3l","spt5"],
          ["spt3ll","spt5"],
          ["spt4rr","spt5"],
          ["spt4r","spt5"],
          ["spt4","spt5"],
          ["spt4l","spt5"],
          ["spt4ll","spt5"],
          {"deformGroup":""},

          //tailgate hinge
          {"beamSpring":1101000,"beamDamp":250},
          {"beamDeform":12400,"beamStrength":36000},
          {"breakGroup":"spoilersupport"},
            ["spt4ll", "t3l"],
            ["spt4rr", "t3r"],
            ["spt4r", "t3r"],
            ["spt4l", "t3l"],
            ["spt4l", "t3"],
            ["spt4r", "t3"],
            ["spt4", "t3l"],
            ["spt4", "t3r"],
            ["spt4rr", "t3"],
            ["spt4ll", "t3"],
            ["spt3ll", "t1l"],
            ["t1r", "spt3rr"],
            ["spt3r", "t1r"],
            ["spt3l", "t1l"],
            ["spt3", "t1l"],
            ["spt3", "t1r"],
            ["spt3l", "t2ll"],
            ["spt3r", "t2rr"],

            ["spt3rr", "t6rr"],
            ["spt3rr", "t5rr"],
            ["spt3rr", "t5ll"],
            ["spt3rr", "t6ll"],
            ["spt3ll", "t6ll"],
            ["spt3ll", "t5ll"],
            ["spt3ll", "t1ll"],
            ["spt3rr", "t1rr"],

          {"breakGroup":"tailgatehinge_L"},
          
          
          

          
          {"breakGroup":""},

          //pop open
          {"breakGroupType":1},
          {"beamSpring":200,"beamDamp":75},
          {"beamDeform":4350,"beamStrength":10000},
          {"beamPrecompression":4},
          {"breakGroup":"tailgatelatch"},
          ["spt4r","r3rr"],
          ["spt4l","r3ll"],
          {"beamPrecompression":1},
          {"breakGroupType":0},
          {"breakGroup":""},

          //damping
          {"beamSpring":0,"beamDamp":20},
          {"beamDeform":27600,"beamStrength":225000},
          {"breakGroup":"tailgatehinge_R"},
          ["spt3rr","r3rr"],
          {"breakGroup":"tailgatehinge_L"},
          ["spt3ll","r3ll"],
          {"breakGroup":""},

          //tailgate latch
          {"beamSpring":1101000,"beamDamp":150},
          {"beamDeform":6450,"beamStrength":17000},
          {"breakGroup":"tailgatelatch"},
          ["spt4","r3"],
          ["spt4","r6"],
          ["spt4r","r6"],
          ["spt4l","r6"],
          ["spt4r","r3"],
          ["spt4l","r3"],


          {"breakGroup":""},

          //tailgate support beams
          {"beamType":"|SUPPORT", "beamLongBound":8},
          {"beamSpring":1101000,"beamDamp":100},
          {"beamDeform":9600,"beamStrength":230000},
          ["spt3rr","tb1r"],
          ["spt3ll","tb1l"],

          ["spt3rr","q5r"],
          ["spt3ll","q5l"],

          
                      ["spt3r", "t5r"],
            ["spt3r", "t5"],
            ["spt3r", "t5l"],
            ["spt3", "t5r"],
            ["spt3", "t5"],
            ["spt3", "t5l"],
            ["spt3l", "t5"],
            ["spt3l", "t5l"],



          ["spt3rr","q6r"],
          ["spt3ll","q6l"],

          ["spt4rr","q5r"],
          ["spt4ll","q5l"],

          ["spt4r","q6r"],
          ["spt4l","q6l"],
          ["spt3r","tb1r"],
          ["spt3l","tb1l"],

          ["spt4rr","q12r"],
          ["spt4ll","q12l"],

          ["spt4rr","q11r"],
          ["spt4ll","q11l"],

          ["spt3","r6"],
          ["spt3r","r6"],
          ["spt3l","r6"],
          ["spt3r","r6rr"],
          ["spt3l","r6ll"],

          {"optional":true},
          ["spt4","rb2"],
          ["spt4r","rb2r"],
          ["spt4l","rb2l"],
          {"optional":false},

          {"beamPrecompression":0.9},
          
          
          
          
          

          {"beamPrecompression":0.6},
          
          
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
},
}