Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: Buddiman on February 17, 2011, 09:32:08 pm

Title: [QUESTION] obj0 structure 4.X
Post by: Buddiman on February 17, 2011, 09:32:08 pm
Hey,

I'm atm working on an obj0 Editor for 4.X Files and I have some Problems with the MDDF-Chunk.

As struct use ich atm:
uint32 Signature;
uint32 Size;

Then for every M2-Entry.
Code: [Select]
uint32 mmidEntry;
uint32 uniqueId;
float position[3];
float rotation[3];
uint16 scale;
uint16 flags;

With this information an M2-Block has 36 Bytes, but if you look in a file you can see that this is not enough. If my calculation is right, an M2-Block has to be 340 Bytes long which would mean much more Data. Maybe here someone has the right structure and give it to me or can me give a tip how to find it trough disassembling.

Greetz
Buddi
Title: Re: [QUESTION] obj0 structure 4.X
Post by: schlumpf on February 18, 2011, 08:17:00 pm
The given structure is correct. Its an array of entries. Divide the chunk size by sizeof(MDDFEntry) to get the count. If that number is not an integer, tell me again, that its wrong. Unless this is not the case, this structure is correct. 340 bytes per entry would be stupid and will not be the case.
Title: Re: [QUESTION] obj0 structure 4.X
Post by: Buddiman on February 24, 2011, 09:29:59 pm
Ok it was my fault. Very stupid fault I have made, sry. I calculated sizeof(MDDF)*numberof(filenames). But actually there can be more than one MDDF Block for one Filename.

With this fixed, I can use my tool. But when I try to change an existing WMO, this happens ingame:
(http://imagr.eu/up/4d66be389b2140_Faiiiiil.jpg)

The filepath is not wrong, I have checked it with a Hexeditor. Is there something like a boundingbox that I need to change? Maybe the MCNK-Chunk in the obj0-Files, even now I don't know exactly what they do, only that if there is no entry no Model gets spawned.

Maybe someone had the same error or has seen it somewhere