(imported from here) DriveEditor allows for quick vehicle configuration, by editing the .jbeam files directly. In future updates, it will also allow you to add your own nodes. It is 100% free, and the download link is not monetized. I make these programs as a hobby! If you get a message about unable to parse a number of files, it's usually because the jbeam file is invalid (unless I've messed up somewhere). I found that a number of their configs are actually just broken (usually missing commas between array elements) I know that jbeam allows for missing commas in place of a newline, but sometimes they just forgot a comma on the same line. It was a massive headache! Luckily, most of their files are absolutely fine, so if you get more than a few files it can't parse, do let me know and I'll look into it. Features: Auto saves as you type Saves your BeamNG install as a setting, rather than hard-coded string. So when they release updates, and the install directory changes, you can just change the setting rather than wait for me to update. Full jbeam parsing, to allow total flexibility of editing Smart lookahead (so common config array structures (like 2-level arrays) will be presented in a multi-column format for easy editing, and the tree view for arrays will display the first element) Type detection for boolean values (so that editing is a checkbox) and decimal/integers (so that saving them does not save them as a string, and maintains the original type) Tab index to allow you to quickly move between edit boxes by pressing tab Component creation by duplicating existing components Custom node adding directly from the editor Planned features: (done) Type detection (so numbers will be a number box, booleans will be a check box, etc.) (done) Custom node adding (So you can create vehicles from within the editor) (done) Tab index (So you can tab your way through values to edit them easily) Warnings: Comments will be stripped from the .jbeam files, and the layout of the file will be modified to JSON standard. Sorry about this. It can still be easily read and edited directly, but I do recommend backing up your vehicle folder just incase you want the old files back (though I'm inclined to think updating Drive would just re-download them if you want them again) Techie stuff: The config files are stored as .jbeam, which is some variant of JSON that I had lots of fun regex-ing to convert to valid JSON. I figured there is little point in making a parser for a format that is so similar to JSON. After it's been converted to valid JSON, the JSON parsed with the Json .NET library, and then loaded into a tree view (as you see on the left, above). Clicking on nodes will recurse and add all the top-level values to the editor, on the right, where they can be modified easily. As soon as the value in the box is modified, the JSON is re-created, and saved instantaneously. Update v0.5: Added node adding Improved performance in editing nodes by refactoring parts of the code (imported from here) Download link (see bottom of page): http://bitnode.co.uk/driveeditor-vehicle-config-editor-for-beamng-drive/#download REMEMBER: It will auto-save as you type, there is no save button! If you'd like one added, let me know and I'll update it Edit: I forgot to mention, just press "CTRL+R" while in game to reload the vehicle configs after editing!
No problem, feedback is always appreciated if you do try it and find something could be done better! Thanks
Actually all commas are optional in jbeams, not just between lines. We have a python script that converts a jbeam (with optional commas) to JSON. The python script is essentially a wrapper for regexes, so that it can be easilly transferable to other languages too: Code: import re import sys import os for fn in sys.argv[1:]: if not os.path.isfile(fn): print "file not found: ", fn continue f=open(fn, "r") j=f.read() f.close() j = re.sub(r'\r\n','<_NEWLINE_>',j) j = re.sub(r'\n','<_NEWLINE_>',j) j = re.sub(r'((?:(?:"[^"]*?"|-?[\d.]+[eE]?[+\-]?\d?)[\s\n]*:[\s\n]*(?:"[^"]*?"|-?[\d.]+[eE]?[+\-]?\d?|[\[{]|false|true|null))|"[^"]*?"|[\]\[{}]|-?[\d.]+[eE]?[+\-]?\d?|false|true|null)', r'\1,', j) j = re.sub(r',([^[\]{}\\"\-\dtfn]*?),', r',\1', j) j = re.sub(r',([^[\]{}\\"\-\dtfn]*?),', r',\1', j) j = re.sub(r'\[,([^[\]{}"\-\dtfn]*?)\]', r'[\1]',j) j = re.sub(r'\{,[^[\]{}"\-\dtfn]*?\}', r'{\1}',j) j = re.sub(r'([[{]),(?=[^[\]{}]*?[[{"\-\dtfn])', r'\1', j) j = re.sub(r'([\]}]),(?=[^[\]{}]*?[\]}])', r'\1', j) j = re.sub(r'(["\-\dle]),(?=[^[\]{}"\-\dtfn]*?[\]}])', r'\1', j) j = re.sub(r',$','',j) j = j.replace('<_NEWLINE_>', '\n') f=open(fn, "w") f.write(j) f.close()
Thank you very much, I will incorporate these regex substitutions in the next update! Great to have support from the devs, I do appreciate it.
I tried to run this, but my avast! said it was a suspicious program, so it forced killed DriveEditor, I can't run it since it says it could has Malware or a Virus.
AWESOME! Nice work, thanks very much this is a lot easier and more convenient than editing the files directly thanks a lot!!!
I think "create engine (based on current car)", "create transmission (based on current car)", "create a turbocharger (based on current car)" and "create a differential (based on current car)" buttons would be handy. Saving should be possible to separate .jbeam file for preserving modifications when the game update is called from the updater (that would otherwise overwrite modified ones).
Awesome ideas! I'll add it to a growing list of "to-do"s So if I understand correctly, you'd be "inside" a file, like so: (imported from here) Then somewhere, there'd be a button to "create engine based on this engine", which would create something like "fullsize_engine_v8.jbeam", which in turn could be modified to your liking, while preserving the original jbeam AND all the required nodes in the custom jbeam. How does that sound? That could then be easily applied to any component, like wheels, etc. Thanks for all the feedback!
Looks great. I can see this coming in very handy. Thanks! I will let you know of any issues when I find them.
I cant seem to get to work the predefined path that the program comes up with C:\Users\joshu_000\AppData\Local\BeamNG\BeamNG-DRIVE-0.3\vehicles is not the correct path and I get an error BeamNG vehicle path is not valid. My correct path is C:\Users\joshu_000\AppData\Local\BeamNG\BeamNG.drive-0.3\vehicles and when I try to edit the path I cant delete the original path and put mine in it just wont let me lol. and when I pull up the drop down menu to change the path the APPDATA folder does not show up on the drop down menu. Do you know how to fix this Thanks for your help in advance Josh.
Hey Josh, So you can't type directly into the directory path setting box, which is why it won't let you manually change it. The reason AppData may not show up on your folder browser is because AppData is a hidden folder on Windows. It's an easy fix, though, just open up any folder (outside of DriveEditor), click "Organize" in the top left, then click "Folder and Search Options": (imported from here) Now just click the "View" tab at the top, then click "Show hidden files and folders": (imported from here) Then just hit "Apply" and go back into DriveEditor, click Options -> Settings -> Browse, then under Josh -> AppData -> Local -> BeamNG, you should see your install folder! Remember to select the "vehicles" folder inside it, not the BeamNG install folder! Hope that helps.