wow-wdl
Parser for World of Warcraft WDL (World Detail Level) files - low-resolution terrain data for continents.
Status
Production Ready - Complete WDL parser with support for all WoW versions
Overview
WDL files contain low-resolution heightmap data for entire WoW continents. They provide:
- Low-resolution terrain heights - 17x17 height points per ADT tile
- Terrain hole information - Which chunks have holes/gaps
- World object placements - Low-detail WMO positions (pre-Legion)
- Model placements - M2 and WMO positions (Legion+)
These files enable:
- Efficient rendering of distant terrain
- World map and minimap generation
- Level-of-detail (LoD) terrain switching
- Memory optimization by using low-detail data for distant areas
Features
- Parse all WDL chunk types (MVER, MAOF, MARE, MAHO, etc.)
- Support for all WoW versions (Classic through Legion+)
- Height data extraction and interpolation
- Hole detection and manipulation
- World object placement data
- Version conversion between formats
- Validation and error handling
Installation
Add to your Cargo.toml:
[]
= "0.6"
Or use cargo add:
Quick Start
use WdlParser;
use File;
use BufReader;
#
File Format
WDL files use a chunk-based structure:
| Chunk | Description | Required |
|---|---|---|
| MVER | Version number | Yes |
| MAOF | Map area offset table (64x64 grid) | Yes |
| MARE | Map area heightmap data (545 heights per tile) | Yes |
| MAHO | Map area hole bitmasks | No |
| MWMO | WMO filename list | No |
| MWID | WMO filename offsets | No |
| MODF | WMO placement data | No |
| ML* | Legion+ model chunks | No |
Supported Versions
- Classic (1.12.1) - Version 18
- The Burning Crusade (2.4.3) - Version 18
- Wrath of the Lich King (3.3.5a) - Version 18
- Cataclysm (4.3.4) - Version 18
- Mists of Pandaria (5.4.8) - Version 18
- Legion+ (7.0+) - Version 18 with ML** chunks
Examples
Height Interpolation
Height interpolation features are planned for future implementation:
These features will be available in a future version:
let height = wdl.get_height_at(1234.5, 5678.9)?;
let (dx, dy) = wdl.get_height_gradient(1234.5, 5678.9)?;
Hole Manipulation
# use WdlFile;
# let mut wdl = new;
# let tile_x = 32u32;
# let tile_y = 48u32;
# let chunk_x = 8;
# let chunk_y = 8;
// Check if a specific chunk has a hole
let has_hole = wdl.holes_data
.get
.map
.unwrap_or;
// Modify hole data
if let Some = wdl.holes_data.get_mut
Version Conversion
use WdlVersion;
use convert_wdl_file;
use WdlParser;
use File;
use BufWriter;
#
Implementation Status
| Feature | Status | Notes |
|---|---|---|
| MVER parsing | Done | All versions supported |
| MAOF parsing | Done | 64x64 offset grid |
| MARE parsing | Done | 17x17 + 16x16 heights |
| MAHO parsing | Done | Hole bitmasks |
| WMO chunks | Done | Pre-Legion support |
| ML** chunks | Done | Legion+ support |
| Version conversion | Done | Between all formats |
| Data validation | Done | Validation |
| Error handling | Done | Error types |
| Height interpolation | Planned | - |
| Coordinate conversion | Planned | - |
| Minimap generation | Planned | - |
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.