Introduction Dear Community, I am pleased to present you my first lua extension for the World Editor: Mesh-Decal Road Convert. As the name suggests, this small program offers World Editor users a one-click solution to convert mesh roads to decal roads and decal roads to mesh roads, complete with copying over all fields which can be copied. This extension was created in response to the annoying workflow that is needed to convert one road to another in the current version of World Editor (creating a new other road, navigating to the item.json files and copying over the nodes, then reloading the level). Presentation This is the extension's window. It comes with a small amount of parameters and a built-in tutorial. Here's a short gif of the Window in action: (https://imgur.com/a/Uu0phPu) Installation To install this extension, follow these steps: 1. Download to .zip file attached to this thread 2.1. Open up the file and place it's content into your userfolder. 2.2. Alternatively, open up the file and place its content into your BeamNG Drive Root directory (can be easily found by right-clicking on BeamNG Drive in Steam -> Manage -> Browse local files): Place the lua folder where the lua folder is. 2.3. Alternatively, navigate through all folders in the .zip attached and place the "meshdecalroadconvert.lua" file in BeamNG.drive\lua\ge\extensions\editor. Once done, it should automatically show up in your editor under Window -> Mesh Decal Road Convert. If it doesn't show up: - Make sure you placed the .lua file in the right directory and no other software is blocking its execution - In your editor, go to Window -> Extensions Editor and check whenever meshdecalroadconvert is enabled - Restart BeamNG drive - As a last resort: post a message here. Changelog The following changes were made since release: 1.0: Initial release 1.1: Added possibility for converting multiple roads at once (select all in the editor, click the select button in the window and convert) Final Words & Notes Please don't hestitate to post suggestions on how to improve the current tool. I do have to say that I started out from almost 0 when coding this extension, so some things might not be as tidy as they could (I know that a certain form of repetition could be deleted for example). This extension is licenced under bCDDL v1.1. --- Post updated ---
This is awesome. Thank you!! It should have been part of the world editor from the beginning. Im currently working on a more experimental map where I didn't really care enough to convert manually or make new decal roads for every single mesh road I had made. It would have been hours of work I wasn't going to do. Now I will probably get it done. Its great as is, but it would be much more useful to allow batching of multiple roads at once. For average use you dont really need that option. But on my mostly completed map I probably have 100+ mesh roads I used to make trails. It would awesome to just select them all and have it get done in one go. Even if you had a limit of 20 at once it would be nice. Also - the extension works perfectly fine if you just extract the zip to your userdata folder - no need to place in the install directory.
Thank you very much for your feedback @23Terrabytes ! I think implementing something like that should be possible. I'll work on it as soon as I got some more free time!
Awesome, good luck. What you made already is game changing, but that would take it over the top. Even if it doesn't work out, thanks again - its such a great tool and a massive time saver.
I tried to add the possibility for selecting multiple roads at once but I just can't wrap my head around how to do so correctly. I've got the base idea, but I can't put it into code :/ I might try again later though, but yeah, don't get your hopes up haha.
Bummer, but thanks for giving it a shot. Its still a game changer for me even with only doing 1 at a time, so thanks again for making such an awesome extension.
Hey Terra, got a little surprise for you: I updated the script so you can now select multiple roads at the same time! I may or may not have had some help from a certain AI chatbot, but now it works really well! All you have to do it select all the roads you want to convert at the same time in the editor, select them in the extension window, and convert! The window just gets a little large when you select a lot, but that's something I'll fix later on. Happy converting!
Awesome! I can't wait to try it out. Thank you. Good timing too, I haven't started making the decal roads on WIP map yet, but was planing on it sometime this week.
wow! i wish i had found this sooner! installing right now together with your road edge tool. great job! thanks for making this