Wally's Home

News

Forum

FAQ

Tutorials

ToDo List

Downloads

Links

Made With Wally

News Archive


Mail the authors:
Ty Matthews
Neal White III



Proudly Hosted By
Telefragged Home
WAD Merge Tool

With version 1.54B of Wally came a new wizard... the WAD Merge Tool. The aim of this tutorial is to explain what the tool is for, and how to use it.

What is this thing?

The WAD Merge Tool allows you to merge together many different WADs into a single destination WAD. With WorldCraft, you are sometimes limited in the number of WADs you can add to your configuration for compilation purposes. This tool will allow you to create a single, large WAD that comprises all of the images from all WADs.

Note! While the name of the tool is "WAD Merge," the source WAD files you've chosen to merge are left unchanged.

In addition to brute-force merging, the tool also allows advanced refinement of exactly which images you want to merge. You can, for instance, merge only those images that begin with a certain string. Or, you can choose to merge only those images that are exactly 64 x 64 in size. Perhaps you'd like to merge all images that are at least 128 x 128, but no greater than 256 x 256. All of these options are possible, and more. Each of these refinements applies on a per-WAD basis. IE, you can choose to merge all images that begin with C from halflife.wad, and all images that begin with ! from liquids.wad.

The merge tool supports both Quake1 and Half-Life WAD files. It will even convert images between the two types if you so desired.

Sounds cool. So what do I do?

For starters, you need to kick the tool off. Do so by going to the menu option Wizard|WAD Merge. This will bring up the dialog box off to the right.

The top list box will display all of the WADs you have chosen to merge into a single WAD. Right now, we don't have any WADs selected, so the list box is empty.

To the right of the list box are buttons for adding, removing, and configuring WADs from that list.

Below the the list box is a section labelled "Destination Properties." Here is where you define what you'd like to do with the merged images. You can create a brand new WAD, add to an already existing WAD on disk, or add to a WAD already open in Wally.

At the bottom of the dialog is the section labelled "Duplicate Image Options." Here is where you define the rules for what happens when a duplicate image is encountered.

Add a source WAD

The first thing you need to do to use the tool is select some source WAD files. You can do this in one of two ways. The first method is by clicking on the Add WAD button, which gives you the opportunity of specifying advanced selection criteria. The second method is by clicking on the Quick Add button, which adds WADs with the default selection criteria. First, let's try Add WAD. The following dialog box will appear:

From here, you specify the source WAD file, the image wildcards, and any size restrictions. Clicking on the [...] button to the right of the source WAD edit box will bring up a file dialog that allows you to browse for the WAD file. Let's choose the xeno.wad file located in your \Half-Life\Valve folder.

Next, we need to specify some wildcards. When this dialog first pops up, Wally will fill in the wildcard field with the previously-used wildcard string. If this is the first time you've used the tool, this field will be just an asterisk (*), which means all images. If you leave the field blank, Wally will assume you meant all images, and will use the asterisk. These wildcards are exactly like the Unix filename-matching routine. You can specify the question mark to indicate a single position, asterisk to indicate all characters, etc.

You can specify multiple wildcards here, by separating them with a space (just like batch conversion.) For example, say you want all images that begin with ! and all images that begin with { from xeno.wad. Your wildcard string would be !* {*.

Off on the right side is a section labelled "Size restrictions." Here is where you can specify that you only want images that meet the minimum/maximum width/height to be merged. This size restriction is in addition to the wildcard restriction, so they are cumulative. Both minimum and maximum values are inclusive, meaning that if you want to have all images that are at least 64 x 64 in size, you would enter 64 in both the Minimum width and Minimum height fields.

Once your restrictions are set, click on OK to return to the main Merge Tool dialog.

Quick Add

The Quick Add button allows you to put in multiple WAD files all at once with the default restrictions set in place. Default restrictions would be all images (the asterisk) and no size restrictions. If you're just merging together WADs and you do not have any special restrictions that you'd like to place on the images in those WAD files, this is the fastest and most efficient way to specify those WAD files.

Clicking on the Quick Add button brings up a file open dialog, very similar to File|Open. You browse for the folder where your source WADs are stored, and you select files by clicking on them while holding down the CTRL key. Once you've got all of the WADs selected, click on Open to add them to the list.

Properties & Remove WAD

Once you've got some files in the list of WADs to be merged, you can change the restriction properties for those WADs at any time. Just click on a name in the list, and click on the Properties button. The same dialog for Add WAD will appear, allowing you to make modifications as you see fit.

If you want to remove a WAD from the list, just click on the name and then the Remove WAD button. That WAD will no longer be part of the merge list.

Destination Properties

In this section is where you define what the destination WAD will be. As mentioned earlier, you can specify that you'd like a new WAD to be created, either of type Half-Life (WAD3) or Quake1 (WAD2.) You can also choose to add the images to an already-existing WAD located on your hard drive. The last option allows you to specify a WAD file that is currently open for editing in Wally. Just note that if you do not have any WAD files open for editing, this option will not be selectable.

Choosing to create a new WAD file gives you the opportunity to view the resulting WAD file before saving. If you choose this option, once you click on Go Wally will create a new WAD file and open it for editing. It will then proceed to import all of the selected WAD files, based on the criteria you specified, and add those images to the newly-created WAD file. This newly-created file will not be saved until you explicitly do so, giving you the chance to back out of the merge, add more images, or do whatever you please.

Choosing to add to an existing WAD will not give you the opportunity to view the resulting merged file. Wally will open the existing WAD, add all of the images, and then save the WAD back to its original location. You can then open the WAD to view the newly-added images.

The last option is a mix between the two. It allows you to add to an existing WAD, view the changes, and also back out of those changes if they're not what you wanted. The only caveat is that you must open the destination WAD file first before going into the WAD Merge Tool.

Duplicate Options

It is very possible that an image already exists in your destination WAD with the same name as what's in a source WAD that you are trying to merge in. You can only have one image for a given name, so choosing the right option for your needs here is pretty important.

You can choose to Ignore duplicate images, which means that the currently-existing image already in the destination WAD will be retained and the new image is simply skipped.

You can choose to Rename the new image, which means that Wally will change the new image's name by appending a ~XX (where XX is a hexidecimal value) to it until it can find a unique name.

The last option, Overwrite, means that the new image will replace the currently-existing image in all cases.

Of the three options, Rename is the safest, since you are practically guaranteed that all images will exist, no matter what their names originally were.

Start this thing up!

Once you've got all of your source WAD files, options, and destination WAD file configured, it's time to spring into action by clicking on the Go button. This will spawn off a new thread which goes to task on loading up the source WAD files, culling out the images that don't match the criteria, converting images to a new type (if going between Quake1 and Half-Life,) and renaming images as required.

A dialog box will pop up showing you the current status of the merge job. The status bar is reset for every source WAD since there is no easy way to calculate how many images will match the criteria without actually loading and working with the WAD data.

Once the merge job is finished, the OK button will be enabled and you can close the status dialog. You will be returned to the WAD Merge Tool dialog to either continue merging WADs, or to simply Quit and move on with your life.