There are actually quite a lot of people who keep having problems just because of either outdated server side maps, or because they can't extract them with modified client properly. So, I've written this tutorial. I know that my way of doing this thing may be rather unclean and someone might point out that those are not things one is supposed to do, BUT they prevent from happening absolutely all kinds of errors and mistakes I've ever encountered so far. TC extractors seem to be not very well written for modded clients, at least they used to be very bad whenever it came to extracting custom stuff.
1 - What are they for?
- maps - Maps are here to let server know where are map tiles and which area IDs are on them (and where). Its possible that they contain even more data (I honestly don't know), but this is the most important basics we commonly need maps for.
- vmaps - Vector maps are here mostly to let server know where are WMOs and their interiors. This gives server possibility to prevent NPCs from attacking players they clearly can't see, for example, NPCs from building's basement won't attack player when he's just going around building. They are just optional, but highly recommended to have.
- mmaps - Movement maps are here to give server information about collisions, so it can make NPCs move in optimal cases only though paths which would be reachable by player as well. So, basically, instead of just jumping on 10yd high rock, they try to find a way up on it. Again, optional, but in most cases good to have.
So, in general, when you don't have up-to-date map files for your custom zones, NPCs can behave in a really buggy and weird way, but what also can't work properly are custom graveyards, fishing loots, who lists, general chats and more area based stuff like that.
2 - Getting extractors
First of all, determine, which maps you want to have on your server. Only maps are really essential, vmaps and mmaps are optional. All 3 maps can be about 2,5-2,7GB big, if you choose to use just maps, they will get much smaller. If you are using repack, you most likely get extractors (or otherwise it sucks even more hard, than most of repacks do) with it. If you've compiled your own core, you should be able to find extractors in folder to which your server binaries were generated. You should get mapextractor.exe, mmaps_generator.exe, vmap4extractor.exe, vmap4assembler.exe from there.
If you use a repack and don't have extractors there, find another repack or compile your own core. Using extractors from different revisions of TC might work for you, but it also may not and I can't recommend you to do so. If you have compiled your own core and you don't have extractors, you have most likely disabled their compilation in CMake. Enable them there (they are usually in TOOLS) and re-compile your TC.
3 - Preparation
I highly recommend to copy your WoW client and make client which will serve only for extracting server side stuff. We'll kinda break some things here and our modified client might even stop working. Otherwise at least make backups of all MPQ's you will edit.
Put all 4 extractors into WoW's root directory (where WoW.exe is located). Go to your Data directory. Make sure there are only following MPQs: common, common-2, expansion, lichking, patch, patch-2, patch-3. Delete (or move out) all other (custom) MPQs you may have there.
Now, normally you should be able to put your stuff into patch-4, but I've already encountered situation when extractors cleverly detected my client as WotLK client and happily ignored patch-4. So, I would recommend you to put all your custom stuff (models, ADTs, WDTs, everything you have in your custom patches) into patch-3. If you are going to use patch-3.mpq, open it and go to Operations menu, choose Change Hash Table Size and increase it to maximum. Otherwise your stuff likely won't fit in it.
There's one more thing you need to do here, in case you have edited any blizzlike maps. What I've encountered in past was that extractors were using blizzlike WDT files (and ADTs in them), while completely ignoring my own custom version of that WDT saved in patch-3. Having multiple versions of map in different MPQs also led commonly to extracting data from outdated versions. So, to make really absolutely sure that extractors will actually read your and not blizzlike stuff and stuff which is up-to-date, you need to do one of the following, depending on what kind of edits you did. If you have...:
- ... only edited a few ADTs of a continent, just place them into World/Maps/(mapname)/ folder into MPQ where blizzlike version of those ADTs is.
- ... edited WDT of that continent to make it bigger/smaller, extract all blizzlike ADTs and WDT of that continent, delete them from blizzlike MPQs, merge them with your custom and edited ones, delete any ADTs you have deleted if you have deleted any from original map (so you will make one big folder with ALL data of that map which is up-to-date, with both unedited ADTs and all ADTs you have edited) and put it into patch-3.
- ... completely deleted all data of some blizzlike map to make wholly new one on its ID, just delete all blizzlike files of that map (even if blizzlike version was in patch-3 itself!), put yours into patch-3 and you're done.
The last thing you need to do is to go to your locale folder in Data folder (enGB, enUS, ruRU, deDE... whatever you have) and open the second last locale MPQ there (patch-enGB-3, patch-enUS-3...). Put all your edited DBCs into its DBFilesClient folder.
4 - Extraction itself
Go to WoW's root folder, open Wordpad and enter into it the following:
vmap4extractor.exe md vmaps md mmaps vmap4assembler.exe Buildings vmaps pause
Save it as whatever with .bat extension, like "extract_vmaps.bat" into WoW's root folder. Now run mapextractor.exe. When its done, run your .bat file you have created. When that is done, run mmapextractor.exe. Ofc, if you don't want to use mmaps or even vmaps at all, skip last or last two steps.
If this is not the first time you are creating server-side maps (you are re-generating/updating them), I HIGHLY recommend deleting ALL old server-side maps and completely replacing them with new ones, so no old files remain there.
Thats all, copy/upload your maps, vmaps and mmaps folders to your server's data folder and everything should work fine and be up-to-date.
A little note: the newest version of TC2 seems to be working with some new server side files, called cameras. They are supposed to be extracted with maps. If thats what your extractor's have created, just put them into server's data folder as well ofc.