Alpha: Difference between revisions

From wowdev
Jump to navigation Jump to search
(48 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This site contains information about the alphafiles
{{Template:SectionBox/VersionRange|max_expansionlevel=0|max_exclusive=1|max_build=0.6.0.3592}}
 
This page contains information about the map/terrain files used in the alpha. For information added on 2012-03-24 : files I looked at come from {{Template:Sandbox/PrettyVersion|expansionlevel=0|build=0.5.3.3368}} (Mjollnà).


==WDT==
==WDT==
In the Alpha the ADTs and the WDT were just one big file with this structure:
In the Alpha the ADTs and the WDT were just one big file with this structure :
 
'MVER': See the new files
 
'MPHD': "
 
'MAIN': "
 
'MDNM': Filenames Doodads
 
'MONM': Filenames WMOS
 
'MCIN': 256 Entries, so a 16*16 Chunkmap
 
'MTEX': See the new files
 
'MDDF': "
 
'MODF': "
 
'MCNK': contains Heightmap(?),MCLY and MCRF
 
==WMO==
Againg one big file:
This is, what now is stored in the Rootfile
 
'MVER'
 
'MOMO'
 
'MOHD'
 
'MOTX'
 
'MOMT'
 
'MOGN'
 
'MOGI'
 
'MOPT'
 
'MOPR'
 
'MOLT'
 
'MODS'
 
'MODN'
 
'MODD'
 
'MFOG'
 
'MCVP'
 
And this is what now is stored in the Groupfiles
 
'MOGP'
 
'MOPY'
 
'MOVT'
 
'MONR'
 
'MOTV'
 
'MOLV'
 
'MOIN'
 
'MOBA'
 
'MODR'
 
'MOBN'
 
'MOBR'


'MOCV'
===MVER===
struct
{
  uint32_t version; // 18, just as all others
} mver;


'MOLM'
===MPHD===
struct SMMapHeader
{
  uint32_t nDoodadNames;
  uint32_t offsDoodadNames;  // [[Alpha#MDNM|MDNM]]
  uint32_t nMapObjNames;
  uint32_t offsMapObjNames;  // [[Alpha#MONM|MONM]]
  uint8_t pad[112];
};


'MOLD'
===MAIN===
*'''Map tile table.''' Needs to contain 64x64 = 4096 entries of sizeof(SMAreaInfo)


repeatet n-times, where n is the number of what now is groupfiles.
struct SMAreaInfo
{
  uint32_t offset;    // absolute offset [[Alpha#MHDR|MHDR]]
  uint32_t size;      // offset relative to MHDR start (so value can also be read as : all ADT chunks total size from MHDR to first MCNK) [[Alpha#MCNK|MCNK]]
  uint32_t flags;      // FLAG_LOADED = 0x1 is the only flag, set at runtime
  uint8_t pad[4];
};


==MDX==
===MDNM===
The old Model-Format, it's a lightly modified WC3-Modelformat.
Filenames Doodads. Zero-terminated strings with complete paths to models.
ChunkedStructure


'MDLX' Identifier(no chunk size!)
===MONM===
Filenames WMOS. Zero-terminated strings with complete paths to models.


'VERS' 0x514 Version Chunk
===MODF (optional)===
Only one instance is possible. It is usually used by WMO based maps which contain no ADT parts with the exception of RazorfenDowns. If this chunk exists, the client marks the map as a dungeon and uses absolute positioning for lights.


'MODL':
[[WDT#MWMO.2C_MODF_chunks|See the new files.]]
        char Name[80];
char AnimationFileName[260];
float BoundsRadius;
Vector3D MinimumExtent;
Vector3D MaximumExtent;
int BlendTime;
char unk;//oO


'SEQS'
===MHDR===
array of:
The start of what is now the ADT files.
    char Name[80];


    int IntervalStart;
struct SMAreaHeader
    int IntervalEnd;
{
    float MoveSpeed;//only for animations were you move
  uint32_t offsInfo;   // [[Alpha#MCIN|MCIN]]
     int Flags;                      //0 - Looping
  uint32_t offsTex;     // [[Alpha#MTEX|MTEX]]
                                      //1 - NonLooping
  uint32_t sizeTex;
    Vector3D MinimumExtent;
  uint32_t offsDoo;    // [[Alpha#MDDF|MDDF]]
     Vector3D MaximumExtent;  
  uint32_t sizeDoo;
    float Rarity;//?
  uint32_t offsMob;     // [[Alpha#MODF_.28in_ADT_part.29|MODF]]
    int SyncPoint;//?
  uint32_t sizeMob;
  uint8_t pad[36];
};


    float BoundsRadius;//?
===MCIN===
    int unknown;//?
256 Entries, so a 16*16 Chunkmap.
    int PlaybackSpeed;//?


'GLBS'
[[ADT/v18#MCIN_chunk_.28.3CCata.29|See the new files.]]


'MTLS'
===MTEX===
[[ADT/v18#MTEX_chunk|See the new files.]]


'TEXS'
===MDDF===
[[ADT/v18#MDDF_chunk|See the new files.]]


'GEOS'
===MODF (in ADT part)===
[[ADT/v18#MODF_chunk|See the new files.]]


'VRTX'
===MCNK===
The header is 128 bytes like later versions, but information inside is placed slightly differently. Offsets are relative to the end of MCNK header.


'UVAS'
struct SMChunk
{
  uint32_t flags;                    // See SMChunkFlags
  uint32_t indexX;
  uint32_t indexY;
  float radius;
  uint32_t nLayers;
  uint32_t nDoodadRefs;
  uint32_t offsHeight;                // [[Alpha#.28MCVT.29_sub-chunk|MCVT]]
  uint32_t offsNormal;                // [[Alpha#.28MCNR.29_sub-chunk|MCNR]]
  uint32_t offsLayer;                // [[Alpha#MCLY_sub-chunk|MCLY]]
  uint32_t offsRefs;                  // [[Alpha#MCRF_sub-chunk|MCRF]]
  uint32_t offsAlpha;                // [[Alpha#.28MCAL.29_sub-chunk|MCAL]]
  uint32_t sizeAlpha;
  uint32_t offsShadow;                // [[Alpha#.28MCSH.29_sub-chunk|MCSH]]
  uint32_t sizeShadow;
  uint32_t areaid;
  uint32_t nMapObjRefs;
  uint16_t holes;
  uint16_t pad0;
  uint16_t predTex[8];
  uint8_t noEffectDoodad[8];
  uint32_t offsSndEmitters;          // MCSE
  uint32_t nSndEmitters;
  uint32_t offsLiquid;                // MLIQ
  uint8_t pad1[24];
};
enum SMChunkFlags
{
  FLAG_SHADOW = 0x1,
  FLAG_IMPASS = 0x2,
  FLAG_LQ_RIVER = 0x4,
  FLAG_LQ_OCEAN = 0x8,
  FLAG_LQ_MAGMA = 0x10,
};


'PTYT'
====(MCVT) sub-chunk====
No chunk name and no size.


'PCNT'
It's composed of the usual 145 floats, but their order is different : alpha vertices are not interleaved... Which means there are all outer vertices first (all 81), then all inner vertices (all 64) in MCVT (and not 9-8-9-8 etc.).
Unlike 3.x format, MCVT have absolute height values (no height relative to MCNK header 0x70).


'PVTX'
struct
{
  float height[9*9 + 8*8];
} mcvt;


'GNDX'
====(MCNR) sub-chunk====
No chunk name and no size.


'MTGC'
Same as 3.x format, except values order which is like alpha MCVT : all outer values first, then all inner ones.


'MATS'
struct SMNormal
{
  uint8_t n[145][3];
  uint8_t pad[13];
};


'BIDX'
====MCLY sub-chunk====
[[ADT/v18#MCLY_sub-chunk|See the new files]], but note that the 'flags' differ.


'BWGT'
struct SMLayer
{
  uint32_t textureId;
  uint32_t props;      // &1: use_alpha_map <code>CMapChunk::CreateLayer</code>
  uint32_t offsAlpha;
  uint16_t effectId;
  uint8_t pad[2];
};


'BONE'
====MCRF sub-chunk====
Since there are no MMDX/MWMO MMID/MWID in alpha ADT, MCRF entries directly point to index in MDNM and MONM chunks.


'KGRT' Animated geoset rotation
====(MCSH) sub-chunk====
No chunk name and no size.


'WOQC'
[[ADT/v18#MCSH_sub-chunk|See the new files.]]


'KGSC' Animated geoset scaling
====(MCAL) sub-chunk====
No chunk name and no size.


'PIVT'
[[ADT/v18#MCAL_sub-chunk|See the new files.]]


'CAMS'
====(MCLQ) sub-chunk====
No chunk name and no size.


'EVTS'
[[ADT/v18#MCLQ_sub-chunk|See the new files.]]


'KEVT'
====(MCSE) sub-chunk====
No chunk name and no size.


'NRMS'
[[ADT/v18#MCSE_sub-chunk|See the new files.]]

Revision as of 22:55, 11 February 2018

This section only applies to versions < PreVanilla (0.6.0.3592).

This page contains information about the map/terrain files used in the alpha. For information added on 2012-03-24 : files I looked at come from PreVanilla (0.5.3.3368) (Mjollnà).

WDT

In the Alpha the ADTs and the WDT were just one big file with this structure :

MVER

struct
{
  uint32_t version; // 18, just as all others
} mver;

MPHD

struct SMMapHeader
{
  uint32_t nDoodadNames;
  uint32_t offsDoodadNames;   // MDNM
  uint32_t nMapObjNames;
  uint32_t offsMapObjNames;   // MONM
  uint8_t pad[112];
};

MAIN

  • Map tile table. Needs to contain 64x64 = 4096 entries of sizeof(SMAreaInfo)
struct SMAreaInfo
{
  uint32_t offset;     // absolute offset MHDR
  uint32_t size;       // offset relative to MHDR start (so value can also be read as : all ADT chunks total size from MHDR to first MCNK) MCNK
  uint32_t flags;      // FLAG_LOADED = 0x1 is the only flag, set at runtime
  uint8_t pad[4];
};

MDNM

Filenames Doodads. Zero-terminated strings with complete paths to models.

MONM

Filenames WMOS. Zero-terminated strings with complete paths to models.

MODF (optional)

Only one instance is possible. It is usually used by WMO based maps which contain no ADT parts with the exception of RazorfenDowns. If this chunk exists, the client marks the map as a dungeon and uses absolute positioning for lights.

See the new files.

MHDR

The start of what is now the ADT files.

struct SMAreaHeader
{
  uint32_t offsInfo;    // MCIN
  uint32_t offsTex;     // MTEX
  uint32_t sizeTex;
  uint32_t offsDoo;     // MDDF
  uint32_t sizeDoo;
  uint32_t offsMob;     // MODF
  uint32_t sizeMob;
  uint8_t pad[36];
};

MCIN

256 Entries, so a 16*16 Chunkmap.

See the new files.

MTEX

See the new files.

MDDF

See the new files.

MODF (in ADT part)

See the new files.

MCNK

The header is 128 bytes like later versions, but information inside is placed slightly differently. Offsets are relative to the end of MCNK header.

struct SMChunk
{
  uint32_t flags;                     // See SMChunkFlags
  uint32_t indexX;
  uint32_t indexY;
  float radius;
  uint32_t nLayers;
  uint32_t nDoodadRefs;
  uint32_t offsHeight;                // MCVT
  uint32_t offsNormal;                // MCNR
  uint32_t offsLayer;                 // MCLY
  uint32_t offsRefs;                  // MCRF
  uint32_t offsAlpha;                 // MCAL
  uint32_t sizeAlpha;
  uint32_t offsShadow;                // MCSH
  uint32_t sizeShadow;
  uint32_t areaid;
  uint32_t nMapObjRefs;
  uint16_t holes;
  uint16_t pad0;
  uint16_t predTex[8];
  uint8_t noEffectDoodad[8];
  uint32_t offsSndEmitters;           // MCSE
  uint32_t nSndEmitters;
  uint32_t offsLiquid;                // MLIQ
  uint8_t pad1[24];
};

enum SMChunkFlags
{
  FLAG_SHADOW = 0x1,
  FLAG_IMPASS = 0x2,
  FLAG_LQ_RIVER = 0x4,
  FLAG_LQ_OCEAN = 0x8,
  FLAG_LQ_MAGMA = 0x10,
};

(MCVT) sub-chunk

No chunk name and no size.

It's composed of the usual 145 floats, but their order is different : alpha vertices are not interleaved... Which means there are all outer vertices first (all 81), then all inner vertices (all 64) in MCVT (and not 9-8-9-8 etc.). Unlike 3.x format, MCVT have absolute height values (no height relative to MCNK header 0x70).

struct 
{
  float height[9*9 + 8*8];
} mcvt;

(MCNR) sub-chunk

No chunk name and no size.

Same as 3.x format, except values order which is like alpha MCVT : all outer values first, then all inner ones.

struct SMNormal
{
  uint8_t n[145][3];
  uint8_t pad[13];
};

MCLY sub-chunk

See the new files, but note that the 'flags' differ.

struct SMLayer
{
  uint32_t textureId;
  uint32_t props;       // &1: use_alpha_map CMapChunk::CreateLayer
  uint32_t offsAlpha;
  uint16_t effectId;
  uint8_t pad[2];
};

MCRF sub-chunk

Since there are no MMDX/MWMO MMID/MWID in alpha ADT, MCRF entries directly point to index in MDNM and MONM chunks.

(MCSH) sub-chunk

No chunk name and no size.

See the new files.

(MCAL) sub-chunk

No chunk name and no size.

See the new files.

(MCLQ) sub-chunk

No chunk name and no size.

See the new files.

(MCSE) sub-chunk

No chunk name and no size.

See the new files.