mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 11:03:51 +00:00
feat(editor): add WACR (Achievement Criteria) open catalog format
Open replacement for Blizzard's Achievement_Criteria.dbc. Defines
the individual progression criteria that a character must
complete to earn an achievement.
Each WACH achievement has a tree of WACR criteria — "Kill 100
boars" is one criteria entry with criteriaType=KillCreature,
targetId=boarCreatureId, requiredCount=100. Multi-criteria
achievements (e.g. "Visit all 3 capital cities") have one entry
per sub-objective, all referencing the same achievementId, with
progressOrder determining their display sequence in the
achievement UI.
Thirteen criteriaType values cover the full progression variety:
KillCreature / ReachLevel / CompleteQuest / EarnGold /
GainHonor / EarnReputation / ExploreZone / LootItem /
UseItem / CastSpell / PvPKill / DungeonRun / Misc
The targetId field is type-polymorphic — for KillCreature it
references WCRT.creatureId, for CompleteQuest it references
WQT.questId, for ExploreZone it's a WMS.zoneId, etc. The engine
interprets it based on criteriaType.
Cross-references back to WACH (achievementId), WCRT
(KillCreature.targetId), WQT (CompleteQuest.targetId), WIT
(LootItem/UseItem.targetId), WMS (ExploreZone.targetId), WSPL
(CastSpell.targetId). findByAchievement(achId) returns all
criteria for an achievement sorted by progressOrder — used
directly by the achievement UI to render the progress checklist.
Three preset emitters: --gen-acr (5 kill criteria under one
composite achievement showing different creature targets),
--gen-acr-quest (4-step quest progression), --gen-acr-mixed
(5 cross-type criteria demonstrating the full CriteriaType
variety).
Validation enforces id+name+achievementId presence,
criteriaType 0..12, no duplicate ids; warns on:
- missing targetId for type-specific kinds (KillCreature,
CompleteQuest, etc. — engine cannot track without it)
- ReachLevel with requiredCount > 80 (above WotLK cap)
- timeLimitMs set on non-time-sensitive types (engine
ignores it for ReachLevel / EarnGold)
- requiredCount=0 (criteria completes instantly on first
progress event — usually a misconfig)
Wired through the cross-format table; WACR appears automatically
in all 14 cross-format utilities. Format count 80 -> 81; CLI flag
count 981 -> 986.
This commit is contained in:
parent
8e85278d89
commit
94e145541a
10 changed files with 695 additions and 0 deletions
|
|
@ -1879,6 +1879,16 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Export binary .wspr to a human-editable JSON sidecar (defaults to <base>.wspr.json). Reagent slot arrays exported as JSON arrays\n");
|
||||
std::printf(" --import-wspr-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wspr.json sidecar back into binary .wspr (accepts reagentKind int OR reagentKindName string; reagent arrays pad with zeros if shorter than 8)\n");
|
||||
std::printf(" --gen-acr <wacr-base> [name]\n");
|
||||
std::printf(" Emit .wacr 5 kill-counting criteria (Defias 50 / Murloc 25 / Naga 100 / Dragon 1 / RareElite 1) under one composite achievement\n");
|
||||
std::printf(" --gen-acr-quest <wacr-base> [name]\n");
|
||||
std::printf(" Emit .wacr 4 quest-completion criteria (tutorial / starting zone / daily / escort) progression chain\n");
|
||||
std::printf(" --gen-acr-mixed <wacr-base> [name]\n");
|
||||
std::printf(" Emit .wacr 5 cross-type criteria (ReachLevel 80 / EarnGold 10k / GainHonor 5k / PvPKill 100 / ExploreZone Stormwind) showing CriteriaType variety\n");
|
||||
std::printf(" --info-wacr <wacr-base> [--json]\n");
|
||||
std::printf(" Print WACR entries (id / achievementId / type / targetId / requiredCount / timeLimitMs / progressOrder / name)\n");
|
||||
std::printf(" --validate-wacr <wacr-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name+achievementId required, criteriaType 0..12, no duplicate ids; warns on missing targetId for type-specific kinds, ReachLevel>80, timeLimit on non-timed types, requiredCount=0\n");
|
||||
std::printf(" --gen-weather-temperate <wow-base> [zoneName]\n");
|
||||
std::printf(" Emit .wow weather schedule: clear-dominant + occasional rain + fog (forest / grassland)\n");
|
||||
std::printf(" --gen-weather-arctic <wow-base> [zoneName]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue