feat(pipeline): WBHV creature behavior catalog (136th open format)

Novel replacement for the implicit creature-behavior rules
vanilla WoW carried in creature_template.AIName + per-creature
C++ scripts in the server's ScriptMgr (most rare-elites and
bosses had hand-coded class-derived behaviors). Each WBHV entry
binds one combat behavior archetype to its creature kind (Melee
/ Caster / Tank / Healer / Pet / Beast), aggro / leash radii,
evade-on-leash policy (ResetToSpawn / HealAtPath / FleeToSpawn
/ NoEvade for raid bosses), corpse persistence duration,
default rotation spell, and a variable-length list of special
abilities (spellId + cooldown + use-chance triplets in basis
points).

Three presets covering common archetypes:
  --gen-bhv-melee   3 entry-tier melee creatures (Kobold Worker
                    + Timber Wolf + Stranglethorn Raptor) with
                    1 special ability each
  --gen-bhv-caster  3 caster patterns (Defias Wizard with
                    Polymorph + Frost Nova / Murloc Coastrunner
                    with Frost Bolt + Lesser Heal / Voidwalker
                    Pet Pattern with Taunt + Sacrifice +
                    Suffering — Sacrifice intentionally has
                    useChancePct=0 as owner-triggered, exercising
                    the validator owner-triggered warning)
  --gen-bhv-boss    1 Onyxia-pattern dragon (Tank kind,
                    NoEvade leash, 600s corpse for 40-man loot
                    distribution, 4 abilities including 90s-CD
                    Deep Breath)

Validator catches: id+name required, creatureKind 0..5,
evadeBehavior 0..3, aggroRadius > 0, no duplicate behaviorIds,
no zero-spellId specials, no duplicate spellId within same
behavior. CRITICAL invariant: leashRadius >= aggroRadius (else
creature evades back to spawn before reaching its target —
permanently un-killable from outside the leash radius). Warns
on corpseDuration < 60s (looting may fail in busy zones), and
useChancePct=0 on a special ability (correctly flagged on the
Voidwalker Sacrifice spec — verified live in smoke-test).

Format count 135 -> 136. CLI flag count 1418 -> 1425.
This commit is contained in:
Kelsi 2026-05-10 04:53:06 -07:00
parent e2cd30a6c5
commit d2e623de9f
10 changed files with 801 additions and 0 deletions

View file

@ -2657,6 +2657,16 @@ void printUsage(const char* argv0) {
std::printf(" Export binary .wbnd to a human-editable JSON sidecar (defaults to <base>.wbnd.json; emits both bindKind and itemQualityFloor as int + name string)\n");
std::printf(" --import-wbnd-json <json-path> [out-base]\n");
std::printf(" Import a .wbnd.json sidecar back into binary .wbnd (bindKind int OR \"bindonpickup\"/\"bindonequip\"/\"bindonuse\"/\"bindonaccount\"/\"soulbound\"/\"nobind\"; itemQualityFloor int OR \"poor\"/\"common\"/\"uncommon\"/\"rare\"/\"epic\"/\"legendary\"/\"artifact\"/\"heirloom\")\n");
std::printf(" --gen-bhv-melee <wbhv-base> [name]\n");
std::printf(" Emit .wbhv 3 entry-tier melee creature behaviors (Kobold Worker / Timber Wolf / Stranglethorn Raptor) with 1 special each (throw-rock / claw / leap)\n");
std::printf(" --gen-bhv-caster <wbhv-base> [name]\n");
std::printf(" Emit .wbhv 3 caster behaviors (Defias Wizard with Polymorph+FrostNova / Murloc Coastrunner with FrostBolt+heal / Voidwalker tank-pet pattern with Taunt+Sacrifice+Suffering)\n");
std::printf(" --gen-bhv-boss <wbhv-base> [name]\n");
std::printf(" Emit .wbhv 1 Onyxia-pattern dragon boss (Tank kind, NoEvade leash, 600s corpse, 4 abilities including 90s-cooldown Deep Breath)\n");
std::printf(" --info-wbhv <wbhv-base> [--json]\n");
std::printf(" Print WBHV entries (id / creatureKind / evadeBehavior / aggro / leash / corpse / mainAttackSpellId / specials count / name)\n");
std::printf(" --validate-wbhv <wbhv-base> [--json]\n");
std::printf(" Static checks: id+name required, creatureKind 0..5, evadeBehavior 0..3, aggroRadius > 0, no duplicate behaviorIds, no zero-spellId specials, no duplicate spellId within same behavior; CRITICAL invariant: leashRadius >= aggroRadius (else creature evades before engaging — un-killable from outside leash). Warns on corpseDuration < 60s (looting may fail in busy zones), useChancePct=0 on a special (ability never auto-fires; verify owner-triggered intent like warlock Sacrifice)\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");