[GUIDE] Rebuilding an MPQ

Cheatpacks and learning how to use them, as well as other guides for manipulating maps.

Moderator: Cheaters

User avatar
nuzamacuxe
Also Not an Admin, but closer than devoltz
Posts: 1655
Joined: February 14th, 2018, 5:35 am
Title: Just Another S.Mod
Been thanked: 6 times

[GUIDE] Rebuilding an MPQ

Post by nuzamacuxe »

Hey there.

Since MPQ protections have changed over the years, the old tutorial isn't as useful as it once was...so I decided to make a new one.
Image
1. Deprotection has nothing to do with MPQ protection.
  • 1.1 Deprotection simply means you want the map be openable in World Editor.
    1.2 Rebuilding an MPQ means you want the map be openable in MPQ Editor, hostable, etc.
2. Many protected maps today have listfiles removed. Due to the nature of MPQs, it's difficult to use a file from an MPQ without the filename, because the filename serves as the key to identify that file. So don't be too surprised if you can't properly rebuild an MPQ - it's often complicated and difficult to get all of the filenames.
Image
Q: I only want to cheat a map, Do I need to do all the following steps?

A: It's usually not necessary unless your map goes over the size limit, as you only need the war3map.j file. If you just want to cheat a map, please follow this guide instead: [GUIDE] Insert a CP / CC / Enable SP / Deprotect / RC.

Q: It's not working on my map, why?

A: Well, there are many types of protections and even though Ladik's MPQ Editor is really good it can't read all those kind of protections. If you find some new MPQ protections that Ladik's MPQ Editor can't read, post it here and Ladik will try to fix it as soon as possible.

Q: My map has a read-only tag, does that mean that the map's protected?

A: Yes, it means that the map is protected/malformed in order to prevent MPQ editors from editing it. It's because the amount, methods, and complexity of map protectors led him to decide to open protected maps for read-only access. You can always scan names, extract as much as possible, and then create a new map and put everything back in.
Image
Let's get started. You'll need this tool to help you out: So to show you guys how to do it, I'll rebuild this map here: post196014.html#p196014

NOTE: DO NOT try to use this listfile to rebuild the MPQ. We'll make a new listfile. If you try to use that listfile above to extract the files, this is what happens:
Spoiler:
Image
1. Building a listfile
  • 1.1 First off, we need to get an old map (not too old!) to get the most filenames possible. Let's use this one: https://www.epicwar.com/maps/276035/

    1.2 After downloading it, open Ladik's MPQ Editor and open the map/MPQ with it:
    Spoiler:
    Image
    1.3 Don't worry about the weird names, click on Tools and then W3X Name Scanner
    Spoiler:
    Image
    1.3.1 There are two types of scan:
    Image
    Map File Scanner: It tries to parse all text files, scripts, and some binary files that are mandatory in every Warcraft III map. All names are extracted from these files, and these names are then used as filenames. This method is not perfect, but can find a fair amount of unknown files in any map.

    * Optional * Live Game Scanner: It watches Warcraft III while it's playing the map and will catch all names that are being opened and logs it to a listfile... it's very useful since it's more "accurate" but the result list can often look pretty much the same like the one from map file scanner. If you are looking for a specific set of files to extract from a map that you've seen in-game, this will find them.


    1.4 We'll use the Map File Scanner first and the Live Game Scanner to get a more accurate listfile.
    1.4.1 Click on the first scan, wait for it to finish, click on Save List ..., and then save it.
    Spoiler:
    Image
    * Optional * 1.4.2 After that, set your Warcraft III directory and then click on the second scan, it'll start your Warcraft III. When it finishes loading the map, wait a moment and then leave (you can also stay as much as possible in the game to get the maximum amount of filenames possible)... then click Save List ....
    Spoiler:
    Image
    1.5 Open up another map (the one you want to rebuild) and do the same steps as above (1.4.1 & 1.4.2).

    1.6 Merge all the listfiles by Clicking on Tools, Merge Listfiles ..., add all the listfiles you got from the maps, and then click on "..." to name your final listfile.
    Spoiler:
    Image
    1.7 Done! We finally got a good listfile to rebuild this specific map.
