{
"rs11_headlight_R": {
    "information":{
        "authors":"Kenemation Mods",
        "name":"Xenon Right Headlight",
        "value":350,
    },
    "slotType" : "rs11_headlight_R",
    "slots": [
        ["type", "default", "description"],
        ["rs11_headlightpanel_R","rs11_headlightpanel_R", "Right Headlight Access Panel"],
    ],
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["rs11_headlightframe_R", ["rs11_headlight_R"]],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"rs11_glass", "deformMaterialDamaged":"invis"},
         ["rs11_headlightglass_R", ["rs11_headlight_R"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound3", "deformVolume":0.4}],
         {"deformGroup":""},
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"rs11_lights", "deformMaterialDamaged":""},
         ["rs11_headlight_R", ["rs11_headlight_R"]],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":70,
            "lightOuterAngle":80,
            "lightColor":{"r":235, "g":245, "b":245, "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
        ["lowhighbeam"    , "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":195, "y":-30, "z":45} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.043, "y":0.633, "z":0.085},"lightRange":50,"lightBrightness":0.7,"flareScale":0.0,"lightOuterAngle":80,"deformGroup":"headlightglass_R_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4r", "he3r", "he2r", {"x":202, "y":-26, "z":40} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.35, "y":0.48, "z":0.095},"lightRange":80,"lightBrightness":0.8,"flareScale":0.0,"lightOuterAngle":80,"deformGroup":"headlightglass_R_break"}],
        //signal
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_R"    , "SPOTLIGHT"        , "he3r", "he4r", "he1r", {"x":-20, "y":0, "z":-30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.1, "y":0.2, "z":-0.04},"flareScale":0.0,"lightBrightness":0.03,"deformGroup":"headlightglass_R_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //right
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.6},
         {"group":"rs11_headlight_R"},
         ["he1r",-0.5088, -2.2219, 0.7248],
         ["he3r",-0.4986, -2.2611, 0.6285],
         ["he2r",-0.7936, -1.9443, 0.7693],
         ["he4r",-0.7936, -1.9843, 0.6594],
         //{"selfCollision":false}
         ["he5r",-0.6105, -1.8643, 0.7033],
         {"group":""},
    ],

    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          //--HEADLIGHT--
          {"beamSpring":1001000,"beamDamp":60},
          {"beamDeform":12000,"beamStrength":62000},
          //headlight main shape
          {"deformGroup":"headlightglass_R_break", "deformationTriggerRatio":0.05},
          //r
          {"deformLimitExpansion":1.1},
          ["he1r","he2r"],
          ["he3r","he4r"],
          ["he1r","he3r"],
          ["he2r","he4r"],

          ["he1r","he4r"],
          ["he2r","he3r"],

          ["he1r","he5r"],
          ["he2r","he5r"],
          ["he3r","he5r"],
          ["he4r","he5r"],

          //attach
          {"beamSpring":301000,"beamDamp":60},
          {"beamDeform":3000,"beamStrength":24000},
          //r
          {"deformLimitExpansion":""},
          {"breakGroup":"headlight_R"},
          ["he5r","f15rr"],
          ["he5r","f15r"],
          ["he2r","f15rr"],
          ["he2r","f15r"],
          ["he4r","f15rr"],

          {"beamDeform":3000,"beamStrength":24000},
          {"breakGroup":"headlight_R"},
          ["he1r","f15r"],
          ["he1r","f15rr"],
          ["he3r","f15r"],
          ["he3r","f13rr"],
          //["he1r","f13rr"],

          {"beamDeform":1500,"beamStrength":46000},
          ["he2r","f18r"],
          ["he4r","f18r"],
          ["he3r","f11rr"],
          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":9},
          {"beamSpring":601000,"beamDamp":90},
          {"beamDeform":13000,"beamStrength":330000},
          {"optional":true},
          ["he2r","h4"],
          ["he3r","h4r"],
          ["he5r","h4rr"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //right headlight
            {"groundModel":"plastic"},
            {"group":"rs11_headlight_R"},
            {"dragCoef":5},
            ["he3r","he1r","he4r"],
            ["he4r","he1r","he2r"],

            {"triangleType":"NONCOLLIDABLE"},
            ["he4r","he2r","he5r"],
            ["he1r","he5r","he2r"],
            ["he3r","he5r","he1r"],
            ["he4r","he5r","he3r"],
            {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
"rs11_headlight_L": {
    "information":{
        "authors":"Kenemation Mods",
        "name":"Xenon Left Headlight",
        "value":350,
    },
    "slotType" : "rs11_headlight_L",
    "slots": [
        ["type", "default", "description"],
        ["rs11_headlightpanel_L","rs11_headlightpanel_L", "Left Headlight Access Panel"],
    ],
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["rs11_headlightframe_L", ["rs11_headlight_L"]],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"rs11_glass", "deformMaterialDamaged":"invis"},
         ["rs11_headlightglass_L", ["rs11_headlight_L"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>extglassbreaksound4", "deformVolume":0.6}],
         {"deformGroup":""},
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"rs11_lights", "deformMaterialDamaged":""},
         ["rs11_headlight_L", ["rs11_headlight_L"]],
         {"deformGroup":""},
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":70,
            "lightOuterAngle":80,
            "lightColor":{"r":235, "g":245, "b":245, "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 angled right slightly to avoid blinding oncoming traffic
        ["lowhighbeam"    , "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-48, "y":24, "z":-37} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":-0.043, "y":0.633, "z":-0.085},"lightRange":50,"lightBrightness":0.7,"flareScale":0.0,"lightOuterAngle":80,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "he4l", "he3l", "he2l", {"x":-40, "y":24, "z":-37} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.35, "y":0.48, "z":-0.095},"lightRange":80,"lightBrightness":0.8,"flareScale":0.0,"lightOuterAngle":80,"deformGroup":"headlightglass_L_break"}],
        //signal
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightRange":8,
            "lightColor":{"r":255, "g":255, "b":0, "a":255},
            "lightAttenuation":{"x":0, "y":1, "z":1},
            "lightCastShadows":false,
            "flareName":"vehicleBrakeLightFlare",
        },
        ["signal_L"    , "SPOTLIGHT"        , "he3l", "he4l", "he1l", {"x":200, "y":0, "z":30} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.1, "y":0.2, "z":0.04},"flareScale":0.0,"lightBrightness":0.03,"deformGroup":"headlightglass_L_break"}],
     ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--HEADLIGHT--
         //left
         {"selfCollision":true},
         {"collision":true},
         {"nodeMaterial":"|NM_PLASTIC"},
         {"frictionCoef":0.5},
         {"nodeWeight":0.6},
         {"group":"rs11_headlight_L"},
         ["he1l", 0.5087, -2.2219, 0.7248],
         ["he3l", 0.4985, -2.2611, 0.6285],
         ["he2l", 0.7936, -1.9443, 0.7693],
         ["he4l", 0.7936, -1.9843, 0.6594],
         //{"selfCollision":false}
         ["he5l", 0.6104, -1.8643, 0.7033],
         {"group":""},

    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          //--HEADLIGHT--
          {"beamSpring":1001000,"beamDamp":60},
          {"beamDeform":12000,"beamStrength":128000},
          //headlight main shape
          {"deformGroup":"headlightglass_L_break", "deformationTriggerRatio":0.05},
          //l
          {"deformLimitExpansion":1.1},
          ["he1l","he2l"],
          ["he3l","he4l"],
          ["he1l","he3l"],
          ["he2l","he4l"],

          ["he1l","he4l"],
          ["he2l","he3l"],

          ["he1l","he5l"],
          ["he2l","he5l"],
          ["he3l","he5l"],
          ["he4l","he5l"],
          //attach
          {"deformLimitExpansion":""},
          {"beamSpring":301000,"beamDamp":60},
          {"beamDeform":3000,"beamStrength":28000},
          //l
          {"breakGroup":"headlight_L"},
          ["he5l","f15ll"],
          ["he5l","f15l"],
          ["he2l","f15ll"],
          ["he2l","f15l"],
          ["he4l","f15ll"],

          {"beamDeform":3000,"beamStrength":28000},
          {"breakGroup":"headlight_L"},
          ["he1l","f15ll"],
          ["he1l","f15l"],
          ["he3l","f15l"],
          ["he3l","f13ll"],
          //["he1l","f13ll"],

          {"beamDeform":1500,"beamStrength":46000},
          ["he2l","f18l"],
          ["he4l","f18l"],
          ["he3l","f11ll"],
          {"breakGroup":""},
          {"deformGroup":""},

          //headlight support beams
          {"beamType":"|SUPPORT", "beamLongBound":9},
          {"beamSpring":601000,"beamDamp":90},
          {"beamDeform":13000,"beamStrength":330000},
          {"optional":true},
          ["he2l","h4"],
          ["he3l","h4l"],
          ["he5l","h4ll"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //left headlight
            {"groundModel":"plastic"},
            {"group":"rs11_headlight_L"},
            {"dragCoef":5},
            ["he1l","he3l","he4l"],
            ["he1l","he4l","he2l"],
            {"triangleType":"NONCOLLIDABLE"},
            ["he2l","he4l","he5l"],
            ["he5l","he1l","he2l"],
            ["he5l","he3l","he1l"],
            ["he5l","he4l","he3l"],
            {"triangleType":"NORMALTYPE"},
            {"group":""},
    ],
},
"rs11_headlightpanel_R": {
    "information":{
        "authors":"Kenemation Mods",
        "name":"Right Headlight Access Panel",
        "value":20,
    },
    "slotType" : "rs11_headlightpanel_R",
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"headlightglass_R_break", "deformMaterialBase":"rs11_common_acc", "deformMaterialDamaged":"invis"},
         ["rs11_enginebay_cladding_R", ["rs11_body"]],
         {"deformGroup":""},
    ],
    "nodes": [
        ["id", "posX", "posY", "posZ"],
        {"nodeMaterial":"|NM_PLASTIC"},
        {"frictionCoef":0.5},
        {"collision":true},
        {"selfCollision":true},
        {"nodeWeight":1.6},
        {"group":"rs11_headlight_R"},
        ["he5r", -0.60, -1.76, 0.72],
    ],
},
"rs11_headlightpanel_L": {
    "information":{
        "authors":"Kenemation Mods",
        "name":"Left Headlight Access Panel",
        "value":20,
    },
    "slotType" : "rs11_headlightpanel_L",
    "flexbodies": [
        ["mesh", "[group]:", "nonFlexMaterials"],
         {"deformGroup":"headlightglass_L_break", "deformMaterialBase":"rs11_common_acc", "deformMaterialDamaged":"invis"},
         ["rs11_enginebay_cladding_L", ["rs11_body"]],
         {"deformGroup":""},
    ],
    "nodes": [
        ["id", "posX", "posY", "posZ"],
        {"nodeMaterial":"|NM_PLASTIC"},
        {"frictionCoef":0.5},
        {"collision":true},
        {"selfCollision":true},
        {"nodeWeight":1.6},
        {"group":"rs11_headlight_L"},
        ["he5l", 0.60, -1.76, 0.72],
    ],
},
}
