Skip to content

August 17, 2013

12

DriveEditor – Vehicle config editor for BeamNG Drive

Another desktop application! This one was actually challenging, (which makes a change from other desktop applications I’ve made) and I learned a lot while creating a useful tool at the same time!

Well, useful if you like smashing cars in BeamNG’s Drive: a softbody car physics simulator which is much more fun than it sounds! Here’s the kind of stuff you can do after editing your vehicles:

If that’s sold you already, click here to go to the download.

So how does it work?

First, you might need to tell it where your BeamNG Drive vehicle directory is located (just go into Options->Settings), and then it will scan the chosen directory for vehicle config files. 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. After that, you get a screen with a huge tree on the left, and an editor on the right. You can edit values to your liking:

It saves automatically as you type, so you can hop back into BeamNG Drive and hit “CRTL+R”, and the config will be loaded!

 

Features

  • Automated scanning for .jbeam files
  • Full .jbeam parsing, allowing for total flexibility of input
  • Smart lookahead (so common config arrays will be presented in a multi-column format for easy editing)
  • 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
  • Auto update checker (can be disabled)
  • Component creation by duplicating existing components
  • Node deletion
  • 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)

Download

v0.5

  • Added node adding
  • Recoded a major portion of the code, improving editing speeds

DriveEditor
DriveEditor
DriveEditor-v0.5.zip
Version: 0.5
181.6 KiB
1596 Downloads
Details

 

 

Older releases:

v0.4:

  • Fixed bug where fullsize.jbeam would be incorrectly parsed
  • Added “Create component from…” function, so that parts can be duplicated and modified without editing the original
  • Patch v0.4.1: Made the “add new component” create JSON friendly validated names
  • Patch v0.4.2: Added automatic update checking (can be disabled) and “Delete node” option (right click on a node to open the menu)

DriveEditor (179.0 KiB)

(August 19th, 21:00)

v0.3:

  • Improved (but not perfected) jbeam parsing. At least now all default files should be able to be parsed
  • Added tab indexes to text boxes, so you can easily move between edit boxes by pressing tab
  • Fixed bug where text would be truncated on long labels (oops)
  • Added type detection, so values will be loaded, presented, and saved as their original types (e.g booleans will be checkboxes, integers will be saved without quotes, etc.)
  • Allowed for window resizing

DriveEditor (176.0 KiB)

v0.2:

  • Added loading screen, made it easier to browse arrays (useful for BeamNG’s use of arrays)

DriveEditor (176.3 KiB)

 

v0.1 – Initial release

12 Comments Post a comment
  1. estama
    Aug 17 2013

    Hello,

    Below you’ll find a python script (that only runs regexes) to convert jbeams to json (fixes the optional commas in jbeam):

    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’,”,j)
    j = re.sub(r’\n’,”,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(”, ‘\n’)

    f=open(fn, “w”)
    f.write(j)
    f.close()

    Reply
  2. estama
    Aug 17 2013

    Also nice work on the editor!

    Reply
    • Oliver
      Aug 17 2013

      Thank you very much for the regex, and thanks for the compliment! I’ll use this in the next update.

      Reply
  3. topias123
    Feb 15 2014

    It doesn’t work, says it can’t find the vehicle files. Could it be because i didn’t install the game in C:/?

    Reply
    • topias123
      Feb 15 2014

      Nevermind, it was just loading slowly :p

      Reply
  4. Bonbm
    Mar 30 2014

    Can it change the color of a car?

    Reply
  5. Sep 6 2014

    What’s up, all the time i used to check web site posts
    here in the early hours in the dawn, as i love to gain knowledge of more and
    more.

    Reply
  6. Sep 20 2014

    Testosterone is converted to dihydrotestosterone (DHT) which slows down or stops hair growth and produces weaker, shorter
    hair. This is because targeting the hair shaft without damaging the pigment of the skin can be quite a
    tricky process. Alopecia areata is an inflammatory condition which can make hair come out
    in patches or clumps.

    Reply
  7. There is also the second side of the story, which is a bit more
    critical about the trend of US jobs outsourced to companies in developing countries.
    If your moving company charges by the hour, make sure that you have
    everything ready to go long before they show up.
    The employer may want to explain how to do something differently than how you have been doing it.
    The problem arises when the volume of the data increases with the integrations of tools and applications such as customer relationship management,
    supply chain management, e-mail, wireless computing, ecommerce, online store, workgroup collaboration, smartphone integrations and various other factors.
    Therefore, if you have unstoppable mould growth in your home, it’s a sign of excess moisture and you need to take preventive measures against it.
    As soon as you’ve looked at all the principals,
    it’s time to have a trip to the self-storage facility itself to
    see what exactly they are offering as a portion of the package.
    Middle East region is hugely popular among expatriates as a career destination as people from all nationalities and
    religions come together to earn attractive salaries in return for their expert services.

    Professional call answering services enable offices everywhere to take advantage of the
    latest technology while maintaining a professional image.
    3rd party logistics providers don’t just stock and handle merchandise, they provide crucial support for shippers and
    retailers who are looking into overseas markets.

    Unanticipated incidents or acts of God such as fire or floods can be dangerous for
    every single business who relies on their stored paperwork.

    Reply
  8. Since many men and women are mindful that keeping up with your healthy weight range has several emotional and physical benefits.

    Failure to Diagnose an Ectopic Pregnancy – Is This Medical Negligence.

    Human Chorionic Gonadotrophin or better known as HCG is
    a naturally occurring substance produced in pregnant women.

    Reply
  9. Your mouth watering chicken salad is ready to serve. Blood HCG test: What
    is the best time for early pregnancy test. Yes, HCG is one highly
    effective product that is capable of giving its consumers a good result from
    the very first day of its consumption.

    Reply

Trackbacks & Pingbacks

  1. BeamNG Drive: Einsteiger-Tutorial für den Editor - Trolltest.de

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments