SteamRE / DepotDownloader

Steam depot downloader utilizing the SteamKit2 library.
GNU General Public License v2.0
1.96k stars 266 forks source link

Extract contents from backups/retail discs #544

Open thepwrtank18 opened 1 month ago

thepwrtank18 commented 1 month ago

What problem is this feature trying to solve?

I like messing with old stuff, especially games. If I have a retail disc that uses Steam for protection, the only way I can extract the files from that disc is Steam...which immediately updates it to the latest version of that game. Bit of a problem if I wanted the version in that disc.

How would you like it to be solved?

Modern retail discs and backups use the .csm/.csd archive format, the same format used for downloading. I believe it wouldn't be hard to specify a directory for the archives in DepotDownloader, put your Steam credentials in (it still needs that decryption key!), and have that version of the game extracted.

Have you considered any alternative solutions

I tried pausing the update after it installs from disc on Steam, but from what it looks like, the update process is mixed into the install process, so by installation you have the up to date version.

Offline mode won't work either, since Steam needs the decryption key for the game from Valve's servers.

Additional Information

Some retail copies/backups come in multiple discs, which might be a hurdle.

yaakov-h commented 1 month ago

I think we would need a disc on hand to test this out, and I don't think I have any personally.

(I have an Xbox disc somewhere but that's probably a very different story.)

thepwrtank18 commented 1 month ago

You can create one yourself with Steam's backup feature, for any game you own. https://help.steampowered.com/en/faqs/view/4593-5CB7-DC3C-64F0

For retail discs (which are functionally the same), I know Skyrim (non-Special Edition) and Fallout NV have Steam retail discs.

Dimensional commented 1 month ago

I think we would need a disc on hand to test this out, and I don't think I have any personally.

(I have an Xbox disc somewhere but that's probably a very different story.)

Yes and no. You can technically create your own CSD/CSM backups that are nearly identical to that of the discs. This was brought up in a conversation in the no-intro discord server at one point when discussing ways of downloading CDN chunks and saving them directly. A python project called SteamArchiver has the ability to grab these chunks and combine them into a CSD/CSM pair that steam can read when 'restoring' a backup.

You can create one yourself with Steam's backup feature, for any game you own. https://help.steampowered.com/en/faqs/view/4593-5CB7-DC3C-64F0

For retail discs (which are functionally the same), I know Skyrim (non-Special Edition) and Fallout NV have Steam retail discs.

That can work too. The difference here versus what I mention above is that this backup takes the whole file and packages it into a CSD/CSM, where as the above mentioned packages the CDN chunks. I personally haven't looked at it, but I think the backup process compresses the file, encrypts it with the depot key, and then writes it to the CSD, with the sidecar data, like the checksum, is written to the CSM. I'm likely inaccurate, since I almost never use Steam's backup feature, but it may close.

On this topic, maybe implementation of creating CSD/CSM pairs could also be done? A way of backing up the game files once they are downloaded?

thepwrtank18 commented 1 month ago

I think we would need a disc on hand to test this out, and I don't think I have any personally. (I have an Xbox disc somewhere but that's probably a very different story.)

Yes and no. You can technically create your own CSD/CSM backups that are nearly identical to that of the discs. This was brought up in a conversation in the no-intro discord server at one point when discussing ways of downloading CDN chunks and saving them directly. A python project called SteamArchiver has the ability to grab these chunks and combine them into a CSD/CSM pair that steam can read when 'restoring' a backup.

You can create one yourself with Steam's backup feature, for any game you own. help.steampowered.com/en/faqs/view/4593-5CB7-DC3C-64F0 For retail discs (which are functionally the same), I know Skyrim (non-Special Edition) and Fallout NV have Steam retail discs.

That can work too. The difference here versus what I mention above is that this backup takes the whole file and packages it into a CSD/CSM, where as the above mentioned packages the CDN chunks. I personally haven't looked at it, but I think the backup process compresses the file, encrypts it with the depot key, and then writes it to the CSD, with the sidecar data, like the checksum, is written to the CSM. I'm likely inaccurate, since I almost never use Steam's backup feature, but it may close.

On this topic, maybe implementation of creating CSD/CSM pairs could also be done? A way of backing up the game files once they are downloaded?

You can also make complete retail discs yourself from any game you own: https://partner.steamgames.com/doc/sdk/goldmaster

thepwrtank18 commented 1 month ago

image Ah, the plot thickens. Older retail discs use the sim/sis/sid format...whatever that is.

.sim files appear to have a list of every file in the archives, with some other data before and after it. .sis files are the usual config files (name, appid, depot list, etc).

psychonic commented 1 month ago

TBH, this all seems out of scope for DepotDownloader