This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TUTORIAL] [TC2] [3.3.5a] extracting maps, vmaps, mmaps  (Read 2718 times)

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
[TUTORIAL] [TC2] [3.3.5a] extracting maps, vmaps, mmaps
« on: June 30, 2016, 06:25:19 pm »
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.

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-2 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:

Code: [Select]
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.


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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Valkryst

  • Moderators
  • Model Change Addict
  • *****
  • Posts: 224
    • View Profile
    • http://valkryst.com/blog/
Re: [TUTORIAL] [TC2] [3.3.5a] extracting maps, vmaps, mmaps
« Reply #1 on: June 30, 2016, 06:30:44 pm »
Additional link to the official tutorial on map, vmap, and mmap extraction.

https://trinitycore.atlassian.net/wiki/ ... Extractors
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
MY BLOG IS NOW HERE.

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [TUTORIAL] [TC2] [3.3.5a] extracting maps, vmaps, mmaps
« Reply #2 on: June 30, 2016, 06:33:29 pm »
Which sadly makes you commonly extract files which are not up-to-date whenever you have edited any blizzlike maps. Thats why I've had to write this tutorial in a first place. But its good to have it here for a refference I suppose, thanks for reminding that.

Btw, if you want to follow TC's tutorial (you haven't edited any blizzlike map), you still need to put your DBCs into Locale patch and other files into last Data patch ofc.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz