Increase the immersiveness of id’s classic FPS by replacing the space marine’s pictures with your own.
id Software’s groundbreaking DOOM almost singlehandedly created the modern FPS genre. With style oozing from every crevice, a near-infinite amount of customizability, and an open source codebase, it’s no wonder that people still play variants such as PrBoom (http://prboom.sourceforge.net/).
As any dedicated modder will tell you, half the fun is in making your own fun. Earlier games were also hackable, but DOOM was unique in encouraging gamers to add their own maps, weapons, and graphics. Since it was a pre-Windows pioneer, the tools aren’t very user-friendly, but they exist and work with a little prodding.
Creating your own maps is a lot of work, but it’s much easier to replace individual graphics. One good way to start is to change the picture of your character in the game’s status bar.
Start by downloading PrBoom or an equivalent. PrBoom is nice in that it supports Windows and Linux equally well. Windows installation is as easy as downloading the latest Windows ZIP archive (2.2.4 at the time of writing) and unzipping it into an appropriate directory.
If you have the registered version of DOOM somewhere,[17] copy its .wad files into the PrBoom
directory. Otherwise, look for a file called
doom1.wad online. This is the shareware version.
DOOM stores all its maps, images, and sounds in WAD files. There are two types. IWADs are the original internal WADs shipped with the game; they contain the default game information. PWADs are player-supplied WADs that change or add parts of the game. They can be much smaller, because anything they don’t supply directly comes from the original IWAD.
Think of a WAD as a directory containing subdirectories and files, somewhat like a ZIP archive. To replace a particular graphic, you have to know its details within the IWAD and add an equivalent graphic to your PWAD. That’s where tools such as DeuTex (http://www.teaser.fr/~amajorel/deutex/) come in.
Technically, you’re not supposed to be able to
create or use PWADs with the shareware IWAD. I renamed
doom1.wad to doom.wad, and
PrBoom and DeuTex were happy.
DeuTex is a WAD disassembler, meaning that it can disassemble a WAD
into a real directory. It runs on DOS and Linux. Download and extract
DeuTex into its own directory, then extract the data from
doom.wad with a command resembling:
$ ./deutex -extract /usr/share/games/doom/doom.wadThis creates several directories such as
textures/ and sounds/ as
well as a file called wadinfo.txt.
Besides trial and error, there’s really no good way
to figure out which image within this WAD to replace. Fortunately, I
can tell you that the files in graphics/stf*
represent the face in the status bar. I replaced the god-mode powerup
image (type iddqd while playing) with a
picture of my nephew. DeuTex extracts this image to
graphics/stfgod0.pnm.
The trickiest part of this process is building a 24 29 image that
looks good in DOOM, especially with its restricted palette. I cropped
and adjusted the picture until it fit, then saved it as a 256-color
GIF file in graphics/stfgod0.gif. Be sure to
keep the same base name as the file you’re
replacing; otherwise, DOOM won’t know how to find
the resource. It’s okay to use a different file
extension; DeuTex converts BMP, GIF, or JPEG files to PPM files
automatically when it builds a WAD. If you do use a different
extension, though, be sure to move the original file out of the way
so that DeuTex will use your replacement.
For best results, remove the background of the image, leaving only the subject’s face and head. The image is much less jarring this way.
The next step is to build a manifest file to tell DeuTex which files
to assemble. Open the wadinfo.txt file in your
favorite text editor. It has several internal sections for the
different types of files within the WAD. Delete everything that you
haven’t replaced. In my case, I had a very short
file:
# List of Pictures (with insertion point) [graphics] STFGOD0 -5 -2
Be sure to keep the [graphics] heading, though you
can delete the entries beneath it for the images you want to stay the
same. Save the file with a different name, perhaps
godinfo.txt, so you can make other modifications
by copying the relevant lines from the original manifest.
The final step is to assemble all the new resources into a PWAD. DeuTex again can do this. Use a command resembling:
$ ./deutex -build godinfo.txt baby.wadIf everything goes well, this will write a new PWAD called
baby.wad in your current directory. DeuTex
helpfully refuses to overwrite an existing file, so delete or move
baby.wad if you’ve already
generated one.
To see the effects of your work, launch PrBoom with your new PWAD.
Use the -file switch to give the location of the
file:
$ prboom -file baby.wadStart a new game, type iddqd, and marvel at
the connection between innocence and ultimate power, seen in Figure 7-4.
The same technique here works for replacing any image or sound within the IWAD files, including monsters and weapons. Remember, if you can do it for one image, you can do it for many.