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] Convert WoD adts to Legion (010Editor script)  (Read 4179 times)

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
[TOOL] Convert WoD adts to Legion (010Editor script)
« on: December 25, 2017, 03:00:47 pm »
Hello there, modcraft community!

I have for a while been looking for a tool to convert WoD (or even wotlk) adts to Legion, as you could no longer see any object, and after a whole day of research without any result, I decided to take a look at the wiki and try to do it by myself. Which I somehow succeeded to.

I then decided to write a 010Editor script so I could at least give people something usable and let the hope of modern modding shine.

I doesn't do everything it should, could cause some errors, isn't fully optimal but it works - at least for me.
Tried it on lostisles adts that have been ported on WotLK for noggit, then verted to WoD with PhilipTNG 010Editor scripts, and haven't got any problem yet.

Further "technical" details below, here is the link for the impatient folks: https://www.dropbox.com/s/gspldv71wdx5q10/ADT-Legion-Conversion.1sc?dl=1
You need to apply the script on the _obj1.adt file ONLY. If you don't have one, simply copy the _obj0.adt, rename it to the _obj1 part and use the script on it.




Bad things that I'm aware of:
  • The m2 models never had a CAaBox in the adt, so I created one from the object coords with a default radius of 300, which you can change at the very beginning of the script, in the "configuration part"
  • The WMO models got their CAaBox moved and they are now written the same way as m2s. The thing is I messed up the "cut/paste" part of this and went on completely removing the old CAaBox and creating a new one with a default radius of 300, exactly like I did for m2s
  • The MLFD chunk is not added, because the _lod.adt part is not created as it seems optionnal and I first of all wanted something working.

If this script can help some people to make their own converter with better and smoother results, then I'd be happy to know about!
This is completely free of any exigence, I do not ask for any credit if you plan to reuse this or anything. You do your own business, I do mine, if you want to "steal" it and claim it as yours, well, this is the almighty internet and I won't care much!
« Last Edit: December 29, 2017, 03:14:23 pm by Arektor »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #1 on: December 25, 2017, 03:30:21 pm »
I haven’t checked the script, but have you found anything that’s not on the wiki?

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #2 on: December 25, 2017, 03:37:33 pm »
I haven’t checked the script, but have you found anything that’s not on the wiki?
Unfortunally not, I am far from having a solid experience with all of this, and it was an enormous surprise to me when I managed to do this conversion. All I did was looking at the wiki, compare a wod obj1 adt to a legion one and theorize on what should be done step-by-step, which I then reproduced within the script.

Mr. DK

  • Moderators
  • Model Change Addict
  • *****
  • Posts: 224
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #3 on: December 28, 2017, 03:59:20 pm »
Hey,

tried your script today I converted both obj (o and 1) becasue otherwise i got a streaming error. Now when I enter the map I have no ground as you can see on the screenshot. Any idea what might cause this?

I am Thor! Supreme commander of the Asgard Fleet!

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #4 on: December 28, 2017, 04:29:57 pm »
Most probably because you used the legion conversion on the obj0 part. If I said that it is only for the obj1, it is because only the obj1 adt part has changed.
About the streaming error, are the adts working on WoD (without legion conversion)? If not, then the problem doesn't come from here.

Mr. DK

  • Moderators
  • Model Change Addict
  • *****
  • Posts: 224
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #5 on: December 28, 2017, 05:38:42 pm »
Yep they do.

Could you try to convert it for you and see if it works?
https://drive.google.com/open?id=11qVCX6ACFlnzXpJFuw-KnpeaOFgWUie9
I am Thor! Supreme commander of the Asgard Fleet!

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #6 on: December 28, 2017, 06:35:36 pm »
Could you try to convert it for you and see if it works?

Ah, well, it just tilted in my head when I saw the file you sent. This is a custom map, and according to the wiki, the WDT format also changed in Legion. I may will try to make another script for it, but can't guarantee anything. This is probably the source of the streaming error and / or for the invisible terrain.

Added on my to-do list!

Mr. DK

  • Moderators
  • Model Change Addict
  • *****
  • Posts: 224
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #7 on: December 28, 2017, 07:01:37 pm »
Thanks man hope you manage.

