Skip to content

Commit bac8c7f

Browse files
docs: remove the sales / marketing tone
1 parent ff6dd12 commit bac8c7f

File tree

11 files changed

+560
-592
lines changed

11 files changed

+560
-592
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Cleanup caches for closed PRs
3+
4+
on:
5+
# Run twice every day to remove the cache so that the caches from the closed prs
6+
# are removed.
7+
schedule:
8+
- cron: '0 17 * * *'
9+
- cron: '30 18 * * *'
10+
workflow_dispatch:
11+
12+
jobs:
13+
clear-github-caches:
14+
name: Clear all GitHub action caches
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Clear all caches
18+
run: gh cache delete --succeed-on-no-caches --all --repo wowemulation-dev/warcraft-rs
19+
env:
20+
# This token requires the "repo" scope.
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **wow-mpq**: Complete archive modification API with `MutableArchive` for adding, removing, and renaming files
1313
- **wow-mpq**: Automatic listfile and attributes updates during archive modifications
1414
- **wow-mpq**: Full StormLib bidirectional compatibility - archives created/modified by wow-mpq are readable by StormLib and vice versa
15-
- **wow-mpq**: Achieved 100% compatibility with all WoW versions (1.12.1 through 5.4.8)
16-
- **wow-mpq**: Full support for all official World of Warcraft MPQ archives (versions 1.12.1 - 5.4.8)
15+
- **wow-mpq**: Compatibility with WoW versions 1.12.1 through 5.4.8
16+
- **wow-mpq**: Support for official World of Warcraft MPQ archives (versions 1.12.1 - 5.4.8)
1717
- **wow-mpq**: Support for all MPQ format versions (V1, V2, V3 with HET/BET, V4 with advanced HET/BET)
1818
- **wow-mpq**: Portable WoW data discovery system using environment variables and common paths
1919
- **wow-mpq**: `test-utils` feature for examples requiring WoW game data
@@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- **warcraft-rs CLI**: Added path separator conversion in `mpq extract` subcommand for proper cross-platform file extraction
2727
- **wow-wdl**: Initial implementation of WDL (World Data Low-resolution) format support
2828
- **warcraft-rs CLI**: Added `wdl` subcommand with validate, convert, and info commands for WDL file manipulation
29-
- **wow-wdt**: Complete WDT (World Data Table) format support with 100% parsing success rate across all WoW versions
29+
- **wow-wdt**: WDT (World Data Table) format support with parsing for WoW versions
3030
- **warcraft-rs CLI**: Added `wdt` subcommand with info, validate, convert, and tiles commands for WDT file manipulation
3131
- **wow-adt**: Integrated comprehensive ADT (terrain) file support
3232
- **wow-adt**: Full parsing support for all ADT chunk types including terrain, textures, water, and object placement
@@ -71,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7171
### Changed
7272

7373
- **wow-mpq**: Attributes files now use StormLib-compatible 149-byte format instead of 24-byte format
74-
- **Documentation**: Comprehensively updated all documentation to reflect 100% StormLib compatibility
74+
- **Documentation**: Updated documentation to reflect StormLib compatibility
7575
- **Documentation**: Added notes about Blizzard archive compatibility and common warnings
7676

7777
### Removed

README.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,75 +13,75 @@ A collection of crates handling World of Warcraft file formats for WoW 1.12.1,
1313

1414
</div>
1515

