
In previous versions, the IWAD was called srb2.srb. Since v2.2, SRB2 no longer uses an IWAD because the main resources are stored in a PK3 file called srb2.pk3. In the original Doom, this file is called DOOM.WAD. It normally contains all of the basic resources for the game, and is the first WAD file to be loaded upon starting the game. The internal WAD, or IWAD, is the main WAD file for a Doom-based game. To view and change the type of a WAD file, it must be opened with a hex editor. The type is specified in the first four bytes of the header, e.g., the first four bytes of a PWAD file are PWAD. There are four types of WAD files that can be used in SRB2: IWAD, PWAD, ZWAD and SDLL. The string must be null-terminated if shorter than 8 bytes. The lump's name, which can have up to 8 characters. If the size is 0, the lump is a marker lump that has no data and merely serves to organize the WAD file. Stores the offset to the start of the lump's data in the file. Each entry has a length of 16 bytes and consists of the following values: The number of entries in the directory is therefore the number of lumps as set in the header. The directory lists the names of all lumps in the WAD files and links them to the associated lump data via a pointer. Stores the offset to the start of the directory in the file. Specifies the number of lumps in the WAD file. See Types of WAD files for an explanation. It contains three values:ĭesignates the type of WAD file, i.e., "IWAD", "PWAD", "ZWAD" or "SDLL". WAD files with custom gamedata files (determined via the MainCfg SOC block) can also partially bypass the game's modification check – any WADs added previously to these will also not count as modifying the game afterwards.Ī WAD file consists of three components: a header, a directory that lists all the lumps in the file, and the lump data itself.Ī WAD file always starts with a 12-byte header. Exceptions to this are WAD files purely consisting of digital/MIDI music, sounds, select HUD-related graphics, and/or custom palettes, all of which will affect only the user's end and are therefore able to be added by the user within netgames. With the exception of SRB2's included resource files, WAD files are typically added as modifications to the game when one is added, the game will detect this and mark itself as "modified". An individual piece of data in a WAD file is called a lump, and programs that allow the user to manage the lumps of a WAD file are called lump editors. WAD files can contain a wide variety of resources, such as maps, scripts, graphics, sound effects or music. The term "WAD" is an acronym for Where's All the Data?. A WAD file is a data library for any program that runs on the Doom engine, including SRB2.
