Extracting maps, vmaps, mmaps


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.

  • Like 1


Recommended Comments

Like Valkryst have pointed out, you can follow a guide from Trinity:
https://trinitycore.atlassian.net/wiki/display/tc/Server+Setup


BUT not in case you have edited any blizzlike maps. In such case, you need to follow this tutorial, simply because of getting incorrect, buggy or outdated data otherwise. You still need to put your DBCs into Locale patch and other files into last Data patch ofc.

Share this comment


Link to comment
Share on other sites

Im running Mangos server.  and tried to extract mmaps, vmaps but there occured a problem when it started to extract my custom maps? I put everything into patch-3 and also the dbc-s. what could be the problem? I get the extractor from modcraft, is there any avaiable modded extractor?

on the picture you can see the error, something like "flag" error, what is this? I would be more than grateful if you could help me to solve this!!

cica.png

Share this comment


Link to comment
Share on other sites

Hey!

I'm trying to extract vmaps from my 4.3.4 client, and it seems to be working fine (with an occasional err=2), but in the end I get this:

7a4qe12USFo.jpg

Then the program closes and my vmaps folder is empty.

Share this comment


Link to comment
Share on other sites

I got some problem i created custom map with your tut then try to extract to server and the error is  Extract TrekChichiobiektm2 (137/137) Error loading World\Maps\TrekChichiobiektm2\TrekChichiobiektm2.wdt map any help? Latest trinity core

Share this comment


Link to comment
Share on other sites

First of all, this is not tutorial for any different client version  than 3.3.5a (as it is with all my tutorials). I have absolutely no idea how this works on any earlier or later versions and cannot be of any assistance with any issue regarding those versions.

 

Having said that, if you have any issues loading wdt file, clearly, there is some issue with that wdt file. This happens pretty much exclusively only with wdts which are custom or modified. It depends highly on what changes you made to those WDTs and what tools you used on your WDT. I remember having such issues myself, but sadly, I really don't remember how I solved them. Try using different WDT editors, or try creating your own new custom WDT vs copying existing one and just renaming and editing. Something like that SHOULD work. Since it has been 2++years since the last time I updated server side maps, this is pretty much all I can provide and remember.

Share this comment


Link to comment
Share on other sites

My server is on 3.3.5a 3 days alredy trying to solve this up. Maybe i can add you on skype or discord? If it possible

Share this comment


Link to comment
Share on other sites

Hi Amaroth, back in 2017 I did this succesfully, with Kronixusa Cata and Mop maps ( and even Draenor maps),  I followed your tutorial and afer many attemps, I was able to make it work, on my old server.   I am trying to do this in a up to date, server.  And my question is, if you think this method still works the same?   What I am doing is removing all Azeroth and Kalimdor, WDT and map-like files so it only extacts the Cata maps, with no luck. 

 

Maps are build ok,  (Npcs wont fall through the ground on custom, ground and works ok).    But when trying to use the Batch files to extract Vmaps and mmaps i get errors.

 

Thanks!

Share this comment


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now