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

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

Each lock round-trips:
  • lockId, name, flags
  • all 5 channel slots (even unused ones, kind=None)
  • each channel: kind (dual int + name) + skillRequired +
    targetId

The flag bitset emits string-array form so a hand-author
can write ["destruct"] instead of having to remember that
DestructOnOpen = 0x01. Channel kindName makes the difference
between item / lockpick / spell / damage obvious without
needing to know the int values.

Verified byte-identical round-trip on the dungeon preset
(3 locks: light lockpick + steel chest with dual key/pick
channels + boss-key seal with destruct flag).

Adds 2 flags (530 documented total now).
This commit is contained in:
Kelsi 2026-05-09 15:52:20 -07:00
parent 95e593e59c
commit 929693405e
3 changed files with 158 additions and 0 deletions

View file

@ -52,6 +52,7 @@ const char* const kArgRequired[] = {
"--export-wfac-json", "--import-wfac-json",
"--gen-locks", "--gen-locks-dungeon", "--gen-locks-professions",
"--info-wlck", "--validate-wlck",
"--export-wlck-json", "--import-wlck-json",
"--gen-skills", "--gen-skills-professions", "--gen-skills-weapons",
"--info-wskl", "--validate-wskl",
"--gen-weather-temperate", "--gen-weather-arctic",