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:
Kelsi 2026-05-09 22:43:44 -07:00
parent 8e85278d89
commit 94e145541a
10 changed files with 695 additions and 0 deletions

View file

@ -247,6 +247,8 @@ const char* const kArgRequired[] = {
"--gen-spr", "--gen-spr-warlock", "--gen-spr-rez",
"--info-wspr", "--validate-wspr",
"--export-wspr-json", "--import-wspr-json",
"--gen-acr", "--gen-acr-quest", "--gen-acr-mixed",
"--info-wacr", "--validate-wacr",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",