KatsBits
Creating 3D models, meshes & game content
3D modelling & meshing, level editing and textures making
Hints, tips and tutorials for 3D modelling & content creation

[back]Creating PAK, PK3 & PK4 files

Contents
What are PAK, PK3 & PK4 files? ^

A PK3 (PK4 for Doom 3 games) or 'pack' file is basically a ZIP or RAR archive which uses the 'pk3' file extension instead of *.zip or *.rar. It's not automatically recognised by either WinZip or WinRar, this usually has to be assigned to either application; right click on a current PK3 file and select open with, in the dialogue that appears select WinZip or WinRAR as the application of choice to open these files by default.

How do I create a PK3/PK4 file ^

There are a couple of ways to create PK3 or PAK files for games using idsoftware technology, including the recently released Doom 3. The two main ways are to either pack up the contents of a folder or pack folders sitting on the root drive letter. Each works just as well as the other but are the result of different working methods when you create the assets. The most common of the two is to pack up the contents of a folder so that will be explained below.

Packing the contents of a folder ^

Typically this means a folder structure within a directory similar to the following;

  • ..\working directory
      • \main
        • \maps
        • \models
          • \subfolder
          • \subfolder
        • \scripts
        • \textures
          • \subfolder
          • \subfolder
        • \ui
        • \etc..

When you open Windows Explorer it'll be split into two parts; the main 'contents' window on the right with a thin 'navigation' panel on the left. Using the method above means selecting the parent folder in the panel on left hand side - this would be 'baseq3' if you were packing up the files for a Quake 3 project. On selecting the parent folder on the left, the 'content' panel on the right will then show the directory structure of that folder, listing further subfolders and files.

  • Select the folders; maps, models etc.

Selecting the files to pack
Selecting the files to pack
  • Right click one of the selected folders and the select 'add to zip'.

Right click, add to zip file
Right click, "add to zip file"
  • This will open a dialogue with a file path and some text already highlighted in the top text box; most likely showing the name of the folder you right clicked on, in the example below it shows the 'scripts' folder as the last entry.

  • Left click at the end of that box and change that last entry (highlight below) to what ever you want to call the PK3 file and then add the '.PK3' (a 'fullstop' [punctuation] 'P', 'K', and '3') extension.

  • There's also a check box near the bottom of this dialogue box; 'Save full path info', make sure that is unchecked (the box is empty).

Changing the name and location
Changing the name and location
  • Press the add button and you'll see WinZip (or similar) add the files to the newly created zip file and drop that into the main folder. If you open the file it'll show the contents with file paths relative to the parent directory, 'main' in this case.

Files added to zip
Files added to zip
final destination of PK'x' file
Final desination of PK'X' file
  • You may find after doing this you have 'junk' files included in the PK3, if that's the case just select and delete them from the file.

  • For distribution make sure you put the PK3 inside a ZIP file by going through the same process above but adding .ZIP at the end of the file path.

© 2008 KatsBits - All Rights reserved.
No part of this web site may be reproduced (unless for personal use) without prior written consent from KatsBits.com