{
"etk800_tailgate_ute": {
    "information":{
        "authors":"BeamNG",
        "name":"Tailgate",
        "value":410,
    },
    "slotType" : "etk800_tailgate_ute",
    "slots": [
        ["type", "default", "description"],
        ["etk800_lettering_tailgate_ute","etk800_lettering_tailgate_856t_ute", "Tailgate Lettering"],
        ["etk800_licenseplate_tailgate_ute","etk800_licenseplate_tailgate_ute", "Rear License Plate"],
    ],
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["uteetk800_tailgate", ["etk800_tailgate"]],
        ["uteetk800_logo_R", ["etk800_tailgate"]],

        {"deformGroup":"tailgatelight_L_break", "deformMaterialBase":"etk800_lights", "deformMaterialDamaged":"etk800_lights_dmg"},
        ["uteetk800_tailgatelight_L", ["etk800_tailgate"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound3", "deformVolume":0.3}],
        {"deformGroup":"tailgatelight_R_break", "deformMaterialBase":"etk800_lights", "deformMaterialDamaged":"etk800_lights_dmg"},
        ["uteetk800_tailgatelight_R", ["etk800_tailgate"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.3}],

        {"deformGroup":"tailgatelight_L_break", "deformMaterialBase":"etk800_glass", "deformMaterialDamaged":"etk800_glass_dmg"},
        ["uteetk800_tailgatelightglass_L", ["etk800_tailgate"]],
        {"deformGroup":"tailgatelight_R_break", "deformMaterialBase":"etk800_glass", "deformMaterialDamaged":"etk800_glass_dmg"},
        ["uteetk800_tailgatelightglass_R", ["etk800_tailgate"]],
        {"deformGroup":""},
    ],
    "props": [
        ["func", "mesh", "idRef:", "idX:", "idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":10, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //chmsl
        ["brakelights", "SPOTLIGHT", "t1r", "t1l", "t2rr", {"x":120,"y":0,"z":0}, {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.5,"y":0.2,"z":-0.01},"flareScale":0.05,"lightBrightness":0.08,"deformGroup":"tailgateglass_break"}],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":10, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //taillights
        ["brakelights" ,         "SPOTLIGHT"        , "t4r", "t4rr", "t3r", {"x":200, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.80, "y":0.70, "z":0.02},"flareScale":0.05,"lightBrightness":0.08,"deformGroup":"tailgatelight_R_break"}],
        ["brakelights" ,         "SPOTLIGHT"        , "t4l", "t4ll", "t3l", {"x":-20, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.80, "y":0.70, "z":-0.02},"flareScale":0.05,"lightBrightness":0.08,"deformGroup":"tailgatelight_L_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "t4r", "t4rr", "t3r", {"x":200, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.70, "y":0.50, "z":0.055},"flareScale":0.015,"lightBrightness":0.08,"deformGroup":"tailgatelight_R_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "t4l", "t4ll", "t3l", {"x":-20, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.70, "y":0.50, "z":-0.055},"flareScale":0.015,"lightBrightness":0.08,"deformGroup":"tailgatelight_L_break"}],

        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":200, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleReverseLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.5,
        },
        ["reverse" ,         "SPOTLIGHT"        , "t4r", "t4rr", "t3r", {"x":200, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.9, "y":0.5, "z":0.02},"flareScale":0.05,"lightBrightness":0.06,"deformGroup":"tailgatelight_R_break"}],
        ["reverse" ,         "SPOTLIGHT"        , "t4l", "t4ll", "t3l", {"x":-20, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.9, "y":0.5, "z":-0.02},"flareScale":0.05,"lightBrightness":0.06,"deformGroup":"tailgatelight_L_break"}],
    ],
    "controller": [
        ["fileName"],
        ["advancedCouplerControl", {"name":"tailgateCoupler"}],
    ]
    "tailgateCoupler":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["q4l",  "t3llc",     20000,                     0.025,                  0.005,                      0.2,                 0.1,                   "tailgatelatch_L", {"forceCid1":"t5", "forceCid2":"t3"}]
            ["q4r",  "t3rrc",     20000,                     0.025,                  0.005,                      0.2,                 0.1,                   "tailgatelatch_R", {"forceCid1":"t5", "forceCid2":"t3"}]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["t3"]
        "attachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 90,
        "openForceDuration": 1.0,
        "closeForceMagnitude": 240,
        "closeForceDuration": 1.3
    }
    "triggers":[
        ["id", "label", "idRef:", "idX:", "idY:", "type", "size", "baseRotation", "rotation", "translation", "baseTranslation"],
        ["tailgate", "", "t5","t4","t3", "box", {"x":0.08, "y":0.08, "z":0.13}, {"x":90, "y":90, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.24, "y":0.1, "z":0.06}, {"deformGroup":"etk800_tailgate"}],
    ],
    "triggerEventLinks":[
        ["triggerId:triggers", "action", "targetEventId:events"],
        ["tailgate", "action0", "800ute_doors"]
    ],
    "events":[
        ["id", "title", "desc"],
        ["800ute_doors", "ui.inputActions.pickup.tailgateLatch.title", "ui.inputActions.pickup.tailgateLatch.description", {"onUp":"controller.getControllerSafe('tailgateCoupler').toggleGroup()"}],
    ],
    "nodes": [
        ["id", "posX", "posY", "posZ"],
         //--TAILGATE--
         {"collision":true},
         {"selfCollision":true},
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         {"group":"etk800_tailgate"},
         {"nodeWeight":1.3},

         ["t3rr", -0.58075, 2.11572, 1.02965],
         {"selfCollision":false},
         ["t3r", -0.32000, 2.12428, 1.02966],
         ["t3", 0.00000, 2.12940, 1.02966],
         ["t3l", 0.32000, 2.12428, 1.02966],
         {"selfCollision":true},
         ["t3ll", 0.58075, 2.11572, 1.02965],

         {"nodeWeight":1.5},
         ["t4rr", -0.58511, 2.23491, 0.61992],
         ["t4r", -0.30000, 2.24731, 0.60999],
         ["t4", 0.00000, 2.25414, 0.60999],
         ["t4l", 0.30000, 2.24731, 0.60999],
         ["t4ll", 0.58511, 2.23491, 0.61992],

         {"collision":false},
         {"selfCollision":false},
         {"nodeWeight":2},
         ["t5", 0.00000, 1.96085, 0.78000],
		 
         //latch nodes
         {"collision":false},
         {"selfCollision":false},
         {"group":""},
         {"nodeWeight":1.15},
         ["t3rrc", -0.65303, 2.13000, 1.01995],
         ["t3llc", 0.65303, 2.13000, 1.01995],
		 
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1401000,"beamDamp":250},
          {"beamDeform":32550,"beamStrength":"FLT_MAX"},
          //tailgate main shape
          {"deformLimitExpansion":1.1},
          {"deformationTriggerRatio":0.95},
          {"deformGroup":"tailgatelight_R_break"},
          ["t3rr","t3r"],
          ["t4rr","t4r"],
          ["t3rr","t4rr"],
          ["t3r","t4r"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t3l","t3ll"],
          ["t4l","t4ll"],
          ["t3l","t4l"],
          ["t3ll","t4ll"],
          {"deformGroup":""},
          
          
          ["t3rrc","t3rr"],
          ["t3rrc","t5"],
          ["t3rrc","t4rr"],
          ["t3llc","t3ll"],
          ["t3llc","t5"],
          ["t3llc","t4ll"],
          

          ["t3r","t3"],
          ["t3l","t3"],

          
          

          ["t4r","t4"],
          ["t4l","t4"],

          ["t3","t4"],

          //surficial crossing
          {"deformLimitExpansion":""},
          {"beamDeform":17550,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgatelight_R_break"},
          ["t4rr","t3r"],
          ["t4r","t3rr"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t4l","t3ll"],
          ["t4ll","t3l"],
          {"deformGroup":""},

          
          

          ["t4r","t3"],
          ["t4","t3r"],
          ["t4l","t3"],
          ["t4","t3l"],

          //rigids
          {"beamSpring":851000,"beamDamp":120},
          {"beamDeform":5550,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgateglass_break", "deformationTriggerRatio":0.02},
          

          
          

          
          

          
          

          {"deformGroup":"tailgatelight_R_break"},
          ["t4rr","t4"],
          ["t3rr","t3"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t4","t4ll"],
          ["t3","t3ll"],
          {"deformGroup":""},

          ["t3r","t3l"],
          ["t4r","t4l"],

          
          

          //rigidifier
          {"beamSpring":3251000,"beamDamp":140},
          {"beamDeform":5000,"beamStrength":"FLT_MAX"},
          {"deformationTriggerRatio":0.05},
          
          
          
          
          
          {"deformGroup":"tailgatelight_R_break"},
          ["t3rr","t5"],
          ["t3r","t5"],
          ["t4rr","t5"],
          ["t4r","t5"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t3l","t5"],
          ["t3ll","t5"],
          ["t4l","t5"],
          ["t4ll","t5"],
          {"deformGroup":""},

          ["t3","t5"],
          ["t4","t5"],

          //tailgate hinge
          {"beamSpring":2001000,"beamDamp":220},
          {"beamDeform":18000,"beamStrength":54000},
          {"breakGroup":"tailgatehinge_R"},
          {"deformGroup":"tailgatelight_R_break"},
          
          ["t4ll","r7ll"],
          ["t4ll","r4ll"],
          ["t4ll","r4"],
          ["t4ll","q9l"],

          {"breakGroup":"tailgatehinge_M"},
          {"deformGroup":"tailgatelight_M_break"},
          

          {"breakGroup":"tailgatehinge_L"},
          {"deformGroup":"tailgatelight_L_break"},
          
          ["t4rr","r7rr"],
          ["t4rr","r4rr"],
          ["t4rr","r4"],
          ["t4rr","q9r"],
          
          
          
          {"deformGroup":""},
          {"breakGroup":""},



          //damping
          {"beamDeform":27600,"beamStrength":255000},
          {"beamSpring":10,"beamDamp":50},
          ["t3r","q4r"],
          ["t3l","q4l"],
		  
          ["t3","p12r"],
          ["t3","p12l"],
          ["t3","r5"],
		  
          ["t5","p11r"],
          ["t5","p11l"], 
          {"breakGroup":""},

          //tailgate support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":1001000,"beamDamp":50},
          {"beamDeform":75000,"beamStrength":200000},
          {"disableTriangleBreaking":true},





          {"beamPrecompression":0.7},
          
          
          

          //inter part triangle breaking triggers
          {"beamType":"|SUPPORT", "beamLongBound":1.0},
          {"beamSpring":0,"beamDamp":0},
          {"beamDeform":1000,"beamStrength":1000},
          {"breakGroup":"tailgate_bumper"},
          {"optional":true},

          {"breakGroup":""},
          {"disableTriangleBreaking":false},
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
		  
          //open limiters
          {"beamPrecompression":1,"beamType":"|BOUNDED","beamLongBound":8.0},
          {"beamSpring":0,"beamDamp":24},
          {"beamLimitSpring":50400,"beamLimitDamp":1750},
          {"beamDeform":65000,"beamStrength":75000},
          ["t3ll", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3rr", "q4r"{"breakGroup":"tailgatehinge_R"}],
          ["t3l", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3r", "q4r"{"breakGroup":"tailgatehinge_R"}],
          ["t3l", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3r", "q4r"{"breakGroup":"tailgatehinge_R"}],
		  
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //tailgate
            {"groundModel":"metal"},
            {"group":"etk800_tailgate"},
            {"dragCoef":2},
            ["t1","t1l","t2ll"],
            ["t1","t2ll","t2rr"],
            ["t1","t2rr","t1r"],
            ["t2ll","t3ll","t3l"],
            ["t2ll","t3l","t3"],
            ["t2ll","t3","t2rr"],
            ["t2rr","t3","t3r"],
            ["t2rr","t3r","t3rr"],

            {"dragCoef":6},
            ["t3ll","t4ll","t4l"],
            ["t3ll","t4l","t3l"],
            ["t3l","t4","t3"],
            ["t3l","t4l","t4"],
            ["t4r","t3r","t4"],
            ["t3r","t3","t4"],
            ["t3r","t4r","t3rr"],
            ["t4rr","t3rr","t4r"],

    ],
},
"etk800_tailgate_ute_sport": {
    "information":{
        "authors":"BeamNG",
        "name":"ttSport Tailgate",
        "value":410,
    },
    "slotType" : "etk800_tailgate_ute",
    "slots": [
        ["type", "default", "description"],
        ["etk800_lettering_tailgate_ute","etk800_lettering_tailgate_858_ttsport_ute", "Tailgate Lettering"],
    ],
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["uteetk800_tailgate_sport", ["etk800_tailgate"]],
        ["uteetk800_logo_R", ["etk800_tailgate"]],

        {"deformGroup":"tailgatelight_L_break", "deformMaterialBase":"etk800_lights", "deformMaterialDamaged":"etk800_lights_dmg"},
        ["uteetk800_tailgatelight_L", ["etk800_tailgate"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound3", "deformVolume":0.3}],
        {"deformGroup":"tailgatelight_R_break", "deformMaterialBase":"etk800_lights", "deformMaterialDamaged":"etk800_lights_dmg"},
        ["uteetk800_tailgatelight_R", ["etk800_tailgate"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.3}],

        {"deformGroup":"tailgatelight_L_break", "deformMaterialBase":"etk800_glass", "deformMaterialDamaged":"etk800_glass_dmg"},
        ["uteetk800_tailgatelightglass_L", ["etk800_tailgate"]],
        {"deformGroup":"tailgatelight_R_break", "deformMaterialBase":"etk800_glass", "deformMaterialDamaged":"etk800_glass_dmg"},
        ["uteetk800_tailgatelightglass_R", ["etk800_tailgate"]],
        {"deformGroup":""},
    ],
    "props": [
        ["func", "mesh", "idRef:", "idX:", "idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":10, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //chmsl
        ["brakelights", "SPOTLIGHT", "t1r", "t1l", "t2rr", {"x":120,"y":0,"z":0}, {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.5,"y":0.2,"z":-0.01},"flareScale":0.05,"lightBrightness":0.08,"deformGroup":"tailgateglass_break"}],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":10, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        //taillights
        ["brakelights" ,         "SPOTLIGHT"        , "t4r", "t4rr", "t3r", {"x":200, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.80, "y":0.70, "z":0.02},"flareScale":0.05,"lightBrightness":0.08,"deformGroup":"tailgatelight_R_break"}],
        ["brakelights" ,         "SPOTLIGHT"        , "t4l", "t4ll", "t3l", {"x":-20, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.80, "y":0.70, "z":-0.02},"flareScale":0.05,"lightBrightness":0.08,"deformGroup":"tailgatelight_L_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "t4r", "t4rr", "t3r", {"x":200, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.70, "y":0.50, "z":0.055},"flareScale":0.015,"lightBrightness":0.08,"deformGroup":"tailgatelight_R_break"}],
        ["lowhighbeam" ,         "SPOTLIGHT"        , "t4l", "t4ll", "t3l", {"x":-20, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.70, "y":0.50, "z":-0.055},"flareScale":0.015,"lightBrightness":0.08,"deformGroup":"tailgatelight_L_break"}],

        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":200, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleReverseLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds"
            "texSize":512,
            "shadowSoftness":0.5,
        },
        ["reverse" ,         "SPOTLIGHT"        , "t4r", "t4rr", "t3r", {"x":200, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.9, "y":0.5, "z":0.02},"flareScale":0.05,"lightBrightness":0.06,"deformGroup":"tailgatelight_R_break"}],
        ["reverse" ,         "SPOTLIGHT"        , "t4l", "t4ll", "t3l", {"x":-20, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.9, "y":0.5, "z":-0.02},"flareScale":0.05,"lightBrightness":0.06,"deformGroup":"tailgatelight_L_break"}],
    ],
    "controller": [
        ["fileName"],
        ["advancedCouplerControl", {"name":"tailgateCoupler"}],
    ]
    "tailgateCoupler":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["q4l",  "t3llc",     20000,                     0.025,                  0.005,                      0.2,                 0.1,                   "tailgatelatch_L", {"forceCid1":"t5", "forceCid2":"t3"}]
            ["q4r",  "t3rrc",     20000,                     0.025,                  0.005,                      0.2,                 0.1,                   "tailgatelatch_R", {"forceCid1":"t5", "forceCid2":"t3"}]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["t3"]
        "attachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 90,
        "openForceDuration": 1.0,
        "closeForceMagnitude": 240,
        "closeForceDuration": 1.3
    }
    "triggers":[
        ["id", "label", "idRef:", "idX:", "idY:", "type", "size", "baseRotation", "rotation", "translation", "baseTranslation"],
        ["tailgate", "", "t5","t4","t3", "box", {"x":0.08, "y":0.08, "z":0.13}, {"x":90, "y":90, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.24, "y":0.1, "z":0.06}, {"deformGroup":"etk800_tailgate"}],
    ],
    "triggerEventLinks":[
        ["triggerId:triggers", "action", "targetEventId:events"],
        ["tailgate", "action0", "800ute_doors"]
    ],
    "events":[
        ["id", "title", "desc"],
        ["800ute_doors", "ui.inputActions.pickup.tailgateLatch.title", "ui.inputActions.pickup.tailgateLatch.description", {"onUp":"controller.getControllerSafe('tailgateCoupler').toggleGroup()"}],
    ],
    "nodes": [
        ["id", "posX", "posY", "posZ"],
         //--TAILGATE--
         {"collision":true},
         {"selfCollision":true},
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         {"group":"etk800_tailgate"},
         {"nodeWeight":1.3},

         ["t3rr", -0.58075, 2.11572, 1.02965],
         {"selfCollision":false},
         ["t3r", -0.32000, 2.12428, 1.02966],
         ["t3", 0.00000, 2.12940, 1.02966],
         ["t3l", 0.32000, 2.12428, 1.02966],
         {"selfCollision":true},
         ["t3ll", 0.58075, 2.11572, 1.02965],

         {"nodeWeight":1.5},
         ["t4rr", -0.58511, 2.23491, 0.61992],
         ["t4r", -0.30000, 2.24731, 0.60999],
         ["t4", 0.00000, 2.25414, 0.60999],
         ["t4l", 0.30000, 2.24731, 0.60999],
         ["t4ll", 0.58511, 2.23491, 0.61992],

         {"collision":false},
         {"selfCollision":false},
         {"nodeWeight":2},
         ["t5", 0.00000, 1.96085, 0.78000],
		 
         //latch nodes
         {"collision":false},
         {"selfCollision":false},
         {"group":""},
         {"nodeWeight":1.15},
         ["t3rrc", -0.65303, 2.13000, 1.01995],
         ["t3llc", 0.65303, 2.13000, 1.01995],
		 
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1401000,"beamDamp":250},
          {"beamDeform":32550,"beamStrength":"FLT_MAX"},
          //tailgate main shape
          {"deformLimitExpansion":1.1},
          {"deformationTriggerRatio":0.95},
          {"deformGroup":"tailgatelight_R_break"},
          ["t3rr","t3r"],
          ["t4rr","t4r"],
          ["t3rr","t4rr"],
          ["t3r","t4r"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t3l","t3ll"],
          ["t4l","t4ll"],
          ["t3l","t4l"],
          ["t3ll","t4ll"],
          {"deformGroup":""},
          
          
          ["t3rrc","t3rr"],
          ["t3rrc","t5"],
          ["t3rrc","t4rr"],
          ["t3llc","t3ll"],
          ["t3llc","t5"],
          ["t3llc","t4ll"],
          

          ["t3r","t3"],
          ["t3l","t3"],

          
          

          ["t4r","t4"],
          ["t4l","t4"],

          ["t3","t4"],

          //surficial crossing
          {"deformLimitExpansion":""},
          {"beamDeform":17550,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgatelight_R_break"},
          ["t4rr","t3r"],
          ["t4r","t3rr"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t4l","t3ll"],
          ["t4ll","t3l"],
          {"deformGroup":""},

          
          

          ["t4r","t3"],
          ["t4","t3r"],
          ["t4l","t3"],
          ["t4","t3l"],

          //rigids
          {"beamSpring":851000,"beamDamp":120},
          {"beamDeform":5550,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgateglass_break", "deformationTriggerRatio":0.02},
          

          
          

          
          

          
          

          {"deformGroup":"tailgatelight_R_break"},
          ["t4rr","t4"],
          ["t3rr","t3"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t4","t4ll"],
          ["t3","t3ll"],
          {"deformGroup":""},

          ["t3r","t3l"],
          ["t4r","t4l"],

          
          

          //rigidifier
          {"beamSpring":3251000,"beamDamp":140},
          {"beamDeform":5000,"beamStrength":"FLT_MAX"},
          {"deformationTriggerRatio":0.05},
          
          
          
          
          
          {"deformGroup":"tailgatelight_R_break"},
          ["t3rr","t5"],
          ["t3r","t5"],
          ["t4rr","t5"],
          ["t4r","t5"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t3l","t5"],
          ["t3ll","t5"],
          ["t4l","t5"],
          ["t4ll","t5"],
          {"deformGroup":""},

          ["t3","t5"],
          ["t4","t5"],

          //tailgate hinge
          {"beamSpring":2001000,"beamDamp":220},
          {"beamDeform":18000,"beamStrength":54000},
          {"breakGroup":"tailgatehinge_R"},
          {"deformGroup":"tailgatelight_R_break"},
          
          ["t4ll","r7ll"],
          ["t4ll","r4ll"],
          ["t4ll","r4"],
          ["t4ll","q9l"],

          {"breakGroup":"tailgatehinge_M"},
          {"deformGroup":"tailgatelight_M_break"},
          

          {"breakGroup":"tailgatehinge_L"},
          {"deformGroup":"tailgatelight_L_break"},
          
          ["t4rr","r7rr"],
          ["t4rr","r4rr"],
          ["t4rr","r4"],
          ["t4rr","q9r"],
          
          
          
          {"deformGroup":""},
          {"breakGroup":""},



          //damping
          {"beamDeform":27600,"beamStrength":255000},
          {"beamSpring":10,"beamDamp":50},
          ["t3r","q4r"],
          ["t3l","q4l"],
		  
          ["t3","p12r"],
          ["t3","p12l"],
		  
          ["t5","p11r"],
          ["t5","p11l"], 
          {"breakGroup":""},

          //tailgate support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":1001000,"beamDamp":50},
          {"beamDeform":75000,"beamStrength":200000},
          {"disableTriangleBreaking":true},





          {"beamPrecompression":0.7},
          
          
          

          //inter part triangle breaking triggers
          {"beamType":"|SUPPORT", "beamLongBound":1.0},
          {"beamSpring":0,"beamDamp":0},
          {"beamDeform":1000,"beamStrength":1000},
          {"breakGroup":"tailgate_bumper"},
          {"optional":true},

          {"breakGroup":""},
          {"disableTriangleBreaking":false},
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
		  
          //open limiters
          {"beamPrecompression":1,"beamType":"|BOUNDED","beamLongBound":8.0},
          {"beamSpring":0,"beamDamp":24},
          {"beamLimitSpring":50400,"beamLimitDamp":1750},
          {"beamDeform":65000,"beamStrength":75000},
          ["t3ll", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3rr", "q4r"{"breakGroup":"tailgatehinge_R"}],
          ["t3l", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3r", "q4r"{"breakGroup":"tailgatehinge_R"}],
          ["t3l", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3r", "q4r"{"breakGroup":"tailgatehinge_R"}],
		  
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //tailgate
            {"groundModel":"metal"},
            {"group":"etk800_tailgate"},
            {"dragCoef":2},
            ["t1","t1l","t2ll"],
            ["t1","t2ll","t2rr"],
            ["t1","t2rr","t1r"],
            ["t2ll","t3ll","t3l"],
            ["t2ll","t3l","t3"],
            ["t2ll","t3","t2rr"],
            ["t2rr","t3","t3r"],
            ["t2rr","t3r","t3rr"],

            {"dragCoef":6},
            ["t3ll","t4ll","t4l"],
            ["t3ll","t4l","t3l"],
            ["t3l","t4","t3"],
            ["t3l","t4l","t4"],
            ["t4r","t3r","t4"],
            ["t3r","t3","t4"],
            ["t3r","t4r","t3rr"],
            ["t4rr","t3rr","t4r"],

    ],
},
"etk800_tailgate_ute_alt": {
    "information":{
        "authors":"BeamNG",
        "name":"Plain Tailgate",
        "value":410,
    },
    "slotType" : "etk800_tailgate_ute",
    "slots": [
        ["type", "default", "description"],
        ["etk800_lettering_tailgate_ute","etk800_lettering_tailgate_856t_ute", "Tailgate Lettering"],
        ["etk800_licenseplate_tailgate_ute","etk800_licenseplate_tailgate_ute", "Rear License Plate"],
    ],
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
        ["uteetk800_tailgate_alt", ["etk800_tailgate"]],
        ["uteetk800_logo_R", ["etk800_tailgate"]],
    ],
    "controller": [
        ["fileName"],
        ["advancedCouplerControl", {"name":"tailgateCoupler"}],
    ]
    "tailgateCoupler":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["q4l",  "t3llc",     20000,                     0.025,                  0.005,                      0.2,                 0.1,                   "tailgatelatch_L", {"forceCid1":"t5", "forceCid2":"t3"}]
            ["q4r",  "t3rrc",     20000,                     0.025,                  0.005,                      0.2,                 0.1,                   "tailgatelatch_R", {"forceCid1":"t5", "forceCid2":"t3"}]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["t3"]
        "attachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 90,
        "openForceDuration": 1.0,
        "closeForceMagnitude": 240,
        "closeForceDuration": 1.3
    }
    "triggers":[
        ["id", "label", "idRef:", "idX:", "idY:", "type", "size", "baseRotation", "rotation", "translation", "baseTranslation"],
        ["tailgate", "", "t5","t4","t3", "box", {"x":0.08, "y":0.08, "z":0.13}, {"x":90, "y":90, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.24, "y":0.1, "z":0.06}, {"deformGroup":"etk800_tailgate"}],
    ],
    "triggerEventLinks":[
        ["triggerId:triggers", "action", "targetEventId:events"],
        ["tailgate", "action0", "800ute_doors"]
    ],
    "events":[
        ["id", "title", "desc"],
        ["800ute_doors", "ui.inputActions.pickup.tailgateLatch.title", "ui.inputActions.pickup.tailgateLatch.description", {"onUp":"controller.getControllerSafe('tailgateCoupler').toggleGroup()"}],
    ],
    "nodes": [
        ["id", "posX", "posY", "posZ"],
         //--TAILGATE--
         {"collision":true},
         {"selfCollision":true},
         {"nodeMaterial":"|NM_METAL"},
         {"frictionCoef":0.5},
         {"group":"etk800_tailgate"},
         {"nodeWeight":1.3},

         ["t3rr", -0.58075, 2.11572, 1.02965],
         {"selfCollision":false},
         ["t3r", -0.32000, 2.12428, 1.02966],
         ["t3", 0.00000, 2.12940, 1.02966],
         ["t3l", 0.32000, 2.12428, 1.02966],
         {"selfCollision":true},
         ["t3ll", 0.58075, 2.11572, 1.02965],

         {"nodeWeight":1.5},
         ["t4rr", -0.58511, 2.23491, 0.61992],
         ["t4r", -0.30000, 2.24731, 0.60999],
         ["t4", 0.00000, 2.25414, 0.60999],
         ["t4l", 0.30000, 2.24731, 0.60999],
         ["t4ll", 0.58511, 2.23491, 0.61992],

         {"collision":false},
         {"selfCollision":false},
         {"nodeWeight":2},
         ["t5", 0.00000, 1.96085, 0.78000],
		 
         //latch nodes
         {"collision":false},
         {"selfCollision":false},
         {"group":""},
         {"nodeWeight":1.15},
         ["t3rrc", -0.65303, 2.13000, 1.01995],
         ["t3llc", 0.65303, 2.13000, 1.01995],
		 
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--TAILGATE--
          {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1401000,"beamDamp":250},
          {"beamDeform":32550,"beamStrength":"FLT_MAX"},
          //tailgate main shape
          {"deformLimitExpansion":1.1},
          {"deformationTriggerRatio":0.95},
          {"deformGroup":"tailgatelight_R_break"},
          ["t3rr","t3r"],
          ["t4rr","t4r"],
          ["t3rr","t4rr"],
          ["t3r","t4r"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t3l","t3ll"],
          ["t4l","t4ll"],
          ["t3l","t4l"],
          ["t3ll","t4ll"],
          {"deformGroup":""},
          
          
          ["t3rrc","t3rr"],
          ["t3rrc","t5"],
          ["t3rrc","t4rr"],
          ["t3llc","t3ll"],
          ["t3llc","t5"],
          ["t3llc","t4ll"],
          

          ["t3r","t3"],
          ["t3l","t3"],

          
          

          ["t4r","t4"],
          ["t4l","t4"],

          ["t3","t4"],

          //surficial crossing
          {"deformLimitExpansion":""},
          {"beamDeform":17550,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgatelight_R_break"},
          ["t4rr","t3r"],
          ["t4r","t3rr"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t4l","t3ll"],
          ["t4ll","t3l"],
          {"deformGroup":""},

          
          

          ["t4r","t3"],
          ["t4","t3r"],
          ["t4l","t3"],
          ["t4","t3l"],

          //rigids
          {"beamSpring":851000,"beamDamp":120},
          {"beamDeform":5550,"beamStrength":"FLT_MAX"},
          {"deformGroup":"tailgateglass_break", "deformationTriggerRatio":0.02},
          

          
          

          
          

          
          

          {"deformGroup":"tailgatelight_R_break"},
          ["t4rr","t4"],
          ["t3rr","t3"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t4","t4ll"],
          ["t3","t3ll"],
          {"deformGroup":""},

          ["t3r","t3l"],
          ["t4r","t4l"],

          
          

          //rigidifier
          {"beamSpring":3251000,"beamDamp":140},
          {"beamDeform":5000,"beamStrength":"FLT_MAX"},
          {"deformationTriggerRatio":0.05},
          
          
          
          
          
          {"deformGroup":"tailgatelight_R_break"},
          ["t3rr","t5"],
          ["t3r","t5"],
          ["t4rr","t5"],
          ["t4r","t5"],
          {"deformGroup":"tailgatelight_L_break"},
          ["t3l","t5"],
          ["t3ll","t5"],
          ["t4l","t5"],
          ["t4ll","t5"],
          {"deformGroup":""},

          ["t3","t5"],
          ["t4","t5"],

          //tailgate hinge
          {"beamSpring":2001000,"beamDamp":220},
          {"beamDeform":18000,"beamStrength":54000},
          {"breakGroup":"tailgatehinge_R"},
          {"deformGroup":"tailgatelight_R_break"},
          
          ["t4ll","r7ll"],
          ["t4ll","r4ll"],
          ["t4ll","r4"],
          ["t4ll","q9l"],

          {"breakGroup":"tailgatehinge_M"},
          {"deformGroup":"tailgatelight_M_break"},
          

          {"breakGroup":"tailgatehinge_L"},
          {"deformGroup":"tailgatelight_L_break"},
          
          ["t4rr","r7rr"],
          ["t4rr","r4rr"],
          ["t4rr","r4"],
          ["t4rr","q9r"],
          
          
          
          {"deformGroup":""},
          {"breakGroup":""},



          //damping
          {"beamDeform":27600,"beamStrength":255000},
          {"beamSpring":10,"beamDamp":50},
          ["t3r","q4r"],
          ["t3l","q4l"],
		  
          ["t3","p12r"],
          ["t3","p12l"],
		  
          ["t5","p11r"],
          ["t5","p11l"], 
          {"breakGroup":""},

          //tailgate support beams
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":1001000,"beamDamp":50},
          {"beamDeform":75000,"beamStrength":200000},
          {"disableTriangleBreaking":true},





          {"beamPrecompression":0.7},
          
          
          

          //inter part triangle breaking triggers
          {"beamType":"|SUPPORT", "beamLongBound":1.0},
          {"beamSpring":0,"beamDamp":0},
          {"beamDeform":1000,"beamStrength":1000},
          {"breakGroup":"tailgate_bumper"},
          {"optional":true},

          {"breakGroup":""},
          {"disableTriangleBreaking":false},
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
		  
          //open limiters
          {"beamPrecompression":1,"beamType":"|BOUNDED","beamLongBound":8.0},
          {"beamSpring":0,"beamDamp":24},
          {"beamLimitSpring":50400,"beamLimitDamp":1750},
          {"beamDeform":65000,"beamStrength":75000},
          ["t3ll", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3rr", "q4r"{"breakGroup":"tailgatehinge_R"}],
          ["t3l", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3r", "q4r"{"breakGroup":"tailgatehinge_R"}],
          ["t3l", "q4l"{"breakGroup":"tailgatehinge_L"}],
          ["t3r", "q4r"{"breakGroup":"tailgatehinge_R"}],
		  
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //tailgate
            {"groundModel":"metal"},
            {"group":"etk800_tailgate"},
            {"dragCoef":2},
            ["t1","t1l","t2ll"],
            ["t1","t2ll","t2rr"],
            ["t1","t2rr","t1r"],
            ["t2ll","t3ll","t3l"],
            ["t2ll","t3l","t3"],
            ["t2ll","t3","t2rr"],
            ["t2rr","t3","t3r"],
            ["t2rr","t3r","t3rr"],

            {"dragCoef":6},
            ["t3ll","t4ll","t4l"],
            ["t3ll","t4l","t3l"],
            ["t3l","t4","t3"],
            ["t3l","t4l","t4"],
            ["t4r","t3r","t4"],
            ["t3r","t3","t4"],
            ["t3r","t4r","t3rr"],
            ["t4rr","t3rr","t4r"],

    ],
},
}