16-
`warcraft-rs` is part of a fantastic Rust WoW community. Be sure to check out
17-
[awesome-wow-rust](https://github.com/arlyon/awesome-wow-rust) for more cool
18-
projects and a link to official WoW Rust Discord.
16+
`warcraft-rs` is part of the Rust WoW community. See
17+
[awesome-wow-rust](https://github.com/arlyon/awesome-wow-rust) for other
18+
projects and a link to the WoW Rust Discord.
1919

2020
## Features
2121

2222
### 📦 Format Support
2323

2424
- **MPQ Archives** - Read, write, modify, rebuild and compare MPQ archive files (v1-v4)
25-
-**Full StormLib Compatibility** - 100% bidirectional compatibility with reference implementation
26-
-**100% WoW Version Support** - Tested with all versions from 1.12.1 through 5.4.8
25+
-**StormLib Compatibility** - Bidirectional compatibility with reference implementation
26+
-**WoW Version Support** - Tested with versions 1.12.1 through 5.4.8
2727
- ✏️ **Archive Modification** - Add, remove, and rename files with automatic listfile/attributes updates
28-
- 🔄 **Archive Rebuilding** - Recreate archives 1:1 with format upgrades and optimization
28+
- 🔄 **Archive Rebuilding** - Recreate archives with format upgrades and optimization
2929
- 🔍 **Archive Comparison** - Compare archives for differences in metadata, files, and content
30-
- 🔐 **Digital Signatures** - Generate and verify archive signatures for integrity protection
31-
- 🎮 **Official WoW Archive Support** - Handles all Blizzard-specific quirks and format variations
30+
- 🔐 **Digital Signatures** - Generate and verify archive signatures
31+
- 🎮 **Official WoW Archive Support** - Handles Blizzard-specific quirks and format variations
3232
- **DBC Database** - Parse client database files
3333
- **BLP Textures** - Handle texture files
3434
- **M2 Models** - Work with character and creature models
3535
- **WMO Objects** - Process world map objects (buildings, structures)
36-
-**Full Format Support** - Parse and write root and group files
37-
-**All WoW Versions** - Supports v17 (Classic) through v27 (The War Within)
36+
-**Format Support** - Parse and write root and group files
37+
-**WoW Versions** - Supports v17 (Classic) through v27 (The War Within)
3838
- 🔄 **Version Conversion** - Convert between expansions (Classic → Cataclysm, etc.)
3939
- 🏗️ **Builder API** - Create WMO files programmatically
40-
- 🔍 **Comprehensive Validation** - Field-level and structural checks
40+
- 🔍 **Validation** - Field-level and structural checks
4141
- **ADT Terrain** - Parse terrain and map data
4242
- **WDT Maps** - World map definitions and tile layouts
4343
- **WDL Maps** - Low-resolution terrain heightmaps
4444

4545
### 🛠️ Command-Line Tools
4646

47-
Each format comes with its own CLI tool for common operations:
47+
CLI tools for each format:
4848

4949
```bash
5050
# MPQ archive manipulation
5151
warcraft-rs mpq list archive.mpq
5252
warcraft-rs mpq extract archive.mpq --output ./extracted
5353
warcraft-rs mpq create new.mpq --add file1.txt --add file2.dat
5454
warcraft-rs mpq info archive.mpq
55-
warcraft-rs mpq tree archive.mpq # NEW! Visualize archive structure
55+
warcraft-rs mpq tree archive.mpq # Visualize archive structure
5656

57-
# Archive rebuild and comparison (NEW!)
57+
# Archive rebuild and comparison
5858
warcraft-rs mpq rebuild original.mpq rebuilt.mpq --upgrade-to v4
5959
warcraft-rs mpq compare original.mpq rebuilt.mpq --content-check
6060

6161
# WDL terrain data manipulation
6262
warcraft-rs wdl validate terrain.wdl
6363
warcraft-rs wdl info terrain.wdl
6464
warcraft-rs wdl convert terrain.wdl terrain_new.wdl --to wotlk
65-
warcraft-rs wdl tree terrain.wdl # NEW! Visualize WDL structure
65+
warcraft-rs wdl tree terrain.wdl # Visualize WDL structure
6666

6767
# WDT map operations
6868
warcraft-rs wdt info map.wdt
6969
warcraft-rs wdt validate map.wdt
7070
warcraft-rs wdt convert map.wdt map_new.wdt --to wotlk
7171
warcraft-rs wdt tiles map.wdt
72-
warcraft-rs wdt tree map.wdt # NEW! Visualize WDT structure
72+
warcraft-rs wdt tree map.wdt # Visualize WDT structure
7373

7474
# ADT terrain operations
7575
warcraft-rs adt info terrain.adt
7676
warcraft-rs adt validate terrain.adt --level strict
7777
warcraft-rs adt convert classic.adt cata.adt --to cataclysm
78-
warcraft-rs adt tree terrain.adt # NEW! Visualize ADT structure
78+
warcraft-rs adt tree terrain.adt # Visualize ADT structure
7979

8080
# WMO object operations
8181
warcraft-rs wmo info building.wmo
8282
warcraft-rs wmo validate building.wmo --warnings
8383
warcraft-rs wmo convert classic.wmo modern.wmo --to 21
84-
warcraft-rs wmo tree building.wmo # NEW! Visualize WMO structure
84+
warcraft-rs wmo tree building.wmo # Visualize WMO structure
8585
warcraft-rs wmo edit building.wmo --set-flag has-fog
8686
warcraft-rs wmo build new.wmo --from config.yaml
8787

@@ -93,7 +93,7 @@ warcraft-rs m2 info model.m2
9393

9494
### 📚 Library Usage
9595

96-
All formats can also be used as Rust libraries:
96+
Using formats as Rust libraries:
9797

9898
```rust
9999
use wow_mpq::{Archive, ArchiveBuilder, MutableArchive, AddFileOptions};
@@ -126,29 +126,33 @@ println!("ADT version: {:?}", adt.version);
126126
println!("Terrain chunks: {}", adt.mcnk_chunks().len());
127127

128128
// Validate the ADT file
129-
adt.validate_with_report(ValidationLevel::Standard)?;
129+
let report = adt.validate_with_report(ValidationLevel::Standard)?;
130+
println!("Validation passed with {} warnings", report.warnings.len());
130131
```
131132

132133
```rust
133134
// WMO object parsing and manipulation
134-
use wow_wmo::{WmoRoot, WmoGroup, WmoParser, WmoWriter, WmoVersion};
135+
use wow_wmo::{WmoParser, WmoWriter, WmoVersion, WmoConverter};
135136
use std::fs;
137+
use std::io::Cursor;
136138

137139
// Parse WMO root file
138140
let data = fs::read("building.wmo")?;
139-
let wmo = WmoParser::parse_root(&data)?;
141+
let mut cursor = Cursor::new(&data);
142+
let parser = WmoParser::new();
143+
let wmo = parser.parse_root(&mut cursor)?;
140144
println!("WMO version: v{}", wmo.version.to_raw());
141145
println!("Groups: {}", wmo.groups.len());
142146
println!("Materials: {}", wmo.materials.len());
143147

144148
// Convert to a different version
145-
let mut wmo = wmo;
146-
wmo.convert_to(WmoVersion::Cataclysm)?;
149+
let converter = WmoConverter::new();
150+
let converted_wmo = converter.convert(&wmo, WmoVersion::Cataclysm)?;
147151

148152
// Save the converted file
149153
let writer = WmoWriter::new();
150154
let mut output = Vec::new();
151-
writer.write_root(&mut output, &wmo, WmoVersion::Cataclysm)?;
155+
writer.write_root(&mut output, &converted_wmo, WmoVersion::Cataclysm)?;
152156
fs::write("building_cata.wmo", output)?;
153157
```
154158

@@ -195,7 +199,7 @@ warcraft-rs mpq tree patch.mpq --depth 3 # Visualize archive structure
195199
# Extract files
196200
warcraft-rs mpq extract patch.mpq --output ./extracted --preserve-paths
197201

198-
# Rebuild and modernize an archive
202+
# Rebuild an archive
199203
warcraft-rs mpq rebuild old.mpq modern.mpq --upgrade-to v4 --compression lzma
200204

201205
# Verify the rebuild
@@ -210,25 +214,24 @@ warcraft-rs wmo tree building.wmo --show-refs # See WMO structure with reference
210214

211215
## Documentation
212216

213-
Comprehensive documentation is available in the `docs/` directory:
217+
Documentation in the `docs/` directory:
214218

215219
- [Getting Started](docs/getting-started/quick-start.md)
216220
- [Format Documentation](docs/formats/)
217221
- [API Reference](docs/api/)
218222
- [Examples and Guides](docs/guides/)
219-
- **[📦 MPQ CLI Usage Guide](docs/guides/mpq-cli-usage.md)** - Complete CLI
220-
reference with rebuild and compare examples
223+
- **[📦 MPQ CLI Usage Guide](docs/guides/mpq-cli-usage.md)** - CLI
224+
reference with examples
221225
- **[📦 MPQ Archives Guide](docs/guides/mpq-archives.md)** - Programming guide
222226
with rebuild and comparison APIs
223227
- **[🔍 StormLib vs wow-mpq](docs/guides/stormlib-differences.md)** - Technical
224228
comparison with the reference implementation
225-
- **[🏰 WMO CLI Usage Guide](docs/guides/wmo-cli-usage.md)** - Complete guide
229+
- **[🏰 WMO CLI Usage Guide](docs/guides/wmo-cli-usage.md)** - Guide
226230
for working with World Map Objects
227231

228232
## 🤝 Contributing
229233

230-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for
231-
details on:
234+
See the [Contributing Guide](CONTRIBUTING.md) for:
232235

233236
- Setting up your development environment
234237
- Finding issues to work on
@@ -247,7 +250,7 @@ This project uses GitHub Actions for continuous integration:
247250

248251
### Contributors
249252

250-
Special thanks to all our [contributors](CONTRIBUTORS.md)!
253+
Thanks to all [contributors](CONTRIBUTORS.md).
251254

252255
---
253256

docs/guides/mpq-archives.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,31 @@
22

33
## Overview
44

5-
MPQ (Mo'PaQ) archives are Blizzard's proprietary archive format used extensively
6-
in World of Warcraft to store game assets. This guide covers how to work with
7-
MPQ archives using `warcraft-rs`, including reading, extracting, and managing
8-
files within these archives.
5+
MPQ (Mo'PaQ) archives are Blizzard's archive format used
6+
in World of Warcraft to store game assets. This guide covers working with
7+
MPQ archives using `warcraft-rs`.
98

109
**Key Features:**
1110

12-
-**100% StormLib Compatibility** - Full cross-implementation support
13-
-**Full Blizzard Archive Support** - Handles all official WoW archives (1.12.1 - 5.4.8)
14-
-**Bidirectional Compatibility** - Archives created by either implementation can be read by both
15-
-**Automatic Path Conversion** - Forward slashes automatically converted to backslashes
11+
-**StormLib Compatibility** - Cross-implementation support
12+
-**Blizzard Archive Support** - Handles official WoW archives (1.12.1 - 5.4.8)
13+
-**Bidirectional Compatibility** - Archives work with both implementations
14+
-**Path Conversion** - Forward slashes converted to backslashes
1615

1716
## Prerequisites
1817

19-
Before working with MPQ archives, ensure you have:
18+
Prerequisites:
2019

21-
- Basic understanding of Rust programming
20+
- Rust programming knowledge
2221
- `warcraft-rs` installed with the `mpq` feature enabled
2322
- Access to World of Warcraft MPQ files (from game installation)
24-
- Understanding of file I/O operations in Rust
23+
- File I/O knowledge in Rust
2524

2625
## Understanding MPQ Archives
2726

28-
### What are MPQ Archives?
27+
### MPQ Archives
2928

30-
MPQ archives are compressed file containers that can store:
29+
MPQ archives are file containers that store:
3130

3231
- Game textures (BLP files)
3332
- Models (M2, WMO files)
@@ -40,11 +39,11 @@ MPQ archives are compressed file containers that can store:
4039

4140
- **Compression**: Multiple compression algorithms (PKWARE, zlib, bzip2)
4241
- **Encryption**: Optional file encryption
43-
- **Listfiles**: Internal file listings (though not always present)
44-
- **Patches**: Support for incremental updates
42+
- **Listfiles**: Internal file listings (not always present)
43+
- **Patches**: Incremental updates
4544
- **Multi-locale**: Language-specific file variations
4645

47-
## Step-by-Step Instructions
46+
## Instructions
4847

4948
### 1. Opening an MPQ Archive
5049

@@ -90,7 +89,7 @@ fn list_archive_contents(archive: &mut Archive) -> Result<(), Box<dyn std::error
9089
}
9190
Err(_) => {
9291
println!("No listfile found in archive");
93-
// You'll need to know exact filenames to extract without a listfile
92+
// Need exact filenames without a listfile
9493
}
9594
}
9695

@@ -156,8 +155,8 @@ fn extract_all_files(archive: &mut Archive, output_dir: &str) -> Result<(), Box<
156155

157156
### 4. Working with Multiple Archives using PatchChain
158157

159-
The `PatchChain` struct provides automatic priority-based file resolution across
160-
multiple MPQ archives, mimicking how World of Warcraft handles patches.
158+
The `PatchChain` struct provides priority-based file resolution across
159+
multiple MPQ archives.
161160

162161
```rust
163162
use wow_mpq::{PatchChain, Archive};
@@ -174,21 +173,21 @@ fn work_with_patch_chain() -> Result<(), Box<dyn std::error::Error>> {
174173
chain.add_archive(PathBuf::from("Data/patch-2.MPQ"), 300)?; // Patch 2
175174
chain.add_archive(PathBuf::from("Data/patch-3.MPQ"), 400)?; // Patch 3 (highest priority)
176175

177-
// Extract a file - automatically uses the highest priority version
176+
// Extract a file - uses the highest priority version
178177
let filename = "Interface/Icons/INV_Misc_QuestionMark.blp";
179178
let data = chain.read_file(filename)?;
180179
println!("Extracted {} ({} bytes)", filename, data.len());
181180

182-
// Find which archive contains a specific file
181+
// Find which archive contains a file
183182
if let Some(archive_path) = chain.find_file_archive(filename) {
184183
println!("File found in: {}", archive_path.display());
185184
}
186185

187-
// List all unique files across all archives
186+
// List unique files across archives
188187
let all_files = chain.list()?;
189188
println!("Total unique files: {}", all_files.len());
190189

191-
// Get information about all archives in the chain
190+
// Get information about archives
192191
let chain_info = chain.get_chain_info();
193192
for info in &chain_info {
194193
println!("{} (priority {}): {} files",
@@ -240,7 +239,7 @@ fn work_with_multiple_archives_manual() -> Result<(), Box<dyn std::error::Error>
240239
use wow_mpq::{ArchiveBuilder, FormatVersion, ListfileOption};
241240

242241
fn create_simple_archive() -> Result<(), Box<dyn std::error::Error>> {
243-
// Create a basic archive
242+
// Create archive
244243
ArchiveBuilder::new()
245244
.add_file("readme.txt", "README.txt")
246245
.add_file_data(b"Hello World".to_vec(), "hello.txt")
@@ -285,8 +284,8 @@ fn create_advanced_archive() -> Result<(), Box<dyn std::error::Error>> {
285284

286285
### 6. Rebuilding and Comparing Archives
287286

288-
The `warcraft-rs` CLI provides powerful tools for rebuilding MPQ archives and
289-
comparing them for differences.
287+
The `warcraft-rs` CLI provides tools for rebuilding MPQ archives and
288+
comparing them.
290289

291290
#### Rebuilding Archives
292291

@@ -802,8 +801,8 @@ let archive = Archive::open("Data/patch.mpq")?; // Works despite warning
802801
### Understanding Patch Chains
803802

804803
World of Warcraft uses a patch chain system where newer patches override files
805-
in older archives. The `PatchChain` struct automates this process, ensuring you
806-
always get the most recent version of a file.
804+
in older archives. The `PatchChain` struct automates this process, returning
805+
the highest priority version of a file.
807806

808807
### Critical Loading Order Rules
809808

0 commit comments

Comments
 (0)