WDT: Difference between revisions

From wowdev
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


*'''Header chunk.'''  
*'''Header chunk.'''  
Contains 8 32-bit integers. The first integer is 1 for maps without any terrain, 0 otherwise. The rest are always 0. Can be 2 too. Unknown effect. IF set to 3 you'll fall throug the terrain.
Contains 8 32-bit integers. The lower 4 Bits of the first integer are a bitmask:
 
'''Flag Description'''
0b0001 No Terrain/no terraincollision
0b0010 unknown(nothing?)
0b0100 funky(-> http://imagr.eu/upload/66886112164390_WoWScrnShot_022809_122447.jpg )
0b1000 unknown(nothing?)
 


==  MAIN chunk ==
==  MAIN chunk ==

Revision as of 13:40, 28 February 2009

WDT files specify exactly which map tiles are present in a world, if any, and can also reference a "global" WMO. They have a chunked file structure.

MPHD chunk

  • Header chunk.

Contains 8 32-bit integers. The lower 4 Bits of the first integer are a bitmask:

Flag 		Description
0b0001 	No Terrain/no terraincollision
0b0010 	unknown(nothing?)
0b0100 	funky(-> http://imagr.eu/upload/66886112164390_WoWScrnShot_022809_122447.jpg )
0b1000 	unknown(nothing?)


MAIN chunk

  • Map tile table.

Contains 64x64 = 4096 records of 8 bytes each. Each record can be considered a 64-bit integer: 1 if a tile is present, 0 otherwise.

MWMO, MODF chunks

For worlds with terrain, the MWMO chunk is empty and there is no MODF chunk. For a global-WMO-only world, these chunks specify an object in the same format as it is already done in ADT files. See the ADT format description for details.

MWMO chunk

  • List of filenames for WMOs (world map objects) that appear in this map tile. A contiguous block of zero-terminated strings.

MODF chunk

  • Placement information for WMOs. 64 bytes per wmo instance.
Offset 	Type 		Description
0x00 	uint32 		ID (index in the MWMO list)
0x04 	uint32 		unique identifier for this instance
0x08 	3*floats 	Position (X,Y,Z)
0x14 	3*floats 	Orientation (A,B,C)
0x20 	6*floats 	Extents
0x38 	uint32 		Flags
0x3A 	uint16 		Doodad set index
0x3C 	uint32 		Name set
struct SMMapObjDef // 03-29-2005 By ObscuR
{
/*000h*/  UINT32 nameId;		
/*004h*/  UINT32 uniqueId;		
/*008h*/  float pos[3];
/*00Ch*/  		
/*010h*/  		
/*014h*/  float rot[3];
/*018h*/  	
/*01Ch*/  		
/*020h*/  float extents[6];
/*024h*/  	 
/*028h*/   	
/*02Ch*/ 	
/*030h*/ 		
/*034h*/  		
/*038h*/  UINT32 flags;		
/*03Ch*/  UINT16 doodadSet;
/*03Eh*/  UINT16 nameSet;
/*040h*/ 
};