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
Editing WAD Files

Table Of Contents:

Overview

What exactly are WAD files, anyway? Well, to put it in quick terms, a WAD file is a collection of images. Nothing more, nothing less. Disclaimer: there are a few exceptions where WAD files contain items other than images, but for nearly everyone except for heavy-duty mod authors, you' re only concerned about images. Like ZIP files, a WAD file can contain quite a large number of files... images in this case.

Half-Life and Quake1 make use of WAD files. Half-Life WADs are not the same as Quake1 WAD files; they have a slightly different format. For that reason, you'll see two options for creating WAD files when you go to File|New. Just make sure to choose the right type for the game you're building your map for, and you'll be all set.

Note! If you're here looking for help on creating custom color decals, then you've actually come to the wrong place. While you can use the methods in this tutorial, it's much easier to use the color decal wizard.

Creating a WAD File

For the rest of this discussion, I'm going to assume you're working with Half-Life. Since nearly everyone out there is building maps for Counter-Strike or some other HL mod, this is the most likely scenario. For the most part, the concepts and features are identical no matter which game you're working with.

To start a new WAD file, go to File|New and choose Half-Life Package [WAD3]. Click OK, and what you'll get is the following window:


The WAD editor

This is the standard WAD editor in Wally. We generally refer to WAD files as Half-Life Packages. The two terms are interchangeable. We used this term because many other games use a similar concept for packaging groups of images together, and we wanted a general term that meant the same thing.

Now, for a quick run-down of what the various areas of this window are:

  • Selection Button
    Use this button to select all of the images in the list. Useful when you want to copy or delete a group of images.
  • List of Images
    Contains a list of all the images in the WAD, sorted alphabetically by name. Select items by clicking on them once. Hold down CTRL and click on multiple items to select a group. Click once, hold down SHIFT, and click on another item in the list to select all of the names between those two images.
  • Filter Button
    Clicking on this check box will enable filtering on the list of images. The edit box located to the right of the check box will become enabled, allowing you to enter some text by which Wally will filter the list of images. Useful when you've got thousands of images and you're only interested in a small group of them.
  • Display Options
    These buttons allow you to change the display properties in the right-hand window. By default, Wally displays your collection of images in thumbnail-browse mode, meaning you see small versions of all your images, as many as will fit in the window at any one time. Hover your mouse over any one of the buttons to see what the button is used for. From left to right, they are: Random Tiled, Enable Animation, Tiled Mode, and Browse Mode.
  • Right-hand Window
    This is where all of your images will be displayed, either in browse mode or tiled mode.

Adding Images

So now you've gotten a brief rundown of what WAD files are, how to create a new WAD in Wally, and what Wally's WAD editor looks like. Now we're ready to actually do something, like add some images!

Wally supports a wide array of options for adding images to a WAD file. So many, in fact, that I sometimes forget we can even do it one particular way. I'm just going to run through each of the various methods, in no particular order. In every case, I am assuming you've got your WAD file open in Wally.

Clipboard

Like most everything in Wally, the clipboard is perhaps the quickest and easiest way to bring in an image. Just zip over to your paint application, copy the image to the clipboard, and come back to Wally. From there, you can do one of any of the following to paste that image in:
  1. Right-click anywhere in the WAD editor, then choose Paste As New from the pop-up menu that appears (see image at right.)
  2. Go to the menu selection Edit|Paste->Paste Into Package File.
  3. Press the little toolbar button.
  4. Hit CTRL-E.

You'll be prompted to enter a name for the image. Just enter something useful and click OK.

Create New

This option is when you want to create a new image in your WAD and then edit it directly in Wally. You can do so following either of these steps:
  1. Right-click anywhere in the WAD editor, then choose Create New Image from the pop-up menu that appears (see image at right.)
  2. Go to the menu selection Package|Create New Image.

Once you've chosen to create a new image, you need to provide a name for it and choose the image's dimensions. A dialog box will pop up (see image below) prompting you to enter a name. A list of useful characters is provided to help you decide on a name. Choose the dimensions you want, and click on OK to go the next step.

