Kanma / MPQExtractor

A command-line tool to extract files from MPQ archives
Other
127 stars 39 forks source link

How to apply warcraft 3 mpq patches #10

Closed jbbqqf closed 3 months ago

jbbqqf commented 8 years ago

Hi,

Your tool looks just awesome ! However, I'm trying to use it to extract some files from warcraft 3 mpqs and find difficulties knowing how to properly apply patches.

What I would like to do is to extract all files from both roc and tft separately.

There are some explanations about the 4 mpq files that I found here : http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=42787. Maybe your understand better than me what those briefs descriptions mean (the difference between War3Patch.mpq and war3local.mpq).

Here are the commands I tried :

MPQExtractor -s "*" -f war3.mpq
MPQExtractor -s "*" -p War3Patch.mpq --prefix base -f war3.mpq

It seems to work (no error, I get a list generated). But I store the output in files and compute a diff between the two of them, I get this kind of non-sense (making me guess something has gone wrong) :

>   - 0000711.xxx
>   - 0000712.xxx
>   - 0000713.xxx
>   - 0000714.xxx

If you can suggest me a command from your tool that would help me understand what is going on and how to use those patches it would be much appreciated :)

Kanma commented 8 years ago

Hello

I could reproduce the problem, using the same command lines than you. I don't know what those files are supposed to be, but I failed to extract any of them. Note that MPQExtractor is only a thin command-line utility on top of StormLib, they might have a better idea about what is happening here with the search function... (I tried to recompile with the latest StormLib version just in case, but the behavior was the same).

To retrieve a list of all the files in a MPQ archive, I would suggest to use the --list (or -l) option:

MPQExtractor -p War3Patch.mpq --prefix base -l list.txt war3.mpq

The generated list doesn't seem to contain any of those files.

If you want to extract all the files, you can do:

MPQExtractor -p War3Patch.mpq --prefix base -e "*" -o out/ -f war3.mpq

Even though the 0000xxx.xxx files are detected and can't be extracted, all the others will be.

(It's funny, I think it's the first time I see MPQ files stored inside another MPQ files)

jbbqqf commented 8 years ago

Even if it's not directly linked to your tool : do you have an understanding / ressource to recommand to better understand how do patches get applied ? It seems to be the key so as I can figure out what's going wrong.

For instance, do you know if it possible to get a list of... "references" (?) contained in an mpq file which is not a main ?

PS: I guess you did not use to play/edit warcraft 3 maps : you did miss something ! :D