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

Closes the WLOT open-format loop with --export-wlot-json /
--import-wlot-json, mirroring the WOL/WOW/WOMX/WSND/WSPN/WIT
JSON pairs. All 7 binary formats added since WOL now have
full JSON round-trip authoring.

Each loot table round-trips:
  • table-level: creatureId, flags (int + flagsList strings),
                  dropCount, money min/max (copper)
  • per-drop:    itemId, chancePercent (float),
                  minQty / maxQty, flags (int + flagsList)

Both flag fields emit dual int + named string-array forms.
A hand-author can write ["quest", "always"] instead of
having to remember that QuestRequired|AlwaysDrop = 5.

Verified byte-identical round-trip on the boss preset
(6 drops including the QuestRequired+AlwaysDrop combo on
the guaranteed quest item, group-only epic at 5%, mass-loot
trade goods at 90%).

Adds 2 flags (495 documented total now).
This commit is contained in:
Kelsi 2026-05-09 15:20:05 -07:00
parent b2b84139aa
commit 24bc52ab11
3 changed files with 174 additions and 0 deletions

View file

@ -37,6 +37,7 @@ const char* const kArgRequired[] = {
"--export-wit-json", "--import-wit-json",
"--gen-loot", "--gen-loot-bandit", "--gen-loot-boss",
"--info-wlot", "--validate-wlot",
"--export-wlot-json", "--import-wlot-json",
"--gen-creatures", "--gen-creatures-bandit", "--gen-creatures-merchants",
"--info-wcrt", "--validate-wcrt",
"--gen-weather-temperate", "--gen-weather-arctic",