Once you've picked a name and fixed the dimensions, you need to choose a palette (see image below.) This isn't the last chance you'll have to pick a palette, so don't worry about getting locked into it. You can pick a palette from the drop-down list if one looks good. Or, you can edit the palette yourself and have a custom one. Or, you can load one from disk. Or, you can create a brand new palette for use later on. If you choose to create a new palette and start editing it, just make sure you click on the Save button when everything looks good so that the palette will get written out to disk.

Click OK when you've got the palette set, and the image will be created inside your WAD and immediately opened for you to start editing.

Batch Conversion

Batch Conversion is a multi-purpose tool. It can be used to convert images from one type to another type. Since it provides a useful foundation for loading various image types, it can also be used to load images from your hard drive directly into the WAD you're creating. What's really nice about Batch Conversion is that you can recurse subdirectories, use wildcards, and load any type of image that Wally supports. Say for instance you have a directory structure full of BMP, JPG, and TGA files. With a simple Batch Conversion setup, you could import every single one of those images, regardless of whether they were 24-bit or 8-bit.

To get started with Batch Conversion, follow any one of the following steps:

  1. Go to the menu selection Package|Add Images.
  2. Go to the menu selection File|Batch Conversion.
  3. Click on the little toolbar button.
When you start up Batch Conversion, the following dialog box will appear:

As you can see, there are quite a few different options, and it might seem a bit confusing at first. For adding images to a WAD file, there are only three items that you need to be concerned with. You must set the following fields:

  1. Enter the source directory.
  2. Enter the wildcards that will determine which images are loaded.
  3. Choose the WAD file that you want the images to be loaded into (the WAD in focus will be the default) or choose to create a new WAD.
The source directory is where your images are located. Use the [...] button to browse for it. Depending on the Wally options you've chosen, the batch conversion tool will recurse through the subdirectories underneath the folder you've chosen. If you look on the right side of the dialog, you'll see a list of options that have an effect on batch conversion. To change any one of them, click on the Wally Settings button at the top of the list.

The wildcards edit box is where you specify the filter for selecting images. If your directory only contains images, you can just enter *.* and the batch conversion tool will load them all into the WAD. If your directory happens to contain other files, or you only want to select certain images, you can specify a list of wildcards to narrow down the list of matches. You separate multiple wildcards with a space. These wildcards work just like when doing a search for files on your local hard-drive. For instance, say you wanted to load in all of the JPG files from a given directory. The wildcard there would be *.jpg. If you wanted to load all JPG files that begin with the letter R, your wildcard would be r*.jpg. Say you wanted to load in all JPG and TGA files. The wildcard would be *.jpg *.tga.

The last piece you need to specify is the WAD file to load the images into. If you've only got a single WAD file open, the choice is simple. If you have multiple WAD files, you must choose the one you want. If you don't already have a WAD file open, you may also choose to have Wally create one for you. Here you'd choose the option for "New Package" and change the type of WAD to the game of your choice.

Once you've got all of the parameters set up, click on Go to start the process. The status bar will advance along as it imports the images into your WAD file. When all images have been processed, a summary box will pop up, showing you the results of the import. If anything failed to import, you'll have the reason why.

Drag N Drop

Perhaps one of the most powerful features of the WAD editor is the ability to drag and drop files. You can drag files from Windows Explorer directly onto an open WAD file in Wally and have those files be automatically imported into the WAD. You can drag images from one WAD to another within Wally. You can drag images from Wally's image browser into a WAD. You can even drag images between different WAD types (Quake1 and Half-Life.)

Windows Explorer. First, let's go over dragging files from Windows Explorer. With Explorer open on the right side of your screen and Wally open on the left, select the images you want to import by holding down the CTRL key and clicking on the files from the list. Just like you'd select a bunch of files to delete or copy to the clipboard. Once all of the files have been selected, press and hold down the left mouse button on any one of the selected images. You can now begin to drag those files to any other location. In this case, we want to drag the files onto the WAD currently open in Wally. Once the mouse pointer is hovering over the WAD editor in Wally, let go of the mouse button and Wally will begin to import the images. See the image below for a graphical explanation of this. Explorer and Wally are both kind of squished, but I did that so you could see both of them side-by-side.