2. Extracting the files
  • 2. Open the map you want to rebuild, use the listfile you made before as an additional listfile and then tick the Deep File Verification option.
    Spoiler:
    Image
    2.1 Now let's check how many unknown files we got. Wow! We got only one unknown file name, that's 99% accuracy. The less unknown files you get, the better your rebuilt version will be.
    NOTE: Unfortunately, as I said at the start, it isn't always you'll get a 99% accuracy because depending on your map, it's really hard to get all filenames. Sometimes this does not matter, sometimes it might.
    Spoiler:
    Image
    2.2 Right click on map's name and then Extract it to Work folder (or any folder you want).
    Spoiler:
    Image
    2.3 After that, delete the unknown file name(s).
    Spoiler:
    Image
    2.4 Done.
3. Creating the MPQ file
  • 3. Click on File, New MPQ.
    Spoiler:
    Image
    3.1 Choose the name you want to be your rebuilt MPQ file.
    Spoiler:
    Image
    3.2 Copy the user data from the original map.
    NOTE: Some maps doesn't let you to drop the files into the map if you copy their user data, so if it's the case, just leave it blank.
    Spoiler:
    Image
    3.3 Tick the Build the MPQ archive from a file or directory option and set the directory where you extracted all the files, set the Game Compatibility to Warcraft III - The Frozen Throne.
    Spoiler:
    Image
    3.4 Next, Next, and then click on Finish.
    Spoiler:
    Image
    3.5 Done! You finally rebuilt the MPQ! Let's test it to check if it's good.

    3.6 Well, the gif speaks for itself.
    Spoiler:
    Image
Hope this guide helps. ;-)
Last edited by nuzamacuxe on April 3rd, 2018, 2:59 pm, edited 2 times in total.
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: [GUIDE] Rebuilding an MPQ

Post by Bartimaeus »

Thanks, nuzamacuxe! Stickied.
User avatar
devoltz
Co-Admin
Posts: 3127
Joined: March 23rd, 2016, 8:06 pm
Has thanked: 9 times
Been thanked: 53 times

Re: [GUIDE] Rebuilding an MPQ

Post by devoltz »

Really good content.
User avatar
nuzamacuxe
Also Not an Admin, but closer than devoltz
Posts: 1655
Joined: February 14th, 2018, 5:35 am
Title: Just Another S.Mod
Been thanked: 6 times

Re: [GUIDE] Rebuilding an MPQ

Post by nuzamacuxe »

Thank you guys!
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: [GUIDE] Rebuilding an MPQ

Post by Bartimaeus »

One thing...I noticed that you are using puush as your image-hoster. I would recommend re-uploading the images to imgur or something, because puush automatically deletes stuff after a certain amount of time has passed.
User avatar
nuzamacuxe
Also Not an Admin, but closer than devoltz
Posts: 1655
Joined: February 14th, 2018, 5:35 am
Title: Just Another S.Mod
Been thanked: 6 times

Re: [GUIDE] Rebuilding an MPQ

Post by nuzamacuxe »

Alright, doing it now. Thank you.

//

Done!
Dragking
Newcomer
Posts: 7
Joined: October 5th, 2009, 9:34 am

Re: [GUIDE] Rebuilding an MPQ

Post by Dragking »

I rebuilt an MPQ, im still unable to open it in world editor. Any ideas? I have been able to open it in world editor but it loses too much to be useful
User avatar
nuzamacuxe
Also Not an Admin, but closer than devoltz
Posts: 1655
Joined: February 14th, 2018, 5:35 am
Title: Just Another S.Mod
Been thanked: 6 times

Re: [GUIDE] Rebuilding an MPQ

Post by nuzamacuxe »

As I said, it's not perfect... unfortunately. You can try to use the Live Scanner to get data file as much as possible.
mmucahitsrdm
Newcomer
Posts: 4
Joined: August 20th, 2015, 8:55 am

Re: [GUIDE] Rebuilding an MPQ

Post by mmucahitsrdm »

images are gone.
User avatar
nuzamacuxe
Also Not an Admin, but closer than devoltz
Posts: 1655
Joined: February 14th, 2018, 5:35 am
Title: Just Another S.Mod
Been thanked: 6 times

Re: [GUIDE] Rebuilding an MPQ

Post by nuzamacuxe »

Nope. It's fine here.