Saturday, August 18, 2012

Restoring The Witcher 2 backup saves

I finished The Witcher 2 on Iorveth's path today. So, I decided to restore the Chapter 1 big decision save I made so I could go through Roche's. After backing up and clearing my Iorveth saves, I extracted the big decision save and started the game. And...the Steam Cloud restored my saves and The Witcher 2 completely ignored my save.

So, I deleted all the saves again, restored the one I wanted, and turned off the cloud. Still nothing. So, I tried restoring every single save I ever made. This resulted in the game botching their playdates and presenting them out of order with some missing their thumbnails. Quit out, delete, and restore the single save with cloud storage enabled. My save was ignored, but the cloud saves were present. This prompted me to delete each save through the game's interface to delete them from the cloud.

This made sense in theory, but only resulted in an undeletable thumbnail due to its corresponding savegame being deleted without it (I have no idea how Steam could miss deleting the thumbnail). This meant that I couldn't reduce the cloud storage for The Witcher 2 to 0 bytes for some forum post's magic condition that makes the game read from the My Documents savegame folder again.

This was followed by another 45 minutes of screwing around with changing CloudStorage=false in User.ini, enabling/disabling cloud storage both ingame and out, and trying to force the cloud to load my manual save by getting the file sizes and names, tweaking times, and generating Sha-1 hashes for my save and its thumbnail. I even cleared the gamedata registry value to see if that would help. No dice.

I came across a post about the patch that broke savegames due to compression and suggested that version mismatch between the game and the save was the problem. So, I verified The Witcher 2's game cache integrity. About 35% through, I decided it was taking too long and cancelled the operation. I tried to start The Witcher 2 again, but I guess the verification purged all the registry entries and Steam tried to do the first time setup again. This meant I had to manually set the registry values again since even after running the first time setup, steam will fail to set the "I'm done" registry entries for each step except DirectX. For reference, I've copied the posts I used to fix this here:

--------------------
Quote:
Originally Posted by Who Cares View Post
Another solution involves a registry hack.

open regedit and go to (on 32 bit XP that is):

HKEY_LOCAL_MACHINE\SOFTWARE\Valve\Steam\Apps\20920

Should show:
default REG_SZ (value not set)
DirectX Reg_DWORD 0x00000001 (1)

Need to add
dotNetFX40 Reg_DWORD 0x00000001 (1)
vcredist Reg_DWORD 0x00000001 (1)

Adding a value:
right click, select new, select DWORD
fill in the name of the value, double click and fill in 1
For 64-bit win7 it's:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Valve\Stea m\Apps\20920--------------------

Once those keys were set, I put copies of my save in both the My Documents savegame folder AND the steam 20920 userdata savegame folder, turned on cloud saving, and started the game. IT WORKED!

I think something about verifying the game cache purging registry keys fixed it. To make certain it wasn't a fluke, I loaded the game, make a quicksave, quit the game, restarted it, and both saves were there. I still have that annoying thumbnail sitting there, so I need to screw with its filesize and try to force the Steam Cloud "FILE MISMATCH!" prompt to appear.

----------------------

I'm debugging a Portal 2 map idea right now. I am starting to loathe linked_portal_door. It can't move, flickers, and crashes (The ent, not the game) if a func_brush passes through it. This is crippling my idea something fierce. The initial idea was great and I managed to reduce its implementation complexity by substituting existing entities in place of reinventing the wheel, but I'm hitting that "Source can't do that" wall again.

5 comments:

  1. Did you have the cloud saves turned on before you lost your saved files? I experienced something like this with Mass Effect 3 on EA’s Origin. I don’t know exactly how it happened, but there it was. Cloud saves are relatively new on the PC, and it takes quite a while to work out the kinks. My recommendation: Turn both offline and cloud saves on. If your internet connection goes down, or if the servers do, at least you know the offline saves are always updated.

    Ruby Badcoe @ WilliamsDataManagement

    ReplyDelete
    Replies
    1. I didn't lose my saves. I kept my own backups. The problem was making Steam stop syncing and getting The Witcher 2 to recognize the old saves from those backups. No connection -> no offline save recognition. Connection -> offline save recognition, deletion, and replacement.

      Cloud saves have been around for a while. For Steam, since 2008. Cloud isn't bad. It is merely cumbersome when there aren't proper controls for the end user. As was the case here.

      Delete
    2. I'm having the same issue; it's not recognizing any of the files in the Witcher app gamesave folder when offline, only the cloud files in the AppID > remote folder. Have you found a solution?

      Delete
    3. Nothing concrete. I still don't know why it worked when I made this entry. Try turning off Cloudsaves for The Witcher, deleting the saves you don't want, verifying the local game cache, and restarting Steam. If at any time you get Steam's "cloud mismatch" prompt, leave it up, put in the saves you want in the remote folder, and choose to upload from your PC.

      Delete
  2. I was able to kill off the undeleteable ghost file in the cloud folder by editing remotecache.vdf with a text editor and removing everything within the outermost braces.

    ReplyDelete