Repository navigation
Generator
The Generator is the Python pipeline that builds the map art and Lua data tables for the addons. It lives in src/generator/ and is not packaged with either addon.
It reads World of Warcraft game data from Blizzard's CASC archives and writes:
| Output | Goes to | Used by |
|---|---|---|
| Low-resolution World and Continent maps | src/addon/client/WorldMap/ |
Client |
High-resolution *HD maps |
src/addon/art/WorldMap/ |
Art |
FDIDMap.lua, CaveData.lua and other tables |
src/addon/client/data/ |
Client |
pip install -r requirements.txt # Pillow, numpy, scipy
The Generator targets one pinned game build, set in hfwm/config/build.py. Caches are stored per build in src/generator/.cache-<product>-<build>/, so retail data cannot mix in.
Run from src/generator/:
python generateHFWM.py # full build
python generateHFWM.py --zones Elwynn,Durotar # limit to some zones
python generateHFWM.py --dry-run # print the plan, write nothing
python generateHFWM.py --list-art-passes # describe the art passes and exit
Useful flags:
-
--lowres-only: skip the high-resolution output. -
--caves-only: run only the cave table pass (CaveData.lua). -
--tables-only: rebuild only the Lua tables. -
--skip-fdid-map: do not regenerateFDIDMap.lua. -
--no-original: skip the second, unpainted dump. This saves about 175 MB and roughly half the phase-3 time. -
--refresh: re-download cached inputs. -
--threads,--dl-threads: control parallel work.
The orchestrator is hfwm/cli/main.py. It runs these phases in order:
- Zone database. Reads the build-pinned DB2 exports and the WDT MAID chunks.
- Tile download. Fetches every unique minimap tile FDID and caches it on disk.
-
Zone processing. Stitches, crops and fits the art for the World and Continent maps. Encodes BLP2 files.
- 3b. Runs the same stitch with every art pass off, into
Original/.
- 3b. Runs the same stitch with every art pass off, into
- FDIDMap.lua. Maps each FileDataID to its bundled texture path.
-
CaveData.lua. Rebuilds the interior map table that this build's
UiMapdoes not list, usinghfwm/gamedata/microdungeon.py.
Phase 5 downloads its own data, so --caves-only can run it alone.
Art passes change pixels after stitching. Each one is toggled by a --<name> flag. Run --list-art-passes for the current list, options and defaults. --no-art-passes turns them all off, leaving the raw stitch with gaps black.
| Path | Contents |
|---|---|
generateHFWM.py |
Entry point. Calls hfwm.cli.main. |
hfwm/cli/ |
Argument parsing and phase sequencing. |
hfwm/pipeline/ |
Downloads and per-zone processing. |
hfwm/imaging/ |
Art passes: ocean, effects, resampling. |
hfwm/caves/ |
Interior and cave art, including WMO handling. |
hfwm/gamedata/ |
DB2 readers and microdungeon data. |
hfwm/formats/ |
BLP and WDT readers. |
hfwm/lua/ |
Writers for FDIDMap.lua and CaveData.lua. |
scripts/ |
Standalone helpers, such as minimap and cave tile emitters. |
Both addon release workflows run the generate-world-map-assets action, which runs this pipeline. The weekly generate-world-map-assets.yml run also builds and caches the output.