MPQ Archives
Overview
MPQ Archives
MPQ (MoPaQ) is an archive format developed by Blizzard Entertainment,
purposed for storing data files, images, sounds, music and videos for their games. The name MoPaQ comes
from the author of the format, Mike O'Brien (Mike O'brien PaCK). So far, MPQ archives have been used for
the following games:
- Diablo
- StarCraft
- Warcraft II (Battle.net Edition)
- Diablo II
- Warcraft III
- World of Warcraft
- Starcraft II
- Lord of Magic (by Sierra)
- Hellfire (Diablo datadisk by Sierra)
Previous versions of archives
Before the game of Diablo was released, Blizzard used WAR format (Warcraft ARchive) for
their stuff. This format was used with the game of Warcraft II (maybe also Warcraft I). This
format was very simple, and average hacker was able to hack it in quite short time. Although
it was not so great problem in Warcraft II, the newly coming game of Diablo needed to use
a better archive format.
Requirements
- Security. Blizzard didn't want people to access their files and thus hack their
games. Archive format must have supported data encryption.
- Fast access. It was necessary to access archived data as fast as possible,
in realtime.
- Compression. Blizzard decided to store sound files, including music, in the WAV
format. Uncompressed size of these files is very large and archive must support a
compression. Several compression methods are used to store data files within MPQ archives
(PKWARE Data Compression Library, ZLIB, BZIP2, LZMA and SPARSE compression),
together with Huffman and IMA ADPCM compression methods used for storing WAV files.
- Expandability. Archive format must support later changes of the way how the files
are stored in the archive. With new games released, the MPQ format is being extended.
All the later changes are backward-compatible with older versions.
- Multilanguage. Blizzard planned to release its games worldwide, in various language
versions. The archive format must support storing multiple files with different
languages.
MPQ archives can either be a standalone file, or can be appended to the end of another file,
like an EXE file. Game patches are self-extracting MPQ archives. For more information about
format of MPQ archives, see MPQ Format.
Files within MPQs
Images used in Blizzard games are in the following formats:
- PCX format (Diablo, Starcraft): screens, large areas. Can be directly viewed in any image viewer.
- GIF format (Diablo)
- CEL format (Diablo I)
- DC6 format (Diablo II)
- BLP format (Warcraft III, World of Warcraft): textures. More info about BLP format can be found here.
Animations used in Blizzard games are in the following formats:
- CL2 format (Diablo)
- DC6 format (Diablo II)
- MDX format (Warcraft III): textures in Warcraft III. More info about MDX format can be found here.
Sounds used in Blizzard games are in the following formats:
- WAV format: can be found in MPQ from all games from Diablo to World of Warcraft.
- MID format: ambient sounds in Warcraft III
- MP3 format: usually music files, started to appear in MPQ archives since Warcraft III
- OGG format: several files with WAV extension were actually OGG files
Movies used in Blizzard games are in the following formats:
- SMK format (Smacker Video Technologies): Diablo I movies, Starcraft I animations
- BIK format (Bink Video)
- AVI format (DIVX): since Warcraft III
MPQ patches
For the possibility of patching existing games, Blizzard does not change existing MPQ archives
(which can also be on CD). Instead of it, patching application creates a patch MPQ (like Patch_rt.mpq
or War3patch.mpq). When opening game MPQs, the game creates a chain. Patch MPQs are first in that chain,
and original MPQs are placed last. When a file is being open, the game searches the chain, so that patch
MPQ are checked first and opens the file from an archive where is has been found first.
With the Warcraft III game is also possible to make the game use, locally stored (unarchived) files
when you change this setting in the registry:
REGEDIT4
[HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III]
"Allow Local Files"=dword:00000001
Copyright (c) Ladislav Zezula 2003 - 2010