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
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
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?
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.
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).
You need to change the path to the "vehicle" directory inside BeamNG's install directory, not the BeamNG install directory itself. Almost there!
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!
Trumple, keep up the good work! Didn't try your tool yet but this looks like something I will use for sure!
Thanks for the compliments! Added a new update, v0.5: Added node adding Improved performance in editing nodes by refactoring parts of the code (imported from here) Download is in the OP: DriveEditor-Vehicle-Configuration-%28-jbeam%29-Editor-GUI Cheers folks.
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.
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
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.
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!
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: 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 ?
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 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