Ladik's MPQ Editor

This tool originates from here

For more information regarding this tool and the MoPaQ format, click here

Editor of MPQ archives in the Windows Explorer style. Can execute files directly from archive, extract files, rename them, delete, create archives, including file compression. Supports MPQs from Diablo I to Diablo III.
Works in Windows NT 4.0 or newer, ReactOS 0.3.14 or newer, Wine 1.3.28 or newer (tested in Kubuntu 11.10).

For the changelog, check the included history.txt file in the zip file.

Disclaimer: This tool is created and owned by Ladislav Zezula. For more information, check the links above.
Contents

Ladiq's MPQ Editor v3.6.0.868 (Binary)

Reviews
00:28, 3rd Apr 2014 TriggerHappy: Very useful tool and has support for some of the newer encryption methods. It would be best to use the author link, though.

Moderator

M

Moderator

00:28, 3rd Apr 2014
TriggerHappy:

Very useful tool and has support for some of the newer encryption methods. It would be best to use the author link, though.
 

Roland

R

Roland

The Interface looks like it's from Windows 8, Are you sure this is also Compatible?
I'm really sorry for the necro-posting. But I'm really concerned.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Compatible to what? Do you mean Win7?
Anyway it says in the description "Works in Windows NT 4.0 or newer, ReactOS 0.3.14 or never, Wine 1.3.28 or newer (tested in Kubuntu 11.10)." So I assume it would.
 
Level 3
Joined
Jun 19, 2010
Messages
49
ok, here is my tiny FAQ i had to figure out, hopefully it will be helpful for one or two:

question:
how to add folder(s)?
answer:
just use drag'n'drop!

question:
when adding files/folders to the MPQ & reload the MPQ,
the added files aren't encrypted/are unknown files!
how can i view custom MPQs with correct structure?
answer:
everytime you make changes to the MPQ
you have to create a new listfile which
you have to use for correct reloading of the MPQ.
create the new listfile by clicking "Tools/Name Breaker/Save list ..."

question:
is MPQ size reduced properly when removing files?
(unlike "MPQ Master 1.1.0" which keeps MPQs growing!)
answer:
yes!
 
Level 4
Joined
Sep 13, 2014
Messages
106
Does this work for starcraft 1? My starcraft CD exploded, and it had my CD key written on it, and I want to extract my cd key from the mpq, but the program was only part-way installed, and so this mpq editor doesn't seem to be able to open the mpq. Is that normal, or is it because it was only part-way installed?
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,985
Does this work for starcraft 1?

Yes

My starcraft CD exploded, and it had my CD key written on it, and I want to extract my cd key from the mpq, but the program was only part-way installed, and so this mpq editor doesn't seem to be able to open the mpq. Is that normal, or is it because it was only part-way installed?

I doubt this program is designed to extract such things.
Your game installation / mpq is corrupt.

Your CD Key should be written inside the box you bought.
 
Level 4
Joined
Sep 13, 2014
Messages
106
Yeah, I have had that cd since before I was born. I don't have the box >_>. I really should have redeemed the cd key earlier, oh well.
 
Level 2
Joined
Jun 21, 2014
Messages
11
Not sure but I've seen and used MPQs with 3GB+
3GB+ strange, when I add all my files to MPQ size is 2.1GB and WB will not open for me, that is why I am asking for size limit, can it broke my files or something? and also after import all my files change name for File000 and so on
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,985
3GB+ strange, when I add all my files to MPQ size is 2.1GB and WB will not open for me

There are four MPQ format versions.
MPQ Archives - MPQ file format

No idea what the size limit is for each of them.

Elsewhere, it is being said:
"[The MPQ] 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."
 
Level 2
Joined
May 19, 2017
Messages
30
I was editing the an mpq until I ran into a problem which made the model files invisible so I closed the mpq and took a look at another mpq then when I opened the mpq I was working on it was in read only mode. How do I get out of read only mode? Everything is opening in that mode now.
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,985
Please try this:

Go to the Tools / Options menu, and uncheck 'Open MPQs in read-only mode'

...or go to File / 'Open MPQ(s) With Options' (or use the Ctrl+Shift+O shortcut). Then browse and click on the MPQ you want to open. From there, you can uncheck 'Read-only mode'.

Hope it helps.


If that does not work, then what kind of problem did you run into exactly?
 
