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: [TOOL] Mh2o exporter & importer  (Read 4784 times)

Mjollna

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 254
    • View Profile
[TOOL] Mh2o exporter & importer
« 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
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

Source only includes main, to compile just clone the repo and replace main by one file or the other.
 
Have fun !
 
Mjollnà
« Last Edit: February 20, 2019, 04:04:10 pm by Mjollna »

fean

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 18
    • View Profile
Re: [TOOL] Mh2o exporter & importer
« Reply #1 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 ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Gamh

  • Contributors
  • Loreweaver
  • *****
  • Posts: 81
    • View Profile
Re: [TOOL] Mh2o exporter & importer
« Reply #2 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Mjollna

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 254
    • View Profile
Re: [TOOL] Mh2o exporter & importer
« Reply #3 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Zim4ik

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 407
    • View Profile
Re: [TOOL] Mh2o exporter & importer
« Reply #4 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? :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Jøk3r

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 544
    • View Profile
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
I don't like Noggit... I LOVE it :D
If you have any question about Noggit, feel free to contact me. I will give my best to help you (:

Mr.Patcher

  • Registred Member
  • Race Changer
  • *****
  • Posts: 39
    • View Profile
Re: [TOOL] Mh2o exporter & importer
« Reply #6 on: March 18, 2012, 08:25:12 am »
With this me can move adt cataclysm on 3.3.5?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Zim4ik

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 407
    • View Profile
Re: [TOOL] Mh2o exporter & importer
« Reply #7 on: March 18, 2012, 09:05:28 am »
read name of the thread
« Last Edit: January 01, 1970, 01:00:00 am by Admin »