feat(pipeline): WCRA crafting recipe catalog (133rd open format)

Novel replacement for the implicit recipe expansion vanilla WoW
carried in SpellReagents.dbc + Spell.dbc effect-24 (CREATE_ITEM)
+ per-trade-skill SkillLineAbility rows. Each WCRA entry binds
one trade-skill recipe spell to its variable-length reagent
list (itemId+count pairs, vanilla cap 8, format cap 32),
produced-item id + count, the trade skill it belongs to, the
minimum skill level to cast, and the source item that teaches
the recipe.

Three presets seeded with canonical vanilla item/spell IDs:
  --gen-cra-alchemy        4 potions (Minor/Lesser Healing+Mana,
                            Greater Healing, Major Mana) using
                            herb itemIds 2447/765/2450/3357/etc
                            and Empty Vial / Crystal Vial
  --gen-cra-engineering    3 recipes including Target Dummy with
                            5 reagents (variable reagent count
                            demonstration); learnedFromItemId
                            references the recipe blueprint
  --gen-cra-blacksmithing  3 recipes covering low/mid/high tiers
                            (skill 1 / 50 / 235) including Heavy
                            Mithril Helm with 4 different bar/ore
                            reagents

Validator catches: id+name+spellId+tradeSkillId+producedItemId+
producedCount required, no duplicate recipeIds, no duplicate
spellIds (cast-handler conflict — two recipes responding to the
same cast), no zero-itemId/zero-count reagents, no duplicate
reagent itemIds within a single recipe (should be merged into
single entry with summed count), no self-reagent (recipe
consuming its own produced item is a perpetual-motion bug).
Warns on requiredSkillLevel > 450 (above WotLK cap) and empty
reagent list (free-to-craft is unusual but allowed for some
alchemy transmutes).

Format count 132 -> 133. CLI flag count 1391 -> 1398.
This commit is contained in:
Kelsi 2026-05-10 04:29:49 -07:00
parent a4ac12dbeb
commit 7df59b1d80
10 changed files with 794 additions and 0 deletions

View file

@ -2615,6 +2615,16 @@ void printUsage(const char* argv0) {
std::printf(" Export binary .wqgr to a human-editable JSON sidecar (defaults to <base>.wqgr.json; emits both questType and factionAccess as int + name string; prevQuestIds/followupQuestIds as JSON int arrays)\n");
std::printf(" --import-wqgr-json <json-path> [out-base]\n");
std::printf(" Import a .wqgr.json sidecar back into binary .wqgr (questType int OR \"normal\"/\"daily\"/\"repeatable\"/\"group\"/\"raid\"; factionAccess int OR \"both\"/\"alliance\"/\"horde\"/\"neutral\"; prereq + followup arrays accept JSON int arrays)\n");
std::printf(" --gen-cra-alchemy <wcra-base> [name]\n");
std::printf(" Emit .wcra 4 vanilla Alchemy potions (Minor/Lesser Healing+Mana, Greater Healing, Major Mana) with canonical herb itemIds + Empty Vial reagents\n");
std::printf(" --gen-cra-engineering <wcra-base> [name]\n");
std::printf(" Emit .wcra 3 vanilla Engineering recipes (Rough Blasting Powder, Mechanical Squirrel Box, Target Dummy with 5 reagents) demonstrating variable reagent count\n");
std::printf(" --gen-cra-blacksmithing <wcra-base> [name]\n");
std::printf(" Emit .wcra 3 Blacksmithing recipes (Rough Sharpening Stone skill 1 / Coarse Grinding Stone skill 50 / Heavy Mithril Helm skill 235) covering low/mid/high tiers\n");
std::printf(" --info-wcra <wcra-base> [--json]\n");
std::printf(" Print WCRA entries (recipeId / spellId / tradeSkillName / requiredSkillLevel / producedItemId / producedCount / reagent count / name)\n");
std::printf(" --validate-wcra <wcra-base> [--json]\n");
std::printf(" Static checks: id+name+spellId+tradeSkillId+producedItemId+producedCount required, no duplicate recipeIds, no duplicate spellIds (cast-handler conflict), no zero-itemId/zero-count reagents, no duplicate reagent itemIds within a single recipe (should be merged), no self-reagent (recipe consuming its own output is a perpetual-motion bug); warns on requiredSkillLevel > 450 (above WotLK cap), empty reagent list (free-to-craft is unusual)\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");