The MpqViewer is a tool to view and extract files from *.mpq archive files used by Blizzard. It's written in C# so you have to install Microsoft .NET Framework 2.0 or higher and it utilizes the C# MpqLibrary published by "The Hungry Programmers" (http://www.hungry.com/).
Check the changes section for updates.
Functions:
- extract any file from any *.mpq archive
How to use:
- Load a *.mpq file using the "File" -> "Open File..." dialog
Options:
- "Options" -> "Switch to LuaMode" will open the lua console (see 'Scripting')
e.g. you export the file "DBFilesClient\spell.dbc" to "MyExportFolder" it will create the folder "DBFilesClient" and put the "spell.dbc" in there, so you can find it under "MyExportFolder\DBFilesClient\spell.dbc", by default this behavior is disabled
Filtering:
- you may filter the file list of the opened *.mpq file to find a certain file or type of file much faster
- there are two filters implemented: the "default" filter works like the file search on Windows, the second is the "regex" filter, it allows you to filter the list using Regular Expressions (see http://msdn2.microsoft.com/en-us/library/2k3te2cs(VS.90).aspx for details about Regex and the .NET Framework)
- "default" filter example: "FrameXML" will display only files starting with this string, in this example this are all UI files; "*.blp" will display only files ending with the string ".blp" (image files), so you see it's a quiet simple and basic filter...
Scripting:
- switch to LuaMode through "Options" -> "Switch to LuaMode"
- load a *.lua script by clicking on "File" -> "Open LuaScript..."
- you may set a workspace through "File" -> "Open Workspace...", the default is "C:\"
- you may use any .NET class because we use the luanet api (see the documentation at http://www.lua.inf.puc-rio.br/luanet/)
- you can write to the console using print(...) (or interop.print(str) with only one param), clear the console calling interop.clear() and to keep the MpqViewer GUI unblocked when running long operations you may call interop.pulse()
- the mpq functions avaiable are: mpq.OpenFile(string srcFile) to get the Stream of a file in the currently opened archive, mpq.ExportFile(string srcFile, string dstFile) to export a file, mpq.FilterFileList(string FilterPattern) to get a list of files using the "default" filter and mpq.RegexFilterFileList(string FilterPattern) to get a list of files using the "regex" filter
- for an example look at the ExtractAndBuildMinimap.lua, on execution it will build the Minimap combining it from the hundreds of small pieces found in common.mpq
Changelog:
1.5.2:
- fixed compatibility issue with Microsoft .NET Framework so you can use framework version 2.0 again instead of 3.5
- when opening multiple *.mpq files they are sorted by date of last change so you get always the most recent file version out of the archives
1.5.1:
- added support for DXT5 compressed *.blp images
- added boolean return value to mpq.ExportFile(...) wether the export succeded or not
1.5:
- added preview for files
1.0:
- initial release
