I'm trying to load additional layers for existing maps without having to directly munge entirely new LVL files. Specifically, I'm doing this to add in new vehicles. I did something like this for SW 2015Front II to add additional props to stock maps without having to rebuild them entirely, but the method I used there does not seem to work and I end up with an lvl file that is laughably 8 bytes in size.
Just make a new "world" without sky dome, terrain, water, etc. and load one of it's layer's filled with the items you need.
Quote from: AnthonyBF2 on May 11, 2021, 01:13:05 PMJust make a new "world" without sky dome, terrain, water, etc. and load one of it's layer's filled with the items you need.
That's the method I mentioned that works in SWBF2, but doing that leaves me with the 8 bytes file.
EDIT: I have to include all the files for it to munge, but it does work.
This is the method I use for CP randomization on my server. It can work the same for new vehicles as Giftheck has seen.
Copy the design layer of a stock map and rename it to a .wld file (should have all the CPs + droids and stuff).
Remove all the sky/terrain stuff from the file.
Remove all CPs from the design layer using a text editor or ZE.
Create new req, .rgn, .bar, and .hnt files that are named the same as your new wld file. I think these can all be blank.
When loading, call the base world first, load the CP .lvl file.
You should be able to munge and have two world files now, and can use the template you created to make new layouts/items/etc.
The method I've used several times is to take a copy of Mos Eisley, toggle terrain off, erase the sky dome block of code from the SKY file, clear out all the regions, paths, props, etc then re-add what I need in any of the layers, then load that after my real world was loaded.