Rangorn

[Legion] WIP Mop/Mop ADTS format to Legion

78 posts in this topic

Hello everyone, i'm making this thread, hoping i can get help from this community, and it's about going forward in Legion modding.

> lol rangorn u always brag but you didn't do anything, blablablabla *SJW tears*

Stfu dude, tell me what is that then ?

ANYWAY ! the project is  about to update WdtSupplies and make it compatible with Legion.

> Create mapping in noggit with 3.3.5 client

> Use Anthony adt converter for adt in cata/mop format

> Using WdtSupplies for making it compatible with Legion

Legion ADTs format have changed with legion, so WoD mapping aren't working in it, you will get 132 errors.

 

Let's get in

Since few expansions, the main files for each map are theses :

WDT : Defines property of the map (https://wowdev.wiki/WDT )

WDL : Define the low-resolution heightmap of the map ( https://wowdev.wiki/WDL/v18 )

TEX : Low-Resolution texturing for the map (  https://wowdev.wiki/TEX/v0 )

_LGT.WDT : Lighting for the map  ( https://wowdev.wiki/WDT#occ.2C_lgt )

_OCC.WDT : Occlusion for the map ( https://wowdev.wiki/WDT#occ.2C_lgt )

 

And of course for one ADT :

ADT_XX_YY : The main adt file

ADT_XX_YY_obj0 : Objects informations of the ADT

ADT_XX_YY_obj1 : Objects informations of the ADT

ADT_XX_YY_tex0 : Textures informations of the ADT

ADT_XX_YY_tex1 : Textures informations of the ADT

NEW WITH LEGION : ADT_XX_YY_lod : Probably low resolution of ADT, didn't really checked this

 

 

 

The principal change in legion, it's the removal of tex1, and adding _lod instead.

As i've understand, _lod are not needed, old maps doesn't have a _lod, but _tex1 is removed for all maps.

 

So, the first thing to understand, is to know what file is necessary, and if not, can it have a minimal structure ?

 

Here are two example of maps with not much content :
 

No ADT

20b08b565a.png

One ADT

db759d11ec.png

 

As we can see on the first screenshoot, Tex and _lgt and _occ wdt are necessary, but they have a minimal structure (chunk name, chunk size, and a lot of 00 depending on the chunk size)

So let's skip theses 3 files for the moment, and let's see about WDT and WDL

-WDT :

There are absolutely no change in WDT, except 2 thing :

- Flags is different for maps, because new expansion

- MWMO empty chunk (if the map is not a WMO Map) isn't present in WDTs

Nothing to do with, perhaps deleting the WMO chunk manually if the wdt have one

 

-WDL :

The body is  the same, One huge MAOF chunk (16384 bytes) and a MARE chunk (1080 bytes) / MAHO chunk (32 bytes) for each ADT in the map

BUT Header have changed a lot

With the minimal structure, old header look like this

MVER (4bytes) : 18

MWMO : 0

MWID : 0

MODF : 0

 

Now the header look like this :

MVER (4bytes) : 18

MLDD : 0

MLDX : 0

MLMD : 0

MLXM : 0

 

Theses new chunk are familiar because they are located in adt too

 

SO  ! For the moment :

Only WDL files need modification, now let's see for the ADTs files in the next post !

 

 

 

 

 

 

3 people like this

Share this post


Link to post
Share on other sites

Basically we have 4 files :

The Main ADT

OBJ0

OBJ1

TEX0

For this part, i've only checked the Wowdev wiki : https://wowdev.wiki/ADT/v18

We can see a lot of new chunk added in Legion, half of them is used in the LOD file, the other part is used in OBJ1

I've also checked OBJ0 and it have no change.

i didn't checked for the main ADT and Tex0, but i think it didn't have changed

 

I need your help for this part in particular, does ADT Tex0 change in legion ? New chunk, deleted chunk ? Change of values ?

 

 

Anyway... the main change in legion remain for the OBJ1.

Basically, on Wod mapping, the obj0 and the obj1 are the same file but with a different name

In legion, the obj1 should have his own structure, this is what we need to for it.

 

Here are the result of what i've found

Adt : TrollRaid2_27_25
Obj0 Obj1
REVM 4 REVM 4
XDMM 3626 XDMM 3626
DIMM 220 DIMM 220
OMWM 829 OMWM 829
DIWM 48 DIWM 48
FDDM 19620 DDLM 19620
FDOM 1984 XDLM 15260
KNCM/DRCM/WRCM 8692 DMLM 1240
    XMLM 868

 

the 5 first chunk are the same, with the same values, but after there are differents chunks for the obj1, actually this is 4 new chunk : MLDD MLDX MLMD and MLMX

According to the wiki and with my personnal test :

MLDD M2
MLDX CaaBox/Float for M2
MLMD WMO
MLMX

CaaBox/Float for WMO

5 people like this

Share this post


Link to post
Share on other sites

Another fucking post because copy/paste from excel is incredibly bad on this forum, and i can't write after this horrible table  *sigh*

AS i've understand

MLDD Chunk is exactly the same chunk as MDDF, except the flags is set to 0x20 for this one (for the example ADT)

MLMD Chunk is exactly the same chunk as MODF, without the 6 floats values (boudingbox)

MLDX and MLMX contain both a CaaBox (6 floats,  minX minY minZ and maxX maxY maxZ) and a float called the radius (just do : maxY - minY for having the value)

 

This is now i need informations, MODF (WMO information) have bounding box value, it's not present in MLDX but it's present in MLMX, because theses two chunks are connected.

But why the values aren't the same in MODF chunk bounding box in Obj0 and in the MLMX chunk in Obj1

Check out the results :

MODF :

minX : 14732

minY : 13536.4

minZ : 49.571

maxX : 14823.9

maxY : 13586.5

maxZ : 86.4528

 

MLMX :

minX : 3480.17

minY : 2242.74

minZ : 49.571

maxX : 3530.22

maxY : 2334.67

maxZ : 86.4528

Radius : 91.9209 (if you did maxY - minY, you get this value too)

 

You can clearly see that both Z values are the same in the different chunk but X and Y are different.

Why it's different ?

 

 

My second question is about the MLDD and the MLDX chunk (related about M2)

Why does MLDX exist, if MDDF chunk doesn't have boundingbox information ?

What are the values in MLDX then ?

Can we fullfile MLDX with random values ?

 

 

Now i need your help for this, i don't understand how to fullfile the MLDX and MLMX chunk.

And did i have to edit the main ADT and the thex 0 files ?

 

Please community, prove me you can be helpful and i will provide a program and informations about Legion.

 

 

 

1 person likes this

Share this post


Link to post
Share on other sites

You might get more interaction from reverse engineers if you post this on a talk page on the wiki.

Or add what you already found to the wiki.

1 person likes this

Share this post


Link to post
Share on other sites

i've found nothing, except for the WDL non referenced on the wiki for the new chunks

the Wiki has already referenced the structure, now the problem is to know what are theses values, probably the boundinbox of M2, i will check this out.

 

1 person likes this

Share this post


Link to post
Share on other sites

Some news for you, i don't really understand what i'm even doing.

When i move my wod World/map folder into Legion with custom map... it's strange.

Some Maps works successfully, like the development_nonweighted converted from 3.3.5

Kalidar from the alpha 0.5.3 converted for wod work, but there are no visible m2/wmo on the map, but there are collisions at their place.

Designer island and other various custom map create 132 errors

 

So it's not needed to rewrite obj1 with a specific format, i just try to understand how to remove the 132 error and what can be the cause of this.

Share this post


Link to post
Share on other sites

Okay I have been working on this for a while. Before they reworked everything within Legion.

You problem with m2 not showing happened to me aswell I also know how to fix it but never made it work.

Basicly every m2 has a bounding box entry in WoD- ADT which was not there back in 3.3.5. You have to calculate that bounding box and make an entry in the ADT. If that entry is not precise you object will either not appear ( box to small) or have no collision (to big)

There was a calculation somewhere in the dev wiki but I never made it to work.
It was somwhere in the ADT page. ( 
https://wowdev.wiki/ADT/v18 )

Hope that helps. A propper ADT converter would be great. Also this should be somewhere in NEO code so maybe have a look there.

Share this post


Link to post
Share on other sites

Rangorn, good decision to make this thread. To be honest, I did not expect that to happen.

Well, I see there is an issue here with ADT conversion to Legion. If you guys find the exact reason and how it should be fixed, I can help you to make the process faster by making a script for this purpose or anything else.

1 person likes this

Share this post


Link to post
Share on other sites

Ok guys new project, it should take me a lot of time.

I want to make my own 3.3.5 noggit adts converter to legion, based on mjollna documentation and wowdev.

Mjollna adt converter works only for official maps

Anthony ToolBox script is too slow and i didn't like the C: specific path etc...

 

i will try to create my own, wish me good luck people :(

Share this post


Link to post
Share on other sites

Ahm why mod legion anyways its unstable as fuck and blizz changes everything all the time. Get a copy of last WoD Build. Luzifix released a adt converter that works with high performance and even clears your adts. So you got even betetr performance in WoD. Everythign that is in legion can be done in WoD and WoD does not change aynmore. It is essential to have a new constant patch. Elesewiese we will probably redo all our tools 20 times before legion is over. And when legion is at its end you would probably end all legion work and work on whatever addon they put out then. So I highly reccomend you havign a look rather on WoD than legion. I have learnd so much in WoD allready but if everyone is workin on a diffrent patch we will never ever achive anything again.

Share this post


Link to post
Share on other sites

i totally forgotten luzifix have made his own adt converter, i will check this, thanks

I hope 3.3.5 fagg.. modders will move to wod 6.2.4, for my part, i have to go on the last expansion, as soon as possible and find my own way for making modding possible

1 person likes this

Share this post


Link to post
Share on other sites

Go use luzis code as a base basicly this + all legiosn spesific stuff should work purfectly

Share this post


Link to post
Share on other sites

One problem, i'm really bad with other language than java, luzifix program is C#

Share this post


Link to post
Share on other sites

then you will have a problem anyway if you want to find your own way to Legion modding.

Share this post


Link to post
Share on other sites
8 hours ago, Rangorn said:

One problem, i'm really bad with other language than java, luzifix program is C#

Java is almost like C# you can try it :)

Converter Source Code https://github.com/WowDevTools/ADTConvert

Besides, I find it better when we have only one converter with all features^^

Share this post


Link to post
Share on other sites

I've moved to C# from Java and have to agree, they are very similiar.

Share this post


Link to post
Share on other sites

I agree with you Luzifix, and you are right C# and Java are very similar, but there are some difference, and i'm not really very familiar with this.

 

Btw, i have an error using your converter, should i send u an mp with the error and the adt causing this ?

Share this post


Link to post
Share on other sites

some news, legion modding have one major issue for the moment, when you don't have 132 errors or weird texturing

- Objects aren't visible, but their collisions are here.

obj0 and obj1 should have specific values and specific structure for having the result visible, i'm working on it, trying to understand the shit.

1 person likes this

Share this post


Link to post
Share on other sites

Its still due to the missing bounding box entries. you probably dont have in the ADT.

Share this post


Link to post
Share on other sites

I opened an zeroth adt with only one object, this wmo shipreck

 

i checked the XMLM (or MLXM, fucking reversing hexa structure) chunk, values inside converted from hex to float give 2 points around the wmo, here is a screenshot about the min value (undermap) and the max value.

As you can see, the box formated with the 2 points is really big for this wmo, i think it's probably a camera effect when you are in this area or something like that.

f64351d8b2.jpg

Coordinates given by hexa values and range of the box

 

-10211,96 2436,203 -286,2135
-10080,87 2563,839 -191,638
x y z
131,09 127,636 94,5755
1 person likes this

Share this post


Link to post
Share on other sites

Yes and nwo tets that witha n m2. Wmos had bounding boxes since ages. m2 have them since WoD

Share this post


Link to post
Share on other sites

It's working !

7fb4de0cd1.jpg

 

3 people like this

Share this post


Link to post
Share on other sites

Another post, i will try to edit your converter luzifix, but my skills in c# are really limited

BTW, if i fail to edit your converter, i will try to make a create a jar program for obj1.

3 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now