Automation2BeamNG Converter

*So today after surfing the webs I found a video on Automation’s Facebook page about my EngineConverter :smiley:
I realised I just posted it on the BeamNG forums and forgot to create a post here. Sorry for that.

Now you don’t need to register for BeamNG to use it. You can test the demo of BeamNG and decide to buy it or not. My recommendation would be: “Buy it! It’s fucking awesome!”

I thought why not be lazy and you copy+paste your post from BeamNG but apparently I can only attach 3 files :stuck_out_tongue:
So maybe just watch the video linked below to get an Idea of the program itself:
youtu.be/RAol-VrZg3w

If you are registered at the BeamNG forums you can take a look at the pictures in the OP:
beamng.com/threads/9960-Automation-Game-Engine-Converter
*


Ever since I’ve played Automation Game, I’ve loved the idea of being able to actually drive the engines I’ve created.
This was not possible without much of manual, hard work. Porting them to BeamNG was a pain in the ass.

So this is why I wrote this little Tool, simply called the “EngineConverter”.
What this tool does, is to take all the hard work and creates a fully functional jbeam tuning which you can select ingame!
Basically it analyses the automation game lua file and creates a jbeam torquecurve which is then available as a tuning(*) in BeamNG

**
To make them work correctly, make sure to set the Transmission and any Differential ingame (strg+w) to “Empty”.
Some cars have the differential part in the engine file, some have them in the suspension file.

The conversion works perfect for “normal” engines which are not totally overpowered.

Please also note that right now I do NOT support the experimental version of BeamNG!
**

If you start EngineConverter for the first time, Configuration Wizard will appear. Just do what he wants you to do.
If everything is set, you can choose to restart the configuration or start EngineConverter.

Now you just need to Drag and Drop a file on the big button at the top of the window or click the button to choose an engine.

If you click on “Create Tuning” you will be preseneted with a list of all your installed vehicles.
Choose one and click on the “Create” button.

If your file was created correctly, you’ll get a message saying where the file was created. Else you’ll get an error message about what went wrong.

The created jbeam engine curve is very smooth as it is based on the Automation Game rpm settings. Meaning, you have a point every 100 rpm’s.

Here is an example of the torque curve that will be generated by “EngineConverter”:

"enginetorque": "rpm", "torque"] [0, 0], [500, 219.38865661621], [600, 225.77734375], [700, 230.80348205566], [800, 236.77087402344], [900, 241.56915283203], [1000, 246.45379638672], [1100, 250.2110748291], [1200, 253.46963500977], [1300, 258.35018920898], [1400, 264.01748657227], [1500, 269.33700561523], [1600, 273.34963989258], [1700, 276.93515014648], [1800, 280.18377685547], [1900, 283.02514648438], [2000, 285.90567016602], [2100, 288.61053466797], [2200, 291.0807800293], [2300, 293.30358886719], [2400, 294.91012573242], [2500, 296.43222045898], [2600, 298.23071289063], [2700, 300.03717041016], [2800, 301.49444580078], [2900, 302.79168701172], [3000, 303.84979248047], [3100, 305.40560913086], [3200, 306.66146850586], [3300, 307.81573486328], [3400, 308.08044433594], [3500, 308.19219970703], [3600, 308.25720214844], [3700, 309.36123657227], [3800, 309.10284423828], [3900, 310.11791992188], [4000, 309.84524536133], [4100, 311.29556274414], [4200, 311.99722290039], [4300, 313.42236328125], [4400, 314.78051757813], [4500, 315.47589111328], [4600, 316.93930053711], [4700, 318.07189941406], [4800, 318.92999267578], [4900, 319.08459472656], [5000, 319.30249023438], [5100, 318.90286254883], [5200, 319.06164550781], [5300, 318.55697631836], [5400, 318.70623779297], [5500, 318.0578918457], [5600, 317.74389648438], [5700, 316.52780151367], [5800, 315.10021972656], [5900, 313.68270874023], [6000, 312.00274658203], [6100, 310.43402099609], [6200, 308.09716796875], [6300, 306.03015136719], [6400, 303.47686767578], [6500, 301.24105834961], [6600, 298.93209838867], [6700, 296.06143188477], [6800, 293.63653564453], [6900, 291.12878417969], [7000, 288.6516418457], [7100, 285.68255615234], [7200, 283.07376098633], [7300, 280.75570678711], [7400, 278.13482666016], [7500, 275.49533081055], [7600, 272.7356262207], [7700, 269.85729980469], [7800, 267.17568969727], [7900, 264.51916503906], [8000, 261.71713256836], [8100, 258.56063842773], [8200, 255.89715576172], [8300, 253.45272827148], [8400, 250.5276184082], [8500, 247.58438110352], [8600, 244.66566467285], [8700, 241.77410888672], [8800, 239.01446533203], [8900, 235.705078125], [9000, 232.51754760742], [9100, 229.04861450195], [9200, 225.2222442627], [9300, 220.96542358398], [9400, 216.05117797852], [9500, 210.84107971191], [9600, 205.51599121094], ], "engine":{ "idleRPM":500, "shiftDownRPM":7500, "shiftUpRPM":6000, "maxRPM":9600, },

