Creating Configurations for Automation Cars (2020/v1.18)

Discussion in 'Content Creation' started by DizzyWombat, Feb 27, 2020.

  1. DizzyWombat

    DizzyWombat
    Expand Collapse

    Joined:
    Feb 26, 2020
    Messages:
    1
    Creating Configurations for Automation Cars

    0: Preamble
    1: Export Car from Automation
    2: Unpack the Mod
    3: Configuration Files
    4: info.json
    5: info_MODELNAME.json
    6: TRIMNAME.pc
    7: Pictures!
    8: Repack Mod and Test
    9: Completion, Conclusion and Cache Issue
    10: The Car




    0: Preamble

    After wrestling with this for 2 days I've finally got it figured and sorted. The provided tutorial on the Wiki didn't work for me and I believe it is because of the Cache system BeamNG uses, as covered below.

    So here it is- A step by step guide to creating configurations for Automation cars, as well as adding pictures for the Selection Screen and Garage. I'm also going to try to explain how and why it works the way it does to the best of my ability, to make it easier to reverse engineer the information into something different and make it more useful.

    Any writing in Red represents a variable which will be different for your car, such as the name of the Model/Car and Trim.

    1: Export Car from Automation

    Export the car using the in-built tool in Automation and name the vehicle. Whatever you name the car will be known as VEHICLENAME



    The car will then be exported to your BeamNG Mods folder. If you can’t find this folder click the folder icon on the export screen in Automation. The car will be packed into a mod which is already compatible with BeamNG and can be driven. However, it will lack tonnes of information and detail which we will now add.

    The mod will be packed into a zip file named after the Mod Name entered in Automation. In this case it will be delta.zip (always lower-case no matter what you type)

    Now we can open up BeamNG and see our car in the Garage or of course drive it around. But...



    ...But of course this looks really shitty and lacks all detail. We've got a poor quality image on the list, no images at all for the trim itself and no stats in the left or right columns. It also has no preview picture on the Selection Screen either. Lets fix that.

    2: Unpack the Mod

    Now we need to un-zip/unpack the mod to access the files within. For this tutorial I will be using WinRar. Either right click the mod and select Extract Here or drag and drop the folders inside the mod to out of it.

    We should now have the following folder structure;

    MODNAME.zip > vehicles > VEHICLENAME > Configuration files, pictures, models and textures

    MODNAME.zip > art > sound > blends > Code to tell game how to blend engine sounds

    MODNAME.zip > art > sound > engine > VEHICLECODE > Engine Sound Wav Files

    We don’t need to pay any attention the the art folder and subfolders, so leave those alone.

    3: Configuration Files

    Now we need to create and edit our Configuration Files. These will dictate all our car’s details, such as the Make, Model, Power and Trim. None of these affect the car when we’re driving it, but they’ll allow us to see this information on the Selection Screen and in the Garage.

    We will need the following files in our VEHICLENAME folder;

    info.json – General information for the Vehicle

    info_TRIMNAME.json – Information for the Specific Trim

    TRIMNAME.pc – Part Configuration File

    Automation automatically generates the info.json file for us. However, it is significantly lacking in detail. Lets sort that out.

    4: info.json

    Open up the info.json file in Notepad++ (It’s free to download and makes life so much easier. Trust me)

    Currently mine looks as follows;

    Code:
    {
        "Name": "Delta H4Sport",
        "Author": "Camshaft Software LTD",
        "Type": "Automation",
        "ExporterVersion": 191030,
        "AutomationVersion": 1912029952,
        "default_color": "Default",
        "colors": {
            "Default": "0.858824 0.858824 0.858824 1.400000",
            "Black": "0.010000 0.010000 0.010000 1.400000",
            "White": "1.000000 1.000000 1.000000 1.400000",
            "Red": "0.700000 0.100000 0.100000 1.400000",
            "Blue": "0.100000 0.200000 0.400000 1.400000",
        }
    }
    
    The Name has come from what we named the car in Automation when exporting the car. Its very important that you save the “Default” colour as this is the one you made in Automation. The other 4 colours are always the same on export. You can have as few or as many colour options as you want, and name them whatever you want. For me the default is white so I’ll rename it to that later, but you can leave it as Default if you want.

    Now delete all lines except this one "Default": "0.858824 0.858824 0.858824 1.400000", of which yours will be completely different, and paste in the following;

    Code:
    {
        //Name "Manufacturer""Model"
        "Name":"Delta H4",
        //Brand shown on the Selection Menu details page
        "Brand":"Tokai Motor Company",
        "Author":"CM",
        //Country of manufacture. Most real countries should work in BeamNG and provide a flag icon for the car.
        "Country":"Japan",
        //Type for filtering on selection screen
        "Type":"Car",
        //Body Style shown in garage
        "Body Style":"Hatchback",
        //Years of manufacture either use the range as below or just a number with no speech marks
        "Years":{"min":1988, "max":1990},
        //Derby Class shown in garage
        "Derby Class":"Sports Car",
        //default_pc Default model comes first on selection screen
        "default_pc":"sport",
        //default_colour Colour selected by default. Must match colour name in "Colors" list
        "default_color": "White",
        "colors": {
        "White": "0.858824 0.858824 0.858824 1.400000",
        "Red": "1.000000 0.000000 0.000000 1.520000",
        "Black": "0.010000 0.010000 0.010000 1.400000",
      }
    }
    
    Now change the values to whatever best represents your car. Note that the "Name" is for the Model not the Trim. For example this is the Delta H4 and the trim will be Sport, therefore it will be named Delta H4 Sport, but the trim name is from the info_TRIMNAME.json

    Any line preceded with // is a comment line and can therefore be deleted to clean things up. They’re quite useful for telling you how each command works. The other lines however are providing information which will be used for this Model of car. The specific Trims will have lots more information in, which can vary from Trim to Trim. This Model information will apply to all trims for this Model/Car. You can change the colours here to whatever you want, for example I’ve changed Default to White.

    Be sure to update the “default_color” from “Default” to whichever colour you want to have as the default for the car.

    Save our new info.json and overwrite the old one (we won't be needing it) We're now done with this file and should only need to make changes in order to add colour variants.

    Here's the difference in-game now we've made our info.json file

    Not an amazing difference really, but we've laid the groundwork. The real difference will be made with the next file.

    5: info_MODELNAME.json

    For this we will need to create the file, as Automation doesn't generate a Trim/Variant config file. Make a new file in Notepad++ and paste in the following code.

    Code:
    {
      //Configuration is Trim Title, goes "Vehicle Name""Configuration"
      "Configuration":"Sport (i4 1.9L Turbo)",
      //Description of trim type
      "Description":"Sports Trim with a moderately powerful 1995cc Turbocharged Inline-4 Engine",
      //Value in Dollars
      "Value":21000,
      //Performance Class higher means higher performance vehicle
      "Performance Class":"6",
      //Config_Type Factory/Custom/Tuned
      "Config Type":"Factory",
      //default_color Colour selected by default for this trim
      "default_color":"White"
      //Weight in KG of Car
      "Weight":1305,
     
      //Performance Stats for Garage right column and Perforamnce tab on Selection Screen
      //Torque Number in lb-ft
      "Torque":233.07,
      //TorquePeakRPM RPM number or RPM Range eg. "5000"
      "TorquePeakRPM":"3400",
      //Power Number in HP
      "Power":212,
      //PowerPeakRPM RPM number or RPM Range eg. "4500-5200"
      "PowerPeakRPM":"5400",
      //0-60 mph Number of seconds
      "0-60 mph":6.3,
      //0-100 mph Number of seconds
      "0-100 mph":0,
      //0-200 mph Number of seconds
      "0-200 mph":0,
      //60-100 mph Number of seconds
      "60-100 mph":0,
      //60-0 mph Distance in FT
      "60-0 mph":111.8766,
      //Braking G Number of Gs
      "Braking G":1.12,
      //Top Speed Number in Meters Per Second (Divide MPH number by 2.23694 to get Meters Per Second)
      "Top Speed":62.5855,
      //Weight/Power Number in KG/KW (Divide KG/KW by 2.23694 to get lbs/bhp in garage)
      "Weight/Power":0.04649,
      //Off-Road Score Number between 1-100
      "Off-Road Score":10,
      //Propulsion Type of engine ICE (Internal Combustion Engine)
      "Propulsion":"ICE",
      //Fuel Type Gasoline/Diesel/Electric
      "Fuel Type":"Gasoline",
      //Drivetrain FWD/RWD/AWD/4x4
      "Drivetrain":"AWD",
      //Transmission Auto/Manual/Sequential/DSG
      "Transmission":"5 Speed Manual",
      //Induction Type NA/Turbocharged/Supercharged
      "Induction Type":"Turbocharged",
    }
    Understandably, this might look confusing and overwhelming. I've left plenty of comments to explain what each line means. The most confusing is probably that BeamNG measures Top Speed in Meters Per Second instead of KPH or MPH so you'll need Google or a Calculator. It also uses a crazy calculation for Weight to Power ratios.

    Now set this file up to match your car. You'll have to dig for this information in the workshop in Automation and do some converting of numbers. I've used the Automation Off-Road Score and I'm not sure exactly how that translates.

    A note about Performance Class. This seems to be an arbitrary value used in BeamNG. With 1 being the lowest, slowest cars and the highest in the Vanilla game being 11(?) therefore any kind of Hypercar or LMP car would be higher than this. I've gone for 6 for this car but I'll probably change it when I've had a closer look and tried to chart it out.

    Once you've got this file nice and configured. Save it as info_TRIMNAME.json in the vehicles > VEHICLENAME > folder. This TRIMNAME MUST also match the name of our TRIMNAME.pc Parts Configuration file and our TRIMNAME pictures.

    6: TRIMNAME.pc

    The third and final file is by far the simplest here, and is only 8 lines long! For vanilla BeamNG cars this file is huge as it dictates which parts this trim uses. However, I haven't matched up making this work for Automation cars yet (Work in Progress)

    Automation will already have generated this file for us. It will be named MODNAME.pc which in this case is delta.pc. Now rename this to TRIMNAME.pc . As this trim will be called Sport, I'll name it sport.pc. For you that may be the engine size, transmission or type, such as auto.pc, 250ci.pc or race.pc.

    IMPORTANT:
    As this is our Default Trim, the name MUST match the "default_pc" value in our info.json we created earlier. Hence this value being "default_pc":"sport" for my config.

    Now open the .pc file Notepad++, delete all lines and paste in the following;

    Code:
    {
    "vars":{
    
    },
        "parts" : {
    },
        "format" : 2
    }
    Hit save and that's it!

    At least for our Config Files.

    Here's what we see in-game now. Much better. All sorts of detail and it looks super slick... Except the lack of preview pictures is really holding us back.


    7: Pictures!

    default.png – Picture shown for Vehicle on Selection Screen and Garage List

    TRIMNAME.png – Picture shown for Vehicle on Selection Screen for Specific Trim

    TRIMNAME_garage_side.png – Picture shown for Trim in Garage and large Preview picture in Garage

    For this we need to get creative and get the camera out... Figuratively speaking!

    Open up Automation and go to Photo Mode for the particular Model and Trim we've imported to BeamNG.
    https://www.beamng.com/attachments/...6/?temp_hash=f3f9a6734668fa8ea85cc1db99a3b1b5

    We need to take two pictures here. I recommend one with the car facing left at an angle and one right. I would also highly recommend saving these as Presets once you're happy. This way you can take matching photos of any of your cars for BeamNG pictures.

    Automation will make you a PNG file, which is perfect as BeamNG loves those. Move the two pictures to your vehicles > VEHICLENAME > folder. You will see there is already a crappy low quality image from Automation there called default.png. Move that picture to the trash, where it belongs and name your Left Facing picture default.png. This will be the picture to represent the whole car in the Selection Menu and Garage. Next rename the Right Facing picture TRIMNAME.png. Lastly, copy this image and name the copy TRIMNAME_garage_side.png.

    Now all that's left is to Repack the mod and check its all okay.

    8: Repack Mod and Test

    Lastly, we need to repack the mod into a .zip so BeamNG treats it properly.

    To do this, select both the art and vehicles folders, right click, Send To, Compressed (Zipped) Folder. This packs the mod neatly into a .zip file which can be uploaded and sent around and allows BeamNG to see it as a mod.


    Now we'll check it worked.
    Looking SWEET in the garage.

    Loads better on the selection menu. The picture doesn't match BeamNG's vanilla car pictures but I think it still looks great and helps me find my cars easier.

    And we can see all the performance stats for this trim like in the garage!


    9: Completion, Conclusion and Cache Issue

    Finally all complete. This is the easiest and best way I've found to make Automation cars come out how they should to begin with. This feature is awesome already and I understand Automation's devs have higher priorities than making the exporter run smoother.

    As mentioned at the beginning, I ran into an issue with BeamNG's Cache which kept causing the game to not read my TRIMNAME.info file. If you run into the issue in which BeamNG seems to be loading an older variant of your mod or not seeming to load the changes you've made after repacking a mod, delete the Vehicles Cache found in;

    My Documents > BeamNG.drive > cache.VERSIONNUMBER >

    I just delete the whole vehicles folder here, but there will be folders inside specifically for your car/mod.



    10: The Car

    I've also attached the Mod made in this tutorial. That way you can pick it apart or reverse engineer it to work for your mod.



    Thanks for your time and I hope this saves you the time it took me to figure out,
    Throw any questions in as a reply and I'll try to solve and issues you have,

    Thanks,
    Dizzy
     

    Attached Files:

    • Like Like x 3
    • Informative Informative x 1
  2. G-Farce

    G-Farce
    Expand Collapse

    Joined:
    Apr 1, 2016
    Messages:
    585
    This looks so extensive. Wish I could give more than just a Thank you!
     
  3. Jammy25

    Jammy25
    Expand Collapse

    Joined:
    Jul 27, 2018
    Messages:
    93
    Hello, I’m having difficulties getting this to work in conjunction with my mod, I have simply copied and pasted the code and changed the values and file names that are stated to need changing however when I go back in to the game after doing this, all of my vehicles (modded or vanilla) are gone in the vehicle selector (garage is missing atm). I know it is to do with the modifications as reversing the modifications makes everything work again or simply moving the modded file in to a different folder such as downloads will also make everything work again. I have however got the picture working, so there’s a silver lining
    --- Post updated ---
    Actually never mind, the etk800 json files swapped out with correct information worked
    Now to figure out how to add configurations
     
    • Like Like x 1
  4. RogueSoldier152

    RogueSoldier152
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    8
    Thank you so much for this! All I am wondering, is how do put multiple trims in the one section. I have two cars that are the same model, but it won’t let me put them together
     
  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