The internal structure of a PK4 file is rigorous and organized. The game engine expects specific file types in specific folders to function correctly. A typical PK4 archive will contain:

This is the single most important technical detail for modders: Doom 3 prioritizes loose files over files inside PK4 archives.

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.

How to test a mod safely:

Under the hood, a PK4 file is a standard Zip archive. However, it follows strict internal rules: