Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/sites/a/ on line 20
Wavelength | Your Game Editing Resource | The Mysteries of the Pak File...
Welcome, Guest! Login | Register

The Mysteries of the Pak File... [Print this Article]
Posted by: Bored_technician
Date posted: May 15 2003
User Rating: N/A
Number of views: 4512
Number of comments: 0
Description: Finally Revealed!
The Pak file Demystified

An oft asked question that n00bs to the world of Half-Life modding have is “what is the Pak file?” or “how do I know what sound effect to select for ?” This tutorial aims to answer these very basic questions in a very basic way so it shouldn’t tax your brain too much.

The Pak File

A heck of a lot of the data required by the game is stored in the Half-Life Pak files. Essentially, these are just a variant on your favourite and mine, the Zip file. The Pak file is very similar to a Zip file in that the original directory structure of the folder is preserved - a most convenient function (more on this later!), however there is no compression in a pak file. It is simply a handy way of centralizing all your files, and keeping them in one file.

So what’s in it then?

There’s a lot of stuff in the Pak file that I wouldn’t recommend you touch unless you know what you’re doing but the following subdirectories will be of use to the intermediate mapper;
  • gfx -Contains some of the graphics files used in game
  • models –Contains multiplayer player models
  • sounds –Contains all the wav files used in the game
  • sprites –Contains the sprites used within the game

The relevance of each of these will become clear in a moment.


This folder contains some of the graphics files used within the game. Specifically, the user interface and menu graphics are stored within the directory labelled “shell” – if you want to make your own menus, this is where they’d go. For further information on this, see the current SDK.

Probably more relevant for the average mapper/2D Artist is the subdirectory labelled ”env”. The files contained within are those that are used to define the image displayed when you apply the SKY texture to a face. If you want to add your own skies, this is where you’d put them, but I’m not going to explain that here – I’ll leave that for another time!


The models folder does exactly what it says on the tin and contains the multiplayer models files. I’m no modeller, so won’t even attempt to explain this user posted image

This is my favourite part of the entire Pak file. Every single .wav file used in the game (and loads and loads that weren’t) is located in this folder. If you’ve got any plans of using the sound based entities, it would be a good idea to check this folder out. And if you have no plans to use sound, then the .wavs have come in handy on numerous other miscellaneous occasions user posted image


You should have worked out the pattern by now, but if not, this folder contains the sprites used within the game, including the HUD and crosshairs. Also included in here are various flames, explosions etc. I’m not going to go into details because, again, the SDK has all the info you’d need to mess with this folder.

Great… Now how can I view it? And what can I do with the contents?

You can view the contents of the Pak file by unpacking it (not recommended!), or by using a Pak Viewer such as Wally - as an added bonus Wally also doubles as a texture editing program.

The contents of the file on their own don’t do a lot. But you’ll find that the ability to view the images/listen to the sounds will really help when you’re trying to get certain entities to do what you want. For example; if you want to use an ambient_generic entity to blast a siren sound throughout your map, you need to know what the name of the siren sound effect is. This is located in the Pak file and you can browse the effects to your hearts content! (In case you were stuck, the wav name for the siren effect is “siren.wav – clever eh?)

I hope that this has helped to explain the mysteries of the Pak file to you and that now you have a better understanding of what it can do! user posted image

If you have any questions, PM me or post them in the forums!


Rate This Article
This article has not yet been rated.

You have to register to rate this article.
User Comments

No User Comments

You must register to post a comment. If you have already registered, you must login.

Latest Articles
3rd person View in Multiplayer
Half-Life 2 | Coding | Client Side Tutorials
How to enable it in HL2DM

By: cct | Nov 13 2006

Making a Camera
Half-Life 2 | Level Design
This camera is good for when you join a map, it gives you a view of the map before you join a team

By: slackiller | Mar 05 2006

Making a camera , Part 2
Half-Life 2 | Level Design
these cameras are working monitors that turn on when a button is pushed.

By: slackiller | Mar 04 2006

Storing weapons on ladder
Half-Life 2 | Coding | Snippets
like Raven Sheild or BF2

By: British_Bomber | Dec 24 2005

Implementation of a string lookup table
Half-Life 2 | Coding | Snippets
A string lookup table is a set of functions that is used to convert strings to pre-defined values

By: deathz0rz | Nov 13 2005

Latest Comments
knock knock
General | News
By: MIFUNE | Dec 31 2017
knock knock
General | News
By: omega | Dec 22 2016
knock knock
General | News
By: MIFUNE | Oct 10 2015
New HL HUD Message System
Half-Life | Coding | Shared Tutorials
By: chbrules | Dec 31 2011
knock knock
General | News
By: Whistler | Nov 05 2011
Particle Engine tutorial part 4
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 18 2010
Particle Engine tutorial part 2
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 11 2010
Particle Engine tutorial part 3
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 11 2010
Game Movement Series #2: Analog Jumping and Floating
Half-Life 2 | Coding | Shared Tutorials
By: mars3554 | Oct 26 2009
Particle Engine tutorial part 5
Half-Life | Coding | Client Side Tutorials
By: Deadpool | Aug 02 2009

Site Info
297 Approved Articless
8 Pending Articles
3940 Registered Members
0 People Online (5 guests)
About - Credits - Contact Us

Wavelength version:
Valid XHTML 1.0! Valid CSS!