Level 2
Joined
May 19, 2017
Messages
30
Please try this:

Go to the Tools / Options menu, and uncheck 'Open MPQs in read-only mode'

...or go to File / 'Open MPQ(s) With Options' (or use the Ctrl+Shift+O shortcut). Then browse and click on the MPQ you want to open. From there, you can uncheck 'Read-only mode'.

Hope it helps.


If that does not work, then what kind of problem did you run into exactly?
No matter what I do every file opens as read only. I hope if I just redownload it it won't keep doing this.
I just ran TFT and the editor to test the mpq out. I must of overwrote something essential because I couldn't initiate a test of the level and the models showed up as invisible in the editor. When I tried TFT everything was black except for the cursor and the version number.
You can refer to my thread to see step by step of what I was doing Merging TTOR resources(units/abilities) with the latest version of Wc3 World Editor
 
Last edited:
Level 4
Joined
Jun 22, 2016
Messages
71
Brilliant powerful tool. A must-have for map developers. It even supports other Blizzard games.

I was having difficulty finding out what hiveworkshop's JASS Checker was referring to. So I extracted the war3map.j, which contains all the trigger code, to find the lines containing the leaks.

Be sure to check the source site since it's been updated. It is now currently v3.6.0.826.
 
Updated to 3.6.0.866 to include the newer StormLib

Changelog
* Version 3.6.0.866
- RebuiltAdded support for alternative MPQ markers

* Version 3.6.0.864
- Rebuilt with StormLib 9.23

* Version 3.6.0.862
- Added support for NP_Protect protector

* Version 3.6.0.838
- Added deprotector tool for MIX files (Warcraft III)

* Version 3.6.0.835
- Fixed live scanner to work with Warcraft III v 1.28.5

* Version 3.6.0.834
- Rebuilt with StormLib v 9.22

* Version 3.6.0.833
- Support for external listfiles in the UNICODE paths
- Fixed bug with tilde (~) in the MPQ file name

* Version 3.6.0.830
- Improved Deep file verification

* Version 3.6.0.828
- Korean build

* Version 3.6.0.826
- Recompiled - fixed patching bug in StormLib

* Version 3.6.0.825
- Fixed crash in "Use Additional Listfile ..."

* Version 3.6.0.824
- Support for any weird non-ASCII file names
- Support for new Korean map protector
- Removed NameBreaker
 
Level 17
Joined
Feb 25, 2013
Messages
297
All maps, both Blizzard's and user-made, are only playable when in the w3m or w3x archives, both of which are MPQs.

User data has been moved out of the main game folder way back in 1.28 because what up to 1.27 did is bad practice and requires more permissions to be granted to the game.

As for Blizzard's maps being in the game data, this is correct. What's more important to note is that they are still w3m and w3x archives, which are again just MPQs
 
Level 8
Joined
Jun 25, 2014
Messages
145
All maps, both Blizzard's and user-made, are only playable when in the w3m or w3x archives, both of which are MPQs.

(...)

As for Blizzard's maps being in the game data, this is correct. What's more important to note is that they are still w3m and w3x archives, which are again just MPQs
You mean w3m, w3x and MPQ has the same structure only they are named differently?
 
Level 7
Joined
Feb 25, 2013
Messages
45
Hello there, i deleted Human01.w3m file to make custom campaign for WC 3 RoC in Ladiks MPQ Editor. I added my custom Human01.w3m file. But it didn't work. Unavaible or missing error then i added orginal Human01.w3m file then I got same missing or unaviable error. What should ı do? when adding file, I didn't use compact or verify files in MPQ Editor.
 
Level 17
Joined
Feb 25, 2013
Messages
297
Hello there, i deleted Human01.w3m file to make custom campaign for WC 3 RoC in Ladiks MPQ Editor. I added my custom Human01.w3m file. But it didn't work. Unavaible or missing error then i added orginal Human01.w3m file then I got same missing or unaviable error. What should ı do? when adding file, I didn't use compact or verify files in MPQ Editor.
You should NEVER be modifying the game's own MPQs, use Local Files instead, or, depending on the patch, War3Mod.mpq.
But moreso on the topic of trying to override a campaign map, there's a lot of parameters you'd need to keep the same, many of which I don't currently know (I'd once tried something similar for the War3 demo long ago). I recommend that you make an actual Custom Campaign through the "Campaign Editor" instead since that makes it much less hacky.
Alternatively, you may get better help starting a new thread than replying to an MPQ editor's thread, good luck with the endeavour either way
 
