How do I recover a corrupted Prison Architect savegame?

How do I recover a corrupted Prison Architect savegame? - Floor Plan on White Paper

When loading a prison, the game crashes with an unknown reason. The last autosave is corrupted, too. I spent a million hours in the game. *cry* Do I have to start a new game or is there anything I can do?



Best Answer

I analyzed the structure of the PA savegame and found that some parts of a savegame can be recovered with minimal effort:

  1. Start new prison
  2. Save immediately, exit.
  3. Open corrupted savegame in a proper texteditor (e.g. atom, vi)
  4. Copy over to new savegame:
  • TimeIndex
  • RandomSeed
  • SecondsPlayed
  • Balance

complete sections:

BEGIN Cells
BEGIN Electricity
BEGIN Water
BEGIN PolicyData
BEGIN StatsTracker
BEGIN TransferData
BEGIN Finance
BEGIN Research
BEGIN Grants
BEGIN Intake
BEGIN WeatherMap

Note: The structure is, just replace all the new <data> with old data:

BEGIN Section 
    <data>
END
  1. Copying over staff and items would need adjustment of Ids (.i, .u, indices), but is possible in theory. It it even possible to copy over buildings under construction and processes. You can still make some of the manual recovery easier by using the clone-feature of the game (and granting yourself the money needed by adjusting your balance).

You can also Strg+F for specific types of objects. With some programming skills, you can actually transfer the lines of most items to a new savegame.

  1. Load your new savegame. Enjoy.

--

Achievement of this process: Buildings, utilities and most of the statistics are transferred. Items, staff and prisoners are missing. The new savegame will start with its own items and their positions (e.g. trees).

Recommendation: To automate the recovery of the savegame and to add items and staff to the recovery process, a short shell-script could be developed. If I could help someone, please consider contributing to that.




Pictures about "How do I recover a corrupted Prison Architect savegame?"

How do I recover a corrupted Prison Architect savegame? - Man Siting on Bed Reading a Paper
How do I recover a corrupted Prison Architect savegame? - Backview of an Engineer holding a Floor Plan on a Wall
How do I recover a corrupted Prison Architect savegame? - Engineer looking on a Floor Plan





ESCAPING The Most Secure Prison EVER in Prison Architect




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: ANTONI SHKRABA production, Ron Lach, Thirdman, Thirdman