feat(editor): add WMS JSON round-trip authoring workflow

Closes the WMS open-format loop with --export-wms-json /
--import-wms-json, mirroring the JSON pairs added for
every other novel binary format. All 20 binary formats
added since WOL now have full JSON round-trip authoring.

Two top-level arrays mirror the binary layout:
  • maps[]  — mapId / name / shortName / mapType (dual int +
              name) / expansionId (dual int + name) / maxPlayers
  • areas[] — areaId / mapId / parentAreaId / name /
              minLevel..maxLevel / factionGroup (dual int +
              name) / explorationXP / ambienceSoundId

Three enum-typed fields (mapType, expansionId, factionGroup)
emit dual int + name forms — a hand-author can write
"continent" / "wotlk" / "alliance" instead of remembering
the integer values.

Verified byte-identical round-trip on the classic preset
(3 maps including Deadmines instance, 6 areas with full
parent-chain hierarchy + WSND ambient cross-refs preserved).

Adds 2 flags (587 documented total now).
This commit is contained in:
Kelsi 2026-05-09 16:48:34 -07:00
parent e66601c208
commit 68812b6c41
3 changed files with 183 additions and 0 deletions

View file

@ -1075,6 +1075,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WMS maps (id / type / expansion / max players) + areas (id / map / parent / level / faction / xp)\n");
std::printf(" --validate-wms <wms-base> [--json]\n");
std::printf(" Static checks: ids unique, areas reference real maps, parent areas exist + same map, BG/Arena needs maxPlayers\n");
std::printf(" --export-wms-json <wms-base> [out.json]\n");
std::printf(" Export binary .wms to a human-editable JSON sidecar (defaults to <base>.wms.json)\n");
std::printf(" --import-wms-json <json-path> [out-base]\n");
std::printf(" Import a .wms.json sidecar back into binary .wms (accepts mapType/expansion/faction int OR name forms)\n");
std::printf(" --gen-chars <wchc-base> [name]\n");
std::printf(" Emit .wchc starter: 2 classes (Warrior + Mage) + 2 races (Human + Orc) + 4 outfits with WIT cross-refs\n");
std::printf(" --gen-chars-alliance <wchc-base> [name]\n");