feat(editor): add WSEF JSON round-trip (--export/--import-wsef-json)

Closes the editing loop on the spell-effect-type catalog: dump a
.wsef to JSON, hand-edit effectKind / behaviorFlags / baseAmount
(e.g. tag a server-custom effect ID as Damage kind, add
IgnoresImmunities to a custom dispel, retune ScriptedHeal's
default baseAmount), re-import to a byte-identical binary.

Two dual-encoded fields:
  - effectKind: int 0..9 OR "damage" / "heal" / "aura" /
    "energize" / "trigger" / "movement" / "summon" / "dispel"
    / "dummy" / "misc"
  - behaviorFlags: int bitfield OR pipe-separated label string
    ("RequiresTarget|IsHostileEffect|TriggersGCD"). Importer
    prefers int form when both present so unknown bits round-
    trip losslessly.

Verified byte-identical round-trip on all three presets
(damage / healing / aura). CLI flag count 994 -> 996.
This commit is contained in:
Kelsi 2026-05-09 22:51:40 -07:00
parent 24e9a55a10
commit 9f5678f67e
3 changed files with 180 additions and 0 deletions

View file

@ -253,6 +253,7 @@ const char* const kArgRequired[] = {
"--export-wacr-json", "--import-wacr-json",
"--gen-sef", "--gen-sef-healing", "--gen-sef-aura",
"--info-wsef", "--validate-wsef",
"--export-wsef-json", "--import-wsef-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",