mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 11:33:52 +00:00
feat(editor): WTUR JSON round-trip closure
Adds --export-wtur-json / --import-wtur-json with the established
readEnumField template factoring int+name dual encoding for
triggerEvent ("login"/"zoneenter"/"levelup"/"itempickup"/
"skilltrain"). Title/body/targetUIElementName multibyte text
preserved through JSON.
All 3 presets (newbie/levelup/bg) byte-identical binary roundtrip
OK including the BG preset's per-mapId trigger gating
(AV=30/WSG=489/AB=529).
Live-tested readability validator: hand-mutated Welcome step
(tutId 1) hideAfterSec from 30 to 3 in JSON. Validator
correctly errored: "hideAfterSec=3 is below 5s — popup vanishes
before the player can read it". Catches the class of UX bugs
where overly-aggressive auto-dismiss timers make tutorials
unhelpful (player sees a flash they can't process).
CLI flag count 1479 -> 1481.
This commit is contained in:
parent
ec81c9b529
commit
2fa2eb9cf0
3 changed files with 176 additions and 0 deletions
|
|
@ -2751,6 +2751,10 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Print WTUR entries (id / step / triggerEvent+value / hide-after sec / body length / title)\n");
|
||||
std::printf(" --validate-wtur <wtur-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name+title+body required, triggerEvent 0..4, stepIndex > 0 (sequence starts at 1), no duplicate tutIds, no duplicate (event,value,step) triples (sequence ordering tie); hideAfterSec MUST be 0 (no auto-dismiss) OR >= 5s (else popup vanishes before player can read it). Warns on Login event with non-zero triggerValue (dead data, Login is unconditional), non-Login event with triggerValue=0 (would fire for ALL events of that kind), and body length < 10 chars (likely placeholder)\n");
|
||||
std::printf(" --export-wtur-json <wtur-base> [out.json]\n");
|
||||
std::printf(" Export binary .wtur to a human-editable JSON sidecar (defaults to <base>.wtur.json; emits triggerEvent as int + name string; multibyte strings preserved)\n");
|
||||
std::printf(" --import-wtur-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wtur.json sidecar back into binary .wtur (triggerEvent int OR \"login\"/\"zoneenter\"/\"levelup\"/\"itempickup\"/\"skilltrain\" — round-trips title/body/target text byte-identical)\n");
|
||||
std::printf(" --catalog-pluck <wXXX-file> <id> [--json]\n");
|
||||
std::printf(" Extract one entry by id from any registered catalog format. Auto-detects magic, dispatches to the per-format --info-* handler internally, then prints just the matching entry. Primary-key field is auto-detected (first *Id field, or first numeric)\n");
|
||||
std::printf(" --catalog-find <directory> <id> [--magic <WXXX>] [--json]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue