{
"kzn_ws6_headlight_R": {
    "information":{
        "authors":"ItzKaizen",
        "name":"Right Headlight",
        "value":150,
    },
    "slotType" : "kzn_ws6_headlight_R",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["kzn_ws6_headlight_R", ["kzn_ws6_headlight_R"]],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"kzn_ws6_headlightlens", "deformMaterialDamaged":"kzn_ws6_headlightlens_dmg"},
         ["kzn_ws6_headlight_glass_R", ["kzn_ws6_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound3", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightColor":{"r":255, "g":255, "b":160, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":true,
            "flareName":"vehicleHeadLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds",
            "texSize":512,
            "shadowSoftness":0.5
        },
        //low beams
        ["lowbeam"    , "SPOTLIGHT"        , "he3r", "he3rr", "he2r", {"x":-8, "y":10, "z":7} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.5, "y":0.35, "z":-0.05},"lightRange":50,"lightBrightness":0.4,"lightOuterAngle":75,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        //high beams
        ["highbeam" ,   "SPOTLIGHT"           , "he3r", "he3rr", "he2r", {"x":-5, "y":10, "z":4} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.5, "y":0.45, "z":-0.0},"lightRange":80,"lightBrightness":0.7,"lightOuterAngle":90,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHTS--
         {"nodeWeight":0.95},
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         {"selfCollision":true},
         {"collision":true},
         {"group":"kzn_ws6_headlight_R"},
         //r
         ["he1rr",-0.75, -1.80, 0.78],
         ["he1r",-0.35, -1.95, 0.76],
         ["he2rr",-0.70, -2.05, 0.67],
         ["he2r",-0.30, -2.20, 0.65],

         {"selfCollision":false},
         ["he3rr",-0.60, -1.85, 0.54],
         ["he3r",-0.38, -1.91, 0.54],

         //["he4rr",-0.65, -1.74, 0.69],
         //["he4r",-0.42, -1.795, 0.69],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHTS--
          {"beamType":"|NORMAL", "beamPrecompression":1, "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1001000,"beamDamp":50},
          {"beamDeform":31950,"beamStrength":"FLT_MAX"},
          //main shape
          {"deformLimitExpansion":1.1},
          //r
          {"deformationTriggerRatio":0.01},
          {"deformGroup":"headlightglass_R_break"},
          ["he1rr","he1r"],
          ["he2rr","he2r"],
          ["he3rr","he3r"],
          //["he4rr","he4r"],
          ["he1rr","he2rr"],
          ["he1r","he2r"],
          ["he1rr","he3rr"],
          ["he1r","he3r"],
          ["he2rr","he3rr"],
          ["he2r","he3r"],

          //cross
          {"deformLimitExpansion":""},
          //r
          ["he1rr","he2r"],
          ["he1rr","he3r"],
          ["he2rr","he1r"],
          ["he2rr","he3r"],
          ["he3rr","he1r"],
          ["he3rr","he2r"],
          {"deformGroup":""},

          //attach to hinge nodes
          {"beamDeform":10950,"beamStrength":"FLT_MAX"},
          //r
          //["he1rr","he4rr"],
          //["he2rr","he4rr"],
          //["he3rr","he4rr"],
          //["he1rr","he4r"],
          //["he2rr","he4r"],
          //["he3rr","he4r"],
          //["he1r","he4rr"],
          //["he2r","he4rr"],
          //["he3r","he4rr"],
          //["he1r","he4r"],
          //["he2r","he4r"],
          //["he3r","he4r"],

          //hinge
          {"beamDeform":9750,"beamStrength":27500},
          {"breakGroup":"headlight_R"},
          //r
          ["he1rr","f15r"],
          ["he1rr","f15rr"],
          ["he1rr","f14rr"],
          ["he1r","f15r"],
          ["he1r","f15rr"],
          ["he1r","f14rr"],

          ["he1rr","f13rr"],
          ["he1rr","f19rr"],
          ["he1r","f13rr"],
          ["he1r","f19rr"],

          //damp
          ["he2r","f13rr", {"beamSpring":0,"beamDamp":150}],
          ["he2rr","f19rr", {"beamSpring":0,"beamDamp":150}],
          {"breakGroup":""},

          //headlight support beams
          {"beamPrecompression":1,"beamType":"|SUPPORT","beamLongBound":4},
          {"beamSpring":1100550,"beamDamp":50},
          {"beamDeform":5400,"beamStrength":100000},
          //r
          {"optional":true},
          ["he1r","fb1r"],
          ["he1rr","fb1rr"],
          ["he1r","fb1"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "hydros": [
            ["id1:","id2:"],
            {"beamDeform":55500,"beamStrength":145000},
            {"beamSpring":50000,"beamDamp":1000},
            {"breakGroupType":1},
            {"breakGroup":"headlight_L"},
            {"deformGroup":"headlightglass_L_break"},
            ["f15r","he3r", {"inputSource":"lowhighbeam","inLimit":0,"outLimit":1.46,"inRate":1.5,"outRate":1.5,"inputFactor":1}],
            {"breakGroup":""},
            {"breakGroupType":0},
            {"deformGroup":""},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right headlight
            {"groundModel":"metal"},
            {"group":"kzn_ws6_headlight_R"},
            {"dragCoef":4},
            ["he1r","he1rr","he2rr"],
            ["he1r","he2rr","he2r"],
            {"group":""},
    ],
},
"kzn_ws6_headlight_L": {
    "information":{
        "authors":"ItzKaizen",
        "name":"Left Headlight",
        "value":150,
    },
    "slotType" : "kzn_ws6_headlight_L",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["kzn_ws6_headlight_L", ["kzn_ws6_headlight_L"]],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"kzn_ws6_headlightlens", "deformMaterialDamaged":"kzn_ws6_headlightlens_dmg"},
         ["kzn_ws6_headlight_glass_L", ["kzn_ws6_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound4", "deformVolume":0.5}],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightColor":{"r":255, "g":255, "b":160, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":true,
            "flareName":"vehicleHeadLightFlare",
            "cookieName":"art/special/BNG_light_cookie_headlight.dds",
            "texSize":512,
            "shadowSoftness":0.5
        },
        //low beams
        ["lowbeam"    , "SPOTLIGHT"        , "he3l", "he3ll", "he2l", {"x":192, "y":-20, "z":-14} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.5, "y":0.35, "z":0.05},"lightRange":50,"lightBrightness":0.4,"lightOuterAngle":75,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam" ,   "SPOTLIGHT"           , "he3l", "he3ll", "he2l", {"x":183, "y":0, "z":-12} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.5, "y":0.45, "z":0.0},"lightRange":80,"lightBrightness":0.7,"lightOuterAngle":90,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHTS--
         {"nodeWeight":0.95},
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         {"selfCollision":true},
         {"collision":true},
         {"group":"kzn_ws6_headlight_L"},
         ["he1ll", 0.75, -1.80, 0.78],
         ["he1l", 0.35, -1.95, 0.76],
         ["he2ll", 0.70, -2.05, 0.67],
         ["he2l", 0.30, -2.20, 0.65],

         {"selfCollision":false},
         ["he3ll", 0.60, -1.85, 0.54],
         ["he3l", 0.38, -1.91, 0.54],

         //["he4ll", 0.65, -1.74, 0.69],
         //["he4l", 0.42, -1.795, 0.69],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--HEADLIGHTS--
          {"beamType":"|NORMAL", "beamPrecompression":1, "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":1001000,"beamDamp":50},
          {"beamDeform":31950,"beamStrength":"FLT_MAX"},
          //main shape
          {"deformLimitExpansion":1.1},
          //l
          {"deformationTriggerRatio":0.01},
          {"deformGroup":"headlightglass_L_break"},
          ["he1ll","he1l"],
          ["he2ll","he2l"],
          ["he3ll","he3l"],
          //["he4ll","he4l"],
          ["he1ll","he2ll"],
          ["he1l","he2l"],
          ["he1ll","he3ll"],
          ["he1l","he3l"],
          ["he2ll","he3ll"],
          ["he2l","he3l"],

          //cross
          {"deformLimitExpansion":""},
          //l
          ["he1ll","he2l"],
          ["he1ll","he3l"],
          ["he2ll","he1l"],
          ["he2ll","he3l"],
          ["he3ll","he1l"],
          ["he3ll","he2l"],
          {"deformGroup":""},

          {"beamDeform":10950,"beamStrength":"FLT_MAX"},
          //attach to hinge nodes
          //l

          //["he1ll","he4ll"],
          //["he2ll","he4ll"],
          //["he3ll","he4ll"],
          //["he1ll","he4l"],
          //["he2ll","he4l"],
          //["he3ll","he4l"],
          //["he1l","he4ll"],
          //["he2l","he4ll"],
          //["he3l","he4ll"],
          //["he1l","he4l"],
          //["he2l","he4l"],
          //["he3l","he4l"],

          //hinge
          {"beamDeform":9750,"beamStrength":27500},
          {"breakGroup":"headlight_L"},
          //l
          ["he1ll","f15l"],
          ["he1ll","f15ll"],
          ["he1ll","f14ll"],
          ["he1l","f15l"],
          ["he1l","f15ll"],
          ["he1l","f14ll"],

          ["he1ll","f13ll"],
          ["he1ll","f19ll"],
          ["he1l","f13ll"],
          ["he1l","f19ll"],

          //damp
          ["he2l","f13ll", {"beamSpring":0,"beamDamp":150}],
          ["he2ll","f19ll", {"beamSpring":0,"beamDamp":150}],
          {"breakGroup":""},

          //headlight support beams
          {"beamPrecompression":1,"beamType":"|SUPPORT","beamLongBound":4},
          {"beamSpring":1100550,"beamDamp":50},
          {"beamDeform":5400,"beamStrength":100000},
          //l
          {"optional":true},
          ["he1l","fb1l"],
          ["he1ll","fb1ll"],
          ["he1l","fb1"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "hydros": [
            ["id1:","id2:"],
            {"beamDeform":55500,"beamStrength":145000},
            {"beamSpring":50000,"beamDamp":1000},
            {"breakGroupType":1},
            {"breakGroup":"headlight_L"},
            {"deformGroup":"headlightglass_L_break"},
            ["f15l","he3l", {"inputSource":"lowhighbeam","inLimit":0,"outLimit":1.46,"inRate":1.5,"outRate":1.5,"inputFactor":1}],
            {"breakGroup":""},
            {"breakGroupType":0},
            {"deformGroup":""},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"metal"},
            {"group":"kzn_ws6_headlight_L"},
            {"dragCoef":4},
            ["he1ll","he1l","he2ll"],
            ["he1l","he2l","he2ll"],
            {"group":""},
    ],
},
}