Released Tutorial: How to mod -engine- Part 1

Discussion in 'Content Creation' started by fufsgfen, Apr 25, 2017.

  1. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    INTRO: This will be step by step walktrough of how to make a engine mod, it is for absolute beginners and shows how I do things, which might be different from how others do it, but should be something that helps you started.

    TOOLS:
    Recommended: Notepad++ from https://notepad-plus-plus.org/
    Optional: Torsion's tutorial to get most out of Notepad++ https://www.beamng.com/threads/how-to-enable-proper-highlighting-in-notepad.39158/#post-588554
    Recommended: 7-zip http://www.7-zip.org/

    -------Let's begin-------
    Official vehicles are in zip files at (Program Files (x86)\Steam\steamapps\common\BeamNG.drive\content\vehicles), however hold your horses there!
    It is not good idea to edit files in that location as it messes up with the game, instead it is better to make changes in a mod folder.

    So anything you drop into your (Documents\BeamNG.drive\mods) folder overrides what is in game folders.


    Step 1:
    Let's start modding by creating a temporary location where we extract (Barstow.zip)

    I made these folders (moddingtuts\stage 1\more power to Barstow\original)
    upload_2017-4-25_15-6-23.png

    Step 2:
    Extract official Barstow vehicle, you can find Barstow in following location (Program Files (x86)\Steam\steamapps\common\BeamNG.drive\content\vehicles\barstow.zip), notice how there are vehicles and barstow folders inside the zip file (archive), that is very important to remember later.
    upload_2017-4-25_15-4-47.png

    Drag vehicles folder from inside of the Barstow.zip to folder named original and you should have something like this:
    upload_2017-4-25_15-2-45.png

    Step 3:
    Create new folders inside more power to barstow folder, first create vehicles folder, then inside of vehicles folder create folder named barstow.
    upload_2017-4-25_14-41-11.png

    NOTE: We don't use capital letters now, it is good practice to avoid capital letters if original files and folders don't have capital letters so you maintain same logic and later it becomes more important when editing files.

    Step 4:
    Now we must copy barstow_engine.jbeam to barstow folder we created at previous step as illustrated by next image, make sure you copy, default action is to move, so hold ctrl down when dragging or select copy and then choose folder and paste!:
    upload_2017-4-25_14-40-47.png

    Step 5:
    Next is fun part, we open barstow_engine.jbeam and start modding, IMPORTANT make sure you open correct file, not one that is in (original) folder, but one that is where you copied engine file in previous step as shown by this image:
    upload_2017-4-25_12-31-20.png
    You will have more fun if you installed Notepad++, if not yet, now is good time for that, links at top of post.

    Step 6:
    INTRO:
    Each jbeam file will have brackets and commas, all very important, curly bracket defines begin and end of section.
    Line 1 has opening of jbeam file curly bracket, line 2 has name of part section "barstow_engine_v8_291": and also at end of line 2 there is curly bracket that opens up part section. I have placed blinking cursor next to that bracket on line 2 so you can see it glows red, this is handy feature of Notepad++
    upload_2017-4-25_12-51-49.png

    Line 161 has closing curly bracket which is end of barstow_engine_v8_291 part, Notepad++ makes it glow red so it is easy to find:
    upload_2017-4-25_12-56-43.png



    More information about jbeam file structure: JBeam_Reference

    Step 7:
    So now we know that what makes engine is between lines 2 and 161, next we select all of those lines, including line 2 and line 161 with everything between them, copy that and paste to new file, so select like in image and copy selection to clipboard.
    upload_2017-4-25_13-1-16.png

    Then hit new button from toolbar and paste selection from clipboard and you should end up something like this:
    upload_2017-4-25_13-3-28.png

    Step 8:
    Next save file to (more power to Barstow\vehicles\barstow) with new name, I like to use my name at end of jbeam file name to make less chance of someone's mod conflicting with mine.
    upload_2017-4-25_13-5-31.png
    IMPORTANT: Select Save as type to All types (*.*) or else your file will not be .jbeam, it will be .txt and that is not working in game.

    Step 9:
    We now have a part (engine) in our new file, but we don't have curly bracket on line 1 that opens the file, so we need to add that and his friend that closes the file at end of the file. So make cursor blink at beginning of line 1, hit enter and make cursor blink at line 1 again, put opening curly bracket there like in image:
    upload_2017-4-25_13-11-9.png

    At this point many make a mistake, at end of the file at line 161 there is curly bracket and it closes something, if you put blinking cursor next to that curly bracket on line 161 it turns red as in image:
    upload_2017-4-25_13-15-39.png

    It is good practice to scroll up and see which curly bracket is pair of that one, in this case it is actually opening bracket for engine part and not the file, so it means we need to add one more curly bracket to end of file so you should have something like in image.
    upload_2017-4-25_13-17-24.png

    Then change name of engine at Line 2 and at Line 5, different between these two is that name on Line 2 is used by game internally and Line 5 is what you see in game:
    upload_2017-4-25_14-10-8.png

    Step 10:
    Now that we are all set, we can start to make the changes, so I decided to change torque curve to what I happened to have from Ford 428 Cobra Jet, I made quick chart of numbers with 500rpm resolution:
    upload_2017-4-25_13-31-21.png
    You can also see typical problem with dyno data, it does not go to low rpm and you have to estimate what 500rpm to 2500rpm range would be, research, read a lot, watch videos, try to find more data, that takes time

    So, what I usually do is this:
    upload_2017-4-25_13-39-15.png
    So what I'm doing here is aiming for smooth curve, that does not kink quickly up or down, for example I could type in values like this:
    upload_2017-4-25_13-44-39.png
    Of course testing, driving, researching etc. is required to get it properly right, also engine's dynamic friction parameters eats up some power, so does transmission, differential etc. So when you have dyno numbers that are torque from the wheels, you need to increase torque in engine file to get same torque to wheels as IRL, use torque curve app in game to see how it looks and adjust accordingly to get correct amount of power.

    If you don't know how to make charts in Excel, you can look tutorial from YT about it, there should be plenty. I made RPM lines with shapes, just drew some lines there to make it easier to read.

    Step 11:
    After you have spent hours and maybe days of researching to make realistic engine, have got torque curve nice and smooth, it's time to put numbers in (of course you can slap any random numbers you like, but that does not make quality mod).


    So under mainEngine we have section called torque and it opens with '[' and also closes with ']' inside the torque section we have rpm bins, for example [500, 380], defines 500 rpm at full throttle engine produces 380Nm of torque.
    upload_2017-4-25_13-51-32.png
    Note that I added new RPM bins there and changed rpm numbers from original, also below torque section I changed maxRPM to be 6000, can't remember now exact maximum rpm for engine, it depended from year I think and later ones had something bit over 6000rpm limiter I think, earlier ones did self destroy without limiter after some high rpm abuse, but for purpose of tutorial I believe 6000rpm will be fine, you can change that to whatever you wish.

    Save changes!

    Step 12: Getting new motor into game

    First we can get rid of barstow_engine.jbeam that we copied to our work folder in (more power to Barstow\vehicles\barstow) so delete that:
    upload_2017-4-25_13-59-42.png

    Open more power to Barstow folder and compress vehicles folder with right mouse button click like in image:
    upload_2017-4-25_14-4-9.png

    You should have something like this, you can really name zip anything you like, good idea to add your name and maybe even version number so it will not be conflicting:
    upload_2017-4-25_14-7-6.png

    Contents of zip should be like this:
    upload_2017-4-25_14-12-41.png

    Step 13: Testing mod in game
    Drag and drop mod normally to Documents\BeamNG.Drive\Mods and test in game your engine should appear in list like here you can see mine named as 428 CJ V8 Engine
    upload_2017-4-25_14-21-39.png

    NOTE: make sure to use 4bbl carburetor intake as with 2bbl your brand spanking new torque curve will be ignored!

    That is just the beginning, we did not even touch slots yet and that is one important aspect that you need to learn, check Wiki it has information, but sometimes bit hard to digest form. Also when working with bigger project there is ways to get changes to game faster, but for start this should help a bit, you should now be able to make new parts for the car, like engines and transmissions.

    Making 3d models and textures is tutorial that someone else will (hopefully) make. This took me over 2 hours to botch up.

    More information: CombustionEngine
     

    Attached Files:

    • upload_2017-4-25_14-40-18.png
    • upload_2017-4-25_14-49-4.png
    • upload_2017-4-25_14-52-55.png
    • upload_2017-4-25_14-56-44.png
    • upload_2017-4-25_14-58-9.png
    #1 fufsgfen, Apr 25, 2017
    Last edited: Apr 28, 2017
    • Like Like x 7
    • Agree Agree x 2
    • Informative Informative x 1
  2. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    I love that you're writing tutorials for newcomers, makes life much easier :)
     
    • Agree Agree x 3
    • Like Like x 1
  3. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    If you want to add it in here, I made an engine generator... it can literally generate a BeamNG ready torque curve as accurate as you wish out to 40 data points... or more if you want to take it from the calculations page. It is designed to just take a couple of parameters off of any engine you can find on the internet (bore, stroke) in either English or SI units and spit out a fairly accurate torque curve. Currently it has an L83 Chevy V8 plugged into it. This sheet can also be used for suspension calculations and gear ratio calculations as well.

    https://drive.google.com/open?id=0B24uvBKGyYwGVkNIUk9pVWdaM1U

    I am updating it all the time... I have done 13 updates to it so far.

    I made this in Excel 2016. Shouldn't make to much of a difference, hopefully.
     
    #3 atv_123, Apr 27, 2017
    Last edited: Apr 27, 2017
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I think that anything that helps newcomers is welcome here.
     
  5. IPlaygames360

    IPlaygames360
    Expand Collapse

    Joined:
    May 4, 2017
    Messages:
    7
    is there a way you can download it? or make a video? Becuase I'm stuck on step 9.
     
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Where on step 9 you are stuck? I might need to break that step to parts and revise it to make it more clear if people get stuck, so it will help if you can tell what is exact position that is giving trouble, so I can help you trough and improve instructions based on that.
     
  7. CreasingCurve

    CreasingCurve
    Expand Collapse

    Joined:
    Jan 19, 2016
    Messages:
    940
    Automation is also a great way to make a quick torque curve for most engines.
     
  8. IPlaygames360

    IPlaygames360
    Expand Collapse

    Joined:
    May 4, 2017
    Messages:
    7
    Right now im stuck on Step 10. i dont understand what I'm supposed to do here, I'm trying to take a truck that's too fast and does too many wheelies and the engine keeps restarting, trying to lower it RPM and torque. Halp
     
  9. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Step 10 is about making torque curve in excel and making a graph, so you can see how torque curve looks, which makes it easier to make smooth, especially important when real world data does not cover the lower rpm range.

    In step 11 you make changes to game files and that is where you lower torque curve for your truck.
     
  10. Graf LOLtube

    Graf LOLtube
    Expand Collapse

    Joined:
    Jan 31, 2017
    Messages:
    41
    This engine stuff looks like math
     
  11. Dealercrash

    Dealercrash
    Expand Collapse

    Joined:
    Apr 1, 2016
    Messages:
    3,122

    upload_2017-7-30_11-17-45.jpeg
     
    • Like Like x 1
  12. sleek.i

    sleek.i
    Expand Collapse

    Joined:
    May 31, 2017
    Messages:
    7
    i find that automobile-catalog.com is also a good place if you want torque curves, gear ratios etc.
     
    • Agree Agree x 1
  13. kaizer moonhawk

    kaizer moonhawk
    Expand Collapse

    Joined:
    Jul 13, 2017
    Messages:
    132
    when i go straight to vehicles i get my pc files i now thats normal but when i go to vehicles through the cache folder i find only modded objects ut foud it
     
    #13 kaizer moonhawk, Sep 27, 2017
    Last edited: Sep 27, 2017
  14. Any Name You Wish

    Any Name You Wish
    Expand Collapse

    Joined:
    Apr 19, 2019
    Messages:
    75
    I know this is old, but I have a problem
    wot.jpg
    when I follow step two, and try to find the Barstow in my files following what you did, (my steam apps is in steam library that's normal)
    it's literally not there, in facts, there's not that many cars there at all...
    what am I doing wrong?

    this whole modding thing is confusing and there's nothing on the internet that actually shows you step by step what to do and why...
    :/
     
  15. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    That looks super odd, there should not be cache folder there at all and vehicles should be compressed folders instead of normal folders :confused:

    Not sure what is wrong there, but if Barstow works in your game, then it must be that your actual game is in some other folder, but to me that looks like broken install, however it can be something else messing things up.
     
  16. Any Name You Wish

    Any Name You Wish
    Expand Collapse

    Joined:
    Apr 19, 2019
    Messages:
    75
    ok, thanks for the info, ill reinstall it tomorrow and check back.
     
  17. Cat Military

    Cat Military
    Expand Collapse

    Joined:
    Apr 23, 2017
    Messages:
    8
    I have a question. I'm working on an engine for the pickup and on step 4, I can't find the J-beam for the engine.
    I literally do not see a pickup_engine.jbeam file Thanks in advance!
     
    #17 Cat Military, Aug 19, 2019
    Last edited: Aug 19, 2019
  18. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    BeamNG.drive\content\vehicles\common.zip\vehicles\common\pickup\pickup_engine_**.jbeam
    ETK 800/K Series engines and Gavril D/H Series/Roamer engines are in the common folder.
     
  19. Cat Military

    Cat Military
    Expand Collapse

    Joined:
    Apr 23, 2017
    Messages:
    8
    Thanks!
     
  20. TheRealPhil

    TheRealPhil
    Expand Collapse

    Joined:
    Nov 29, 2012
    Messages:
    127
    I was always pissed cause there isnt much power to be had without a turbo, and the adjustable rev limiter never let me go as far as i pleased. Now my 200BX has ITB's, has 240hp@8200 and wont stop till 9000. Also gave it a grunty sound, its a blast!
     
  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