Vanilla Doom only loads one PNAMES, one TEXTURE1 and one TEXTURE2 lumps. ZDoom allows cumulative loading; however only one PNAMES lump per archive will be read. Each TEXTUREx lump will refer to the latest PNAMES lump in the same archive, or an archive loaded previously in the loading order. (So for example, loading a single archive containing only a PNAMES lump will not affect the IWAD textures, although it would in a port keeping the vanilla model of texture loading.)
The lump starts with an integer header declaring the number of patches that follow. Each patch is simply declared as a string of eight characters. Shorter names are zero-terminated. The total lump size is therefore equal to (num_patches * 8) + 4.
|0-3||Unsigned 32-bit integer||Number of entries|
Beware that certain tools not written in a XWE, do not understand and can corrupt the PNAMES lump if there are garbage characters after the null byte, as could happen (and be normally allowed by Doom) with tools written in a C-style language such as SLumpEd., such as
For this reason, it is advised to make sure that all bytes not used for a short patch name be nulled. Modern editors, such as SLADE 3, make sure to avoid the problem.