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

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

Each menu round-trips:
  • menuId, titleText
  • options[] with optionId / text / kind (dual int + name) /
    actionTarget / requiredFlags (dual int + flag-string array) /
    moneyCostCopper

The kindName field makes it obvious that a hand-edited
"vendor" / "trainer" / "submenu" string maps to the right
internal value without needing to know that vendor=2 and
submenu=1.

Verified byte-identical round-trip on the innkeeper preset
(2 menus, 7 options including Submenu cross-references that
must stay byte-stable to preserve the inter-menu graph).

Adds 2 flags (566 documented total now).
This commit is contained in:
Kelsi 2026-05-09 16:28:12 -07:00
parent 3b107459b2
commit 429460798f
3 changed files with 171 additions and 0 deletions

View file

@ -67,6 +67,7 @@ const char* const kArgRequired[] = {
"--export-wtrn-json", "--import-wtrn-json",
"--gen-gossip", "--gen-gossip-innkeeper", "--gen-gossip-questgiver",
"--info-wgsp", "--validate-wgsp",
"--export-wgsp-json", "--import-wgsp-json",
"--gen-taxi", "--gen-taxi-region", "--gen-taxi-continent",
"--info-wtax", "--validate-wtax",
"--gen-weather-temperate", "--gen-weather-arctic",