Special thanks to Andrew(Daffyflyer) for helping me with the lua read method, ConeDodger240 for making the video, Automation and BeamNG Devs in general for making these awesome games and everyone that helped during bug fixing!

Now go and have some fun testing your engines :smiley:
EngineConverter.zip (1.92 MB)

    • only if the car supports tunings. Otherwise you need to edit the jbeam to support it. It’s not that hard!

This is pretty sweet!

Holy crap this is what many of us have been hoping for, for a long time!

I will definitely give this a shot when I get a chance!

P.S. finally found out how to sign up for alpha. HURRY UP AND TAKE MY MONEY!!!

P.P.S so this is when I discover just how truly terrifying driving a car with an Ascension Mephisto motor is where the torque curve suddenly goes from about 800Nm to 2000Nm at 4000rpm… can’t drive this thing with the keyboard that’s for sure!

How difficult would full cars be?

Impossible if you ask me.

The amount of modelling is one thing, denoting physics parameters to each and every point in the body makes for quite a bit of work, it’s pretty crazy! At least creating parts is fairly modular and you can make your own tunes pretty easily.

Go Andrew! Apart from using crayons to colour in cars, he also code and writes with crayons too! His skills are expanding :stuck_out_tongue:

I love the mod, and it was no trouble in spending a bit of time to help you build in a more robust and reliable solution.

In regards to exporting full cars to BeamNG, nothing is impossible, it just gets to towering levels of complexity. I would love to get some sort of Automation car exporting, but anything like that is such a time sink. My best bet would be making some sort of SDK/API that outputs data from Automation (such as mesh data, textures, car data etc), and the community can write the layers to export to their favourite games.

I you can converted the engine succesfuly, but you don’t have the engine tuning, this is the solution:

For example, you have this engine (the converted engine), and you open this with Notepad, you can find this in the first lines:

[quote]{
“hatch_engine”: {
“information”:{
“authors”:“gabester”,
“name”:“Automation2beamng”,
}
“slotType” : “hatch_enginetuning”,[/quote]

The red text is the problem: you need to change to this one:

[quote]{
“hatch_engine”: {
“information”:{
“authors”:“gabester”,
“name”:“Ibishu Covet 1.5L I4 Engine”,
}
“slotType” : “hatch_engine”,[/quote]

And you can find this in the BeamNG in the engine slider.

Alternatively, you can create a slot (if your car does not have it already), to allow your car to use tunings, e.g. in the fullsize car, i.e. the Gavril Grand Marshal (which comes with the install), the slot for Tuning is already located in the Fullsize_Engine.jbeam file:

"slots": "type", "default", "description"] "fullsize_exhaust","fullsize_exhaust", "Gavril Grand Marshal Exhaust"], "fullsize_transmission","fullsize_transmission_4A", "Gavril Grand Marshal Transmission"], "fullsize_enginetuning","", "Gavril Grand Marshal Engine Tuning"] ],

What you need to make sure is that the slot type matches, so where vmo has suggested you change enginetuning to engine, here, we have created a slot for Tuning, which will load the tuning file created by the converter (the header of which is shown below):

"fullsize_enginetuning_1": { "information":{ "authors":"gabester", "name":"Colossus 108x8T", } "slotType" : "fullsize_enginetuning",

This way, if you loaded both an engine and model (differential/transmission) into the converter, this will load all of the information in the file. Be sure to empty the Transmission slot in-game if you do so, otherwise they’ll conflict.

So… if i understood correctly this converter works also in the demo version?
(Yes, i will buy the BeamNG Alpha, i really like the game physics and design, but right now i can’t :confused: )

It should, yes. Though I went right ahead and bought the alpha without even playtesting because seriously, that trailer had me sold.

It was also at this point that I learnt that:

  1. My super powered cars that push 2000-3000hp need some really quite special components because putting that kind of power in things like the remade Crown Vic or even the sports cars completely ruined them in seconds. Hit the gas in the Crown Vic with a 3094hp engine? Goodbye wheels.

  2. The way the engine converter also tunes the clutch is vital, and massive props for doing a comprehensive job on it! However the clutch is so heavy and stiff that it seems that it will be completely impossible to drive those cars on the street, then again that should go without saying LOL. I haven’t looked into the clutch settings yet, maybe there’s a way to tune it though.

  3. Any kind of tyre with the traction to deal with 2000hp also needs to have a sidewall so stiff that the suspension must also be stiffened to the point, such that I have a choice of either flying every time I hit a bump like on the island, or travelling exclusively sideways. I have to reconsider my approach…

EDIT: Wait, realised that there is some missing info in the tuned files, which accounts for the difficult behaviour. You need to have these lines to the enginetuning code:

[quote]“idleRPM”:,
“shiftDownRPM”:
,
“shiftUpRPM”:,
“maxRPM”:
,
“inertia”:,
“friction”:
,
“brakingCoefRPS”:____
“burnEfficiency”:___
“throttleSensitivity”:____
“torqueReactionNodes:”:“e1l”,“e2l”,“e4r”][/quote]

