[GUIDE] Rebuilding An MPQ

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

Moderator: Cheaters

User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

[GUIDE] Rebuilding An MPQ

Post by haxorico »

This guide is recommended for users who can cheat normal maps, yet want to do more.

We will be covering the following on this guide:
a) Building a listfile
b) Rebuilding an MPQ

Tools that we will be using:
Spoiler:
RMPQEx
RMPQEx.rar
X-Deprotector
X-Deprotector.rar
MPQRecover
MPQ Recover.rar
MPQEditor
MPQEditor.rar
XVI32
XVI32 (Hex Editor).rar
Photoshop
Part A - Learn more about listfile, and how to get it.
Spoiler:
What is a listfile?
A listfile is a .txt file, containing the files the map is using. So if all you do is add a cheat pack to maps, then all you need is a .txt file containing the information

Code: Select all

war3map.j
scripts//war3map.j
as those are the places the war3map.j file will be found.[/color]

What do I need a listfile for?
Well if all you want to edit some extra files, like the loading screen, you need the files to extract and edit. And if you want to rebuild MPQ, you will need all the file-names you can get, as all unknown will be deleted, and it may result in the map not functioning correctly.
But be careful as the bigger the listfile is, the longer it takes for the MPQEditor you are using to load the map.


What happens if I don't have some file names in my listfile?
Well it will show you the file in the MPQEditor, tough it wont show you the name, or it wont show the files at all, depends on the MPQEditor you are using. Here is a picture to demonstrate (using RMPQEx)
Image


How do I get file names into my listfile?
There are programs to do this for you. Lets get started with MPQRecover:
1) open MPQRecover.
2) Browse for your map.
3) Tick "Deep MPQ Scanning".
4) Click on Brute Force.
5) Click on scan.. It might take some time.
6a) If the program crash then dont tick "Deep MPQ Scanning" and if it still crashes then dont click on brute force.
6b) Click on Save List.
7) and you got your listfile.
Image

MPQRecover doesn't always get all the file names. So we will now use RMPQEx
1) Paste the listfile we got into the RMPQEx folder.
2) Open RMPQEx.
3) Click on the browse button and choose your map.
4) Click on Open.
5) Click on Auto-Search.
6) Click on Extract-Listfiles.
7) Merge it with your existing listfile.
Image

Now if you are still missing some files:
1) Paste the listfile we got into the x-dep folder.
2) Paste the map into the x-dep folder.
3) Rename the map to mymap.
4) Run x-dep, and let it finish.
5) Click on any button to close x-dep
6) Enter the folder called "mymap.w3x.temp"
7) Copy the 2 .txt files in there and paste them in a new folder, along with the listfile from step 1
8) Merge all this files.

How do I merge listfiles and what is it for?
Well if you have a file inside your listfile, there is no point having it in there again. tough you want to add file names into it, so merging makes sure you wont add the same file name twice.
In-order to merge the listfiles:
1) Open MPQEditor
2) Click on the "Tools" Tab
3) Click on Merge Listfile tool
4) Add the listfiles you want to merge
5) Choose a file that will be the merged listfile (result)
6) Start
Image
Those are all the ways to get a listfile using free tools.
Part B - Rebuilding the MPQ Archive
Spoiler:
Ever happened when you tried to open a map in a program such as MPQMaster, and it crashed or didnt open the map? if so, then that means the map MPQ Archive is corrupted, and to solve it, we need to rebuild the MPQ Archive.
When rebuilding the MPQ, we basicly just extract all the files and add them into a blank map. All unknown files will be deleted so use Part A to get a full listfile.
Rebuilding MPQ:
1) Open MPQEditor.
2) Force opening it in read-only mode
3) Select all the files and extract them into the "Files" folder, located inside the MyMap.w3x.temp folder inside your X-Dep folder (Make sure the folder is empty before you do so, if it isnt then empty it)
4) Place the map in X-Dep folder
5) Rename the map to mymap
6) Run x-dep
7) When its done, press any key to close the program
8) Now you got a map called "deprotected" inside you x-dep folder. That is the map with a rebuilt MPQ and will be openable at MPQMaster or any other MPQEditor
Image
You do not have the required permissions to view the files attached to this post.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
royalsymbol
Newcomer
Posts: 18
Joined: June 19th, 2010, 2:17 pm

Re: [Guide] Advanced Cheating

Post by royalsymbol »

omg and thank you! i've been waiting for this!
AbusivePie
Forum Staff
Posts: 269
Joined: August 16th, 2010, 3:49 am
Title: Not a normal Indian

Re: [Guide] Advanced Cheating

Post by AbusivePie »

Very nice guide.
Spoiler:
(21:49:41) CoSmOSaiNt: im not perject jen
(21:49:43) CoSmOSaiNt: ...
(21:49:45) AbusivePie: I may just give up on it
(21:49:49) CoSmOSaiNt: perefecT*
(21:49:51) CoSmOSaiNt: perfect*
(21:49:54) CoSmOSaiNt: screw it

