News
6/12/2004: fixed a bug in the .MAP handling routines that was corrupting point entity coordinates when writing the new .MAP file
Current Version
0.9 beta 2: (6/12/2004) bugfix
OVERVIEW
I was sick of seeing that 8-wad warning all the time, so I wrote autowad to make it go away. Basically, it assembles all the textures that are used in a map into a custom wad file, except textures which are available in a set of 'allowed' wads which are specified on the command line: for example, 'halflife.wad' is assumed to be available, as is 'ns.wad' and 'ns2.wad' in the case of Natural-Selection. When processing a map, autowad will index the set of 'allowed' wads and ignore any textures that are available there; it will then index all of the wads referenced in the map's "wad" keyvalue, which is set by VHE, HLFix, or whatever tool you use to export the map file (autowad does not operate on .RMF files). Any textures used in the map which are available in one of these other wads are copied and extracted into a new wad file. By default, the new wad file will be named after the map - if you run autowad on 'mymap.map', it will output 'mymap.wad' - but you may override the output name with the '-output' switch.
This allows you to specify as many wads as you want in your editor and use them all at will; when the map passes through autowad at compile time (I suggest doing this just before CSG), it will determine which textures your map needs to supply on its own and assemble those into a new custom wad file automatically. If you like to use textures from several expansion wads, this saves you the trouble of either distributing entire copies of the expansion wads with your map, or manually extracting them into your own custom wad.
USAGE
autowad [-allow <files>] [-noNewMap] [-listOnly] [-output <wad>] <map>
-allow <files>: assume that textures in these WADs will be available
-output <file>: generate custom WAD <file> (deafult='mapname.wad')
-noNewMap: don't modify the MAP file
-listOnly: only report required textures, don't generate WAD
<map>: a .MAP file to process
-?: help screen
You must specify at least a map file to process, as in 'autowad mymap.map'
or 'autowad mymap' (if autowad cannot find the map specified it will try
appending '.map'). autowad will then index all wads referenced in the map,
as well as all wads specified on the command line with the '-allow' switch,
as in as in 'autowad mymap -allow wad1.wad wad2.wad'. Any textures used by
the map which are not found in the 'allowed' wads will be collected and
exported to a custom wad; if the map is 'mymap.map', autowad will write
'mymap.wad'. You may specify a different filename to write with the '-output'
switch, as in 'autowad mymap -allow wad1.wad was2.wad -output mywad.wad'.
You may also skip the wad-output stage and instead print a list of used
textures with the '-listOnly' switch, as in 'autowad mymap -listOnly'; this
switch makes the '-output' switch irrelevant. By default, when autowad
generates its custom wad file, it also modifies the original map file's wad
reference to include only the new custom wad and the specified 'allowed'
wads; you may skip this step with the '-noNewMap' switch.
BATCH COMPILER
Enclosed in the zip file is the executable, this readme, and a spec file for Nem's Batch Compiler. It is a modification of the HLFix/OptPlns/XP-Cagey-tools specification available on the Natural-Selection forums which includes autowad in the compile chain, between Map-Backup and HLCSG. If you already use the HLFix/OptPlns/etc specification, you should have no trouble porting over to this spec; I believe all the settings for the other compile tools will transfer automatically (but you'll have to re-save your presets with the new spec). I suggest 'allow'ing ns.wad, ns2.wad, halflife.wad, liquids.wad and zhlt.wad, but you can experiment with the options to your liking.
CHANGELOG
0.9b2: Found and fixed a bug in the .MAP generation routines that caused autowad to strip the Y and Z coordinate values from the "origin" field of point entities. The malformed coordinates that autowad was saving caused all point entities to be compiled as if they were placed at the origin.
0.9b1: Initial release.
DOWNLOAD
autowad09b2.zip