#Server Map Wipe

1 messages · Page 1 of 1 (latest)

rich yoke
#

Hello fellow server owner. I'm in a bit of a dilmma. I need to wipe my server map, but keep my players data and the safehouses intact. If someone with experience in this matter guide me, I'd be forever grateful. We have a bunch of players on the server along with almost a month of progression, so I'm very cautious of this.

tight quarry
#

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.

https://www.reddit.com/r/projectzomboid/comments/1q7ski1/how_to_reset_a_corrupted_map_in_project_zomboid/

Hey survivors, if your Project Zomboid map is corrupted or you accidentally enabled a map mod in an existing save, there’s a simple fix that doesn’t…

rich yoke
tight quarry
#

I will have to ask for the best way to do this and get back to you.

rich yoke
#

And successfully pulled it off

tight quarry
#

Do you mind sharing how in case this happens in the future?

rich yoke
# tight quarry 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.
tight quarry
#

Good to know, thank you!

frail dome
frail dome
tight quarry
#

You should be able to reset the Zombie population by deleting everything in the zpop folder in the save