Modcraft - The community dedicated to quality WoW modding!

Content creation => Level Design => Topic started by: xzetaxx on April 15, 2015, 04:03:30 pm

Title: [QUESTION] Automatically extract the models used in ADTs
Post by: xzetaxx on April 15, 2015, 04:03:30 pm
Hey Modcraft!
Im trying to find a way to Automatically extract all the M2s that an ADT use and the only one I found was using an encripted patch with all the models from Cata to Wod and a listfile made only with the routes from the ADT. This way I get all the M2s needed but the problem is that now I need a way to get the skin files and blps that those M2s use.

I need ideas... How all the mappers do extract all the models needed for an ADT in a fast way? Or it can only be made at hand. I can make a program or something, I just need ideas.

Hope you understand me :)
Title: Re: [QUESTION] Automatically extract the models used in ADTs
Post by: PhilipTNG on April 15, 2015, 04:46:48 pm
Quote from: "xzetaxx"
I can make a program or something, I just need ideas.

If you're serious about that, meaning you can make a program or something and you just need some ideas.

In ADT the M2 files it uses are stored on the chunk called MMDX, but as you should know if you are saying you can make programs, in memory it's switched so it'll say XDMM. here is a picture:
(http://puu.sh/heQNs.png)

the 4 bytes after the chunk name is the size of the chunk, in this image it says 0x2323 which is decimal 8995 in Integer format.  So if you know how to make a program to seek data and select it using binary inputs, you make it bounce to the the MMDX chunk, find the size and then get that size on the m2 filename chunks and dump it to a file.

Same goes with WMOs and BLPs for the ADT,  WMOs are in MWMO chunk:
(http://puu.sh/heQYY.png)

BLP's are MTEX(in the hex it'll show up as XETM) , no need for a picture it looks exactly like the other two pretty much.

Anyway I talk about this in my video guide on how to down port Cataclysm 4.0.3 - MoP 5.0.5 maps down to 3.3.5a.  I talk about how to create batch scripts to dump the file names out of ADT, WMO, M2 files:

http://modcraft.io/viewtopic.php?f=93&t=8958


viewtopic.php?f=93&t=8958 (http://modcraft.io/viewtopic.php?f=93&t=8958" onclick="window.open(this.href);return false;)
And how to format the data into something usable.