Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Resources and Tools => Topic started by: Mjollna on March 16, 2012, 02:10:31 am

Title: [TOOL] Mh2o exporter & importer
Post by: Mjollna on March 16, 2012, 02:10:31 am
Hi guys,
 
Some of you know that I've started some piece of code to convert 2003 alpha adt files.
Actually, it's not only a converter, but can also be used as a base to make other programs related to adt tweaking.
It's here if you're curious : https://bitbucket.org/Mjollna/gillijimproject (https://bitbucket.org/Mjollna/gillijimproject)
It's highly unfinished, probably clumsy... but it's the best I can do right now, it will get better over time. That's also an exercise for me to get better at programming and extend my knowledge of Wow files.
 
Consequently, I decided to use it to create a small utility for quick mh2o handling, until we can manage it correctly in Noggit.
 
# Initial problem :
 
- It's a pain having to use All Water LK every time you need to save water, especially when the adt has different levels/kinds of liquids in it.
- It's also long to swap manually mh2o alone from one adt to another (ok, that doesn't happen very often, but sometimes it can be useful).
 
# Purpose :
 
- Save water chunk and being able to re-import it in any adt quickly.
- Make it possible to have a bash/batch file for multiple files processing.
 
# How it works :
 
- mh2oExport : saves mh2o in a separate file with extension .mh2o.

Usage :
Code: [Select]
mh2oExport.exe adtFileName_xx_yy.adt
- mh2oImport : imports mh2o in an existing adt.
As a bonus, it reintegrates mh2o at the right place (and subsequently re-does all offsets and calculates the right chunk size), and not at the end of the file.
It creates a new adt with the extension ".adt_new" to avoid the source adt to be inadvertently erased.

Usage :
Code: [Select]
mh2oImport.exe adtFileName_xx_yy.adt mh2oFileName.mh2o
Note that apart from mh2o (and mcin offsets), all other chunks will remain untouched. It means that if you have mclq chunks into your adt they will be kept, and you probably won't get the result you expect. As far as I remember, you can use the "remove all water information" option from All Water LK to get rid of the problem.
 
Both programs are meant to work with pre-Cata adts... When Cata parsing is finished (= not too soon, it's not my priority right now) I'll make a Cata version, or integrate 4.x somehow in the existing ones.

The whole thing is still experimental. I've tested with lots of different adts, but I may have forgotten something somewhere. Backup your files before playing with it, and let me know about bugs ! :)

# Source & Windows exe :

http://gaming.mjollna.org/static/docs/mh2o_utilities.zip (http://gaming.mjollna.org/static/docs/mh2o_utilities.zip)

Source only includes main, to compile just clone the repo and replace main by one file or the other.
 
Have fun !
 
Mjollnà
Title: Re: [TOOL] Mh2o exporter & importer
Post by: fean on March 16, 2012, 02:17:56 am
As I already told you, that's nice !

Just a quick question : you said that this program is meant to work with 3.x files. But if I convert the 3.x file to a 4.x thanks to your awesome converter, will the mh2o position will be saved ?
Title: Re: [TOOL] Mh2o exporter & importer
Post by: Gamh on March 16, 2012, 02:20:56 am
Very nice :)

@fean : i think yes, the converter handles well the mh2o when they look nice, and Mjollna isn't the kind to put chunks in weird places, or with wrong size information :D
Title: Re: [TOOL] Mh2o exporter & importer
Post by: Mjollna on March 16, 2012, 02:56:30 am
Haha xD

Yes mh2o is at the right place with the 4.x converter, and it passes conversion... or at least it does on the files I've tested.
Title: Re: [TOOL] Mh2o exporter & importer
Post by: Zim4ik on March 16, 2012, 06:02:03 am
Hey, i1m interested in alpha 2003. But i cant find the client. Can you give the torrent, or link to download? :)
Title: Re: [TOOL] Mh2o exporter & importer
Post by: Jøk3r on March 17, 2012, 10:55:48 am
http://www.ownedcore.com/forums/world-o ... erver.html (http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/31875-wow-alpha-client-sandbox-server.html" onclick="window.open(this.href);return false;)

Try this.

or this:

http://thepiratebay.se/torrent/7068322/ ... ient_(2003 (http://thepiratebay.se/torrent/7068322/World_of_Warcraft_Alpha_Client_(2003" onclick="window.open(this.href);return false;))
Title: Re: [TOOL] Mh2o exporter & importer
Post by: Mr.Patcher on March 18, 2012, 08:25:12 am
With this me can move adt cataclysm on 3.3.5?
Title: Re: [TOOL] Mh2o exporter & importer
Post by: Zim4ik on March 18, 2012, 09:05:28 am
read name of the thread