1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

How do i make a mod that adds 4WD to non 4WD vehicle?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Rainbow Dashie, Apr 6, 2022.

  1. Rainbow Dashie

    Rainbow Dashie
    Expand Collapse

    Joined:
    Apr 6, 2022
    Messages:
    20
    I specifically talking about the Sunburst and Bastion
     
  2. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    • Like Like x 1
  3. Justy4WDTURBO

    Justy4WDTURBO
    Expand Collapse

    Joined:
    May 14, 2016
    Messages:
    648
  4. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    4WD and AWD are different things
     
    • Agree Agree x 1
  5. Rainbow Dashie

    Rainbow Dashie
    Expand Collapse

    Joined:
    Apr 6, 2022
    Messages:
    20
  6. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    If a vehicle has 4 wheels, AWD is 4WD
     
  7. Acrain7

    Acrain7
    Expand Collapse

    Joined:
    Sep 7, 2015
    Messages:
    3,505
    no
     
    • Like Like x 2
    • Agree Agree x 2
  8. Turbo49>

    Turbo49>
    Expand Collapse

    Joined:
    Apr 1, 2021
    Messages:
    3,096
    Tipycally AWD is the kind you'd see in a sunburst, with a center differential and varying power beetween the front and rear wheels, while 4WD is the kind you'd see on a D-series, with only 2 modes : 50:50 4WD or RWD by decoupling the front transfer case.
     
    • Agree Agree x 3
  9. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Do you still believe that the 4WD in the D-Series is 50:50 when engaged? Open up the Powertrain Visualization app and see it yourself.
     
  10. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    The point is not that it's a perfect ratio, but that it's consistent and manually controlled
     
    • Agree Agree x 2
  11. Turbo49>

    Turbo49>
    Expand Collapse

    Joined:
    Apr 1, 2021
    Messages:
    3,096
    As i said typically (spelled wrong tho).
     
  12. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Well the Ibishu Pessima GTz has a "4WD" badge on its trunk.

    Anyway back on topic
    In the example of Sunburst, open the "\BeamNG.drive\content\vehicles\sunburst.zip\vehicles\sunburst\sunburst_trunk.jbeam"and disable the center differential. Scroll to the between AWD and AWD RS and add this(don't forget to make a file backup beforehand)
    Code:
    "sunburst_transfer_case_4WD": {
        "information":{
            "authors":"BeamNG",
            "name":"4WD Transfer Case",
            "value":1600,
        },
        "slotType" : "sunburst_transfer_case",
        "powertrain" : [
            ["type", "name", "inputName", "inputIndex"],
            //locked center diff
            ["differential", "transfercase", "gearbox", 1, {"diffType":"locked", "lockTorque":8000, "friction":0.44, "dynamicFriction":0.00048, "torqueLossCoef":0.012, "uiName":"Transfer Case", "defaultVirtualInertia":0.1}],
        ],
    },
    Unlike the D-Series, the driveshaft is located in a different file"\BeamNG.drive\content\vehicles\sunburst.zip\vehicles\sunburst\sunburst_transaxle.jbeam"
    Code:
    "sunburst_driveshaft_4WD": {
        "information":{
            "authors":"BeamNG",
            "name":"4WD Rear Driveshaft",
            "value":400,
        },
        "slotType" : "sunburst_driveshaft",
        "controller": [
            ["fileName"],
            ["4wd", {"shaftName":"driveshaft"}],
        ],
        "powertrain" : [
            ["type", "name", "inputName", "inputIndex"],
            ["torsionReactor", "torsionReactorR", "transfercase", 1, {}],
            //disconnecting front shaft
            ["shaft", "driveshaft", "torsionReactorR", 1, {"breakTriggerBeam":"driveshaft", "uiName":"Rear Driveshaft", "electricsName":"driveshaft","canDisconnect":true, "friction":0.26, "dynamicFriction": 0.00051}],
        ],
        "torsionReactorR": {
            "torqueReactionNodes:":["e2l","e2r","e3r"],
        },
        "props": [
            ["func"      , "mesh"           , "idRef:", "idX:", "idY:", "baseRotation"        , "rotation"            , "translation"        , "min", "max", "offset", "multiplier",],
            ["driveshaft", "sunburst_driveshaft", "f3r", "f3l", "f8r",    {"x":0, "y":0, "z":0}, {"x":0, "y":1, "z":0} , {"x":0, "y":0, "z":0}, -360, 360, 0, 1,{"breakGroup":"driveshaft","deformGroup":"driveshaft","optional":true}],
        ],
        "beams": [
              ["id1:", "id2:"],
              //driveshaft
              {"beamPrecompression":1, "beamType":"|BOUNDED", "beamLongBound":0.02, "beamShortBound":0.02},
              {"beamSpring":0,"beamDamp":0,"beamDeform":1500,"beamStrength":3500},
              {"beamLimitSpring":10001000,"beamLimitDamp":250},
              ["rdiff","tra1", {"name":"driveshaft","optional":true,"breakGroup":"driveshaft","deformGroup":"driveshaft"}],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
    },
     
  13. Rainbow Dashie

    Rainbow Dashie
    Expand Collapse

    Joined:
    Apr 6, 2022
    Messages:
    20
    I found a mod for it but thx
     
  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