# Save corruption proble

**URL:** <https://discourse.cataclysmdda.org/t/save-corruption-proble/23688>\
**Category:** The Garage\
**Created:** [May 17, 2020, 10:26pm UTC](https://discourse.cataclysmdda.org/t/save-corruption-proble/23688 "2020-05-17T22:26:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)\
**Post date:** [May 17, 2020, 11:46pm UTC](https://discourse.cataclysmdda.org/t/save-corruption-proble/23688/3 "2020-05-17T23:46:42Z")

</div>

[We need more information](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html), like your operating system and the build version of the game you’re running.  
Did you update the game between your last play and the error?  
Do you run it with the launcher?  
Did it end the game in a weird way the last time you could play normally (crash while saving, power outage, …)?

While it probably does not help to fix your save, it would be nice to know if you’re using any mods. This may help to find the error that caused the save corruption in the first place and it can be fixed before others have to suffer from it too.

If you’re using the launcher, did it create any backups?  
If not, depending on your operating system and -settings, it might has made a backup for you:

> [@NPC REALLY dislike camp manager](https://discourse.cataclysmdda.org/t/npc-really-dislike-camp-manager/22601/5):
>
> If you’re running Windows 7+, your system might have backed it up for you. Try right-clicking your games save folder and select “Restore previous versions”. Click one of the entries (if there are any) from before the update, click “copy…” and save it somewhere useful (you probably don’t want to replace your current folder). I had to do that here and there to replace a corrupted save file…

Then about…

> [@aokiji30](#):
>
> is there a way to know or teleport the new character to the place of the old save?

Yes, but I doubt it would be of any use, as it would try to read the corrupt region file and just crash again.

Edit: I had to check myself how you can extract the coordinates if you want to give it a try as it isn’t that straight forward as one would hope:

> **Step by step guide to get the coordinates**
>
> - Open your world folder in the save game folder, in your case probably `/save/you keep stuff/`.
> - Now open the `#[gibberish].sav` file related to your character using a text editor. The “[gibberish]” is actually your ingame characters name encoded with base64 - you can decode it by copy-pasting the filename into a decoder of your choise ([example site](https://www.base64decode.org/)).
> - There are a few variables important for this: `"levx"`, `"levy"`, `"levz"`, `"om_x"` and `"om_y"`.
> - If you only want an approximation (about 1 overmap tile away from where your character actually is), choose “_Teleport - long range_” in the debug menu and move the cursor to the following coordinates (in red, on the bottom right side of the map menu): “LEVEL [value of `levz`], [value of `om_x`]‘[**half** of the `levx` value **plus 2**], [value of `om_y`]’[**half** of the `levy` value **plus 2**]”. If you switch overmap while adding the “plus 2”, let it happen.
> - 
> - For example: You got the following values: `"levx": 220`, `"levy": 357`, `"levz": 0`, `"om_x":0`, `"om_y":-1`. This results in the overmap coordinates: “LEVEL 0, 0’112, -1’180.5” (which will turn into “LEVEL 0, 0’112, 0’1” when you move your cursor).
> 
> - If you want to exactly go to the place you were, you’ll also need to grab the `"posx"` and `"posy"` values of the `"player"`. Best search the file for _THIEF\_MODE_, as this variable is close by.
> - Now halve the `levx` and `levy` values, round it down if necessary.
> - Take the `posx` and `posy` values, adding “12” to it if you’ve rounded down one of the results from before (if you’ve rounded down from `levx`, add 12 to `posx` and/or if you’ve rounded down from `levy`, add to `posy`). Divide them (with remainder) by 24.
> - Add the results to the ones you’ve got from halving the “lev” values.
> - These are now the coordinates you’re looking for, where `om_x` and `om_y` are your overmap coordinates, the `levz` is the Z-Level and the results you’ve gotten are the overmap tile coordinates. The remainder is the actual tile your character stands on, counted from the top left.

---

_[View the full topic](https://discourse.cataclysmdda.org/t/save-corruption-proble/23688)._
