Is it possible to add a CVT to an automation car by editing it's engine JBEAM?

Discussion in 'Utilities and programming' started by agraham10, Mar 3, 2019.

Tags:
  1. agraham10

    agraham10
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    49
    I was messing around with the JBEAMs of several automation cars and default cars and had a thought If things like NO2 can be copied over from one car to another how much effort would it take to copy over and adjust some transmission code for a CVT? I have looked at https://wiki.beamng.com/CvtGearbox a little bit but I am very unfamiliar with how the game code all works. Any advice would be greatly appreciated!
     
  2. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,924
    Yes this is completely possible and easy to do.

    In this example convert the automatic to CVT in the Endevor 2000.

    Open the folder in endevor_2000.zip and look for
    vehicles\adam_graham_endevor_2000\camso_engine.jbeam
    Edit the jbeam via Notepad, locate the "automaticGearbox" in the "powertrain" section (use the search function in Notepad), change the "automaticGearbox" to "cvtGearbox".
    Locate the "gearbox" section. Delete the "shiftEfficiency":0.5, and "gearChangeTime":0.35,. Change the
    "gearRatios":[-2.21, 0, 2.11, 1.18, 0.75],
    to
    "minGearRatio":0.75,
    "maxGearRatio":2.11,

    Locate the
    "lowShiftDownRPM":2427.1179166071,
    "highShiftDownRPM":3940,
    "lowShiftUpRPM":2927.1179166071,
    "highShiftUpRPM":6100,

    in the "vehicleController" section, and change them to
    "cvtLowRPM":1500,
    "cvtHighRPM":6050,

    Locate the "vehicleController" below the "gearbox" section, delete the "transmissionGearChangeDelay" "gearboxDecisionSmoothingUp" "gearboxDecisionSmoothingDown" "sportGearChangeTime" "maxGearChangeTime" "minGearChangeTime" "autoDownShiftInM" and the value after them.
    Change the "automaticModes":"PRND21", to "PRNDS",.
    Delete the "torqueConverterLockupMinGear":0
    Change the "torqueConverterLockupRPM":0, to 1500.

    Finally, save the file.
     
  3. agraham10

    agraham10
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    49
    So I tried it on another car and I am not sure what I have done wrong. The car's engine data is all 0 and the car will only accelerate to around 30mph before stopping. https://pastebin.com/f1nTUrry (This is not for the endevor 2000, I tried changing it on a economy car. Here is the untouched JBEAM. https://pastebin.com/fjCGbWb5
     
  4. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,924
    Set "calculateOptimalLoadShiftPoints":true
    to false.
     
  5. agraham10

    agraham10
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    49
    so even after doing that the car still tops out at 40MPH...? Thank you by the way for your help I am learning a lot!
    Edit: And it holds RPM's fairly high.
     
  6. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,924
    Is there still "he car's engine data is all 0"
    Please put a download link to your car mod so I may have a look
    You can use the "PowertrainVisualization" app, move your mouse over parts to show RPM.

    To reduce RPM holding too high, set these value
    "aggressionHoldOffThrottleDelay":0.1, //lower it
    "aggressionSmoothingUp":0.15., //lower it
    "aggressionSmoothingDown":2.5, //increase it
     
  7. agraham10

    agraham10
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    49
    That was fixed by changing calculateOptimalLoadShiftPoints to false
    I'll see if this changes anything and post the mod in a few minutes
     
  8. Alex_Farmer557

    Alex_Farmer557
    Expand Collapse

    Joined:
    Dec 28, 2016
    Messages:
    3,541
    You can copy the cvt values from the sunburst if needed
     
  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