mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
feat(editor): add WCRE (Creature Resistance & Immunity) — 106th open format
Novel replacement for the per-creature resistance columns
that vanilla WoW buried inside creature_template
(resistance1..6 fields) plus the SpellSchoolMask immunity
and mechanic_immune_mask columns. Each entry is one
creature's full defensive profile: 6 magic-school resist
values (int16, with 32767 as the full-immunity sentinel),
a physical-resistance percentage (0..75 game-engine cap),
plus three immunity bitmasks (CC kinds, spell mechanics,
magic schools).
The CC-immunity mask uses 14 named bits: ImmuneRoot /
Snare / Stun / Fear / Sleep / Silence / Charm / Disarm /
Polymorph / Banish / Knockback / Interrupt / Taunt /
Bleed. The info display renders the mask as a "+"-joined
token list ("root+stun+fear") for readability; "all" for
0xFFFF (typical raid-boss CC profile) and "none" for 0.
Three preset emitters: makeRaidBosses (5 canonical raid
bosses with iconic single-school immunities — Ragnaros
fire / Vael 50%-all / Hakkar arcane / Kel'Thuzad shadow
/ Onyxia fire+frost partial), makeElites (5 mid-tier
elites with single-school resists), makeImmunities (4
selective CC-immunity test cases — root-immune treant,
stun-immune worg, silence-immune acolyte, fear+charm+
poly-immune undead).
Validator's most novel check is creatureEntry uniqueness
— multiple WCRE entries binding the same creature would
make the damage-calc lookup ambiguous (which profile
applies?). Also catches negative resists < -100 (extreme
>2x damage taken), physicalResistPct > 75 (clamped at
runtime to game-engine armor cap), and reserved bits in
schoolImmunityMask (only bits 0-5 are meaningful).
Format count 105 -> 106. CLI flag count 1162 -> 1167.
This commit is contained in:
parent
e4e15b3ffa
commit
f9cad45154
10 changed files with 781 additions and 0 deletions
|
|
@ -2237,6 +2237,16 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Export binary .wldn to a human-editable JSON sidecar (defaults to <base>.wldn.json; emits all 3 enums as both int AND name string; triggerValue as signed int32)\n");
|
||||
std::printf(" --import-wldn-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wldn.json sidecar back into binary .wldn (triggerKind int OR \"levelreach\"/\"factionstanding\"/\"itemacquired\"/\"questcomplete\"/\"spelllearned\"/\"zoneentered\"; channelKind \"raidwarning\"/\"systemmsg\"/\"subtitle\"/\"tutorial\"/\"motdappend\"; factionFilter \"alliance\"/\"horde\"/\"both\")\n");
|
||||
std::printf(" --gen-cre <wcre-base> [name]\n");
|
||||
std::printf(" Emit .wcre 5 raid-boss resist profiles (Ragnaros 100%% fire-immune / Vael 50%% all schools / Hakkar arcane-immune / KT shadow-immune / Onyxia fire+frost partial)\n");
|
||||
std::printf(" --gen-cre-elites <wcre-base> [name]\n");
|
||||
std::printf(" Emit .wcre 5 elite mid-tier profiles with single-school resists (water elemental fire / stone giant nature / scarlet priest holy / dustwind arcane / frostwolf frost)\n");
|
||||
std::printf(" --gen-cre-immune <wcre-base> [name]\n");
|
||||
std::printf(" Emit .wcre 4 CC-immunity test profiles (treant root-immune / alpha worg stun-immune / acolyte silence-immune / risen construct fear+charm+poly immune)\n");
|
||||
std::printf(" --info-wcre <wcre-base> [--json]\n");
|
||||
std::printf(" Print WCRE entries (id / creatureEntry / 6 school resists / phys%% / school-immune mask / CC-immune token list / name)\n");
|
||||
std::printf(" --validate-wcre <wcre-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name+creatureEntry required, no duplicate resistIds OR creatureEntries (damage-calc lookup ambiguity); warns on resist<-100 (extreme negative >2x dmg taken), physicalResistPct>75 (clamped at runtime), schoolImmunityMask reserved bits 0xC0 set\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