#Server Map Wipe
1 messages · Page 1 of 1 (latest)
First of all make sure you have a backup of the save.
So there are tools like Project Zomboid Chunk Cleaner that might be able to help you, obviously not officially supported, use at your own risk etc
https://grabofus.github.io/zomboid-chunk-cleaner/
Or you can delete files from the save to have them regenerate. Here's a reddit post from someone with the steps. The only map_ file you shouldn't delete is "map_p.bin" as that contains safehouse data. Again, very in-depth and not guaranteed to not lose data.
So i just checked and these guides are for Build 41, and 42 has introduced several changes into the file structures, there is no map_p.bin anymore, would there by any way to figure out how they're storing safehouse data now?
I will have to ask for the best way to do this and get back to you.
No need, i figured it out!
And successfully pulled it off
Do you mind sharing how in case this happens in the future?
Not at all, how i figured it is by deleting both map folder and chunkdata folder (since theyre essentially 2 sides of the same coin) and that in turn wiped the entire map. Which cleared up the question of where the safezones are stored, they were inside the map folder, not separated.
Then i studied how the map and chunkdata folders are sorted, basically I discovered that Build 42 uses two different coordinate scales to manage the world.
- The map folder (Chunks): This folder uses an 8 x 8 tile scale. The files are nested in a map/{X}/{Y}.bin structure. To find which file a safehouse is in, you divide the tile coordinates by 8 and floor the result.
- The chunkdata folder (Cells): This folder uses a much larger 256 x 256 tile scale. These files are stored as chunkdata_X_Y.bin. To find these, you divide the tile coordinates by 256.
So then i wrote a script to whitelist safezones and calculate their folders, by taking the top left coordinate and bottom right coord and all in between. Then it deletes everything else.
Good to know, thank you!
would u happen to know if I could somehow reset the zombie data and have all the gone zombies back again like just like when the world just started.
also if you're happy to share this script as I was looking on how do I remove modded map that's bee added to the server tysm
You should be able to reset the Zombie population by deleting everything in the zpop folder in the save