{
"PGP_ramptruck_ramps_R": {
    "information":{
        "authors":"phillygriff",
        "name":"Ramps",
        "value":900,
    },
    "slotType" : "PGP_ramptruck_ramps",
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["PGP_ramptruck_ramp_R", ["pickup_load_ramps"],[],{"pos":{"x":0.0, "y":0.0, "z":0.0}}],
         ["PGP_ramptruck_ramp_L", ["pickup_load_ramps"],[],{"pos":{"x":-0.0, "y":0.0, "z":0.0}}],
		 ["PGP_ramp_hinge_L", ["pickup_load_ramps"],[],{"pos":{"x":-0.0, "y":0.0, "z":0.0}}],
		 ["PGP_ramp_hinge_R", ["pickup_load_ramps"],[],{"pos":{"x":-0.0, "y":0.0, "z":0.0}}],
		 ["PGP_rampbed_hinge_L", ["pickup_flatbed"],[],{"pos":{"x":-0.0, "y":0.0, "z":0.0}}],
		 ["PGP_rampbed_hinge_R", ["pickup_flatbed"],[],{"pos":{"x":-0.0, "y":0.0, "z":0.0}}],

    ],
    "controller": [
        ["fileName"],
        ["advancedCouplerControl", {"name":"RampCouplerL"}],
        ["advancedCouplerControl", {"name":"RampCouplerR"}],
    ]
    "RampCouplerL":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["ramp4l",  "ramp4ll",     200000,                     0.015,                  0.005,                      0.2,                 0.1,                   "ramplatch_L", {"forceCid1":"ramp4l", "forceCid2":"ramp2l"}]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["cf11l"]
        "attachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 70,
        "openForceDuration": 0.5,
        "closeForceMagnitude": 200,
        "closeForceDuration": 1.55
    }
    "RampCouplerR":{
        "couplerNodes":[
            ["cid1",    "cid2",     "autoCouplingStrength",    "autoCouplingRadius",   "autoCouplingLockRadius",   "autoCouplingSpeed", "couplingStartRadius",  "breakGroup"]
            ["ramp4r",  "ramp4rr",     200000,                     0.015,                  0.005,                      0.2,                 0.1,                   "ramplatch_R", {"forceCid1":"ramp4r", "forceCid2":"ramp2r"}]
        ]
        "groupType": "autoCoupling",
        "attachSoundVolume":1,
        "detachSoundVolume":1,
        "soundNode:":["cf11r"]
        "attachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_close",
        "detachSoundEvent": "event:>Vehicle>Latches>Special>tailgate_02_open",
        "breakSoundEvent":""
        "openForceMagnitude": 70,
        "openForceDuration": 0.5,
        "closeForceMagnitude": 190,
        "closeForceDuration": 1.15
    }
    "triggers":[
        ["id", "label", "idRef:", "idX:", "idY:", "type", "size", "baseRotation", "rotation", "translation", "baseTranslation"],
        ["RampL", "", "ramp2ll","ramp2l","ramp1ll", "box", {"x":0.04, "y":0.04, "z":0.12}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":-0.005, "y":0.0, "z":-0.022}, {"deformGroup":"pickup_load_ramps"}],
        ["RampR", "", "ramp2rr","ramp2r","ramp1rr", "box", {"x":0.04, "y":0.04, "z":0.12}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":-0.005, "y":0.0, "z":-0.018}, {"deformGroup":"pickup_load_ramps"}],
        ["Ramps", "", "cf21","cf21r","cf11", "box", {"x":0.18, "y":0.04, "z":0.06}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, {"x":-0.09, "y":-0.015, "z":-0.005}, {"deformGroup":"pickup_flatbed"}],
    ],
    "triggerEventLinks":[
        ["triggerId:triggers", "action", "targetEventId:events"],
        ["RampL", "action0", "RampLatchL"]
        ["RampR", "action0", "RampLatchR"]
        ["Ramps", "action0", "RampLatchL"]
        ["Ramps", "action0", "RampLatchR"]
    ],
    "events":[
        ["id", "title", "desc"],
        ["RampLatchL", "ui.inputActions.pickup.RampLatchL.title", "ui.inputActions.pickup.RampLatchL.description", {"onUp":"controller.getControllerSafe('RampCouplerL').toggleGroup()"}],
        ["RampLatchR", "ui.inputActions.pickup.RampLatchR.title", "ui.inputActions.pickup.RampLatchR.description", {"onUp":"controller.getControllerSafe('RampCouplerR').toggleGroup()"}],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"frictionCoef":0.5},
         {"collision":true},
         {"selfCollision":false},
         {"group":["pickup_load_ramps"]},
         {"deformgroup":["pickup_load_ramps"]},
         {"nodeMaterial":"|NM_METAL"},
         //{"nodeWeight":5.17},
         {"nodeWeight":2.5},
         ["ramp1l", 0.525, 5.725, 0.6093],
         ["ramp1r", -0.4947, 5.725, 0.6093],
         ["ramp1ll", 1.0395, 5.725, 0.6093],
         ["ramp1rr", -1.0015, 5.725, 0.6093],
         {"selfCollision":true},
         ["ramp2l", 0.525, 5.725, 1.3759],
         ["ramp2r", -0.4947, 5.725, 1.3759],
         ["ramp2ll", 1.0395, 5.725, 1.3759],
         ["ramp2rr", -1.0015, 5.725, 1.3759],
         ["ramp3l", 0.525, 5.725, 2.2225],
         ["ramp3r", -0.4947, 5.725, 2.2068],
         ["ramp3ll", 1.0395, 5.725, 2.2225],
         ["ramp3rr", -1.0015, 5.725, 2.2068],

         {"group":""},
         //rigidifier
         {"collision":false},
         {"selfCollision":false},
         ["ramp4l", 0.88, 5.255, 1.3759],
         ["ramp4r", -0.8035, 5.255, 1.3759],
         ["ramp4ll", 0.8785, 5.255, 1.3759],
         ["ramp4rr", -0.8004, 5.255, 1.3759],
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"beamSpring":3760940,"beamDamp":141},
          {"beamDeform":56000,"beamStrength":"FLT_MAX"},
          ["ramp1l","ramp1ll"],
          ["ramp2l","ramp2ll"],
          ["ramp3l","ramp3ll"],
          ["ramp1l","ramp2l"],
          ["ramp2l","ramp3l"],
          ["ramp1ll","ramp2ll"],
          ["ramp2ll","ramp3ll"],
          ["ramp1l","ramp2ll"],
          ["ramp2l","ramp1ll"],
          ["ramp2l","ramp3ll"],
          ["ramp3l","ramp2ll"],

          ["ramp1r","ramp1rr"],
          ["ramp2r","ramp2rr"],
          ["ramp3r","ramp3rr"],
          ["ramp1r","ramp2r"],
          ["ramp2r","ramp3r"],
          ["ramp1rr","ramp2rr"],
          ["ramp2rr","ramp3rr"],
          ["ramp1r","ramp2rr"],
          ["ramp2r","ramp1rr"],
          ["ramp2r","ramp3rr"],
          ["ramp3r","ramp2rr"],

          //rigidifier
          {"beamSpring":3290940,"beamDamp":141},
          {"beamDeform":214000,"beamStrength":"FLT_MAX"},
          ["ramp4l", "ramp1l"],
          ["ramp4l", "ramp1ll"],
          ["ramp4l", "ramp2l"],
          ["ramp4l", "ramp2ll"],
          ["ramp4l", "ramp3l"],
          ["ramp4l", "ramp3ll"],
          ["ramp4r", "ramp1r"],
          ["ramp4r", "ramp1rr"],
          ["ramp4r", "ramp2r"],
          ["ramp4r", "ramp2rr"],
          ["ramp4r", "ramp3r"],
          ["ramp4r", "ramp3rr"],
          //coupler
          ["ramp4ll", "cf11"],
          ["ramp4ll", "cf11ll"],
          ["ramp4ll", "cf12"],
          ["ramp4ll", "cf12ll"],
          ["ramp4ll", "cfrg2"],
          ["ramp4rr", "cf11"],
          ["ramp4rr", "cf11rr"],
          ["ramp4rr", "cf12"],
          ["ramp4rr", "cf12rr"],
          ["ramp4rr", "cfrg2"],

          //hinge attatch
          {"beamDeform":21400,"beamStrength":"125000"},
          ["ramp1l", "cf21l"],
          ["ramp1l", "cf1l"],
          ["ramp1l", "cf21ll"],
          ["ramp1l", "cf11l"],
          ["ramp1l", "cfrg2"],
          ["ramp1ll", "cf21l"],
          ["ramp1ll", "cf1l"],
          ["ramp1ll", "cf21ll"],
          ["ramp1ll", "cf11l"],
          ["ramp1ll", "cfrg2"],

          ["ramp1r", "cf21r"],
          ["ramp1r", "cf1r"],
          ["ramp1r", "cf21rr"],
          ["ramp1r", "cf11r"],
          ["ramp1r", "cfrg2"],
          ["ramp1rr", "cf21r"],
          ["ramp1rr", "cf1r"],
          ["ramp1rr", "cf21rr"],
          ["ramp1rr", "cf11r"],
          ["ramp1rr", "cfrg2"],

          //pop open
          {"optional":true},
          {"beamPrecompression":1.2,"beamType":"|SUPPORT","beamLongBound":20},
          {"beamSpring":154,"beamDamp":20},
          {"beamDeform":13500,"beamStrength":199360},
          ["cfrg2","ramp4l"{"breakGroup":"ramplatch_L"}],
          ["cfrg2","ramp4r"{"breakGroup":"ramplatch_R"}],
          //close limiters
          {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":10.0, "beamShortBound":0.01},
          {"beamSpring":154,"beamDamp":20},
          ["ramp4ll","ramp2l"],
          ["ramp4rr","ramp2r"],
          {"optional":false},
          {"disableTriangleBreaking":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
          {"deformLimitExpansion":1.2},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            //floor
            {"group":"pickup_load_ramps"},
            {"dragCoef":12},
            {"groundModel":"asphalt"},
            ["ramp1l","ramp1ll","ramp2ll"],
            ["ramp1l","ramp2ll","ramp2l"],
            ["ramp2l","ramp2ll","ramp3ll"],
            ["ramp2l","ramp3ll","ramp3l"],
            ["ramp1r","ramp2rr","ramp1rr"],
            ["ramp1r","ramp2r","ramp2rr"],
            ["ramp2r","ramp3rr","ramp2rr"],
            ["ramp2r","ramp3r","ramp3rr"],
            {"group":""},

    ],
},
}
