WiseGCFScape: GCFScape

From Valve Developer Community
Jump to: navigation, search

This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.

Note.pngNote:The information in this tutorial is partly outdated, and the tool is already documented, and more thoroughly, on its own page.

GCFScape is an explorer like utility designed to allow users to browse Half-Life packages and extract their contents. GCFScape supports .gcf, .pak, .wad and .bsp packages and runs independently of Steam.

Why extract files from the Source GCFs? 1) Great way to learn how Valve did certain things. Valve has a good attitude about customers looking inside the SDK files to learn. 2) Files that are needed for your mod. Many of the default files for HL2 can be modified for your own Source mods.

Note: Please be aware that you DO NOT have a right to distribute Source SDK content. Files that are intended to be delivered via Steam are under the control of the Steam EULA.

I can not answer any legal questions; please contact Valve with your questions.

Your GCF files are all located in the same folder. /steam/SteamApps/

At this time of this writing my folder contains 34 GCF files occupying 10.7 GB of space.

If you need to look at the material data files for the HL2 materials you would use GCFScape to extract the materials folders or individual files.

It’s best to create a folder on your system first and create sub-folders for the files you extract. A good name for the folders will help you to remember what they were extracted for.

For me it’s a folder named Source. I extract SDK content into sub-folders under that one.

The material data files for Source materials have the .VMT file extension. Every Source material, .VTF, needs at least one VMT. VMT files are text files you can view in any text editor.

If for example you wanted to find all of the HL2 bumpmap materials you can use GCFScape comes to the rescue.

There are 39 folders of materials under the HL2 /materials/ folder. Extracting the HL2 material folders will occupy 981 MB of space. There are currently 8,542 individual files.

Here’s an example. 1) Extract the HL2 brick materials by using GCFScape. The file you will find the HL2 materials in is source materials.gcf The folder in that GCF is /hl2/materials/Brick/ 2) Once the folder is extracted notice that some of the materials have three files while some have two. The material brickwall052e is an example of a VMT that uses its own bumpmap, brickwall052e_normal.vtf, but another material file brickwall052c. This is the VMT for material brickwall052e: "LightmappedGeneric" { "$basetexture" "Brick/brickwall052c" "$bumpmap" "Brick/brickwall052e_normal" "$surfaceprop" "brick" "%keywords" "c17downtown" }

By extracting these files we were able to learn that material brickwall052e is a bumpmap material that uses the standard material brickwall052c.

Notice the path is specified in the VMT. /Brick/

This is often the cause of custom materials not working, displaying purple checkers instead of your material. In the example above /Brick/ is a folder under the HL2 folder /materials/.

If you create your own custom material from what you learned by looking at the HL2 material brickwall052e your VMT will need to specify a folder with the correct name where your VTF is located.

It doesn’t matter if your custom material is for HL2, HL2DM, CS:S or DOD:S. The root materials folder is /materials/. Your custom folder goes under that, i.e. /materials/mywork/

Your new brick material might look like this: "LightmappedGeneric" { "$basetexture" "mywork/mybrick01" "$bumpmap" "mywork/mybrick01_normal" "$surfaceprop" "brick" "%keywords" "mywork" }

You may not create bumpmaps for your materials, in that case you would not include the $bumpmap line at all.

The surface properties are listed here.

It’s helpful to always include keywords, these can be anything you will use to Browse for materials in Hammer. You can place your name there, or your custom folder, whatever you wish.

Once again, I can not answer any questions about your right to use content from one Source mod in another Source mod, only Valve can answer those questions.