Crate wow_wdt

Crate wow_wdt 

Source
Expand description

World of Warcraft WDT (World Data Table) parser library

This library provides functionality to parse, validate, create, and convert WDT files used in World of Warcraft for map data organization.

§Features

  • Parse WDT files from any WoW version (Classic through modern)
  • Validate WDT structure with version-aware rules
  • Create new WDT files programmatically
  • Convert WDT files between different WoW versions
  • Support for all chunk types (MVER, MPHD, MAIN, MAID, MWMO, MODF)
  • Coordinate system conversion utilities

§Version Support

Tested against 100+ real WDT files from:

  • 1.12.1 (Classic)
  • 2.4.3 (The Burning Crusade)
  • 3.3.5a (Wrath of the Lich King)
  • 4.3.4 (Cataclysm) - Breaking change: terrain maps lose MWMO chunks
  • 5.4.8 (Mists of Pandaria)
  • 8.x+ (Battle for Azeroth) - FileDataID support

§Example

use std::fs::File;
use std::io::BufReader;
use wow_wdt::{WdtReader, version::WowVersion};

let file = File::open("path/to/map.wdt").unwrap();
let mut reader = WdtReader::new(BufReader::new(file), WowVersion::WotLK);
let wdt = reader.read().unwrap();

println!("Map has {} tiles", wdt.count_existing_tiles());

Modules§

chunks
WDT chunk implementations
conversion
Version conversion functionality for WDT files
error
Error types for the WDT library
version
WoW version handling and version-specific behaviors

Structs§

TileInfo
Information about a specific tile
WdtFile
A complete WDT file representation
WdtReader
WDT file reader
WdtWriter
WDT file writer

Functions§

tile_to_world
Convert ADT tile coordinates to world coordinates
world_to_tile
Convert world coordinates to ADT tile coordinates