Restore missing textures in the SDK - Slightly automated!

Snacks

TODO: Clever title
Oct 15, 2009
121
123
Credit to YM for finding what to do.

The problem is that every time you launch Source SDK, it reextracts and overwrites tf.fgd. While not perfect, you can fix this with a batch file.

Here's what to do:
Navigate to your Steam folder and go to:
<path>\Steam\steamapps\<username>\sourcesdk\bin\orangebox\bin

In this folder is the tf.fgd. Make a copy of this file into the same folder (bin) and rename it to something else, I used tf.fgd.bak

Edit this new file. Remove the exclusions inside @MaterialExclusion at the top for some or all of the textures so that they will show up in hammer. Save it.

Now make a batch file in this same folder. I made a text file and renamed it to FixSDK.bat

This bat file does the work to replace tf.fgd with our edited fgd.

Edit the bat file so it contains:
Code:
@echo off
del tf.fgd
copy tf.fgd.bak tf.fgd

The original fgd is deleted then the edited file is copied and renamed to take its place.

Create a shortcut to the batch file so it is convenient to get to.

To use this you have to run things in the right order:
Open Source SDK ---> run the batch file ---> run Hammer
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
lol

Here is a better solution:

Copy the tf.fgd and call it tf_something.fgd
Make the edits
open boojum's tf_abs.fgd and change the top include line to your new file.
????
Profit.