{
"Zil130_engine_V8_biturbo": {
    "information":{
        "authors":"Bagusik",
        "name":"S63 4.4i biturbo",
        "value":11000,
    },
    "slotType" : "Zil130_engine",
    "slots": [
        ["type", "default", "description"],
        //engine
        ["Zil130_enginemounts","Zil130_enginemounts", "Engine Mounts", {"coreSlot":true}],
        ["Zil130_oilpan_i6","Zil130_oilpan_i6", "Oil Pan", {"coreSlot":true}],
        ["Zil130_intake_i6","Zil130_intake_i6", "Intake", {"coreSlot":true}],
        ["Zil130_engine_i6_internals","Zil130_engine_i6_internals", "Engine Long Block", {"coreSlot":true}],
        ["Zil130_exhaust_bmw","Zil130_exhaust_bmw", "Exhaust"],
        ["n2o_system","", "Nitrous Oxide System"],
        ["Zil130_transmission","Zil130_transmission_12M", "Transmission"],
    ],
    "powertrain": [
        ["type", "name", "inputName", "inputIndex"],
        ["combustionEngine", "mainEngine", "dummy", 0],
    ],
    "mainEngine": {
        "torque":[
            ["rpm", "torque"],
            [0, 0],
            [350, 165],
            [700, 295],
            [1000, 386],
            [2000, 405],
            [2500, 465],
            [3000, 500],
            [4000, 497],
            [4500, 490],
            [5000, 450],
            [6000, 273],
            [7000, 130],
            [7500, 110],
        ],

        //engine performance
        "idleRPM":750,
        //max physically capable
        "maxRPM":20000,
        "inertia":0.20,
        "friction":19,
        "dynamicFriction":0.035,
        "engineBrakeTorque":52,
        //"burnEfficiency":0.32,
        "burnEfficiency":[
            [0, 0.1],
            [0.05, 0.21],
            [0.4, 0.33],
            [0.7, 0.36],
            [1, 0.24],
        ],
        //fuel system
        "energyStorage": "mainTank",
        "requiredEnergyType":"gasoline",

        //exhaust
        "instantAfterFireSound": "event:>Vehicle>Afterfire>i6_01>single",
        "sustainedAfterFireSound": "event:>Vehicle>Afterfire>i6_01>multi",
        "shiftAfterFireSound": "event:>Vehicle>Afterfire>i6_01>shift",
        "particulates":0.015,
        "afterFireAudibleThresholdInstant": 500000,
        "instantAfterFireCoef": 0.5,
        "instantAfterFireVolumeCoef": 0.8,
        "afterFireAudibleThresholdShift": 150000,
        "shiftAfterFireVolumeCoef": 0.7,
        "afterFireAudibleThresholdSustained": 40000,
        "sustainedAfterFireCoef": 1.0,
        "sustainedAfterFireTime": 0.6,
        "sustainedAfterFireVolumeCoef": 0.2,

        //cooling and oil system
        "thermalsEnabled":true,
        "engineBlockMaterial":"aluminum",
        "oilVolume":6,
        "engineBlockAirCoolingEfficiency":31,

        //engine durability
        "torqueReactionNodes:":["e3r","e4r","e2l"],
        "cylinderWallTemperatureDamageThreshold":150,
        "headGasketDamageThreshold":1500000,
        "pistonRingDamageThreshold":1500000,
        "connectingRodDamageThreshold":2000000,
        "maxTorqueRating": 630,
        "maxOverTorqueDamage": 300,

        //node beam interface
        "waterDamage": {"[engineGroup]:":["engine_intake"]},
        "radiator": {"[engineGroup]:":["radiator"]},
        "engineBlock": {"[engineGroup]:":["engine_block"]},
        "breakTriggerBeam":"engine",
        "uiName":"Engine",
        "soundConfig": "soundConfig",
        "soundConfigExhaust": "soundConfigExhaust",

        //starter motor
        "starterSample":"event:>Engine>Starter>i6_2007_eng",
        "starterSampleExhaust":"event:>Engine>Starter>i6_2007_exh",
        "shutOffSampleEngine":"event:>Engine>Shutoff>i6_2007_eng",
        "shutOffSampleExhaust":"event:>Engine>Shutoff>i6_2007_exh",
        "starterVolume":0.76,
        "starterVolumeExhaust":0.76,
        "shutOffVolumeEngine":0.76,
        "shutOffVolumeExhaust":0.76,
        "idleRPMStartRate":0.7,
        "idleRPMStartCoef":1.8,

        //engine deform groups
        "deformGroups":["mainEngine", "mainEngine_intake", "mainEngine_accessories"]
    },
    "soundConfig": {
        "sampleName": "V8_flat_2_engine",
        "intakeMuffling": 1,

        "mainGain": -2,
        "onLoadGain":1,
        "offLoadGain":0.33,

        "maxLoadMix": 0.7,
        "minLoadMix": 0,

        "eqLowGain": -6,
        "eqLowFreq": 250,
        "eqLowWidth": 0.3,

        "eqHighGain": -15,
        "eqHighFreq": 1500,
        "eqHighWidth": 0.15,

        "lowShelfGain":-2,
        "lowShelfFreq":150,

        "highShelfGain":3,
        "highShelfFreq":6000,

        "fundamentalFrequencyCylinderCount":8,
        "eqFundamentalGain": -6,
    },
    "soundConfigExhaust": {
        "sampleName": "V8_flat_2_exhaust",

        "mainGain": 0,
        "onLoadGain":1.0,
        "offLoadGain":0.01,

        "maxLoadMix": 0.8,
        "minLoadMix": 0.

        "eqLowGain": -2,
        "eqLowFreq": 350,
        "eqLowWidth": 0.2,

        "eqHighGain": -5,
        "eqHighFreq": 1200,
        "eqHighWidth": 0.2,

        "lowShelfGain":-2,
        "lowShelfFreq":150,

        "highShelfGain":10,
        "highShelfFreq":2500,

        "fundamentalFrequencyCylinderCount":8,
        "eqFundamentalGain": -2,
    },
    "vehicleController": {
        "clutchLaunchStartRPM":1500,
        "clutchLaunchTargetRPM":2000,
        //**highShiftDown can be overwritten by automatic transmissions**
        "highShiftDownRPM":[0,0,0,2800,3800,4300,4700,4700],
        //**highShiftUp can be overwritten by intake modifications**
        "highShiftUpRPM":6800,
    },
    "flexbodies": [
         ["mesh", "[group]:", "nonFlexMaterials"],
         ["Zil130_engine_V8", ["Zil130_engine"]],
         ["Zil130_engine_details", ["Zil130_daycab_cowl"]],
         ["Zil130_engine_V8_boshka", ["Zil130_engine"]],
         {"deformGroup":"radhose", "deformMaterialBase":"Zil130", "deformMaterialDamaged":"invis"},
         ["Zil130_radtube_Rd", ["Zil130_engine","Zil130_radiator","Zil130_radtube_R"]],
         ["Zil130_radtube_Ld", ["Zil130_engine","Zil130_radiator","Zil130_radtube_L"]],
         {"deformGroup":""},
         ["Zil130_airfilter_ypipe", ["Zil130_airfilter_ypipe","Zil130_daycab_cowl","Zil130_engine_intake"]],
    ],
    "props": [
        ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"],
        ["radiatorFanSpin"  , "Zil130_bmw_cooling", "en2r","en2l","en4r",  {"x":0, "y":0, "z":0}, {"x":0, "y":1, "z":0}    , {"x":0, "y":0, "z":0}, -360, 360, 0, 1],
    ],
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"selfCollision":true},
         {"collision":true},
         //--ENGINE CUBE--
         {"nodeWeight":142.8},
         {"frictionCoef":0.5},
         {"nodeMaterial":"|NM_METAL"},
         {"group":"Zil130_engine"},
         {"engineGroup":"Zil130_engine_block"},
         ["en1r", -0.24000, -3.85440, 0.65000,{"isExhaust":"mainEngine","chemEnergy":1000,"burnRate":0.39,"flashPoint":700,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":600,"baseTemp":"thermals","conductionRadius":0.21}],
         ["en1l", 0.24000, -3.85440, 0.65000],
         {"engineGroup":["Zil130_engine_block","Zil130_exhaust_manifold"]},
         ["en2r", -0.24000, -2.97173, 0.52951,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":700,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":600,"baseTemp":"thermals","conductionRadius":0.21}],
         {"engineGroup":"Zil130_engine_block"},
         ["en2l", 0.24000, -2.97173, 0.52951],
         ["en3r", -0.24000, -3.85440, 1.52000,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":700,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":600,"baseTemp":"thermals","conductionRadius":0.21}],
         ["en3l", 0.24000, -3.85440, 1.52000],
         ["en4r", -0.24000, -2.97173, 1.52000,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":700,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":600,"baseTemp":"thermals","conductionRadius":0.21}],
         ["en4l", 0.24000, -2.97173, 1.52000],
         ["enf", 0.00000, -3.92440, 1.33000],
         {"engineGroup":""},
         {"group":"Zil130_airfilter_ypipe"},
         {"nodeWeight":5.1},
         ["afyp", -0.15500, -3.20173, 1.70000],
         {"selfCollision":true},
         {"collision":true},
         {"engineGroup":"Zil130_engine_intake"},
         {"group":"Zil130_radtube_R"},
         ["en5r", -0.45000, -3.36440, 1.40000,{"chemEnergy":200,"burnRate":0.3,"flashPoint":200,"specHeat":0.1,"smokePoint":150,"selfIgnitionCoef":false}],
         {"group":"Zil130_radtube_L"},
         {"engineGroup":"Zil130_engine_block"},
         ["en5l", 0.30000, -3.52440, 1.30000],
         {"engineGroup":""},
         {"selfCollision":true},
         {"collision":true},
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          //--ENGINE CUBE--
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          {"beamSpring":32000800,"beamDamp":1600},
          {"beamDeform":1500000,"beamStrength":"FLT_MAX"},
          ["en1r","en1l"],
          ["en1r","en2r", {"isExhaust":"mainEngine"}],
          ["en1r","en2l"],
          ["en1r","en3r"],
          ["en1r","en3l"],
          ["en1r","en4r"],
          ["en1r","en4l"],
          ["en1l","en2r"],
          ["en1l","en2l"],
          ["en1l","en3r"],
          ["en1l","en3l"],
          ["en1l","en4r"],
          ["en1l","en4l"],
          ["en2r","en2l"],
          ["en2r","en3r"],
          ["en2r","en3l"],
          ["en2r","en4r"],
          ["en2r","en4l"],
          ["en2l","en3r"],
          ["en2l","en3l"],
          ["en2l","en4r"],
          ["en2l","en4l"],
          ["en3r","en3l"],
          ["en3r","en4r"],
          ["en3r","en4l"],
          ["en3l","en4r"],
          ["en3l","en4l"],
          ["en4r","en4l"],
          ["enf","en4l"],
          ["enf","en4r"],
          ["enf","en3l"],
          ["enf","en3r"],
          ["enf","en1l"],
          ["enf","en1r"],
          {"beamDeform":25000,"beamStrength":"FLT_MAX"},
          {"beamSpring":320800,"beamDamp":400},
          //air filter piping attach
          {"optional":true},
          ["afyp","dc1rr"],
          ["afyp","dc1ll"],
          ["afyp","dc3rr"],
          ["afyp","dc3ll"],
          {"beamDeform":10000,"beamStrength":20000},
          {"beamSpring":200800,"beamDamp":400},
          {"breakGroup":"engine_intake"},
          //air filter piping break
          ["afyp","en4l"],
          ["afyp","en4r"],
          ["afyp","en3l"],
          ["afyp","en3r"],
          //duplicates to help mesh break
          ["afyp","dc1rr"],
          ["afyp","dc1ll"],
          ["afyp","dc3rr"],
          ["afyp","dc3ll"],
          {"breakGroup":""},
          {"optional":false},
          //rad pipe node
          {"beamSpring":3200800,"beamDamp":160},
          {"beamDeform":35000,"beamStrength":45000},
          //right
          ["en3r","en5r"],
          ["en4r","en5r"],
          ["en1r","en5r"],
          ["en2r","en5r"],
          //left
          ["en3l","en5l"],
          ["en4l","en5l"],
          ["en1l","en5l"],
          ["en2l","en5l"],
          {"breakGroup":""},
          {"beamSpring":240800,"beamDamp":800},
          {"beamDeform":10000,"beamStrength":30000},
          //rad pipe to engine break
          {"optional":true},
          {"breakGroup":"radtube_R"},
          ["rdt1r","en5r"],
          ["rdt1r","en3r"],
          ["rdt1r","en4r"],
          {"breakGroup":"radtube_L"},
          ["rdt1l","en5l"],
          ["rdt1l","en3l"],
          ["rdt1l","en4l"],
          ["rad2l","en5l"],
          {"breakGroup":""},
          {"beamSpring":2501000,"beamDamp":1500},
          {"beamDeform":80000,"beamStrength":295000},
          //engine mounts
          ["en1r","f2r"],
          ["en1l","f2l"],
          ["en1r","f12r"],
          ["en1l","f12l"],

          ["en1r","f3r"],
          ["en1l","f3l"],
          ["en1r","f13r"],
          ["en1l","f13l"],

          ["en1r","f3r"],
          ["en1l","f3l"],
          ["en1r","f13r"],
          ["en1l","f13l"],

          ["en2r","f3r"],
          ["en2l","f3l"],
          ["en2r","f13r"],
          ["en2l","f13l"],

          {"beamSpring":4001000,"beamDamp":1500},
          ["en2r","f4r"],
          ["en2l","f4l"],
          ["en2r","f14r", {"name":"engine","beamStrength":231000,"disableMeshBreaking":true,"disableTriangleBreaking":true}],
          ["en2l","f14l", {"name":"engine","beamStrength":231000,"disableMeshBreaking":true,"disableTriangleBreaking":true}],
          //support beams for anti clipping
          {"beamType":"|SUPPORT", "beamLongBound":5},
          {"beamSpring":8000800,"beamDamp":800},
          {"beamDeform":250000,"beamStrength":850000},
          {"beamPrecompression":0.8},
          ["en1r","f12r"],
          ["en1l","f12l"],
          ["en1r","f2r"],
          ["en1l","f2l"],
          {"beamSpring":1600800,"beamDamp":160},
          ["en1r","dc5rr"],
          ["en1l","dc5ll"],
          ["en2r","dc10rr"],
          ["en2l","dc10ll"],
          {"optional":false},
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
    ],
    "triangles": [
            ["id1:","id2:","id3:"],
            {"dragCoef":3},
            {"groundModel":"metal"},
            {"group":"Zil130_engine"},
            ["en4r","en2r","en1r"],
            ["en4r","en1r","en3r"],
            ["en4l","en1l","en2l"],
            ["en4l","en3l","en1l"],
            ["en4r","en3r","en3l"],
            ["en4r","en3l","en4l"],
            ["en3r","en1r","en1l"],
            ["en3r","en1l","en3l"],
            ["en4r","en2l","en2r"],
            ["en4r","en4l","en2l"],
            ["en1l", "en2r", "en2l"],
            ["en1l", "en1r", "en2r"],
            {"group":""},
    ],
},
"Zil130_oilpan_i6": {
    "information":{
        "authors":"BeamNG",
        "name":"Stock Oil Pan",
        "value":200,
    },
    "slotType" : "Zil130_oilpan_i6",
    "mainEngine": {
        //cooling and oil system
        "oilVolume":6,

        //engine durability
        "oilpanMaximumSafeG": 1.2

        //node beam interface
        "oilpanNodes:":["oilpan","oilref"],

        //engine deform groups
        "deformGroups_oilPan":["oilpan_damage"]
    },
},
"Zil130_oilpan_i6_race": {
    "information":{
        "authors":"BeamNG",
        "name":"Race Oil Pan",
        "value":500,
    },
    "slotType" : "Zil130_oilpan_i6",
    "mainEngine": {
        //cooling and oil system
        "oilVolume":7,

        //engine durability
        "oilpanMaximumSafeG": 1.5

        //node beam interface
        "oilpanNodes:":["oilpan","oilref"],

        //engine deform groups
        "deformGroups_oilPan":["oilpan_damage"]
    },
},
"Zil130_engine_i6_ecu": {
    "information":{
        "authors":"BeamNG",
        "name":"Stock ECU",
        "value":2500,
    },
    "slotType" : "Zil130_engine_i6_ecu",
    "slots": [
        ["type", "default", "description"],
        ["Zil130_engine_ecu_speedlimit","Zil130_engine_ecu_speedlimit_250", "Speed Limiter", {"coreSlot":true}],
    ],
    "mainEngine":{
        "idleRPM":650,
        "revLimiterRPM":6800,
        "revLimiterType": "soft",
    },
},
"Zil130_engine_i6_internals": {
    "information":{
        "authors":"BeamNG",
        "name":"Stock Long Block",
        "value":1200,
    },
    "slotType" : "Zil130_engine_i6_internals",
    "mainEngine":{
    },
},
"Zil130_engine_i6_internals_heavy": {
    "information":{
        "authors":"BeamNG",
        "name":"Heavy Duty Long Block",
        "value":3200,
    },
    "slotType" : "Zil130_engine_i6_internals",
    "mainEngine":{
        //max rpm physically capable of
        "$+maxRPM":230,
        "$*friction":1.22,
        "$*dynamicFriction":1.12,
        "$*inertia":1.22,
        "$*engineBrakeTorque":1.22,
        //engine durability
        "cylinderWallTemperatureDamageThreshold":175,
        "headGasketDamageThreshold":1700000,
        "pistonRingDamageThreshold":1700000,
        "connectingRodDamageThreshold":2200000,
        "$*maxTorqueRating": 2.2,
        "$*maxOverTorqueDamage": 1.85,
    },
},
"Zil130_intake_i6": {
    "information":{
        "authors":"BeamNG",
        "name":"Stock Intake",
        "value":850,
    },
    "slotType" : "Zil130_intake_i6",
    "nodes": [
         ["id", "posX", "posY", "posZ"],
         {"selfCollision":false},
         {"collision":true},
         {"frictionCoef":0.5},

         //exhaust manifold
         {"nodeWeight":3.0},
         {"group":"Zil130_header"},
         ["exm1r", -0.2, -0.9, 0.27],

         //airbox
         {"nodeWeight":1.0},
         {"group":"Zil130_airbox"},
         {"nodeMaterial":"|NM_PLASTIC"},
         ["airb1", 0.35, -1.75, 0.8],
         ["airb2", -0.35, -1.9, 0.76],
         {"engineGroup":""},
         {"group":""},
    ],
    "beams": [
          ["id1:", "id2:"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},

          //exhaust manifold
          {"beamSpring":2750550,"beamDamp":125},
          {"beamDeform":30000,"beamStrength":"FLT_MAX"},
          ["exm1r", "e1r"],
          ["exm1r", "e1l"],
          ["exm1r", "e2r"],
          ["exm1r", "e2l"],
          ["exm1r", "e3r"],
          ["exm1r", "e3l"],
          ["exm1r", "e4r", {"isExhaust":"mainEngine"}],
          ["exm1r", "e4l"],

          //airbox
          {"beamSpring":101000,"beamDamp":300},
          {"beamDeform":3000,"beamStrength":25000},
          {"deformGroup":"mainEngine_intake", "deformationTriggerRatio":0.01}
          ["airb1", "e3r"],
          ["airb1", "e3l"],
          ["airb1", "e4r"],
          ["airb1", "e4l"],
          ["airb1", "e2l"],
          ["airb1", "e2r"],
          ["airb2", "e3r"],
          ["airb2", "e3l"],
          ["airb2", "e4r"],
          ["airb2", "e4l"],
          ["airb2", "e2l"],
          ["airb2", "e2r"],
          ["airb2", "airb1"],
          {"deformGroup":""}

           //attach to body
          {"beamDeform":2000,"beamStrength":15000},
          ["airb2", "f13rr"],
          ["airb2", "f15r"],
          ["airb2", "f15"],
          ["airb2", "f11rr"],
          ["airb2", "f15rr"],

          ["airb1", "f12ll"],
          ["airb1", "f15ll"],
          ["airb1", "f13ll"],
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
},
"Zil130_intake_i6_turbo_stage1": {
    "information":{
        "authors":"BeamNG",
        "name":"Stage 1 Turbocharger",
        "value":4800,
    },
    "slotType" : "Zil130_intake_i6",
    "turbocharger": {
        "bovSoundFileName":"event:>Vehicle>Forced_Induction>Turbo_02>turbo_bov_tuned",
        "hissLoopEvent":"event:>Vehicle>Forced_Induction>Turbo_02>turbo_hiss_tuned",
        "whineLoopEvent":"event:>Vehicle>Forced_Induction>Turbo_02>turbo_spin_tuned",
        "turboSizeCoef": 0.85,
        "bovSoundVolumeCoef": 0.45,
        "hissVolumePerPSI": 0.026,
        "whineVolumePer10kRPM": 0.017,
        "whinePitchPer10kRPM": 0.08,
        "wastegateStart":21.0,
        "wastegateLimit":21.1,
        "maxExhaustPower": 6000,
        "backPressureCoef": 0.000007,
        "pressureRatePSI": 23,
        "frictionCoef": 47.5,
        "inertia":2.70,
        "damageThresholdTemperature": 685,
        "pressurePSI":[
            //turbineRPM, pressure(PSI)
            [0,         -3.5],
            [30000,     -1],
            [60000,     8],
            [90000,     24],
            [150000,    28],
            [200000,    37],
        ],
        "engineDef":[
            //engineRPM, efficiency, exhaustFactor
            [0,     0.0,    0.35],
            [650,   0.3,   0.35],
            [1000,   0.43,   0.55],
            [1400,  0.62,   0.8],
            [2000,  0.82,    1.0],
            [2500,  0.79,    1.0],
            [3000,  0.77,    1.0],
            [4000,  0.79,    1.0],
            [4500,  0.81,    1.0],
            [5000,  0.82,    1.0],
            [6000,  0.75,    1.0],
            [7000,  0.55,    1.0],
            [8000,  0.1,    1.0],
        ],
    },
    "mainEngine": {
        //turbocharger name
        "turbocharger":"turbocharger",
        "$*afterFireAudibleThresholdInstant": 1,
        "$*instantAfterFireCoef": 2.9,
        "$*instantAfterFireVolumeCoef": 3.2,
        "$*afterFireAudibleThresholdShift":1,
        "$*shiftAfterFireVolumeCoef": 1,
        "$*afterFireAudibleThresholdSustained": 1,
        "$*sustainedAfterFireCoef": 5,
        "$*sustainedAfterFireTime": 2,
        "$*sustainedAfterFireVolumeCoef": 1,
        //turbocharger deform groups
        "deformGroups_turbo":["mainEngine_turbo","mainEngine_intercooler","mainEngine_piping"]
    },
    "soundConfig": {
        "$+intakeMuffling":-0.4,
        "$+maxLoadMix": 0.2,
        "$+minLoadMix": 0.1,
        "$+mainGain":3,
        "$+offLoadGain": 0.00,
        "$+eqHighGain": 0.00,
        "$+eqLowGain": 2.00,
        "$+eqFundamentalGain": 5.00,
    },
    "soundConfigExhaust": {
        "$+maxLoadMix": 0.2,
        "$+minLoadMix": 0.00,
        "$+mainGain": 3.0,
        "$+offLoadGain": 0.00,
        "$+eqHighGain": 0.00,
        "$+eqLowGain": 2.00,
        "$+eqFundamentalGain": 5.00,
    },
},
}