Last edited:
Level 8
Joined
Jun 25, 2014
Messages
145
You should NEVER be modifying the game's own MPQs, use Local Files instead, or, depending on the patch, War3Mod.mpq.(...)
If we speak of replacing files, then it's true. But if we speak of adding new files, then everything will work. However it's more time consuming so I would still go with Local Files. And I know all that cause few years ago I have made the very same mistake 😀 with this difference that I've made backup MPQ's. I ALWAYS MAKE AT LEAST TWO BACKUPS of every native file that I'm modifying!
 
Last edited:
Level 7
Joined
Feb 25, 2013
Messages
45
Hello there, I added new files (Textures and war3mapImported folders ;mdx, blp files etc) into my map in Ladiks MPQ Editor. Then I compacted them. Then I closed Ladiks MPQ Editor program. After closing the program, I opened World Editor program. I saw my models I added. After a short while, I closed the program and opened it again. Models are not visible. There are green boxes. I opened the Ladiks program. The folder, model and blp files I added are gone. What should I do. Actually, I had added them in the fistfile while I was making them.
 
Level 17
Joined
Feb 25, 2013
Messages
297
Hello there, I added new files (Textures and war3mapImported folders ;mdx, blp files etc) into my map in Ladiks MPQ Editor. Then I compacted them. Then I closed Ladiks MPQ Editor program. After closing the program, I opened World Editor program. I saw my models I added. After a short while, I closed the program and opened it again. Models are not visible. There are green boxes. I opened the Ladiks program. The folder, model and blp files I added are gone. What should I do. Actually, I had added them in the fistfile while I was making them.
Adding anything from an MPQ editor will not create the war3map.imp entries required for WE to keep these files upon next saving. Use Folder mode if you want to add files more easily OR only add files through the MPQ editor after you're completely done with opening the map in WE. This is not a fault of MPQEditor.
 
Level 8
Joined
Jun 25, 2014
Messages
145
Hello there, I added new files (Textures and war3mapImported folders ;mdx, blp files etc) into my map in Ladiks MPQ Editor. Then I compacted them. Then I closed Ladiks MPQ Editor program. After closing the program, I opened World Editor program. I saw my models I added. After a short while, I closed the program and opened it again. Models are not visible. There are green boxes. I opened the Ladiks program. The folder, model and blp files I added are gone. What should I do. Actually, I had added them in the fistfile while I was making them.

(...)Use Folder mode if you want to add files more easily OR only add files through the MPQ editor after you're completely done with opening the map in WE.(...)
Or just use WE. I know some people prefer to use MPQ Editor, but then again you won't have such worries if you use WE.
 
Level 17
Joined
Feb 25, 2013
Messages
297
Or just use WE. I know some people prefer to use MPQ Editor, but then again you won't have such worries if you use WE.
Perhaps my reply had the implication set up in a way that was not completely obvious, but I already said this in my sentence: "Use Folder mode if you want to add files more easily (than with World Editor)..." as both of those ways I outlined are there as alternatives to the ever-clunky World Editor's asset manager.
 
Level 8
Joined
Jun 25, 2014
Messages
145
Perhaps my reply had the implication set up in a way that was not completely obvious, but I already said this in my sentence: "Use Folder mode if you want to add files more easily (than with World Editor)..." as both of those ways I outlined are there as alternatives to the ever-clunky World Editor's asset manager.
I fully understood. I quoted both of you but my reply was actually directed to tolist85. Your implication is all good. It is I who forgot set up implication entirely. My bad.
 
Level 17
Joined
Jan 3, 2022
Messages
244

MPQEditor command-line reference:​

MPQ Editor Command line​


Opening a single MPQ

MPQEditor.exe MpqName [/listfile ListFileName]

Opens a MPQ. If you enter a listfile name, this listfile
will be used as external listfile to the MPQ. If the MPQ
already has a listfile, then both those listfiles are combined.

Opening a multiple MPQs in multi-document mode

MPQEditor.exe /multi BaseMpq1 BaseMpq2 BaseMpq3 ... BaseMpqN [/patch PatchMpq1 PatchMpq2 ... PatchMpqN] [/listfile ListFileName]
Opens multiple MPQs in multi-document mode. Additional listfile may be added.


