{
"BBModsAMV_door_R": {
    "information":{
        "authors":"BBMods",
        "name":"Right Door",
        "value":250,
    },
    "slotType" : "BBModsAMV_door_R",
    "slots": [
        ["type", "default", "description"],
        ["BBModsAMV_mirror_R","BBModsAMV_mirror_R", "Right Mirror"],
        ["BBModsAMV_doorpanel_R","BBModsAMV_doorpanel_R", "Right Door Panel"],
        ["BBModsAMV_doorglass_R","BBModsAMV_doorglass_R", "Right Door Glass"],
    ],
     "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         //body
         ["BBModsAMV_door_R", ["BBModsAMV_door_R"]],
         {"deformGroup":""},
     ],
     "controller": [
        ["fileName"],
        ["advancedCouplerControl", {"name":"doorRCoupler"}],
    ]
    "doorRCoupler":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["q7r",    "d14rr",      35000,                     0.01,                   0.005,                      0.2,                0.1,                    "doorR_latch"]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["d14rr"]
        "attachSoundEvent": "event:>Vehicle>Latches>Door>vintage_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Door>vintage_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 50,
        "openForceDuration": 0.5,
        "closeForceMagnitude": 80,
        "closeForceDuration": 1.5
    }
    "triggers":[
        ["id", "label", "idRef:", "idX:", "idY:", "type", "size", "baseRotation", "rotation", "translation", "baseTranslation"],
        ["door_R", "", "d9r","d8r","d6r", "box", {"x":0.16, "y":0.02, "z":0.04}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.035, "y":0.12, "z":0.06}],
        ["door_R_int", "", "d7r","d8r","d4r", "box", {"x":0.14, "y":0.015, "z":0.1}, {"x":-20, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.2, "y":-0.0, "z":0.07}],
    ],
    "triggerEventLinks":[
        ["triggerId:triggers", "action", "targetEventId:events"],
        ["door_R", "action0", "doorLatch_R"],
        ["door_R_int", "action0", "doorLatch_R"],
    ],
    "events":[
        ["id", "title", "desc"],
        ["doorLatch_R", "ui.inputActions.BBModsAMV.doorLatch_R.title", "ui.inputActions.BBModsAMV.doorLatch_R.description", {"onUp":"controller.getControllerSafe('doorRCoupler').toggleGroup()"}],
    ],
    "sounds": {
        "$+cabinFilterCoef": 0.04
    },
     "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--DOOR--
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         {"selfCollision":true},
         {"collision":true},
         {"group":"BBModsAMV_door_R"},
         {"nodeWeight":1.2},
         ["d1r", -0.8861,-0.3883, 0.3276],
         ["d2r", -0.8802, 0.08, 0.3276],
         ["d3r", -0.8705, 0.7569, 0.3403],

         ["d4r", -0.94,-0.4123, 0.58],
         ["d5r", -0.9393,0.08, 0.60, {"selfCollision":false}],
         ["d6r", -0.936,0.8257, 0.62],

         ["d7r", -0.8288,-0.3252, 0.919, {"nodeWeight":1.4}],
         ["d8r", -0.8348,0.08, 0.919, {"selfCollision":false}],
         ["d9r", -0.8158,0.8057, 0.9344],
         //--door glass is in glass jbeam--
         //rigidifier
         {"selfCollision":false},
         {"collision":false},
         {"nodeWeight":1.50},
         ["d14r", -0.72, 0.36, 0.60],
         ["d16r", -0.72, -0.3, 0.60],
         {"group":""},
         //latch node
         {"nodeWeight":0.5},
         ["d14rr", -0.925, 0.8357, 0.62],
    ],
    "beams": [
          ["id1:", "id2:"],
          //--DOOR--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          //door main shape
          {"beamSpring":1551000,"beamDamp":100},
          {"beamDeform":20400,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.1},
          ["d1r","d2r"],
          ["d2r","d3r"],
          ["d4r","d5r"],
          ["d5r","d6r"],
          ["d7r","d8r"],
          ["d8r","d9r"],

          ["d1r","d4r"],
          ["d2r","d5r"],
          ["d3r","d6r"],
          ["d4r","d7r"],
          ["d5r","d8r"],
          ["d6r","d9r"],

          //--door glass is in glass jbeam--

          //corner rigids
          {"deformLimitExpansion":""},
          {"beamDeform":2380,"beamStrength":"FLT_MAX"},
          ["d1r","d7r"],
          ["d2r","d8r"],
          ["d3r","d9r"],

          //lengthwise
          ["d1r","d3r"],
          ["d4r","d6r"],
          ["d7r","d9r"],
          ["d4r","d3r"],

          {"beamDeform":3400,"beamStrength":"FLT_MAX"},
          //surficial crossing
          ["d1r","d5r"],
          ["d2r","d4r"],
          ["d2r","d6r"],
          ["d3r","d5r"],
          ["d4r","d8r"],
          ["d5r","d7r"],
          ["d5r","d9r"],
          ["d6r","d8r"],

          //rigidifier
          {"beamSpring":351000,"beamDamp":100},
          {"deformGroup":"doorglass_R_break","deformationTriggerRatio":0.07},
          {"beamDeform":1530,"beamStrength":"FLT_MAX"},
          ["d1r","d14r"],
          ["d2r","d14r"],
          ["d3r","d14r"],
          ["d4r","d14r"],
          ["d5r","d14r"],
          ["d6r","d14r"],
          ["d7r","d14r"],
          ["d8r","d14r"],
          ["d9r","d14r"],
          ["d1r","d16r"],
          ["d2r","d16r"],
          ["d3r","d16r"],
          ["d4r","d16r"],
          ["d6r","d16r"],
          ["d7r","d16r"],
          ["d8r","d16r"],
          ["d9r","d16r"],
          {"deformGroup":""},

          //door support beams
          {"beamType":"|SUPPORT","beamLongBound":6},
          {"beamSpring":801000,"beamDamp":100},
          {"beamDeform":11900,"beamStrength":127500},
          {"disableTriangleBreaking":true},
          {"beamPrecompression":0.995},
          ["d9r","q2r"],
          ["d6r","q8r"],
          ["d3r","b5rr"],
          ["d6r","q1r"],
          ["d6r","b5rr"],
          ["d8r","b10r"],
          ["d7r","b11r"],
          ["d4r","b2r", {"beamPrecompression":0.95}],
          ["d4r","b11rrr", {"beamPrecompression":0.95}],
          {"optional":true}
          ["d10r","r1"],
          ["d11r","r3"],
          ["d11r","r2rr"],
          ["d10r","r2rr"],
          {"optional":false}
          {"beamPrecompression":1.0},

          //door hinge
          {"beamPrecompression":1.0,"beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          {"beamSpring":1601000,"beamDamp":80},
          {"beamDeform":29750,"beamStrength":42500},
          {"breakGroup":"doorhinge_a_R"},
          ["d1r","b11rr"],
          ["d7r","b11rr"],
          ["d1r","b10rr"],
          ["d7r","b10rr"],
          {"beamDeform":21250,"beamStrength":42500},
          {"breakGroup":"doorhinge_b_R"},
          ["d7r","b2rr"],
          ["d1r","b2rr"],
          ["d7r","b1rr"],
          ["d1r","b1rr"],

          {"beamDeform":2500,"beamStrength":"FLT_MAX"},
          {"beamSpring":201000,"beamDamp":50},
          ["d9r","d14rr"],
          ["d6r","d14rr"],
          ["d5r","d14rr"],
          ["d3r","d14rr"],
          ["d14r","d14rr"],

          //pop open
          {"beamPrecompression":1.0,"beamSpring":50000,"beamDamp":1320,"beamDeform":40000,"beamStrength":10000,"breakGroupType":1,"breakGroup":"doorhinge_a_R","beamType":"|SUPPORT", "beamLongBound":25},
          ["b4r", "d14rr"],
          //outer detent
          {"beamPrecompression":1.0,"beamLongBound":0.1,"beamShortBound":0.5,"beamSpring":900,"beamDamp":200,"beamStrength":8000,"boundZone":0.01,"beamLimitSpring":0,"beamLimitDamp":0,"beamType":"|BOUNDED"},
          ["d5r", "b3rr"],
          //inner detent
          {"beamPrecompression":2.5},
          ["d5r", "b3rr"],
          //limiter & damping
          {"beamLongBound":1,"beamLimitSpring":500000,"beamLimitDamp":500,"beamShortBound":1,"beamPrecompression":1,"beamSpring":0,"beamDamp":5,"beamDeform":3000,"beamStrength":10000,"boundZone":""},
          ["d5r", "b3rr"],
          {"beamLimitSpring":0,"beamLimitDamp":0,"beamType":"|NORMAL","beamLongBound":1,"breakGroup":"","breakGroupType":0},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            {"group":"BBModsAMV_door_R"},
            {"dragCoef":14},
            ["d9r","d6r","d5r"],
            ["d9r","d5r","d8r"],
            ["d8r","d5r","d4r"],
            ["d8r","d4r","d7r"],
            ["d6r","d3r","d2r"],
            ["d6r","d2r","d5r"],
            ["d5r","d2r","d1r"],
            ["d5r","d1r","d4r"],
            {"group":""},
    ],
},
"BBModsAMV_door_L": {
    "information":{
        "authors":"BBMods",
        "name":"Left Door",
        "value":250,
    },
    "slotType" : "BBModsAMV_door_L",
    "slots": [
        ["type", "default", "description"],
        ["BBModsAMV_mirror_L","BBModsAMV_mirror_L", "Left Mirror"],
        ["BBModsAMV_doorpanel_L","BBModsAMV_doorpanel_L", "Left Door Panel"],
        ["BBModsAMV_doorglass_L","BBModsAMV_doorglass_L", "Left Door Glass"],
    ],
     "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         //body
         ["BBModsAMV_door_L", ["BBModsAMV_door_L"]],
         {"deformGroup":""},
     ],
     "controller": [
        ["fileName"],
        ["advancedCouplerControl", {"name":"doorLCoupler"}],
    ]
    "doorLCoupler":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["q7l",    "d14ll",      35000,                     0.01,                   0.005,                      0.2,                0.1,                    "doorL_latch"]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["d14ll"]
        "attachSoundEvent": "event:>Vehicle>Latches>Door>vintage_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Door>vintage_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 50,
        "openForceDuration": 0.5,
        "closeForceMagnitude": 60,
        "closeForceDuration": 1.5
    }
    "triggers":[
        ["id", "label", "idRef:", "idX:", "idY:", "type", "size", "baseRotation", "rotation", "translation", "baseTranslation"],
        ["door_L", "", "d9l","d8l","d6l", "box", {"x":0.16, "y":0.02, "z":0.04}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.035, "y":0.12, "z":-0.06}],
        ["door_L_int", "", "d7l","d8l","d4l", "box", {"x":0.14, "y":0.015, "z":0.1}, {"x":20, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0.2, "y":-0.0, "z":-0.07}],
    ],
    "triggerEventLinks":[
        ["triggerId:triggers", "action", "targetEventId:events"],
        ["door_L", "action0", "doorLatch_L"],
        ["door_L_int", "action0", "doorLatch_L"],
    ],
    "events":[
        ["id", "title", "desc"],
        ["doorLatch_L", "ui.inputActions.BBModsAMV.doorLatch_L.title", "ui.inputActions.BBModsAMV.doorLatch_L.description", {"onUp":"controller.getControllerSafe('doorLCoupler').toggleGroup()"}],
    ],
    "sounds": {
        "$+cabinFilterCoef": 0.04
    },
     "nodes": [
         ["id", "posX", "posY", "posZ"],
         //--DOOR--
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         {"selfCollision":true},
         {"collision":true},
         {"group":"BBModsAMV_door_L"},
         {"nodeWeight":1.2},
         ["d1l", 0.8861,-0.3883, 0.3276],
         ["d2l", 0.8802, 0.08, 0.3276],
         ["d3l", 0.8705, 0.7569, 0.3403],

         ["d4l", 0.94,-0.4123, 0.58],
         ["d5l", 0.9393,0.08, 0.60, {"selfCollision":false}],
         ["d6l", 0.936,0.8257, 0.62],

         ["d7l", 0.8288,-0.3252, 0.919, {"nodeWeight":1.4}],
         ["d8l", 0.8348,0.08, 0.919, {"selfCollision":false}],
         ["d9l", 0.8158,0.8057, 0.9344],
         //--door glass is in glass jbeam--
         //rigidifier
         {"selfCollision":false},
         {"collision":false},
         {"nodeWeight":1.50},
         ["d14l", 0.72, 0.36, 0.60],
         ["d16l", 0.72, -0.3, 0.60],
         {"group":""},
         //latch node
         {"nodeWeight":0.5},
         ["d14ll", 0.925, 0.8357, 0.62],
    ],
    "beams": [
          ["id1:", "id2:"],
          //--DOOR--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          //door main shape
          {"beamSpring":1551000,"beamDamp":100},
          {"beamDeform":20400,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.1},
          ["d1l","d2l"],
          ["d2l","d3l"],
          ["d4l","d5l"],
          ["d5l","d6l"],
          ["d7l","d8l"],
          ["d8l","d9l"],

          ["d1l","d4l"],
          ["d2l","d5l"],
          ["d3l","d6l"],
          ["d4l","d7l"],
          ["d5l","d8l"],
          ["d6l","d9l"],

          //--door glass is in glass jbeam--

          //corner rigids
          {"deformLimitExpansion":""},
          {"beamDeform":2380,"beamStrength":"FLT_MAX"},
          ["d1l","d7l"],
          ["d2l","d8l"],
          ["d3l","d9l"],

          //lengthwise
          ["d1l","d3l"],
          ["d4l","d6l"],
          ["d7l","d9l"],
          ["d4l","d3l"],

          {"beamDeform":3400,"beamStrength":"FLT_MAX"},
          //surficial crossing
          ["d1l","d5l"],
          ["d2l","d4l"],
          ["d2l","d6l"],
          ["d3l","d5l"],
          ["d4l","d8l"],
          ["d5l","d7l"],
          ["d5l","d9l"],
          ["d6l","d8l"],

          //rigidifier
          {"beamSpring":351000,"beamDamp":100},
          {"deformGroup":"doorglass_L_break","deformationTriggerRatio":0.07},
          {"beamDeform":1530,"beamStrength":"FLT_MAX"},
          ["d1l","d14l"],
          ["d2l","d14l"],
          ["d3l","d14l"],
          ["d4l","d14l"],
          ["d5l","d14l"],
          ["d6l","d14l"],
          ["d7l","d14l"],
          ["d8l","d14l"],
          ["d9l","d14l"],
          ["d1l","d16l"],
          ["d2l","d16l"],
          ["d3l","d16l"],
          ["d4l","d16l"],
          ["d6l","d16l"],
          ["d7l","d16l"],
          ["d8l","d16l"],
          ["d9l","d16l"],
          {"deformGroup":""},

          //door support beams
          {"beamType":"|SUPPORT","beamLongBound":6},
          {"beamSpring":801000,"beamDamp":100},
          {"beamDeform":11900,"beamStrength":127500},
          {"disableTriangleBreaking":true},
          {"beamPrecompression":1.0},
          ["d9l","q2l"],
          ["d6l","q8l"],
          ["d3l","b5ll"],
          ["d6l","q1l"],
          ["d6l","b5ll"],
          ["d8l","b10l"],
          ["d7l","b11l"],
          ["d4l","b2l", {"beamPrecompression":0.9}],
          ["d4l","b11lll", {"beamPrecompression":1.0}],
          {"optional":true}
          ["d10l","r1"],
          ["d11l","r3"],
          ["d11l","r2ll"],
          ["d10l","r2ll"],
          {"optional":false}
          {"beamPrecompression":1.0},

          //door hinge
          {"beamPrecompression":1.0,"beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          {"beamSpring":1601000,"beamDamp":80},
          {"beamDeform":29750,"beamStrength":42500},
          {"breakGroup":"doorhinge_a_L"},
          ["d1l","b11ll"],
          ["d7l","b11ll"],
          ["d1l","b10ll"],
          ["d7l","b10ll"],
          {"beamDeform":21250,"beamStrength":42500},
          {"breakGroup":"doorhinge_b_L"},
          ["d7l","b2ll"],
          ["d1l","b2ll"],
          ["d7l","b1ll"],
          ["d1l","b1ll"],

          {"beamDeform":2500,"beamStrength":"FLT_MAX"},
          {"beamSpring":201000,"beamDamp":50},
          ["d9l","d14ll"],
          ["d6l","d14ll"],
          ["d5l","d14ll"],
          ["d3l","d14ll"],
          ["d14l","d14ll"],

          //pop open
          {"beamPrecompression":1.0,"beamSpring":50000,"beamDamp":1320,"beamDeform":40000,"beamStrength":10000,"breakGroupType":1,"breakGroup":"doorhinge_a_L","beamType":"|SUPPORT", "beamLongBound":25},
          ["b4l", "d14ll"],
          //outer detent
          {"beamPrecompression":1.0,"beamLongBound":0.1,"beamShortBound":0.5,"beamSpring":900,"beamDamp":200,"beamStrength":8000,"boundZone":0.01,"beamLimitSpring":0,"beamLimitDamp":0,"beamType":"|BOUNDED"},
          ["d5l", "b3ll"],
          //inner detent
          {"beamPrecompression":2.5}, 
          ["d5l", "b3ll"],
          //limiter & damping
          {"beamLongBound":1,"beamLimitSpring":500000,"beamLimitDamp":500,"beamShortBound":1,"beamPrecompression":1,"beamSpring":0,"beamDamp":5,"beamDeform":3000,"beamStrength":10000,"boundZone":""},
          ["d5l", "b3ll"],
          {"beamLimitSpring":0,"beamLimitDamp":0,"beamType":"|NORMAL","beamLongBound":1,"breakGroup":"","breakGroupType":0},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            {"group":"BBModsAMV_door_L"},
            {"dragCoef":14},
            ["d6l","d9l","d5l"],
            ["d5l","d9l","d8l"],
            ["d5l","d8l","d4l"],
            ["d4l","d8l","d7l"],
            ["d3l","d6l","d2l"],
            ["d2l","d6l","d5l"],
            ["d2l","d5l","d1l"],
            ["d1l","d5l","d4l"],
            {"group":""},
    ],
},
}