MPQ Archives
Overview
MPQ Archives
MPQ (MoPaQ) is an archive format developed by the Blizzard Entertainment
company, intended for storing data files, images, sounds, music and videos for their games:
- Diablo
- StarCraft
- Warcraft II (Battle.net Edition)
- Diablo II
- Warcraft III
- World of Warcraft
They are also used in games Lords of Magic and Hellfire from Sierra.
Name MoPaQ comes from the author of the format, Mike O'Brien (Mike O'brien PaCK).
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
A few main requirements were given onto newly developed format:
- Security. Blizzard didn't want people to access their files and thus hack their
games. Archive format has to support 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 their
compression. For compdession and decompression, they decided to use PKWARE Data
Compression Library, zlib and BZip2, together with special compression method used for
storing WAV files, probably developed by Blizzard itself.
- 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 be stored also as part of EXE or other files. For example game patches are
self-extracting MPQ archives.
MPQ patches
For the possibility of patching existing games, Blizzard does not change existing MPQ archives
(which are on CD in some games). Instead of this, patching app creates a file Patch_rt.mpq
(War3patch.mpq). When opening archive, the game first tries to open a file from the patch archive
(Patch_rt.mpq). When it fails, the game looks for data in the original archive. 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 - 2006