Bruckell LeGran AWD

Discussion in 'Content Creation' started by SHOme1289, Sep 19, 2017.

  1. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    Hey everyone, I spent about 10 hours on code and after ripping the rest of my hair out, i finally have a working example of a LeGran with a torque converter/transfer case AWD system...and it actually works miraculously well! Acts as mostly FWD with the rear diff kicking in when slip is detected in the front. Once i get home and on my computer ill post some screens and will do some more fine tuning, but figured others might be happy to see that its possible. Theres no modelling done, so its essentially the same looking as a regular LeGran, but all the coding is complete and new beams created. It really drives nice, solid and confidently around corners, exactly how it shouldnt!! The drivetrain debug app shows the power path. Cant wait to get home and show yall! Once i get all the bits and pieces (parts, rather) sorted and correctly displayed in the parts selector (no conflicts with FWD counterparts) ill package it as a mod. I was bopping around after i got it working in a lifted AWD LeGran wagon with offroad tires and it was great over the rocky and bumpy stuff. Be back later -SHO
     
  2. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,780
    It would be great to look at the code to see how you managed it
     
  3. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    just got home, basically redid everything, it was too hodgepodged together, part conflicts, duplicates, etc. I did some reading and scouring of the ETK files, and realized that I did it wrong in so many ways...currently I have a complete working proof of concept, complete with modified nodes, beams, and part lists. When I load the game, with default LeGran Wagon BASE loaded, all appears normal in regards to the drivetrain, parts, driveability, etc. When I select the "4 speed auto" gearbox, everything loads up perfectly fine. Torque converter, transfer case, front/rear diffs, front/rear driveshafts, and front/rear axle shafts...the drivetrain debug graphs shows that the diffs and axles are doing exactly what they are supposed to do (currently on a front/rear LSD setup) so now that I have the basic groundwork completed, I can start6 to slowly add more parts, like locked/open/adjustable diffs, adjustable transfer case, etc. Currently works great though, I need to start to figure out how to package it as a mod so I can let people test it and give me feedback...AGAIN there has been no modelling done, but I already did a conversion of a Covet in Blender (from like a year or 2 ago) so I need to get my blender fingers back at it on the LeGran. This started out as a simple "why not" and turned into me learning a TON about how the jbeam files work. pretty easy once you know what you are looking at. Not even a single grammar error or punctuation or anything!! will take screens of the debug and some action in the car.
     
  4. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,780
    Less chatting more getting the file up please?
     
  5. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    I'm not uploading the files yet lol, I'm not uploading hours of work so people can complain about how there's bugs, but here's some screens :) once I get the parts list squared away (need to create all separate suspension F/R as selectable parts, need to create a new transmission (I'm going for a 6 speed torque converter setup) and clean up the engine jbeam since there are parts that still conflict...all in due time :)
     

    Attached Files:

    • awdwagonwithpartslist.png
    • offroadwagonwithdebug.png
    • stockwagonwithpartslist.png
  6. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,780
    Looks good so far and I will be hoping its got a good turn of speed out of it
     
  7. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    ok so I have a pretty good finalized version of the AWD setup, I am having a hard time figuring out how to package it as a mod...will do some more research. in other news, the legran AWD is great in mud and up steep inclines with one of the transfer cases and the other is awesome at street drivability, tuned separately.
     
  8. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    Below, this should go into your legran engine.jbeam, I have been working solely within the installation files in steamapps/common/beamng, so that is probably why I cant just upload it as a mod...this will obviously effect your original game files so use this at your own risk. someone else can release this as a mod if they can get it together in a mod .zip so we can click "install mod" lol...this is JUST the engine stuff, ill post the other jbeam info next...btw I totally recycled the viscotronic code and tweaked a couple variables, this system is drawn from the old pessima AWD system.

    },
    "legran_transfer_case_SR": {
    "information":{
    "authors":"BeamNG",
    "name":"Stabiliride",
    "value":1100,
    },
    "slotType" : "legran_transfer_case",
    "controller": [
    ["fileName"],
    ["viscotronic", {"transfercaseName":"transfercase"}],
    ],
    "powertrain" : [
    ["type", "name", "inputName", "inputIndex"],
    ["splitShaft", "transfercase", "gearbox", 1, {"splitType":"viscous", "primaryOutputID":2, "viscousCoef":15, "viscousTorque":500, "friction":5}],
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["legran_transmission", ["legran_engine","legran_transmission"]],
    ["legran_shifterbase_M", ["legran_body"]],
    //["legran_gearindicator_A", ["legran_dash"]],
    ],
    },
    "legran_transfer_case_AWD": {
    "information":{
    "authors":"BeamNG",
    "name":"AWD Transfer Case",
    "value":795,
    },
    "slotType" : "legran_transfer_case",
    "powertrain" : [
    ["type", "name", "inputName", "inputIndex"],
    ["splitShaft", "transfercase", "gearbox", 1, {"splitType":"viscous", "viscousCoef":6, "viscousTorque":600, "friction":5}],
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["legran_transmission", ["legran_engine","legran_transmission"]],
    ["legran_shifterbase_M", ["legran_body"]],
    //["legran_gearindicator_A", ["legran_dash"]],
    ],
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    //--tcase weight--
    {"selfCollision":false},
    {"collision":false},
    {"nodeMaterial":"|NM_METAL"},
    {"frictionCoef":0.5},
    {"group":"legran_transmission"},
    {"nodeWeight":23.75},
    ["tcase", 0.13, -0.27, 0.22],
    {"group":""},
    ],
    "beams": [
    ["id1:", "id2:"],
    {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    {"beamSpring":5001000,"beamDamp":50},
    {"beamDeform":50000,"beamStrength":"FLT_MAX"},
    ["tcase","f2l"],
    ["tcase","f2r"],
    ["tcase","f1l"],
    ["tcase","f1r"],
    ["tcase","fx2l"],
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    }
    "legran_engine_i4_2.3S": {
    "information":{
    "authors":"BeamNG",
    "name":"2.3L Stroked I4 Engine",
    "value":795,
    }
    "slotType" : "legran_engine",
    "slots": [
    ["type", "default", "description"]
    ["legran_exhaust","legran_exhaust", "Exhaust"],
    ["legran_transmission","legran_transmission_4A", "Transmission"],
    ["legran_intake_i4","legran_intake_i4_sport", "Intake",{"coreSlot":true}],
    ],
    "powertrain": [
    ["type", "name", "inputName", "inputIndex"],
    ["combustionEngine", "mainEngine", "dummy", 0],
    ],
    "mainEngine": {
    "torque":[
    ["rpm", "torque"]
    [0, 0],
    [500, 165],
    [1000, 179],
    [2000, 220],
    [3000, 274],
    [4000, 325],
    [5000, 354],
    [6000, 360],
    [7000, 350],
    [7500, 305],
    [8000, 240],
    [9000, 205],
    ],
    "idleRPM":700,
    "maxRPM":7200,
    "revLimiterRPMDrop":100,
    "inertia":0.12,
    "friction":14
    "dynamicFriction":0.032,
    "burnEfficiency":0.33
    "torqueReactionNodes:":["e1l","e2l","e4r"]
    "particulates":0.027
    "energyStorage": "mainTank",
    "requiredEnergyType":"gasoline",
    //cooling and oil system
    "thermalsEnabled":true
    "engineBlockMaterial":"iron"
    "oilVolume":4
    //engine durability
    "cylinderWallTemperatureDamageThreshold":120
    "headGasketDamageThreshold":1500000
    "pistonRingDamageThreshold":1500000
    "connectingRodDamageThreshold":2000000
    //node beam interface
    "waterDamage": {"[engineGroup]:":["engine_intake"]},
    "radiator": {"[engineGroup]:":["radiator"]},
    "engineBlock": {"[engineGroup]:":["engine_block"]},
    "breakTriggerBeam":"engine",

    "soundConfig": "soundConfig",
    },
    "soundConfig": {
    "sampleName": "I4",
    "mainGain": -10,
    "maxLoadMix": 0.95,
    "minLoadMix": 0.09,
    "onLoadGain":1.5,
    "offLoadGain":0.4,
    "eqLowGain": 10,
    "eqLowFreq": 150,
    //"eqLowWidth": 0,
    "eqHighGain": -3,
    "eqHighFreq": 1800,
    //"eqHighWidth": 0.5,
    "lowCutFreq":140,
    "fundamentalFrequencyCylinderCount":4
    "eqFundamentalGain": 11
    },
    "vehicleController": {
    "clutchLaunchStartRPM":1600,
    "clutchLaunchTargetRPM":2200,
    //**highShiftDown can be overwritten by automatic transmissions**
    "highShiftDownRPM":[0,0,0,2500,2950,3050,3150,3150]
    //**highShiftUp can be overwritten by intake modifications**
    "highShiftUpRPM":5700
    },
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["legran_engine_i4", ["legran_engine"]],
    ["legran_header_i4", ["legran_engine"]],
    ],
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    //--2.5L I4 Engine--
    {"selfCollision":false},
    {"collision":true}
    {"nodeMaterial":"|NM_METAL"},
    {"frictionCoef":0.5},
    {"group":"legran_engine"}
    {"engineGroup":"engine_block"}
    {"nodeWeight":19},
    ["e1r", 0.22, -1.64, 0.20,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.2,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.12}],
    ["e1l", 0.22, -1.40, 0.20],
    ["e2r", -0.31, -1.64, 0.20,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.2,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.12}],
    ["e2l", -0.31, -1.40, 0.20],
    {"engineGroup":["engine_block","engine_intake"]}
    ["e3r", 0.22, -1.68, 0.70,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.2,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.12}],
    ["e3l", 0.22, -1.36, 0.70],
    ["e4r", -0.31, -1.68, 0.70,{"isExhaust":true,"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.2,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.12}],
    ["e4l", -0.31, -1.36, 0.70],
    {"engineGroup":""}
    {"group":""},
    ],
    "beams": [
    ["id1:", "id2:"],
    {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    {"beamSpring":8400600,"beamDamp":150},
    {"beamDeform":540000,"beamStrength":"FLT_MAX"},
    //engine
    ["e1r","e1l"],
    ["e2r","e2l"],
    ["e3r","e3l"],
    ["e4r","e4l"],
    ["e1r","e2r"],
    ["e1l","e2l"],
    ["e3r","e4r"],
    ["e3l","e4l"],
    ["e1r","e3r"],
    ["e1l","e3l"],
    ["e2r","e4r"{"isExhaust":true}],
    ["e2l","e4l"],
    ["e2r","e3r"],
    ["e2l","e3l"],
    ["e2r","e3l"],
    ["e2l","e3r"],
    ["e1r","e4r"],
    ["e1l","e4l"],
    ["e1r","e4l"],
    ["e1l","e4r"],
    ["e1r","e2l"],
    ["e1l","e2r"],
    ["e3r","e4l"],
    ["e3l","e4r"],
    {"beamSpring":60600,"beamDamp":50},
    {"beamDeform":1000,"beamStrength":2000},
    //rad tube beams
    {"breakGroup":"radtube"},
    ["e3r","f15l"],
    ["e3r","f15"],
    ["e3r","f15l"],
    ["e3r","f15"],
    {"breakGroup":""},
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    "triangles": [
    ["id1:","id2:","id3:"],
    {"groundModel":"metal"},
    /*
    ["e5l", "e1l", "e3l"],
    ["e4r", "e3r", "e2r"],
    ["e3r", "e1r", "e2r"],
    ["e1r", "e1l", "e2r"],
    ["e2r", "e1l", "e2l"],
    ["e3l", "e1l", "e3r"],
    ["e3r", "e1l", "e1r"],
    ["e4r", "e4l", "e3l"],
    ["e4r", "e3l", "e3r"],
    ["e4r", "e2r", "e4l"],
    ["e4l", "e2r", "e2l"],
    ["e4l", "e2l", "e6l"],
    ["e6l", "e3l", "e4l"],
    ["e6l", "e2l", "e5l"],
    ["e6l", "e5l", "e3l"],
    ["e2l", "e1l", "e5l"],
    */
    {"triangleType":"NONCOLLIDABLE"},
    ["e2l", "e2r", "e1r"],
    ["e1r", "e1l", "e2l"],
    {"triangleType":"NORMALTYPE"},
    ],
    }
    "legran_transmission_6A_AWD": {
    "information":{
    "authors":"BeamNG, SHOme89",
    "name":"6-Speed AWD Automatic Transmission",
    "value":1200,
    }
    "slotType" : "legran_transmission",
    "slots": [
    ["type", "default", "description"]
    ["legran_converter","legran_converter_locking","Torque Converter", {"coreSlot":true}],
    ["legran_transfer_case","legran_transfer_case_AWD", "Transfer Case"{"coreSlot":true}],
    ],
    "powertrain": [
    ["type", "name", "inputName", "inputIndex"],
    ["torqueConverter", "torqueConverter", "mainEngine", 1],
    ["automaticGearbox", "gearbox", "torqueConverter", 1],
    ],
    "gearbox": {
    "gearRatios":[-3.41, 0, 3.30, 2.25, 1.58, 1.27, 0.99, 0.77]
    "parkLockTorque":3200,
    "oneWayViscousCoef":20,
    "friction": 8,
    },
    "vehicleController": {
    "automaticModes":"PRND21",
    "useSmartAggressionCalculation":false,
    "calculateOptimalLoadShiftPoints": true,
    "transmissionGearChangeDelay":1.1
    "gearboxDecisionSmoothingUp":0.5
    "gearboxDecisionSmoothingDown":0.4
    "lowShiftDownRPM":1050,
    "lowShiftUpRPM":1950,
    //"highShiftDownRPM":3050,
    },
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["legran_transmission", ["legran_engine","legran_transmission"]],
    ["legran_shifterbase_M", ["legran_body"]],
    //["legran_gearindicator_A", ["legran_dash"]],
    ],
    "props": [
    ["func" , "mesh" , "idRef:", "idX:", "idY:" , "baseRotation" , "rotation" , "translation" , "min", "max", "offset", "multiplier"]
    //automatic transmission
    ["gear_A" , "legran_shifter_column", "f1l","f1r","f6l", {"x":0, "y":0, "z":180}, {"x":0, "y":-35, "z":0} , {"x":0, "y":0, "z":0}, 0, 1, 0, 1],
    ],
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    //--6 Speed Auto--
    {"selfCollision":false},
    {"collision":true}
    {"nodeMaterial":"|NM_METAL"},
    {"frictionCoef":0.5},
    {"group":"legran_transmission"},
    {"nodeWeight":20},
    ["tra1r",-0.30, -1.31, 0.29],
    ["tra1l", 0.26, -1.31, 0.29],
    ["ta1", 0, -1.33, 0.31],
    {"group":""},
    ],
    "beams": [
    ["id1:", "id2:"],
    //--TRANSMISSION--
    {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    {"beamSpring":8400600,"beamDamp":150},
    {"beamDeform":540000,"beamStrength":"FLT_MAX"},
    ["tra1l","e2r"],
    ["tra1l","e4r"],
    ["tra1l","e2l"],
    ["tra1l","e4l"],
    ["tra1r","e1r"],
    ["tra1r","e3r"],
    ["tra1r","e1l"],
    ["tra1r","e3l"],
    ["tra1r","tra1l"],
    ["ta1","e1l"],
    ["ta1","e2l"],
    ["ta1","e4l"],
    ["ta1","e3l"],
    ["ta1","tra1l"],
    ["ta1","tra1r"],
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    --- Post updated ---
    haven't posted on here in a while so I have no idea how to post the comment "code" thingy. below, this goes into your legran suspension_F.jbeam file. this probably isn't a direct copy->paste as there might be punctuation or syntax errors associated with that, but this is just to throw out there so people can see how it can be effectively done on a non-awd car. going to probably do other cars, like the covet or new pessima etc.

    },
    "legran_differential_F_LSD": {
    "information":{
    "authors":"BeamNG",
    "name":"LSD Front Differential",
    "value":585,
    },
    "slotType" : "legran_differential_F",
    "slots": [
    ["type", "default", "description"]
    ["legran_driveshaft_F","legran_driveshaft_F", "Front Driveshaft"],
    ],
    "powertrain" : [
    ["type", "name", "inputName", "inputIndex"]
    ["differential", "differential_F", "driveshaft_F", 1, {"diffType":"lsd", "gearRatio": 3.67, "lsdPreload":50, "lsdLockCoef":0.15, "lsdRevLockCoef":0.01, "friction":6}]
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["legran_transmission", ["legran_engine","legran_transmission"]],
    ["legran_shifter_M", ["legran_body"]],
    ["legran_shifterbase_M", ["legran_body"]],
    ],
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    //--diff weight--
    {"selfCollision":false},
    {"collision":false},
    {"nodeMaterial":"|NM_METAL"},
    {"frictionCoef":0.5},
    {"group":"legran_diff_F"},
    {"nodeWeight":26},
    ["fdiff", 0.13, -1.41, 0.25],
    {"group":""},
    ],
    "beams": [
    ["id1:", "id2:"],
    {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    {"beamSpring":2501000,"beamDamp":100},
    {"beamDeform":30000,"beamStrength":"FLT_MAX"},
    ["fdiff","fx2r"],
    ["fdiff","fx2l"],
    ["fdiff","fx1l"],
    ["fdiff","fx1r"],
    ["fdiff","fh6r"],
    ["fdiff","fh6l"],
    ["fdiff","fs1l"],
    //halfshafts
    {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.04, "beamShortBound":0.04},
    {"beamSpring":0,"beamDamp":0,"beamDeform":150000,"beamStrength":350000},
    {"beamLimitSpring":2501000,"beamLimitDamp":100},
    {"optional":true},
    {"breakGroupType":1},
    {"breakGroup":"wheel_FR"},
    ["fw1r","fdiff", {"name":"axle_FR"}],
    {"breakGroup":"wheel_FL"},
    ["fw1l","fdiff", {"name":"axle_FL"}],
    {"breakGroup":""},
    {"optional":false},
    {"breakGroupType":0},
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    },
    "legran_driveshaft_F": {
    "information":{
    "authors":"BeamNG",
    "name":"Front Driveshaft",
    "value":275,
    },
    "slotType" : "legran_driveshaft_F",
    "powertrain" : [
    ["type", "name", "inputName", "inputIndex"]
    ["shaft", "driveshaft_F", "transfercase", 2, {"breakTriggerBeam":"driveshaft_F", "electricsName":"driveshaft_F", "friction":2}]
    ],
    "beams": [
    ["id1:", "id2:"],
    //front driveshaft
    {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.01, "beamShortBound":0.01},
    {"beamSpring":0,"beamDamp":0,"beamDeform":32000,"beamStrength":80500},
    {"beamLimitSpring":10001000,"beamLimitDamp":250},
    ["fdiff","tcase", {"name":"driveshaft_F","optional":true,"breakGroup":"driveshaft_F","deformGroup":"driveshaft_F"}],
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],


    below here, this needs to be put in place of the original suspension_F main slots part of code, near the beginning of the code...basically the differential is added in to the called parts list FOR the suspension slot in the part picker list in game.

    "slots": [
    ["type", "default", "description"]
    ["legran_brake_F","legran_brake_F", "Front Brakes"],
    ["legran_differential_F","legran_differential_F", "Front Differential"],
    ["wheel_F_5","steelwheel_01a_14x5.5_F_alt","Front Wheels", {"nodeOffset":{"x":"$trackwidth_F", "y":-1.34, "z":0.26}}],
    ["legran_wheeldata_F","legran_wheeldata_F", "Front Spindles"{"coreSlot":true}],
    ["legran_strut_F","legran_strut_F", "Front Struts"],
    ["legran_swaybar_F","legran_swaybar_F", "Front Sway Bar"],
    ["legran_steering","legran_steering", "Steering"],
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    //front running gear
    ["legran_lowerarm_F", ["legran_lowerarm_F"]],
    ["legran_hub_F", ["legran_hub_F"]],
    ],
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    //--FRONT INDEPENDENT SUSPENSION--
    {"collision":true},
    {"selfCollision":false},
    {"nodeMaterial":"|NM_METAL"},
    {"frictionCoef":0.5},
    //front hub
    {"nodeWeight":6.5},
    {"group":["legran_lowerarm_F","legran_swaybar_F","legran_hub_F","legran_strut_F","legran_halfshaft_F"]},
    ["fh1r",-0.69, -1.35, 0.17],
    ["fh1l", 0.69, -1.35, 0.17],
    {"nodeWeight":4.5},
    {"group":["legran_hub_F","legran_halfshaft_F"]},
    ["fh5r",-0.75, -1.48, 0.26],
    ["fh5l", 0.75, -1.48, 0.26],
    ["fw2r",-0.75, -1.20, 0.26],
    ["fw2l", 0.75, -1.20, 0.26],
    //strut
    {"group":["legran_strut_F","legran_hub_F","legran_halfshaft_F"]},
    ["fh4r",-0.607, -1.31, 0.60],
    ["fh4l", 0.607, -1.31, 0.60],
    //tie rod end
    {"nodeWeight":5.0},
    {"group":["legran_tierod_F","legran_hub_F"]},
    ["fh3r",-0.635, -1.165, 0.258],
    ["fh3l", 0.635, -1.165, 0.258],
    //nodeCoupling
    {"group":"legran_hub_F"},
    //["fnc1r", -0.73, -1.29, 0.31],
    //["fnc1l", 0.73, -1.29, 0.31],
    //strut flexbody help
    {"collision":false},
    {"selfCollision":false},
    {"nodeWeight":0.5},
    {"group":["legran_strut_F","legran_hub_F"]},
    ["fs2l", 0.48, -1.30, 0.58],
    ["fs2r", -0.48, -1.30, 0.58],
    {"group":""},
    ],
    --- Post updated ---
    this is the rear suspension parts that need to be added to the suspension_R jbeam...below, this needs to replace the flexbody AND slots psections of the suspension jbeam. (sorry I'm a little tipsy too so if this isn't making any sense or you know how to shorten this shit please let me know lol)

    }
    "slotType" : "legran_suspension_R",
    "slots": [
    ["type", "default", "description"]
    ["wheel_R_5","steelwheel_01a_14x5.5_R_alt","Rear Wheels", {"nodeOffset":{"x":"$trackwidth_R", "y":1.33, "z":0.24}}],
    ["legran_differential_R","legran_differential_R", "Rear Differential"],
    ["legran_brake_R","legran_brake_R", "Rear Brakes"],
    ["legran_wheeldata_R","legran_wheeldata_R", "Rear Spindles"{"coreSlot":true}],
    ["legran_spring_R","legran_spring_R", "Rear Springs"],
    ["legran_shock_R","legran_shock_R", "Rear Shocks"],
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    //rear running gear
    ["legran_axle_R", ["legran_axle_R"],[]],
    ["legran_lowerarm_R", ["legran_lowerarm_R"],[]],
    ["legran_panhard_R", ["legran_panhard_R"],[]],
    ],


    and below this, this is the other parts needed to be added to the rear suspension file.

    }
    "legran_differential_R_LSD": {
    "information":{
    "authors":"BeamNG",
    "name":"LSD Rear Differential",
    "value":950,
    }
    "slotType" : "legran_differential_R",
    "slots": [
    ["type", "default", "description"]
    ["legran_driveshaft_R","legran_driveshaft_R", "Rear Driveshaft"],
    ],
    "powertrain" : [
    ["type", "name", "inputName", "inputIndex"]
    ["differential", "differential_R", "driveshaft_R", 1, {"diffType":"lsd", "gearRatio": 3.67, "lsdPreload":100, "lsdLockCoef":0.15, "lsdRevLockCoef":0.01, "friction":8}]
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["legran_axle_R", ["legran_axle_R"],[]],
    ["legran_lowerarm_R", ["legran_lowerarm_R"],[]],
    ["legran_panhard_R", ["legran_panhard_R"],[]],
    ],
    "nodes": [
    ["id", "posX", "posY", "posZ"],
    //--diff weight--
    {"selfCollision":false},
    {"collision":false}
    {"nodeMaterial":"|NM_METAL"},
    {"frictionCoef":0.5},
    {"group":""},
    {"nodeWeight":31},
    ["rdiff", 0, 1.355, 0.26],
    {"group":""},
    ],
    "beams": [
    ["id1:", "id2:"],
    //differential node
    {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    {"beamSpring":4800600,"beamDamp":150},
    {"beamDeform":60000,"beamStrength":"FLT_MAX"},
    ["rdiff","r5ll"],
    ["rdiff","r5rr"],
    ["rdiff","r5"],
    ["rdiff","r1rr"],
    ["rdiff","r1ll"],
    ["rdiff","r1"],
    ["rdiff","r2"],
    ["rdiff","f4r"],
    ["rdiff","f4l"],
    //halfshafts
    {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.02, "beamShortBound":0.02},
    {"beamSpring":0,"beamDamp":0,"beamDeform":145000,"beamStrength":345000},
    {"beamLimitSpring":7501000,"beamLimitDamp":250},
    {"breakGroupType":1},
    {"optional":true},
    {"breakGroup":"wheel_RR"},
    ["rw1r","rdiff", {"name":"axle_RR"}],
    {"breakGroup":"wheel_RL"},
    ["rw1l","rdiff", {"name":"axle_RL"}],
    {"breakGroup":""},
    {"optional":false},
    {"breakGroupType":0},
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    }
    "legran_driveshaft_R": {
    "information":{
    "authors":"BeamNG",
    "name":"Rear Driveshaft",
    "value":350,
    }
    "slotType" : "legran_driveshaft_R",
    "powertrain" : [
    ["type", "name", "inputName", "inputIndex"]
    ["shaft", "driveshaft_R", "transfercase", 1, {"breakTriggerBeam":"driveshaft_R", "electricsName":"driveshaft_R", "friction":2}]
    ],
    "beams": [
    ["id1:", "id2:"],
    //driveshaft
    {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.01, "beamShortBound":0.01},
    {"beamSpring":0,"beamDamp":0,"beamDeform":85000,"beamStrength":23500},
    {"beamLimitSpring":10001000,"beamLimitDamp":250},
    ["rdiff","r5", {"name":"driveshaft_R","breakGroup":"driveshaft_R","optional":true,"deformGroup":"driveshaft_R"}],
    {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    ],
    --- Post updated ---
    I think there are more bits to it, but this code that I threw out there is basically all the important parts...and I didn't just upload the file cuz you can also do some work too, ya know, its not hard to learn.
     
    • Agree Agree x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice