Corrupted save, how to edit map files by hand?

My save game got corrupted a few days ago using a linux curses experimental, I’m not entirely sure how it happened, but it manifests as follows: If about a dozen turns pass after I load up my game, a buggy and poorly formatted debug string is printed across the screen and the game promptly exits.

Here’s a screenshot of the message

The thing is though, the crash only seems to occur as long as my home-base (a house with a hole in the wall for my car) is within my reality bubble. If I teleport far enough away, the game doesn’t crash at all. If I teleport near my base again, the game crashes after a few turns pass.

Using the map editor, I replaced my base’s overmap tile with a crater, which (I think) destroys all items, vehicles (my car and minifridges) and other furniture (forges, kilns, fireplace) that was on the tile. Without the homebase tile, the game no longer crashes. So I can conclude that there is an item or vehicle that’s causing my game to crash.

I’ve narrowed down the cause of the crash this far, but the problem is that I don’t know how I can use the debug menu to probe the offending overmap tile any further.

I would like to be able to destroy individual vehicles and items using the debug menu, so that I can figure out what exactly is causing the crash, but there is no such option as far as I’m aware.

I am left with editing the save files by hand, which I understand is simply a collection of JSON files. But I can’t begin to understand why the files in the /save/maps/ folder are named the way they are, and don’t know which file to edit.

How can I know what map file is associated with what overmap tile in the game? Perhaps there’s a debug menu command that tells me this? Also, I’m open to other ideas that could help me fix my save game.

Some other details:
I’ve had to savescum this save before, but that was a few (in-game) days before the crash started occuring.
I’m using the linux curses experimentals
Starting a new game on the same build doesn’t lead to any apparent crashing.
The crash first occurred on an experimental a few dozen builds ago, I tried 2 different experimentals with the same save game and configs, and the crash still occurs.
Replacing the homebase tile with a river also worked in stopping the crash, presumably replacing the overmap tile with anything works.
Leveling the homebase tile with mininukes doesn’t stop the crash (perhaps I wasn’t thorough enough? vehicles never get destroyed)
The first time the crash occurred, it was around 50 turns after I loaded up the game. I’m now left with only a dozen left before crashing because I thought saving the game sometime after loading it up would fix it.

If you want to remove items, I usually change the floor into lava. Dunno if it can help in your case.

If it’s a matter of time before a crash, that would mean that something change … no ? Maybe go ahead and lava-floor tiles with anything like this (battery stuff ON, charcoal making stuff, fire, acid, fermenting …)

If you upload your save maybe we can fix the bug.

Thanks for the replies guys. I apologise for my late response, the charger for my linux laptop fried itself last night for no particular reason.

Before I get into your responses, there’s been a significant turn of events to my benefit. The fried charger for my linux laptop prompted me to move important files from the laptop to my windows desktop, including the buggy save folder, so I could continue probing it with the most recent windows experimental tiles build (at that time).

And to my surprise, I discovered that the crash was no longer occurring as scheduled, in fact, it no longer occurs at all when running the save with a windows tiles build. My character was allowed to go to sleep and wake up after six whole hours, which wasn’t previously possible when running the buggy(?) save folder on my linux experimental console build.

So I saved the game after my character woke up, and moved the folder back to my linux laptop (running on a replacement charger). And miraculously enough, there is no crash to be observed when running this newer save on the same linux experimental I had used when trying to probe the older buggy save.
I am reeling from sheer bafflement, so I can’t confirm for sure that all is well with my save folder, but it certainly seems like it is.

At this point, I’m not even sure if it’s the save that was the problem, or perhaps it was just a buggy cata build, or perhaps my laptop has a janky unix environment or something.

[quote=“Oragepoilu, post:2, topic:10815”]If you want to remove items, I usually change the floor into lava. Dunno if it can help in your case.

If it’s a matter of time before a crash, that would mean that something change … no ? Maybe go ahead and lava-floor tiles with anything like this (battery stuff ON, charcoal making stuff, fire, acid, fermenting …)[/quote]

I just realized I could edit an individual tile’s terrain now that you mention it, thanks. Turning tiles into lava works for destroying items, but not for vehicles it seems.

And yeah, I think my troubles had something to do with an item or vehicle that was changing state unexpectedly, perhaps rotting food or batteries being drained.

Here’s a .zip file of the save, the world name is De Kalb, my character is Astor Bright. You’ll find she’s in a stationary vehicle when you load up this save. The buggy overmap tile is the house north-north-west of her. However, I am uncertain whether or not you will experience the bug like I did, since I couldn’t even replicate it on my windows machine.

EDIT: The fact that I couldn’t get my save to work on several different linux builds suggests that the save itself was corrupted somehow. However, since I was able to get it to run fine with no unexpected behaviours on a windows build, I can conclude that the save file is not at fault. But that suggests the unexpected behaviour is rooted in the linux build I was using, however, the fact I can run fresh new games with fairly stable behaviour suggests otherwise.

What can I conclude?

EDIT: Welp, looks like you may not need this. Still, someone may find it useful at some point.

I don’t know how it works on Linux, but here’s what I know about map editing in the Windows graphical version. Okay so you’ve got basically three kinds of files.

The first kind are the files that describe the layout of the overmap. If you look at one of these files as text you’ll see a long list of buildings and locations, each describing one tile on the overmap. These are found in the main save folder and have names like “o.#.#” with the two numbers describing which area of the map they correspond to.

The second kind have names like “#QnJheHRvbg==.seen.#.#” and are also found in the main save folder. These seem to just record which tiles on the overmap have been revealed so far.

The third kind are in the maps subfolder of your save file. These files have names like “” and describe the actual vehicles and items contained within individual overmap tiles. They’re divided up among subfolders based on what area of the map they’re located in.

If any of these files are deleted, the game will simply generate fresh ones when needed. For example if you delete everything in the maps folder and start your game, you’ll find yourself on the same overmap, but all the buildings and such will be freshly generated as if you’re encountering them for the first time.

One thing I’ll sometimes do is use a knife to inscribe an item with a very distinctive word that doesn’t occur in the game, then drop that item next to my vehicle. Then I’ll search the maps folder for that word, find out what file it’s in, and delete every map file except that one. This has the effect of preserving the tile containing my precious vehicle, keeping the same overmap, but forcing the game to re-generate everything else. This is great for keeping the size of a save file down over long periods of time.

If you also delete all the “o.#.#” and “seen.#.#” files at the same time, the game will also re-generate the overmap, dumping you and your one preserved tile into a completely new world. Of course there’s no guarantee that you won’t be in the middle of the woods or something, but you can always quit without saving and try again.

That’s what I know about map editing. I hope it helps. If you can manage to drive your vehicle out onto a nice empty road tile or something before the game crashes, you can use the technique above to keep it while forcing the game to re-do the rest of the world.

Sorry for wasting your time! At least your response directly answered the question in my OP, which is always a good thing, and will certainly be helpful to other players in the future. The inscribing technique to figure out which in-game overmap tile is associated with what maps file is particularly clever, I will definitely use it to fix whatever corrupted save files I have later on. EDIT: Thanks!

I found it useful 5 years later. I forgot to add a certain mod that effects the overmap generation and I didn’t want to try and transfer my character and ride because the last time I did that “Mistakes were made”. What you detailed out worked perfectly. I labeled my Thompson Submachine Gun “My Precious”, and was able to preserve my tile and my stuff. Sadly Rico, my “Prime” mutated killing machine buddy of an NPC was lost during the wipes. R.I.P Rico, you were the best zombie slayer this side of New England.

Edit: There is definitely some weirdness in that spawn area, but, just drive off and don’t look back.