The lines in green are the missing values. I was having serious trouble getting my cars moving and assuming it had to do with excessive clutch friction but that doesn’t seem to be the case at all. Adding in those extra lines fixed my problem though.

Just got BeamNG alpha, and have been playing around with the engine converter. I can only seem to get the engines to show up in the hatchback Covet

You should find that the grand Marshall (the full size) will also have engine tunes. This is because the .jbeam files have a slot created for “enginetuning”. Otherwise, you need to create a slot for it so the file knows to look for the enginetuning type file.

Its easy once you figure out how, but nobody has actually posted clear instructions on it, so I might do so later.

It’s fun BUT Beamng doesn’t handle some engines very well. 100-200hp I4’s, sure they work great. 350hp I4 nope… 0-60 in 3 days. Even my most modest v8’s wheel spin for days. Maybe I set my expectations too high, its fun but not ‘as fun’ as I thought it would be

Well if you take out a 1.5 60hp engine out of any car and place a 250+ hp V8 in it, you wouldn’t be suprised to see it drives like shit would you?
Same thing goes for BeamNG. The tires are still the ones used on the 1.5, suspension is still the old one etc.

So you need to make some things for youself. Mod the tires, so the have better grip. Mod the suspension so it matches your engine.

[quote=“Alex200SX”]Well if you take out a 1.5 60hp engine out of any car and place a 250+ hp V8 in it, you wouldn’t be suprised to see it drives like shit would you?
Same thing goes for BeamNG. The tires are still the ones used on the 1.5, suspension is still the old one etc.

So you need to make some things for youself. Mod the tires, so the have better grip. Mod the suspension so it matches your engine.[/quote]

I put all of the ‘race’ parts options on, it made a slight difference. I really don’t have the modding skills to go make new tires and suspension

[quote=“np1993”]

[quote=“Alex200SX”]Well if you take out a 1.5 60hp engine out of any car and place a 250+ hp V8 in it, you wouldn’t be suprised to see it drives like shit would you?
Same thing goes for BeamNG. The tires are still the ones used on the 1.5, suspension is still the old one etc.

So you need to make some things for youself. Mod the tires, so the have better grip. Mod the suspension so it matches your engine.[/quote]

I put all of the ‘race’ parts options on, it made a slight difference. I really don’t have the modding skills to go make new tires and suspension[/quote]

As long as you don’t want a complete new set of tires it’s just editing of textfiles. I recommend you reading the BeamNG wiki. There’s a lot of info on that.

I’ll give it a look in the morning.

Its not so much the handling that’s weird but its almost as if the car doesn’t have the stock engine with a stock ‘tune’ option it doesn’t work right. I built a 150hp I4 with the smoothest power band I could must and it took 6 years to get the covet (the hatch thing) to do 0-60, with most of that time trying to break the 40km mark. So then I plop a 250hp Turbo I4 with a very peaky power band and it starts up smooth and tops out at 120kmph.

The ‘not-a-grand marquis’ responds a little better to imported engines, but is still a little underwhelming for ‘mild engines’ and then wheel spin for days with powerful engines.

How the car responds to a motor ‘upgrade’ varies a lot, I don’t know if its something to do with the options, engine or just the game itself. I tried 10 different engines (to rule out fluke or ‘bad builds’ some of which other people built) and its still a little weird.

If you just import the engine, it may happen that the clutch and gearbox are just not tough enough to handle the power.
Best practice is to import complete cars from automation as you can also convert the transmission which should handle the power well enough.

You just need to make sure that you deselect the transmission in Part Selector in BeamNG.
So hit Ctrl + E and search for the transmission. Set it to none.
Search for the differential and set it to none too.

That should work quite good