Forum > Tutorials

[TUTORIAL] [RELEASE] Forget MPQ : don't pack anymore

(1/6) > >>

Mjollna:
Hi everyone !

Those who follow the chatbox have probably seen a few weeks ago some exe tweaking Schlumpf made, allowing (again) the Wow client to read files that are not packed into a MPQ, like Noggit does.

That really makes adt testing a lot easier/faster, so I strongly encourage everyone worldbuilding to go for it.

I'm detailing here how to reproduce it, so that there's no need to use MPQ anymore.
Again, say thanks to Schlumpf for finding it and sharing :)

How it works
In your (Windows) Wow.exe, look for the following pattern:

--- Code: ---E8 ? ? ? ? 6A 00 E8 ? ? ? ? 6A 02
--- End code ---
You can use 010 editor, edit > search, tick "use wildcards", set to "hex bytes" and paste pattern. You should have only one entry.

You can also use this tool by Schlumpf to replace the pattern instead of 010 editor : viewtopic.php?f=59&t=1829&p=11827#p11827

Replace the beginning of the pattern with:

--- Code: ---90 90 90 90 90 6A FF
--- End code ---
Which gives for Windows Wow 3.3.5a 12340:

--- Code: ---90 90 90 90 90 6A FF E8 2A EC 01 00 6A 02
--- End code ---
The explanation for the curious ones

--- Quote from: "schlumpf" ---Search for string "World of Warcraft\Client". Will be referenced on four places. Once with "SendErrorLogs" right behind. That's a call to SRegLoadValue and SRegSaveValue. From there, go up. You will see two calls to StormSetOption, one with first argument being 10, the other one being 11.
Right in between, there will either be a call to two functions or an inlined function containing an if. On windows, it will most likely not be inlined.
If there is no branch, dive into the second function called. That one should contain a branch.
That branch is for checking the command line for a different data folder given. You're interested in the functions above. Those are SFile::DisableSFileCheckDisk(); and SFile::EnableDirectAccess(0);.
You want to remove the call to DisableSFileCheckDisk and change the argument for EnableDirectAccess to something having bits 1 and 2 set.
--- End quote ---
Some notes
Refreshing the map
Ok, there's probably a better method for that, but that's the quickest I've come up with.
If you want to quickly refresh your adts without quitting the client on your favorite private server, you can :


* Paste your newly edited files in your wow folder.
* Click this macro twice:

--- Code: ---.go -17000 -17000 0 0
.go [your coords on your map]
--- End code ---
That first teleports you in an empty continent area (ie : fast to load), and then re-teleports you on your map.
The map change makes the client reload the adts from file.

Other advice
If you have two installs (one for Noggit and one for Wow) you can have both programs opened at the same time and do some copy/pasting/refresh to see your changes ingame quickly.

Be sure to always make a copy of your adts in another safe place from time to time. You never know, some quick file overwriting can happen quickly.

TL;DR

* Download this wow.exe (Windows 3.3.5a 12340)
* Save you original Wow.exe, paste the one you've downloaded in your Wow folder.

Zim4ik:
Really helpful. Thanks)

schlumpf:
As posted in Replace binary patterns in files with given data:

Allow local files

* Windows (tested on 12340): "E8 ?? ?? ?? ?? 6A 00 E8 ?? ?? ?? ?? 6A 02" "90 90 90 90 90 6A FF"
* OSX (tested on 15464, 15689): "E8 ?? ?? ?? ?? C7 04 24 00 00 00 00 E8 ?? ?? ?? ?? C7 04 24 02 00 00 00" "90 90 90 90 90 C7 04 24 FF FF FF FF"

Steff:
I like MPQs. Hold my WoW folders clean. Files are outside the client in the project folder and if i want to test, one click on the patchtester and wow starts. So I have no problems with MPQ packing. There are so much other things that are realy bad.

Mjollna:
To be completely honest, I have only one 335a test install to run run both Noggit and the client.

So now this exe change is saving me a lot of copying / packing steps : when I want to see my files ingame, I just close Noggit, (very often copy my files in another place to keep intermediate saving steps), and open client, as simple as that.

That also saves a lot of path potential errors, since both programs work on the same files.

The only thing I really have to remember is to not open both programs at the same time.

Navigation

[0] Message Index

[#] Next page

Go to full version