Spoiler:
(23:33:35) FatherSpace: Zenn, what operating system are you on? Windows, Mac, *nix?
(23:33:42) zenn31: laptop xD
(23:33:50) FatherSpace: Operating system...
royalsymbol
Newcomer
Posts: 18
Joined: June 19th, 2010, 2:17 pm

Re: [Guide] Advanced Cheating

Post by royalsymbol »

However some files if you tried to open it with MPQ Recover like Dacia1.8_Spaz.w3x , which has MPQ archieve corrupted, we couldn't open it with RMPQEx & X-Deprotector.

so is there an alternative method?
Kyoshiro
Forum Staff
Posts: 762
Joined: October 27th, 2009, 12:18 pm
Location: Australia, GMT+8

Re: [Guide] Advanced Cheating

Post by Kyoshiro »

You can use a listfile from an older version that hasnt been spazzled.
If you have any questions drop in by chat sometime, chances are there'll be someone who can help you that's afking there, so the next best thing is to click the link on UndeadxAssassin's Sig and ask your question there.
royalsymbol
Newcomer
Posts: 18
Joined: June 19th, 2010, 2:17 pm

Re: [Guide] Advanced Cheating

Post by royalsymbol »

Thanks Kyoshiro, this has been thought of :)

but im not sure at first if you used this method but now i do.

I've looked at your hacked map, your JJCP [globals] was put right at the end, why not at the start?

then your JJCP [endglobals] was at the start..

finally your JJCP [function main] was in between in the start and the end..

why is that so? its quite confusing how you insert the cheat packs, would you like to explain some parts?

now that listfiles are covered, we only need to learn some cheat packs inserting.
User avatar
UndeadxAssassin
Grammar King
Posts: 2117
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: [Guide] Advanced Cheating

Post by UndeadxAssassin »

Simply because if you insert it at the start of the .j, it's so much easier to find out. GRanted, putting it further down isn't hard to find, but it does take more time than just having it right there when you open up JASSCraft. It doesn't matter where you put it, as long as it's under the section that it's supposed to be (id esta, globals under globals, endglobals before function main, and function main under function main. However, the locals for function main have to come first.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.
(23:44:12) Bartimaeus: I was in pubic school until middle school...
Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!
User avatar
infernorock
Forum Fanatic
Posts: 324
Joined: August 31st, 2008, 10:24 am
Title: ☆Fate Testarossa★
Location: Malaysia

Re: [Guide] Advanced Cheating

Post by infernorock »

Cool~!
Nice guide haxor.
Spoiler for Wc3 I'm using and Garena ID:
The wc3 version I'm current using:1.21,1.24b,1.24e
Garena UID-->pkyer123(BANNED for some reason LOL)
-->pkyer(Active)
-->InfernoRock(Banned for inactive...WTF!?)
Small Sized Duck wrote:IF someone is talking about a map they wanted cheated 17 years ago. And you bump it, you're retarded.
royalsymbol
Newcomer
Posts: 18
Joined: June 19th, 2010, 2:17 pm

Re: [Guide] Advanced Cheating

Post by royalsymbol »

Also, we need to take note of JASS editing.
For instance,

Function (trigger_0222)
call customdefeatbj ("no cheating")
End Function

I found out that we cannot delete the three lines, only delete "call customdefeatbj ("no cheating")
so that it becomes
Function (trigger_0222)
End Function

If you delete the three lines, your WC3 couldn't load the map.

What else is there to take note of?

what else can we delete?
I've noticed another like

Function (trigger_0222)
return (Map_control)=Player_slot_playing=computer(trigger_2055)
End Function

notice the 'return', can we delete that line?

all of these is written from my memory, its about the same like this..
AbusivePie
Forum Staff
Posts: 269
Joined: August 16th, 2010, 3:49 am
Title: Not a normal Indian

Re: [Guide] Advanced Cheating

Post by AbusivePie »

Don't delete the call function, just change it from call customdefeatbj ("no cheating") to call DoNothing( ) . So it looks like this.

Function (trigger_0222)
call DoNothing( )
End Function
Spoiler:
(21:49:41) CoSmOSaiNt: im not perject jen
(21:49:43) CoSmOSaiNt: ...
(21:49:45) AbusivePie: I may just give up on it
(21:49:49) CoSmOSaiNt: perefecT*
(21:49:51) CoSmOSaiNt: perfect*
(21:49:54) CoSmOSaiNt: screw it

Spoiler:
(23:33:35) FatherSpace: Zenn, what operating system are you on? Windows, Mac, *nix?
(23:33:42) zenn31: laptop xD
(23:33:50) FatherSpace: Operating system...