Using the texture wad configuration file (wad.cfg)

Back to the Index

About wad.cfg

The texture wad configuration file, called wad.cfg should be extracted to the same directory as the compile tools, or your Half-Life directory.

Whats the purpose of this feature?

Say, you map for 3 mods: Counter-Strike, TFC, and normal Half-Life single player. All three of these mods use different wads. Say you wanted to work on your Counter-Strike map one day, and TFC the next: because Worldcraft does not store which wad files are in use for each game configuration, you would need to go into Worldcraft texture configuration, Add/Remove wad files from the list, and Restart Worldcraft.

The idealistic solution to this would be to make it so that Worldcraft stores which wad files are in use for any given game configuration, but that's not as easy as it would first appear.

The solution

In the mean time, you can use this method to overcome the hassle of restarting Worldcraft. In the wad.cfg file, you can explicitly define what wads you want written into the .bsp file, regardless of what happens to be in Worldcraft, for any given game configuration. So, now, HLCSG will ignore the wads that you have configured in Worldcraft, and instead only write in the ones you specify.

The specific syntax for the file is the following:

configuration_name
{
c:\path\to\wad\wad1.wad
c:\path\to\wad\wad2.wad
include c:\path\to\wad\wad3.wad
}

Where

All that remains now is to run hlcsg.exe with the parameter -wadconfig configuration_name.

Lets take an example. Say you want to create a configuration called 'my_wads'. It has 3 standard wadfiles in it: 'halflife.wad', 'liquids.wad' and 'xeno.wad', all of which can be found in the valve directory, because they all came with Half-Life. It also has a custom wad created by me called 'mywad.wad', which you want to compile into the .bsp file, which also happens to be in the valve directory. My configuration might look something like this:

my_wads
{
C:\Sierra\Half-Life\valve\halflife.wad
C:\Sierra\Half-Life\valve\liquids.wad
C:\Sierra\Half-Life\valve\xeno.wad
include C:\Sierra\Half-Life\valve\mywad.wad
}

Now, when you run hlcsg.exe when you compile your map, you put -wadconfig my_wads in the command line.

If you really don't understand the wad.cfg file syntax, then don't worry. You don't have to use it. However, it does come with some example configurations already in it; just open it in notepad and see if you can get the hang of it, because it can be quite handy.

Back to the Index