GCFScape

From Valve Developer Community
(Redirected from Gcfscape)
Jump to: navigation, search
English (en)Español (es)Русский (ru)中文 (zh)Translate (Translate)
Obsolete-notext.pngDeprecated:The creator of GCFScape has abandoned his projects and website, If you encounter bugs please consider using a newer maintained alternative like VPKEdit VPKEdit.
Note.pngNote:While GCFScape was made for Source Source, it also works with Source 2 Source 2. However, as there won't be any updates for the tool, it's best not to rely on its continuous functionality.
Gcfscape-small.png

GCFScape GCFScape is a small tool that can open and extract from GCF files that were formerly utilized by Steam for game content storage. The latest version of GCFScape is 1.8.6.

GCFScape 1.7.1 or newer is required to open VPK files, introduced with Left 4 Dead engine branch, and Source 2013, as well as Steam for backward compatibility with older Source games that only load directly from filesystem or .gcf files (down to Source 2004), using Depot VPK files. It also support Source 2's VPK files out of the box.

To browse a multi-part VPK, you must open the index file, named 🖿<vpkname>_dir.vpk.

Requires

  1. .NET Framework 4.0 (or later up to 4.8.1)
    1. Windows 8.1, 8, 7 support .NET Framework up to 4.8, Vista support up to .NET Framework 4.6/4.6.1 (unofficially), XP support only .NET Framework 4.0. Older versions are usually not recommended as most of them no longer received security updates. Also not to be confused with .NET Core (which is renamed to just .NET). Newer version of Windows 10 and 11 will have them installed by default.
  2. Visual C++ 2010 SP1 runtime (download) - both 32-bit and 64-bit.

Both the requirements are usually pre-installed as part of Steamworks Common Redistributables. macOS macOS and Linux Linux users will need to install these in order to run GCFScape through Wine.

Extraction

Tip.pngTip:When you install GCFScape make sure you associate GCF files with GCFScape so they'll open straight away. The files will be given icons if this has been done.

When a GCF is opened, the program will appear like this:

Gcfscape-02.png

Clicking the little Plus-New.png button, you can browse the folders clicking on them so they expand and show subfolders like so, then clicking on a folder will show the contents to the right:

Gcfscape-03.png

Right clicking a file will bring up a context menu from where you can extract from:

Gcfscape-04.png

Clicking this will bring up a window where you can choose your save location:

Gcfscape-05.png

Clicking OK will extract the file to your chosen location.

Note.pngNote:You can also extract file by drag & drop the files inside the archive to a folder, but it is not recommended as larger archives may cause GCFScape to freezing, plus if your C:\ drive are running out of space, drag & drop will not work at all.

Supported Formats

In addition to GCF files, GCFScape also supports Half-Life BSP, NCF, PAK, VPK, WAD, and XZP files.

Options

The following options are available inside the options menu in GCFScape:

Verbose
Enable verbose logging (enabled by default). Disable this option to reduce log output. This can be useful when you are extracting large amounts of files and only want to be informed of errors.
File Mapping
Enable Windows file mapping (enabled by default). File mapping is an efficient method of random file access. Some operating systems have problems with file mapping (in particular Windows 98) and may produce errors; disable this option in such cases.
Quick File Mapping
Map the entire file to memory (instead of pieces of it as needed). Effectively caches the file in memory. Can speed things up if you have sufficient free memory. Some operating systems have problems with file mapping (in particular Windows 98) and may produce errors; disable this option in such cases.
Volatile Access
Enable volatile file access (enabled by default). By default, Steam loads .gcf files in read/write mode and is liable to change their contents at any time (as updates occur). Should this happen, GCFScape would become unstable and likely crash. Volatile access allows you to open GCF files loaded in Steam at your own risk. It is generally stable and can prove useful for examining which files Steam is updating.
Write Access
Enable write file access (disabled by default). Write access gives GCFScape the ability to modify certain files and is not compatible with volatile access for the instability a combination of the two would cause. This option is required for GCF defragmentation.

Validation

In version 1.5.0, GCFScape added the ability to validate GCF files. This process computes a series of hybrid CRC 32 and Adler-32 checksums for each file within a GCF file and compares each checksum to the checksums precalculated and stored within the GCF file. This feature provides a quick alternative to Steam for checking GCF corruption and listing corrupt and incomplete files, but cannot repair corrupted GCF files as Steam can.

To validate all or part of a GCF file using GCFScape, complete the following steps:

  1. Launch GCFScape.
  2. From the File menu, open your GCF file.
  3. Browse to the top level folder you wish to validate (root for the entire GCF file).
  4. Right click on the folder and select Validate.
  5. Repeat steps 2-4 for each GCF file you wish to validate.

Defragmentation

In version 1.6.0, the ability to defragment GCF files was added to GCFScape. This feature was added after several tests by Nem indicated that Steam's built in defragmenter did not always completely defragment a game's GCF files. In fact, Steam would often falsely report a fragmentation of 0% when the true fragmentation was as high or higher than 10%, a value extremely detrimental to performance.

GCFScape defines the fragmentation ratio to be the number of used clusters that are out of order divided by the total number of used clusters. The first cluster in a file can never be out of order, so a file that consists of only one cluster (typically < 8192 B) can never be fragmented. At 10% fragmentation, a typical ~785 MB GCF file (roughly 100,000 clusters at 8192 B per cluster) would require, on average, one seek operation for every 80 KB of data read. You can view the fragmentation of any file or folder (root for the entire GCF file) by checking its properties.

To defragment your GCF files using GCFScape, complete the following steps:

  1. Shutdown Steam.
  2. Launch GCFScape.
  3. In the Options menu, enable Write Access and disable Volatile Access.
  4. From the File menu, open your GCF file.
  5. From the Tools menu, select Defragment.
  6. Repeat steps 4-5 for each GCF file you wish to defragment.
Note.pngNote:The defragmentation process is quite slow, but can be cancelled and resumed at any time.
Warning.pngWarning:Defragmenting GCF files is highly not recommended for systems with SSD drives, as defragmenting may reduce its lifespan[confirm]. Furthermore, defragmentation is unnecessary on SSD, as data can be accessed quickly regardless of whether the file is fragmented or not.

External links

See also