Opening a multiple MPQs in merged mode

MPQEditor.exe /merged BaseMpq1 BaseMpq2 BaseMpq3 ... BaseMpqN [/patch PatchMpq1 PatchMpq2 ... PatchMpqN] [/listfile ListFileName]
Opens multiple MPQs in merged mode. The user will only see one tree,
where all the files will be combined. This is how the game sees
all MPQs.


Opening a MPQ in patch mode


MPQEditor.exe /base BaseMpq1 BaseMpq2 /patch PatchMpq1 PatchMpq2 ... PatchMpqN [/listfile ListFileName]
Opens multiple MPQs in patch mode. You have to enter all patches
that belong to a MPQ. When extracting a file in patch mode, then
the extracted file will allways be the latest version, i.e. from base
MPQ with all subsequent patches applied.


Running MPQEditor in console mode


MPQEditor.exe /console [ScriptName]
Opens a MoPaq 2000 console. If a script name is entered, it is executed immediately.

Using MoPaq 2000 commands from command line


MPQEditor supports executing MoPaq 2000 commands directly from command line.
They can be executed either with or without opening console window. The difference
is to use or not to use slash before the command.

This is an example to run a command without opening a console:
MPQEditor.exe extract war3.mpq * C:\Work /fp

This is an example to run a command with opening a console:
MPQEditor.exe /extract war3.mpq * C:\Work /fp

MoPaQ is probably the first MPQ tool that existed:

It was popular, so Ladik's MPQ Editor supports its syntax (I hope so, while writing this). It was possible to write MoPaQ2000 scripts.

How to access its help / interactive menu?
MPQEditor.exe /console then type "help"

Available commands

Code:
new (n)
open (o)
openpatch (op)
add (a)
extract (e)
rename (r)
move (m)
delete (d)
flush (f)
compact
htsize (t)
list (l)
mksvf
close (c)
script (s)
chdir (cd)
exit (x)
quit (q)
help (h)
ver (v)
version
console

MoPaQ script interpreter also supports Windows command line.
For example, type "md /?" for help on the Windows "md" command.


help​

help [command]
Shows basic help about a command.


new​

n[ew] MpqFile [MaxFileCount]

Creates a new MPQ. If the file already exists, it will be converted to MPQ.

MpqFile Name of the MPQ to be used for this operation.
MaxFileCount File limit. Can be a dec or hex number. Default is 0x1000.


open​

o[pen] MpqFile [ListFile]

Opens an existing MPQ. If the file doesn't exist, the function fails.

MpqFile Name of the MPQ to be used for this operation.
ListFile Name of the listfile to be used on open operation


openpatch​

op[enpatch] BaseMpq PatchName1 PatchName2 ... PatchNameN [/listfile|/lf ListFile1 ... ListFileN]

Opens multiple MPQs in patch mode. If any of the MPQs doesn't exist,
the function fails.

BaseMpq Name of the base MPQ.
PatchNameX Name of patch MPQ. Older patch MPQs must come first.
ListFile Name(s) of external listfile(s) to be additionally used.


add​

a[dd] MpqFile [SourceFile] [TargetName] [/wav] [/c] [/auto] [/r]

Adds one or more files into the MPQ. Replaces existing files.

MpqFile Name of the MPQ to be used for this operation.
SourceFile Name of source file. Can contain wildcards.
TargetName Target file name (or directory name) in MPQ.
/wave Add the file as WAVE file
/c Use data file compression
/auto Choose compression by file type
/r Recurse subdirectories


extract​

e[xtract] MpqFile FileName [TargetDir] [/fp]

Extracts one or more files from MPQ Archive.

MpqFile Name of the MPQ to be used for this operation.
FileName Full of file in MPQ.
TargetDir Target dir. If not entered, the current dir will be used.
/fp Forces extraction with the path stored in MPQ file
/lower Creates lowercase path

Currently only supports literal filenames, i.e. "File00000510.xxx" in an obfuscated map, even if it's actually "war3map.j" in MPQ root.
Filename = * (asterisk) will extract all files.

rename​

r[ename] MpqFile OldFileName NewFileName

Renames a file within MPQ.

MpqFile Name of the MPQ to be used for this operation.
OldFileName Name of file to be renamed.
NewFileName New name of the file


