Latest Update: Version 1.1.7 (2025-01-17) Download: https://github.com/alexkleinwaechter/BeamNG_LevelCleanUp "Even if you don't want to use any functionality of that tool it makes really sense to go to the Map Shrinker and start analyzing your level. A lot of stuff is logged and helps you to make your map better!" Hi map builders, I created a tool that shrinks the deployment file for a map level, renames a map or copy assets between maps. The idea of the map shrinker is that a map developer can leave the development project as is although there are tons of copied assets from other maps or colladas for testing. The Tool also helps you finding errors in your map project like corrupted json or xml files and wrong paths in your material files. If the tool wants to delete a file you need then read the generated logfiles. Extreme Example: East Coast Reworked | v2.5 The tool shrinks out almost 4.7 GB of uncompressed data Zipsize before: 3.1 GB Zipsize after: 1.1 GB The tool checks the used assets by scanning the info.json, missiongroups, prefabs, forest, decals, terrain.json. Then it scans all available managed materials by materials.json, materials.cs and reads all available dae files, scenarios, races. All not used assests are deleted from the managed assets. Corrupted json files are repaired for reading and a warning log is written, so that you can repair syntax and duplicate keys. Duplicate materials are written to a logfile. In a last step all (unmanaged) files are checked against the used assets and deleted if not used. but there is more⦠Feature Description: Map Shrinker You can load a zipped map and let the tool search for orphaned files and assets which are not needed in the map. This can save a lot of space. All files and configurations will be checked against your scene tree with all of its dependencies and a proposal for file deletion is shown. Please check the list. It is always possible that the tool deletes too much. So always use a copy of your project! This tool is made for deleting things The good thing: You still have all your crap in the project and can use it for further ideas while having a lean deployment file. Rename Map You can load a zipped map and then change the name in the file system. This is important if you want to see this map beside the original one. If you customized the industrial level for example and want to have your own customized level beside industrial, you could rename it with industrial_larry You can change the shown name in the map overview, too. After renaming you can build a new zipfile with the tool and you are ready to go. Copy Assets (Experimental) You can load a zipped map you want to copy assets from and a zipped map you want to have the assets. At the moment the tool allows to copy decalroads, decals and collada assets (dae files). You get a list of all the assets and can select the ones you want to copy. No need anymore for copying the whole folders from the desired maps. The tool copies only the needed materials and places them in a dedicated folder per assettype starting with a "MT_" for Mapping-tools. This functionality is not well tested yet. Therefore the experimantal state. Very old maps with a lot of cs files are likely not working with this functionality. Convert TSStatic Assets to forest items You can load a zipped map and then convert your static assets placed in the scene tree to forest items. After selecting a level your scene tree is shown in the tool to select the items or folders you want to convert. Only assets with an identical scale on all axis and an existing rotation matrix will be converted. During the process the tool asks if you want to delete the assets out of the scene tree. If you don't delete them you will have duplicate assets. One in the tree and one in the forest items. This only makes sense to check if the tool does it right A discussion if it generally makes sense to convert static assets to forest items can be found here: https://www.beamng.com/threads/converting-placed-meshes-to-forest-items.86837 Utilities -> move the whole map You can change x, y, z-axis position values for all objects at once by entering offset values in this tool. Experimental. I hope I got all the objects. Before you start It's a good idea to copy the maps you want to work with to a dedicated folder. The tool does a lot of unzipping, zipping and logfiles. You don't want to have that in your vanilla maps folder Troubleshooting If you get the error: System.IO.FileNotFoundException: Cannot locate the file, you need to install the Microsoft WebView2 Runtime. The tool needs the Microsoft WebView2 Runtime to run properly. Its already installed on Windows 11 and newer versions of Windows 10. You can Download and install the Runtime from this Website: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ Direct link to the installer: https://go.microsoft.com/fwlink/p/?LinkId=2124703 Have fun! Alex Tutorial video: Best! Alex Spoiler: Update History Version 1.1.9 (2025-03-29) - Changed behaviour of copy assets selection. Selection is now retained when using search filter. Fix vulnerability of imagesharp library Version 1.1.8 (2025-03-21) - Feature: Experimental You can now change the position (x, y, z-axis) of the whole map. All objects within the missiongroups, decals and the forest are affected. TSStatic and Prefab Items without position property now get one in order to be moved correctly. Version 1.1.7 (2025-01-17) - Fix: handling of Persistent ID if not a valid guid - Fix: paths which are not starting with "levels" are now not renamed anymore. Sky Gradients would not be found then in some levels. - Feature: Experimental You can change the height position (z-axis) of the whole map. All objects within the missiongroups and the forest are affected. Version 1.1.2 (2024-06-02) - Copy Assets: You can now choose a folder for your target map (makes the process quicker) - Fix: Update Imagesharp dependency because of vulnerabilty Version 1.1.0 (2024-02-25) - Fix: sometimes needed cubemaps have been deleted which causes BeamNG to crash. repaired now. - Fix error resolving texture files with missing file extension Version 1.0.8 (2024-01-06) - Check if material files linked to vanilla map files exist in vanilla map (MaterialFilesNotFound.txt) Version 1.0.7 (2024-01-06) - Parse json with two commas (empty property) -> west_coast_usa\facilities\dealerships.facilities.json - Write dedicated logfiles for errors and warnings - Vanilla level selector in mapshrinker (for easier testing on my side) Version 1.0.6 (2023-12-01) - Small Bugfix: Rename Map. Delete mod_info folder to prevent duplicate mod error. Version 1.0.5 (2023-11-26) - Small Bugfix: Don't delete source zip files when tidy up working folder on application close Version 1.0.4 (2023-10-13) - Scanning of facilities - Scanning of Minimap in info.json - Exclude files like depthmap and heightmap from root - Repair of corrupted jsonfiles or jsonfiles with duplicate keys - Seperate logging of warnings which help you to repair your jsonfiles. - optional Cleanup of working directory when closing the Application. Version 1.0.0 (2023-10-12) Delete duplicate materials from material.json files Version 0.9.8 (2023-10-08) Show Asset Counter in Convert to ForestItems Version 0.9.7 (2023-10-07) Convert Scene Tree Assets to ForestItems Version 0.9.6 (2023-10-02) Copy and rename vanilla map in on go and some bugfixes. Version 0.9.5 (2023-04-16) App uses full width for content now. Version 0.9.4 (2023-04-16) App handles duplicate property keys in json and json comments now, asset copy now copies assets linked to third vanilla levels even if image extension differs, UI is more responsive now. Version 0.9.3 (2023-04-15) Bugfix: Some processes didn't stop after quitting the app, Use same level for renaming if copied or shrinked before renaming instead of unzipping it again Version 0.9.2 (2023-04-01) Added check if material name is not set. Use internal name instead (Discovered in Polish Roads) Version 0.9.1 (2023-04-01) copy assets lets you select vanilla levels from the game install folder and copies it Version 0.9.0 (2023-03-29) new UI Interface, Experimental feature for copying assets from one map to another Version 0.8.9 (2022-12-14): Adjustments for BeamNG 0.27, Decal and forest scanner now scans json files and cs files Version 0.8.8 (2022-11-21): Scan Prefab files nested in prefab files (Discovered in Westcoast USA) Version 0.8.7 (2022-11-21): AutoUpdater added, compression level for zipfile generation added, discard water ripple and foam files
A map cleaner-upper *AND* a new-map creator in one? Now that's going the extra mile. Thank-you so kindly, from the bottom of my dusty cold heart! (you have positively, absolutely no idea how much time it will save me not having to try to explain to everyone how to make a new map - yes, I will add you to the 'contributor' list which gets most early Los Injurus betas).
Funny: I just tested the tool with the vanilla East Coast USA. It deleted some textures for the rocks. In my missing material log I could see that the devs have some wrong paths which still point to the pbr_textures folder which is not exisiting anymore in the latest map version. Hey devs, you could use my tool for some quality checks By the way, East Coast could be shrinked by more than 400 MB. Best! Alex --- Post updated --- Oh wow! My tool fails on West Coast USA. Looking at the files I see that prefabs can consist of other prefabs. If you use that wait for the next update. (Done in 0.8.8)
It would be interesting for me why it breaks your project. But therefore I would need a look at your level. Always take a look at the log files in your levels folder after processing. It helps resolving errors in the project. The tool is not completely fire and forget. Best! Alex.
That's great! If you release your next version just contact me and I guide you through the tool if needed.
I will not likely make a map mod but will this tool help fps? It reduces the file size so in theory improve fps
No, because it only deletes files which aren't loaded by the game. I thought about a fun function which scales down all the textures. This would help with VRAM problems and then in special cases perhaps increase FPS. But I don't do that
I honestly can't express how useful this is for making new levels. It should be incorporated into the world editor. I've not even tried the level size reduction yet. Fair play for doing this.
Your tool is amazing and should be built into the vanilla game. I can't thank you enough for your great work. However, it's giving me trouble when trying to copy the driver_training map. It's the first time I've had such an error (I've been playing around with it, cloning maps for experiments and fun). Any idea what this could be about? Apologies for bumping an old thread but I can't think of a better place to ask.
In the mentioned info.json there must be a duplicate entry at the preview section. Just delete one of them.
Alex, you're a legend. I actually tried this already but deleted all of them, and of course it didn't work. Deleting the first one immediately did the trick. Thanks again! Amazing work!
Used on current version of my map before I uploaded my update (it'll be uploading for a DAY yet). Good! It found the lack of a comma in the info json file for my map. Errors: metrocity/newmosaic.dds was deleted, it is used on the CASA series of houses in the metrocity or metrocity/commercial folder. plasterdirty0324_grey - but this might not have had an entry from the looks of it. I couldn't find any other issues with it, aside of not figuring out how to expand the file name boxes so I could see what I was clicking. When I started clicking around it seemed to right itself somewhat. Would like to make a request that I could expand those fields in the results box / move the dividers between cells around a bit. 6.1 GB > 3.26 GB. That's a reduction of almost 50%. Now, of-course, with my slow internet, uploading a file worked by this program can be a god-send with my rubbish slow internet. My upload speed on 'broadband satellite internet' is currently 60~80KB/s. Yes, KB/s, Kilobyte not Kilobit. It SUCKS, and it's over 100$ USD a month for this dumpster fire.
Thanks for the feedback. There are surely some things I didn't catch in the version of my tool. So it makes sense to doublecheck the delete suggestions and after deleting to check what's happening in cache cleared beamng (logfiles and visual check). The UI is very ugly and I will try to improve it soon. But nice that it works for you. If you need help because of the errors please let me know. Best! Alex --- Post updated --- What I forgot, it's worth looking at the logfiles I write in your project folder. And you can delete them of course to save some more kb
I got it handled - No problem doing that on my end. Save almost 3gb for an hour+ of work with a free tool? Yeah I'm game for that - especially considering what money looks like right now with my body literally going to pieces vs my fixed income. That said Los Injurus City Map project is safe because that carries itself for the time being (which is why I set it up like that, otherwise, it'd be at risk of getting cancelled due to costs). I will do my best to figure out why and what fails as I get more time to test more maps on it. The nice thing is, is I can likely drop off another 0.5~1.0gb if I use compressed models in-stead.