Steam – How to manually-manually detect installed steam games

steam

I know that if you just run the install with the game present Steam does all the work for you. But before Steam even attempts to install/detect a game, it will first check if you have enough of free room on the storage device you're trying to install the game to.

Now check this scenario. You install Middle Earth: SoW on your 256GB SSD. It's a large game, full install takes up over 152GB. Now, Steam gets screwed in some way and no longer detects your game as installed.

However, since the game takes over half of the size of the SSD, I cannot make room to have enough room to install it twice, not to mentioned I barely managed to make enough space to install it once.

One method I'm thinking of is to move the game to another drive (if you own one) and then start the download again. Then you shut down Steam, move the game back and resume the download, and Steam HOPEFULLY recognizes the game and everything is great again, except you lost four hours moving 150GB around like an idiot.

I'm looking for a different method; Steam must have the list of installed games stored somewhere. In which file does something like that reside, and how do I edit it?

Best Answer

TLDR; create or modify your current game's appmanifest file (in your case appmanifest_356190.acf) in your Steam\steamapps folder, and adjust the following values:

  • StateFlags to 1026,
  • LastUpdated to 0,
  • UpdateResult to 4,
  • SizeOnDisk to 0,
  • buildid to 0,
  • LastOwner to <identical value>,
  • BytesToDownload to 0, and
  • BytesDownloaded to 0.
  • Remove the values from the InstalledDepots and MountedDepots section.

This worked for me after testing out a similar scenario. I'm not sure what values are strictly necessary to change.

Below is the route I took to arrive to this conclusion.


I simulated your problem.
On one of my disks I had little space left, so I started downloading a game that was at least half that size, paused it after a few seconds, and quit Steam.

I checked to see what files were modified/created based on the game's Steam ID, and found (unsurprisingly) the appmanifest_.acf file (in the Steam\steamapps folder), which contains integers that tell Steam what game has what status and can be found where (the same file user l3l_aze refers to in their answer).
Nothing revolutionary.

I then tried a few scenarios:

  • I (copy-pasted and) deleted that .acf file, to see how Steam would react, and to duplicate your situation. I opened up Steam again, but it (logically) didn't recognize the game having been partially downloaded.

  • Starting the download again (by clicking 'Install' in the Steam Library) I got the same "You do not have enough disk space" warning (it would actually have continued where it had left off, recognizing the files in the download folder, when I tried it with a smaller game).

  • I quit Steam again, grabbed an .acf file of a game I knew had successfully finished, and renamed it to appmanifest_.acf to correspond with the game I was trying to install (so '356190' in the case of Middle Earth: Shadow of War). I removed the values for LastUpdated, SizeOnDisk and BytesToDownload, and restarted Steam.
    I could click the 'Update' button to continue the download, but it simply wouldn't download anything.

  • Then I tried to "Verify the integrity of the game files", but it didn't work. This process probably needs info from the appmanifest as well.

  • I deleted the value of BytesToDownload again, looked up the size of the game in the download folder, and pasted both in the right places (without the commas). It did show the new size, but still no dice - the download was stuck at 0%.

  • The "Clear download cache" after renaming the download folder (to keep the files it had already downloaded) didn't help.

  • Just emptying the appmanifest file doesn't work: I figured the appmanifest might repopulate itself with the right values, but it doesn't.

  • I then started downloading another file, pausing it, and copying the values in that game's appmanifest to our game's appmanifest (the following values were changed: StateFlags to 1026 (flagging it as 'Update required but already started'1), LastUpdated to 0, UpdateResult to 4, SizeOnDisk to 0, buildid to 0, LastOwner to <identical value>, BytesToDownload to 0, and BytesDownloaded to 0. I also removed the values from the InstalledDepots and MountedDepots section, and kept the two identical integers, 228980 in the SharedDepots section (this is likely the code for a DirectX or Visual Basic redistributable2, so probably not important for this purpose).
    This did the trick: after restarting Steam the game continued downloading whence it left off.
    (This could be slightly dependent on what games you copy values from and to, though.)


1. https://www.reddit.com/r/Steam/comments/4x3il8/deployments_and_steam/
2. https://crosscode.gamepedia.com/Steam_depots