mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
feat(editor): add WRPR JSON round-trip (--export/--import-wrpr-json)
Two parallel variable-length arrays (unlockedItemIds +
unlockedRecipeIds) serialize as plain JSON int arrays —
operators editing JSON can add or remove unlock entries
without touching either array's parallel partner.
grantsTabard and grantsMount accept bool or int.
Export adds a derived standingTier label
("Friendly"/"Honored"/"Revered"/"Exalted"/"Neutral"/etc.)
alongside the raw minStanding int — purely informational
for JSON readability, ignored on import (the int is
authoritative). Reuses the standingTierName helper
already used by --info-wrpr table display.
All 3 presets (argent/kaluak/accord) byte-identical
roundtrip OK. CLI flag count 1189 -> 1191.
This commit is contained in:
parent
8fee281899
commit
4aa2138749
3 changed files with 151 additions and 0 deletions
|
|
@ -2289,6 +2289,10 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Print WRPR entries (id / faction / standing / standing tier / discount %% / tabard flag / mount flag / item count / recipe count / name)\n");
|
||||
std::printf(" --validate-wrpr <wrpr-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name+factionId required, minStanding [-42000, 42000], no zero item/recipe IDs, no duplicate tierIds, no two tiers binding same (factionId,minStanding) tuple; warns on discountPct>20%% (exceeds Exalted cap), and PER-FACTION non-monotonic discount progression (higher standing should never give worse discount)\n");
|
||||
std::printf(" --export-wrpr-json <wrpr-base> [out.json]\n");
|
||||
std::printf(" Export binary .wrpr to a human-editable JSON sidecar (defaults to <base>.wrpr.json; emits both unlockedItemIds and unlockedRecipeIds as JSON arrays of IDs; standingTier derived label \"Friendly/Honored/Revered/Exalted\" added for readability)\n");
|
||||
std::printf(" --import-wrpr-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wrpr.json sidecar back into binary .wrpr (grantsTabard/grantsMount accept bool OR int; both unlock arrays serialize as plain JSON int arrays; standingTier label is informational only — minStanding int is authoritative)\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