move​

m[ove] MpqFile FileName NewDirectory

Moves a file within MPQ into another dir.

MpqFile Name of the MPQ to be used for this operation.
FileName Name of file to be moved.
NewDirectory Target directory within MPQ to move the file to


delete​

d[elete] MpqFile FileName

Deletes a file within MPQ.

MpqFile Name of the MPQ to be used for this operation.
FileName Name of file to be deleted


flush​

f[lush] MpqFile [ListFile]

Compacts the MPQ, removing all empty space.

MpqFile Name of the MPQ to be used for this operation.
ListFile Listfile name. If none, the internal listfile is used.


compact​

compact MpqFile [ListFile]

Compacts the MPQ, removing all empty space.

MpqFile Name of the MPQ to be used for this operation.
ListFile Listfile name. If none, the internal listfile is used.


h[t]size MpqFile HashTableSize

Changes hash table size of the archive.

MpqFile Name of the MPQ to be used for this operation.
HashTableSize File limit. Can be a dec or hex number. Default is 0x1000.


list​

l[ist] MpqFile [FileMask] [OutFile]

Lists files in MPQ.
Can list them to the screen or to a file.

MpqFile Name of the MPQ to be used for this operation.
FileMask File mask to be listed
OutFile Name of text file that contain the file list.


mksv​

mksv

Creates a file that contains MD5 values of each file in the MPQ.


close​

c[lose]

Closes currently open MPQ.
Automatically done at the end of script processing or after "exit" command.


script​

script ScriptFile

Processes a MoPaQ 2000 script.


chdir​

chdir NewDirector

Changes the current directory.


exit | qui​

exit | qui

Closes the script console.
Also closes opened MPQ.


v[er] | versio​

v[er] | versio

Shows version of MPQ Editor.

Bugs:
1. Doesn't support Unicode, e.g. for file names.
 
Last edited:
Level 17
Joined
Jan 3, 2022
Messages
244
@WilliamBz war3map.wtg is the trigger file. Are you sure they are the same version as the rest of the map? In other words, do you NOT mismatch versions when moving this file?
Alternatively, you can export/import all triggers as a file inside the Trigger Editor too. File > Export / Import.
If this doesn't help, please open a new thread, to not go off topic here. (ping me then)
 
Level 3
Joined
Dec 11, 2022
Messages
20
I have an issue that I describe in depth here. Share scripts among custom campaign maps

Basically, I need to replace a map file inside a custom campaign MPQ archive (*.w3n).

When any of the numerous MPQ editors are used to overwrite a map file inside a campaign, the game fails to read that particular map file at runtime with fatal errors. Outside the campaign, individual map loads as expected. Ladik's MPQEditor can't replace campaign map files successfully for some reason, regardless if I use program itself or the libstorm it's based on, or some other tool that is based on libstorm, or any other backend for that matter.

The intention is to do it programmatically, hence why I am not using the original WE for this purpose. My goal is to find any MPQ editor that can replace map files inside a custom campaign archive.

It is entirely possible that I miss some configuration option that will make the map readable. Regardless, I think it's a valid use case for the program and I would appreciate some help with the issue.

+++ The issue was resolved, read the thread if you are interested.
 
Last edited:
Level 27
Joined
May 14, 2021
Messages
989
a question
unit data missing or invalid
is there a way to solve this problem by using this MPQ editor?
thanks in advance
Not really an MPQ Editor issue directly, but more likely your map. It's either protected or not compatible with the specific versions of Warcraft 3.
For the first case, there are several ways to deprotect the map, but it requires a time consuming and sometimes, you'll most likely caught by errors during the process.
For the second case, it's pretty obvious because when you save a map using Reforged World Editor, it will add an exclusive features that were only present in Reforged, meaning you can no longer open it with the older ones. This thread might be helpful for solving this issue.
 
Level 4
Joined
Sep 10, 2022
Messages
30
So it turns out there is a hard size limit of 1.99GB for the MPQ format. As soon as the file size hits 2GB the MPQ Editor refuses to allow the file to be edited in any way, shape or form, and WorldEdit is unable to find the file even though it does in fact exist.

I tried looking at the formats but the only mention of size limits is that it was 4GB before Burning Crusade, which is clearly not the case here. The Devklog site is dead, so that doesn't help, either.
 
Top