{
"BBModsAMV_grille": {
    "information":{
        "authors":"BBMods",
        "name":"Grille",
        "value":450,
    },
    "slotType" : "BBModsAMV_grille",
     "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["BBModsAMV_grille", ["BBModsAMV_grille"]],
         ["BBModsAMV_headlight_R", ["BBModsAMV_grille"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound3", "deformVolume":0.5}],
         ["BBModsAMV_headlight_L", ["BBModsAMV_grille"],[]{"deformSound":"event:>Destruction>Vehicle>Glass>glassbreaksound4", "deformVolume":0.5}],

         ["BBModsAMV_headlightglass_R", ["BBModsAMV_grille"]],
         ["BBModsAMV_headlightglass_L", ["BBModsAMV_grille"]],
		
         ["BBModsAMV_fogglass_R", ["BBModsAMV_grille"]],
         ["BBModsAMV_fogglass_L", ["BBModsAMV_grille"]],
         {"deformGroup":""},
     ],
     "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        {
            "lightInnerAngle":0,
            "lightOuterAngle":120,
            "lightColor":{"r":255, "g":255, "b":150, "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_filament" , "SPOTLIGHT",  "g2rr", "g2r", "g1rr", {"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.5, "y":0.0, "z":-0.0},"lightRange":50,"lightBrightness":0.25,"lightOuterAngle":95,"flareScale":0.06,"deformGroup":"headlightglass_R_break", "lightScaling":{}}],
        //high beams
        ["highbeam_filament", "SPOTLIGHT",  "g2rr", "g2r", "g1rr", {"x":-10, "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.0, "z":-0.0},"lightRange":80,"lightBrightness":0.58,"lightOuterAngle":80,"flareScale":0.09,"deformGroup":"headlightglass_R_break", "lightScaling":{}}],
    ],
        //low beams angled right slightly to avoid blinding oncoming traffic
        ["lowbeam"    , "SPOTLIGHT"        , "g2rr", "g2r", "g1rr", {"x":195, "y":15, "z":-5} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.20, "y":0.42, "z":-0.0},"lightRange":50,"lightBrightness":0.35,"lightOuterAngle":80,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        ["lowbeam"    , "SPOTLIGHT"        , "g2ll", "g2l", "g1ll", {"x":-15, "y":-15, "z":-11} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.20, "y":0.42, "z":0.0},"lightRange":50,"lightBrightness":0.35,"lightOuterAngle":80,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
        //high beams
        ["highbeam" ,         "SPOTLIGHT"        , "g2rr", "g2r", "g1rr", {"x":190, "y":35, "z":-5} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.55, "y":0.42, "z":-0.01},"lightRange":80,"lightBrightness":0.6,"lightOuterAngle":80,"flareScale":0.0,"deformGroup":"headlightglass_R_break"}],
        ["highbeam" ,         "SPOTLIGHT"        , "g2ll", "g2l", "g1ll", {"x":-10, "y":35, "z":5} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.55, "y":0.42, "z":0.01},"lightRange":80,"lightBrightness":0.6,"lightOuterAngle":80,"flareScale":0.0,"deformGroup":"headlightglass_L_break"}],
     ],
     "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"collision":true},
         {"nodeWeight":1.0},
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         //grille
         {"selfCollision":true},
         {"group":"BBModsAMV_grille"},
         ["g1rr",-0.533, -2.1852, 0.6644],
         ["g1r",-0.3438, -2.1967, 0.6726],
         ["g1", 0.0000, -2.2066, 0.671],
         ["g1l", 0.3438, -2.1967, 0.6726],
         ["g1ll", 0.533, -2.1852, 0.6644],

         ["g2rr",-0.5532, -2.1536, 0.4771],
         ["g2r",-0.3438, -2.1634, 0.4754],
         ["g2", 0.0000, -2.1716, 0.4639],
         ["g2l", 0.3438, -2.1634, 0.4754],
         ["g2ll", 0.5532, -2.1536, 0.4771],

         //rigidifying/headlight nodes
         ["g3r",-0.3804, -2.0403, 0.5875, {"collision":false,"selfCollision":false}],
         ["g3l", 0.3804, -2.0403, 0.5875, {"collision":false,"selfCollision":false}],
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"breakGroupType":0},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          {"beamDeform":21250,"beamStrength":148750},
          {"beamSpring":701000,"beamDamp":60},
          {"deformLimitExpansion":1.1},
          //main shape
          {"deformGroup":"headlightglass_R_break","deformationTriggerRatio":0.03},
          ["g1rr","g1r"],
          ["g2rr","g2r"],
          {"deformGroup":"headlightglass_L_break"},
          ["g1ll","g1l"],
          ["g2ll","g2l"],
          {"deformGroup":""},

          ["g1r","g1"],
          ["g2r","g2"],
          ["g1l","g1"],
          ["g2l","g2"],

          //vert
          {"beamDeform":21250,"beamStrength":"FLT_MAX"},
          {"deformGroup":"headlightglass_R_break"},
          ["g1rr","g2rr"],
          ["g1r","g2r"],
          {"deformGroup":"headlightglass_L_break"},
          ["g1ll","g2ll"],
          ["g1l","g2l"],
          {"deformGroup":""},

          ["g1","g2"],

          //surficial crossing
          {"deformLimitExpansion":""},
          {"beamDeform":11050,"beamStrength":148750},
          {"deformGroup":"headlightglass_R_break"},
          ["g1rr","g2r"],
          ["g1r","g2rr"],
          {"deformGroup":"headlightglass_L_break"},
          ["g1ll","g2l"],
          ["g1l","g2ll"],
          {"deformGroup":""},

          ["g1","g2r"],
          ["g1","g2l"],
          ["g2","g1r"],
          ["g2","g1l"],

          //rigids
          {"beamSpring":601000,"beamDamp":60},
          {"beamDeform":3750,"beamStrength":148750},
          ["g1rr","g1"],
          ["g1ll","g1"],
          ["g2rr","g1"],
          ["g2ll","g1"],
          ["g2r","g2l"],
          ["g1r","g1l"],

          //headlight rigidifier
          {"beamSpring":601000,"beamDamp":60},
          {"beamDeform":3100,"beamStrength":148750},
          {"deformGroup":"headlightglass_R_break"},
          ["g1rr","g3r"],
          ["g1r","g3r"],
          ["g1","g3r"],
          ["g2rr","g3r"],
          ["g2r","g3r"],
          ["g2","g3r"],
          {"deformGroup":"headlightglass_L_break"},
          ["g1ll","g3l"],
          ["g1l","g3l"],
          ["g1","g3l"],
          ["g2ll","g3l"],
          ["g2l","g3l"],
          ["g2","g3l"],
          {"deformGroup":""},

          ["g3r","g3l"],

          //attach
          {"disableTriangleBreaking":true},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          {"beamSpring":501000,"beamDamp":100},
          {"beamDeform":5500,"beamStrength":18700},
          {"breakGroup":"grille_a_R"},
          {"deformGroup":"headlightglass_R_break"},
          ["g1r","ra1"],
          ["g1r","ra1r"],
          ["g2r","ra1"],
          ["g2r","ra1r"],
          ["g1r","ra7l"],
          ["g1r","ra7r"],
          ["g3r","ra1r"],
          ["g1rr","ra3r"],
          ["g2rr","ra3r"],
          ["g1r","ra3r"],
          ["g2r","ra3r"],
          ["g3r","ra3r"],

          ["g2rr","ra3rr"],
          ["g2rr","ra1rr"],
          ["g1rr","ra3rr"],
          ["g1rr","ra1rr"],

          ["g1rr", "ra5r", {"beamSpring":0,"beamDamp":750}],
          ["g2rr", "ra7r", {"beamSpring":0,"beamDamp":750}],

          {"deformGroup":"headlightglass_L_break"},
          {"breakGroup":"grille_a_L"},
          ["g1l","ra1"],
          ["g1l","ra1l"],
          ["g2l","ra1"],
          ["g2l","ra1l"],
          ["g1l","ra7r"],
          ["g3l","ra1l"],
          ["g1ll","ra3l"],
          ["g2ll","ra3l"],
          ["g1l","ra3l"],
          ["g2l","ra3l"],
          ["g3l","ra3l"],

          ["g2ll","ra3ll"],
          ["g2ll","ra1ll"],
          ["g1ll","ra3ll"],
          ["g1ll","ra1ll"],

          ["g1ll", "ra5l", {"beamSpring":0,"beamDamp":750}],
          ["g2ll", "ra7l", {"beamSpring":0,"beamDamp":750}],
          {"deformGroup":""},

          //inter part triangle breaking triggers
          {"beamType":"|SUPPORT", "beamLongBound":4},
          {"beamSpring":0,"beamDamp":0},
          {"beamDeform":850,"beamStrength":850},
          {"breakGroup":"grille_radsupport"},
          ["g1rr","ra3rr"],
          ["g2rr","ra1rr"],
          ["g1ll","ra3ll"],
          ["g2ll","ra1ll"],
          {"breakGroup":""},
          {"disableTriangleBreaking":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            {"group":"BBModsAMV_grille"},
            {"dragCoef":4},
            ["g1rr","g2rr","g2r"],
            ["g1rr","g2r","g1r"],
            ["g1r","g2r","g2"],
            ["g1r","g2","g1"],
            ["g2ll","g1ll","g2l"],
            ["g1l","g2l","g1ll"],
            ["g2l","g1l","g2"],
            ["g1l","g1","g2"],

            //{"breakGroup":"grille_radsupport"},
            //["ra1rr", "g1rr", "g1r"],
            //["ra1rr", "g1r", "ra1r"],
            //["ra1r", "g1r", "ra1"],
            //["g1r", "g1", "ra1"],
            //["ra1rr", "ra3rr", "g1rr"],
            //["g1rr", "ra3rr", "g2rr"],
            //["g2rr", "ra3rr", "ra3r"],
            //["g2rr", "ra3r", "g2r"],
            //["g2r", "ra3r", "ra3"],
            //["g2r", "ra3", "g2"],
            //
            //["g1ll", "ra1ll", "g1l"],
            //["g1l", "ra1ll", "ra1l"],
            //["g1l", "ra1l", "ra1"],
            //["g1", "g1l", "ra1"],
            //["ra3ll", "ra1ll", "g1ll"],
            //["ra3ll", "g1ll", "g2ll"],
            //["ra3ll", "g2ll", "ra3l"],
            //["ra3l", "g2ll", "g2l"],
            //["ra3l", "g2l", "ra3"],
            //["ra3", "g2l", "g2"],
            //{"breakGroup":""},
            {"group":""},
    ],
},
}