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

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

Each token round-trips all 8 scalar fields (tokenId, name,
description, iconPath, category, maxBalance, weeklyCap,
flags). Two enum-typed fields (category and flags) emit
dual int + name forms.

The flag bitset emits string-array form so a hand-author
can write ["hidden", "resets"] instead of having to
remember that HiddenUntilEarned|ResetsOnLogout = 0xC.

Verified byte-identical round-trip on the PvP preset
(8 tokens: Honor + Arena + 6 BG marks of honor with
maxBalance + weeklyCap + flags all preserved).

Adds 2 flags (596 documented total now).
This commit is contained in:
Kelsi 2026-05-09 16:56:55 -07:00
parent 41156f4a95
commit dea95a2ad9
3 changed files with 149 additions and 0 deletions

View file

@ -82,6 +82,7 @@ const char* const kArgRequired[] = {
"--export-wchc-json", "--import-wchc-json",
"--gen-tokens", "--gen-tokens-pvp", "--gen-tokens-seasonal",
"--info-wtkn", "--validate-wtkn",
"--export-wtkn-json", "--import-wtkn-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",