Other WAD Files. The next item we'll go over is dragging between WAD files. This is helpful when you want to take images from one WAD and copy or move them over into a separate WAD. To do this, you'll need to have both WAD files open in Wally. Select the images you want to copy by holding down CTRL and clicking on the thumbnail images in the browser section of the WAD editor. The images you select will have a blue border to them. See pic below.

Once you've got all of your images selected, press and hold the left mouse button on any one of them and drag the icon over to the other WAD and let go of the mouse button. A little popup menu will appear, asking you whether you want to move the images, copy them, or just plain cancel. The choices should be pretty obvious, but I'll go over them anyways. If you choose Move, the images will be removed from the source WAD and inserted into the destination WAD. If you choose Copy, the images are left in the source WAD in addition to being inserted into the destination WAD. Choosing Cancel just gets rid of the popup and nothing will be done. See pic below.

You can also choose the items using the listbox and drag from there. You can't drag with the left mouse button, however, since that feature is used to highlight multiple items in the listbox at one time. You have to use the right mouse button when dragging from inside the listbox of image names. The result is the same, however. You'll get a popup menu and have to choose which option you want.

Wally's Image Browser and the PAK Editor The last drag-n-drop feature we need to cover is Wally's Image Browser and the PAK editor. Perhaps an overlooked feature of Wally, the Image Browser will allow you to view the images on your hard drive before you actually load them into your WAD file. Let's start off by opening the Image Browser by going to File|Browse. Browse to the folder where your images are stored using the Explorer-like interface in the left pane window. Highlight the folder you want to browse, and the right pane window will begin to fill with thumbnail versions of the images located in that folder. When Wally has finished displaying all of the thumbnails, select your images just like we did with dragging from a WAD file. Press and hold the left mouse button on any image you've selected, drag it over to your WAD file, and let go of the mouse button. Unlike the WAD drag-n-drop, however, you won't get a prompt asking how you want to handle the drag. It always copies the image in this case.

The PAK Editor tool in Wally provides the same mechanism for drag-n-drop as the Browsing tool, so I won't go over it in any detail. Just know that you can drag-n-drop from an open PAK file in Wally just like you can with the Browsing tool. You can actually drag from the Image Browser directly into a PAK file too, but that's beyond the scope of this tutorial :-)

Summary. As you can see, there are quite a few methods for getting images into your WAD file. You'd be surprised at just how many different ways there are to go about the task in Wally. I'm sure I probably even forgot to mention some; I completely forgot you could drag from a PAK file directly into a WAD when I was planning this tutorial. Don't be afraid to try different things in Wally; you might just be surprised at what you can accomplish.

Editing and Replacing Images

To open an image for editing, you can do one of two things... either double-click on the thumbnail in the right-pane window, or select the image(s) and go to the menu option Package|Open Selected. Once your image is open for editing, it is considered a separate item to Wally at that point. You must "Save" the image back into your WAD file. This allows you to wreak havoc with the image and back out of actually making the change to the WAD file. Saving the image back into the WAD is not enough to fully save the change. You must then also save the whole WAD file.

So you have two levels of protection here: 1) you must explicitly save the image back into the WAD, and 2) you must explicitly save the WAD back to disk. If you attempt to close either an open image or an open WAD file and Wally has detected that you made some sort of change, it will ask you if you want to save the changes you've made.

If you want to replace an image in your WAD with a new one, you can do one of two things. Either A) open the image for editing and have at it, or B) Paste Over the existing image. Option A we just discussed. Option B involves copying your new image to the clipboard. Once the image is on the clipboard, you can right-click on the thumbnail you want to replace in the right-pane window, and choose Paste Over from the pop up menu that will appear. You achieve the same effect by selecting your image and going to the menu option Edit|Paste->Paste Over.

Exporting Images

