DriveEditor - Vehicle Configuration (.jbeam) Editor GUI

Discussion in 'Utilities and programming' started by Trumple, Aug 17, 2013.

  1. blinkingyellow

    blinkingyellow
    Expand Collapse

    Joined:
    Mar 9, 2013
    Messages:
    276
    Thanks for this, i will try to learn that tool for my project.
     
  2. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    Update 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

    Still having issues with the regex provided above, but I'll give it another go at some point. All default files should be able to be loaded now!

    Get it while it's hot ;)
     
    #22 Trumple, Aug 18, 2013
    Last edited: Aug 18, 2013
  3. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    Thanks so much and great tool.
     
  4. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    Update v0.4:

    • Fixed bug where fullsize.jbeam would be incorrectly parsed
    • Added "Create component from..." function (as requested), so that parts can be duplicated and modified while keeping the original. The new part can be selected in the part editor (ctrl+W)

    I highly recommend you update to this version!
    http://bitnode.co.uk/driveeditor-vehicle-config-editor-for-beamng-drive/#download

    Cheers folks
     
    #24 Trumple, Aug 19, 2013
    Last edited: Aug 19, 2013
  5. monobrau

    monobrau
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    200
    i\I screwed a file up by making a new engine in a in the super engine file. How would i fix that? Or could ssomeone lend me one?
     
  6. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    It's not broken, don't worry: you just have a duplicate engine. To see the engine in the parts list, you simply rename the part under information->name like so:


    (imported from here)

    Then it will appear in the parts list in Ctrl+W. If you still want the original file, I've attached it to this.

    I'll also make a "remove component" option in the next update!

    Hope that helps.
     

    Attached Files:

  7. Rob_G2102

    Rob_G2102
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    11
    driveeditor.png
    When i launch the editor all i get is the above, no little + like in the screenshot, i have tried running as admin and granted the whole directory full admin control, but still no joy, im on windows 7 (x64).
     
  8. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    You need to change the path to the "vehicle" directory inside BeamNG's install directory, not the BeamNG install directory itself. Almost there!
     
  9. Rob_G2102

    Rob_G2102
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    11
    That's fixed it, Thanks Trumple.
     
  10. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    Just fixed a few fairly major bugs and added node deletion as someone pointed out above, it was a necessary addition! Please update to this version (v0.4.2). I've also included an automatic update checker, so I won't need to keep posting updates here, and you don't need to worry about looking here for updates :)

    Thanks guys, download link is in the first post!
     
    #30 Trumple, Aug 19, 2013
    Last edited: Aug 19, 2013
  11. physicsfreak

    physicsfreak
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    15
    Trumple, keep up the good work! Didn't try your tool yet but this looks like something I will use for sure!
     
  12. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
  13. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    Thanks a lot for making this.

    Just to let you know I noticed just a few things that could improve it though.

    - First it would be nice to be able to rename a node.
    - Second you can't create boolean values for now. Maybe some type checks would be good too but I suppose there's no data about that.
    - Third I noticed that some arrays are actually used as a description for an array coming later on the same parent node. If ever possible it would be great to see some kind of link between them. Sometimes the description array is first of all sub-nodes and a value array corresponding to it is at the bottom so it's you can link them only by guessing. Maybe that would be some BeamNG work though.
    - Fourth about input and UI (it's not very important just a notice). You can't validate an action with "Enter" or use "Escape" to cancel. And the UI doesn't resize (only the window). If you used C# as I assume it would be just a few anchors on controls and KeyUp catches on textboxes. But that's just fine tuning ;)
    - Fifth... would be nice to have an in-game editor haha. But that's even less important now. Just throwing thoughts...

    Already very useful though it saves a lot of time compared to searching into files what to add or change. Thanks again.
     
  14. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    Thanks for the constructive feedback!
    1) Renaming a node....duh! A feature I completely forgot to think of, thanks!
    2) You should be able to create boolean values, if you type "true" or "false" as the value (without quotes) it will actually save it as a boolean. Not ideal, but I couldn't think of a nice way of allowing a checkbox and text input in the same dialogue! Perhaps the context menu can have an additional option when you highlight "Value", which will allow you to select "boolean" "decimal", etc.
    3) That's where the array display comes in, where the first array is displayed as a row, and so on. It would be nice, but in some cases, it wouldn't work.
    4) Good point, needs to be more fluid there!
    5) Maybe in future?

    Cheers
     
    #34 Trumple, Aug 27, 2013
    Last edited: Aug 27, 2013
  15. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    I decided to spend a little time reading the jbeam stuff from the wiki and its actually quite organized so it would be possible to have a vehicle creation editor that doesn't require the user to read nodes at all. But of course everything must be taken into account and that wouldn't be that easy. Probably why they didn't give us an editor yet (and I think they said they would in the future somewhere). But there is a structure to follow for every part of a vehicle that allows you to determine what type which value should have and what group it belongs to and why etc.

    I wanted to give it a try but didn't play with the data yet like you did so far. If you're interested I can also give you the code I made. It's just giving an idea of how the interface could be organized and also some useful dynamic type-based controls (that update the editable control based on the value type you need, even having the value type determined automatically by the given value as we don't need special cases that would involve multiple editors for the same type).

    I can eventually give it some time from time to time. But I'm not sure I'll feel like giving too much of it for that so. I can surely help if needed though.
     
  16. Trumple

    Trumple
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    18
    Thanks for the offer! Currently it does detect the type (Decimals, bools, and strings) but only when reading data. I can't predict what the user needs to input, unless we have some kind of reference of exactly what values in JBeams need to be booleans, which sounds like more trouble than it's worth given that users can type "0.01" and it will be converted to decimal automatically for them. And going INTO the editor, it also recognises booleans:

    (imported from here)
    And decimals too, but there's not a great deal of difference between typing a string and typing a decimal apart from validation

    Anyway again, thanks for the offer of help. Perhaps one day I'll push this to GitHub and people can collaborate at will!
     
  17. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    What I meant is that your editor seems to parse the data whatever it is. So it would work for any jbeam code at all.
    What I mean is that the vehicle jbeam code is organized is a certain way. There must be certains parts all with some particular things.

    If you look at:
    Nodes
    You know you need a nodes group and what kind of data needs to be in.

    If you look at:
    Beams
    You know you need a beams group and what kind of data needs to be in.

    If instead of simply parsing data - which would be the most generic solution and would allow anything to ever work no matter what the BeamNG guys change in the way vehicles are built but cannot be made very user friendly since the available "meta-data" contained in the data itself is far from enough - if instead the editor provides premade groups of code lines which via UI alow the user to alter some of the values without having to look at the lines of code (no matter the way) then you'll have an editor anybody can use and that everybody will use.

    What I mean is something like this:
    DriveBeamEditorFirstIdea.png
    But still in that picture my text would be incorrect. It wouldn't be "Add" but more like "Reset to defaults" and "Load from other vehicle". And the menu names wouldn't be the actual names either so that they would mean something when you read them.
    To provide a dynamic solution for such a way to work and not having it all hard-coded and get into trouble once the devs add or remove something you would have an xml file serving as the real meta-data defining the structure of a vehicle as seen by the application.

    So I actually meant a different kind of approach.

    PS: before I get commented on it that the Edit menu contents would serve as a template for every vehicle part actually (with some removed if needed). The edit menu would contain vehicle parts as sub-menus of level 2 and the third level would be what currently sits in Edit menu level 2.

    I thought maybe you could be interested in going further...

    Any opinions ?
     
    #37 GregBlast, Aug 28, 2013
    Last edited: Aug 28, 2013
  18. danielb1989

    danielb1989
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    3
    Awesome program! :)

    Turned my normal offroad 4WD into an unstoppable beast in about 3 minutes! :D

    Thanks!
     
  19. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,683
    Please note about the following, I don't mean it in offense, I like the program and use it alot, just some things that I feel could be improved, they are not requests/orders or whatever. I have made my own personal version with these changes, that I will never release, I just wanted to show you them.

    First thing that I noted that really seems to bother me is your BorderStyle for the About screen, it's set to Sizable rather than FixedSingle :p

    As well, for the FolderBrowserDialog, we don't want to use the path if the user hits cancel. In your code it opens the dialog, changes the SelectedPath setting, then updates controls. So this could easily be implemented

    You could use a code similar to this to make that work
    Code:
    DialogResult d = FolderBrowserDialog1.ShowDialog();
    if (d == DialogResult.Cancel) {
        //User cancelled, do nothing
    } else if (d == DialogResult.OK) {
        //Set textbox text to the selected directory
    }
    
    or to be simpler

    Code:
    DialogResult d = FolderBrowserDialog1.ShowDialog();
    if (d == DialogResult.OK) {
        //Set textbox text to the selected directory
    }
    
    As well could you also change the border style of the vehicle location selector, and make the text box non-read-only. I memory edited to change my folder because most people have AppData hidden, maybe you could set the FolderBrowserDialog to start in Appdata\Local? (With My.Computer.FileSystem.SpecialDirectories.Appdata) or something.

    For the non read only idea, you could just use the OnTextChanged event and update controls the same way you would with the folder browser dialog. Also BeamNG has a new path, instead of being "BeamNG-Drive-0.3" it's "BeamNG.drive-0.3" now.


    As well, this is just a personal pet peeve. I absolutely hate the .NET MenuStrip default renderer, I suggest using System renderer or something custom like this : http://www.vbforums.com/showthread....io2008-style-MenuStrip-and-ToolStrip-Renderer


    That's just my suggestions for now :p
     
    #39 Dummiesman, Sep 1, 2013
    Last edited by a moderator: Sep 2, 2013
  20. Garebear

    Garebear
    Expand Collapse

    Joined:
    Apr 25, 2013
    Messages:
    176
    Will Someone help me install properly?
     
  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