Edit: I had a look myself. Basically it seems to me that if I look at the hadder all wdts from legion seem to have 2Bytes doffrent from WoD all of them seem to be 4E 01 but when oyu change you get a crash. That is because the rest of the wdt seems to have a diffrent protocol now.

previous to Legion a ADT selected on the wdt grid was represented by 00 00 00 00 00 00 00 00 and now its 02 00 00 00 00 00 00 00



I cant write scripts for 010 but If im correct you have to:

1. Change the 2 Bytes in the header to 4E 01
2. Wirte all 00 00 00 00 00 00 00 00 to 02 00 00 00 00 00 00 00

« Last Edit: December 28, 2017, 07:25:58 pm by Mr. DK »
I am Thor! Supreme commander of the Asgard Fleet!

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #8 on: December 28, 2017, 07:56:48 pm »
I cant write scripts for 010 but If im correct you have to:

1. Change the 2 Bytes in the header to 4E 01
2. Wirte all 00 00 00 00 00 00 00 00 to 02 00 00 00 00 00 00 00

Have you tried this already? If not, I will as soon as I have enough time.
Btw, all tex1 adt parts have been removed in Legion, you no longer need them.

Mr. DK

  • Moderators
  • Model Change Addict
  • *****
  • Posts: 224
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #9 on: December 28, 2017, 08:06:38 pm »
I just did this by hand it still crashes. But I guess it due to something diffrent. Where did the info from tex go?

I guess the WDT is working but it tries to acces something that isnt there. Are there any additions to dbcs in Legion?
Maybe something with .tex, wdl, _lgt or _occ?
« Last Edit: December 28, 2017, 08:11:02 pm by Mr. DK »
I am Thor! Supreme commander of the Asgard Fleet!

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #10 on: December 28, 2017, 09:32:41 pm »
Dunno about the dbcs, the _lgt changed in Legion but it's related to light.

About the .tex, I just said that the _tex1 got removed (not all _tex). It most likely was just a full copy of _tex0, and if anything was supposed to be different in tex1, it doesn't seems like theres anywhere this different data got moved to.

barncastle

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #11 on: December 29, 2017, 02:45:50 pm »
From memory, all maps in Legion have the 0x40 MPHD flag set, so in your case it should be 0x42.

Unrelated to your issue, but FYI, I found any custom or edited maps will need the 0x100 flag removed unless you've created a valid _lod.adt. This is something to do with continents and how their lod is applied.

On topic: Nice work, good to see something Legion related! One thing I noticed; each MLDD entry should have a flag of 0x20 if you are to 0 fill MLDL.

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #12 on: December 29, 2017, 03:12:36 pm »
One thing I noticed; each MLDD entry should have a flag of 0x20 if you are to 0 fill MLDL.
According to the wiki, for each mldl entry, "if the corresponding MLDD has a flag of 0x8 this has a value otherwise 0". And as we don't know what kind of value we're supposed to set in case of a 0x8 flag, that's why I 0 filled it.

Most of the mldd entries I have on my converted adts (if not all) don't have this 0x20 flag, and it still works well. According to the wiki (again), this flag is related to liquid.

barncastle

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #13 on: December 29, 2017, 03:28:52 pm »
According to the wiki, for each mldl entry, "if the corresponding MLDD has a flag of 0x8 this has a value otherwise 0". And as we don't know what kind of value we're supposed to set in case of a 0x8 flag, that's why I 0 filled it.

Most of the mldd entries I have on my converted adts (if not all) don't have this 0x20 flag, and it still works well. According to the wiki (again), this flag is related to liquid.

You're right, sorry, I meant to 0x8. The point still stands, you're not explicitly setting 0x8 on the MLDD flags - I only mention it as I had issues with this on certain MoP ADTs. (I was the one that wrote that on the wiki btw :) )

Arektor

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 8
  • Random Madness
    • View Profile
Re: [TOOL] Convert WoD adts to Legion (010Editor script)
« Reply #14 on: December 29, 2017, 04:00:48 pm »
You're right, sorry, I meant to 0x8. The point still stands, you're not explicitly setting 0x8 on the MLDD flags
Wait, I'm starting to get lost right there. So when the MLDL value is 0, the MLDD should have the 0x8 flag? Cause what you wrote on the wiki says the exact opposite