Wally will let you export images from your WAD into another image format, into any directory on your hard drive. Wally will create the images in any format that it supports: BMP, PCX, PNG, JPG, TGA, or any of the other game formats: SWL, WAL, MIP, M8, etc. To export images, you first have to select them. Just like dragging them out of a WAD, you select images by holding down CTRL and clicking on the thumbnails, or clicking once on the selection button to highlight all images in the list. Once you've got the images selected, either click on the toolbar button or go to the Package|Export Selected... menu option. A dialog box will pop up (see pic at right.)

With the dialog box open, choose the output format that you'd like the images to be created as. Then, select the output folder on your hard drive by clicking on the [...] button. If you want to overwrite an image if it already exists in the output folder (with the same name) check the box marked "Overwrite existing files." If you'd like a little summary box to pop up after the export is finished, check that box. This summary will tell you whether or not it was able to create each of the images. Once you've got everything squared away, click on OK and Wally will go to town and build all of those images for you.

Note that for certain image types, you can adjust the Wally options to affect how the images are created. For instance, you might want to create 24-bit TGA images instead of the 8-bit format used by Half-Life. You might also want to have a special palette for one of the game types (like Quake2.) You must define these options before you go and Export the images, as you won't have a chance to change them once you've chosen to do the Export.

Deleting and Renaming Images

This is an easy topic to discuss, as there aren't many rules here. To delete an image or mutliple images, you must select them first. Once you've got them selected, either go to the menu option Package|Delete Selected, or hit the Delete key. You'll be asked if you really want to delete the selected images. Clicking on Yes will remove those images from the WAD. Clicking on No will cancel the delete operation.

To rename images, you must do them one at a time. Either right-click on an image from the list and choose Rename from the pop up menu, or click on the thumbnail and and go to the menu option Package|Rename. A dialog box will pop up just like when you're creating a new image. Enter the new name and click on OK. If you enter a name that already exists, an error box will pop up and you'll have to re-enter the name.

Filtering Images

The filter feature allows you to view only certain images from the list. With large WAD files, you might have images numbering in the thousands (like Valve's HalfLife.wad, which contains over 3000 images.) You might only want to work with a certain range of images, and the filtering option is one way of just hiding those images from view. To start filtering the list of images, check the box that says Filter: below the listbox of image names. Enter the text that you want to match up against. This filter is not overly sophisticated; it matches all of the characters you enter to the leading characters of each image name and displays those matches. Say you only wanted to look at the transparent images in a WAD file. You'd enter { in the filter box and only those image names beginning with a { will be shown. To stop filtering, just uncheck the box.

Display Options

There are two different ways of viewing your images. For those of you who were around back when Wally first added WAD support, you'll remember that we only would display one image at a time, and you couldn't browse through a list of thumbnails. Many people requested the ability to browse the images, which is why we added that option and made it the default. We kept the old method, however, as it provides some neat features which are unique to Wally... the ability to see the image tiled, zoomed, animated, randomized, or liquified.

If you look back into the Creating a WAD File section, you'll notice the area marked with "Display Options." These are the buttons that will alter the right-hand window viewing mode. I'll run through them all real quick for you.

Toggles randomized view of the image if image name begins with a - and at least one other image in the sequence also exists. Must be in Tiled View mode.
Toggles animated view of the image if image name begins with a + or !. If name begins with + then at least one other image in the sequence must also exist. Must be in Tiled View mode.
View a single image in Tiled mode.
View multiple images in Browse mode.

As you can see, the first two options are toggles. They are either on or off. Both of them are only applicable when you're viewing a single image at a time, meaning you must be in Tiled mode. The last two buttons switch between the two viewing modes.

When in tiled mode, the zoom tool is also available. Clicking on the magnifying glass toolbar button and then either left-clicking or right-clicking in the right-pane window will zoom the image in/out.

ReMip-ing Images

A common thing that people tend to forget about is the sub-mips of their images. Wally can be set up to handle this task for you automatically, but for those people out there who like to have more control over the sub-mip generation, we've added a feature to WAD files so you can remip a whole batch of images at one time. Simply select the images you'd like to ReMip by holding down CTRL and left-clicking on those images from the listbox. Then go to the menu option Package|ReMip Selected. If you just want to ReMip all images in the entire WAD, choose the menu option Package|ReMip All.