RPG 2007-9-6 21:11
MPQ简介
MPQ简介- -
Tag: MPQ
翻译:sprite
出处:Diablo 2 北邮战网论坛--Mod 制作
本文章翻译自 Phrozwn Keep。
什么是 MPQ?
MPQ,或者称为 MoPaQ,是被誉为 Blizzard 公司的多人游戏引擎天才的 Mike O'Brien 发明的一种私有压缩文件格式。1996年,该格式作为一种多用途压缩文件
应用在游戏 Diablo 中,并以它的创始人命名“Mike O'Brien PaCK”。但是它的
版权却属于 Blizzard 的父公司 Havas Interactive。尽管现在 Mike O'Brien 已
经离开了 Blizzard,这种格式仍然在使用。显然,MPQ 格式压缩文件在 Diablo
中出色地扮演了它的角色,因为 Havas 公司一次又一次地在游戏中使用它:
Starcraft, Warcraft 2: BNE, Diablo 2, Lords of Magic(Havas 的另一个子公
司 Sierra 的作品),也许还有其他我不知道的游戏。压缩文件是一种内部包含许
多其它文件的文件,通常这些被包含的文件处于压缩的状态。Havas 公司将需要复
制到硬盘上的各种各样的重要游戏数据都包装在 MPQ 格式文件里面。这些 MPQ 文
件包含图像、声音、动画、标准、字符串、数字数据,以及故事情节。
什么是 "Storm"?
Blizzard 公司在他们所有的时髦游戏中使用了一种被称作“Storm”的共享程序库
(PC 上为 Storm.dll 文件,Mac 机上为 Storm.bin 文件)来存储重要函数,像
MPQ 文件读取函数,Battle.net 函数,甚至一些图形处理程序。与所有的共享程
序库一样,Storm 并不是十分保密,任何想使用它的程序都可以访问到它的函数。
正因为这个原因,Storm 库只包含 MPQ 文件读取的函数。MPQ 文件写入的函数是
Blizzard 专有的技术,他们不想让别人使用这些技术。
什么是 MPQ API Library DLL?
虽然 Storm 库提供了 MoPaQ 文件读取的函数,但是出于保密的考虑,它没有包含
任何编辑 MPQ 文件的功能。但是 StarEdit 包含,因为 SCM/SCX 文件也是 MoPaQ
文件。但是这些函数被加密了,所以只有知识渊博的黑客们才可以使用。对于
Blizzard 来说不幸的是,有一个这样的黑客,他的名字是 Andrey Lelikov(aka
Lelik)。他发现了一种访问这些宝贵的函数的途径,并把这个复杂的过程封装在
LMPQAPI.DLL(Lelik's MPQ API Library DLL)文件中。该文件自动破解
StarEdit,将这些函数展示在所有的程序员面前。
关于 MoPaQ 的更多信息 - Inside MoPaQ
显然,通过在 Diablo、Diablo 2、Starcraft 和其他游戏中使用的 MoPaQ 文件,
用户定制游戏的力量将是巨大的。所以我决定与大家分享我知道的有关 MoPaQ 的
知识。在写作完 Mo'PaQ 2000 之后,我将写作 Inside MoPaQ(at),它将成为关于
MPQ 文件、Storm 库、StarEdit、MPQ API Library 等信息的最权威的一体化程
序。
原文:
What’s an MPQ?
MPQ, or MoPaQ, is a proprietary archive FORMat created by Mike O'Brien, the man hailed as Blizzard's multiplayer engine genius, back in 1996 as a general-purpose archive for use with Diablo, and named narcissistically for its creator - "Mike O'brien PaCK"; the copyrights to it, however, are held by Havas Interactive, Blizzard's parent company, and it may continue to be used now that Mike O'Brien has left Blizzard. MPQs apparently excelled in their role in Diablo, because Havas has turned back to them time and time again for Starcraft, Warcraft 2: BNE, Diablo 2, Lords of Magic (by Sierra, another company owned by Havas), and possibly others that I'm not aware of. An archive is a file that contains other files inside it, usually in a compressed state. Havas uses MPQs to hold all sorts of things ranging from files that are copied to the hard drive to game data. It is the game data that is particularly useful. Those MPQs contain everything including graphics, sounds, animations, levels, strings, numeric data, and storyline inFORMation.
What’s ‘Storm’?
Blizzard uses a shared library called Storm (Storm.dll on PCs, Storm.bin on Macs) in all their modern games to store important functions like MPQ reading, Battle.net, and even some graphics routines. Like all shared libraries, Storm makes its functions available to any program that wants to use them, which is not very good for security. It is for this reason that Storm only contains MPQ reading functions. The MPQ writing functions are Blizzard's prized possessions, and they're not going to let just anyone use them.
What’s the MPQ API Library DLL?
Although Storm provides public functions for reading MoPaQs, for security reasons it does not contain any functions to edit MoPaQs.
However, StarEdit does, since SCMs/SCXs are really MoPaQs.
Unfortunately, these functions are under tight lock and key, so all but the most knowledgeable (and persistent) hackers will be unable to use them. Unfortunately for Blizzard, there does exist one such hacker, named Andrey Lelikov (aka Lelik). He has found a way to access these precious functions, and has encapsulated this complex process in LMPQAPI.DLL (Lelik’s MPQ API Library DLL), which automatically cracks open StarEdit to reveal these functions to any programmer.
For More InFORMation about MoPaQs - Inside MoPaQ Clearly, with MoPaQs being used in Diablo, Diablo 2, Starcraft, and others, the customization power is tremendous. So, I decided to share my considerable knowledge I gained about MoPaQ, and, after writing Mo’PaQ 2000, to write Inside MoPaQ (at ), which has since become the definitive, all-in-one source of inFORMation about MPQs, Storm, StarEdit, and the MPQ API Library.