This article will cover everything from what a PK4 file actually is, to how to open, edit, and repack them, and finally, how to troubleshoot common errors.
Missing texture. Cause: The material definition in materials/ points to a TGA that isn't inside your PK4, or the path is wrong inside the PK4. Fix: Verify the internal path. textures/my/tex.tga requires a PK4 folder exactly textures/my/ .
While the name sounds unique, PK4 files are not a secret proprietary binary format. In a move of elegant simplicity, id Software used but changed the file extension to .pk4 .
files are essentially ZIP archives used to store the game's data, such as textures, models, and scripts. GameDevs.org
If you create a folder in base/ called maps , and inside it place game/mars_city1.map , the game will load your version instead of the one inside pak000.pk4 . This means you never need to modify the original PK4 files. This is a safe, reversible way to mod.
: For multiple PK4s, the game reads them alphabetically. This is why many mods are named z_modname.pk4 pak009.pk4 to ensure they load last and overwrite original assets. 4. Basic Modding Workflow