The length of the directory is determined by the number given in the WAD header. It consists of a number of entries, each with a length of 16 bytes. The directory associates names of lumps with the data that belong to them. For example, CHEX.WAD and TNT.WAD have a PWAD signature despite serving as IWAD. Loading an IWAD as a PWAD is possible, and inversely loading a PWAD as an IWAD is also possible. The IWAD or PWAD signature is meant to define whether the file is an IWAD or a PWAD, however this is not actually checked by the engine. For some ports based on the Atari Jaguar code (Playstation derived ports being the notable exception), big-endian order is used instead. Their values can never exceed 2 31-1, since Doom reads them as signed ints. It contains three values:Īn integer specifying the number of lumps in the WAD.Īn integer holding a pointer to the location of the directory.Īll integers are 4 bytes long in x86-style little-endian order. Vanilla Doom does not support replacing sprites from inside PWAD files older graphical mods would commonly be distributed with a small tool named DeuSF that would work around this limitation (modern source ports have entirely removed the restriction).Ī WAD file always starts with a 12-byte header.
WAD files contain certain limitations: for example, much of the game behavior cannot be changed without patching DOOM.EXE using a tool such as DeHackEd (modern source ports allow DeHackEd patch files to be included in WAD files). This is in comparison to Wolfenstein mods, where the main game resource files had to be modified in order to make any change. Mods containing new levels, graphics, sound effects and music are natively supported by vanilla Doom without needing any special third party tooling they can simply be loaded using the -file command line argument. The WAD file system is the primary mechanism that allows easy modding by fans. Rather than causing id Software to seek to suppress such mods, they encouraged the developers to make Doom more easily moddable. After the release of Wolfenstein 3D in 1992, fans developed unauthorized mods of the game that changed elements such as levels and monster graphics.