feat(pipeline): add WTKN (Wowee Token catalog) format

Novel open replacement for Blizzard's Currency.dbc +
CurrencyCategory.dbc + CurrencyTypes.dbc + the AzerothCore-
style player_currency SQL tables. The 28th open format
added to the editor.

Defines secondary currency tokens beyond gold: Honor Points
(PvP), Arena Points (rated PvP), Marks of Honor (per
battleground), faction reputation tokens, holiday-event
currencies. Each token has a balance cap, optional weekly
cap (regenerating earnings limit), and a category for
grouping in the player's currency tab.

Cross-references:
  WTRN.item.extendedCost -> WTKN.entry.tokenId
                             (vendors can charge in tokens
                              instead of copper — when
                              extendedCost > 0 the runtime
                              looks up the matching token)

Format:
  • magic "WTKN", version 1, little-endian
  • per token: tokenId / name / description / iconPath /
    category / maxBalance / weeklyCap / flags

Enums:
  • Category (6): Misc / Pvp / Reputation / Crafting /
                   Seasonal / Holiday
  • Flags:        AccountWide / Tradeable / HiddenUntilEarned /
                   ResetsOnLogout / ConvertsToGold

API: WoweeTokenLoader::save / load / exists / findById.

Three preset emitters showcase typical token shapes:
  • makeStarter  — 3 tokens (Honor / Marks / Stormwind Guard
                    rep) covering Pvp + Reputation categories
  • makePvp      — full PvP set: Honor (75k) + Arena (5k +
                    weekly 1500) + 6 BG marks of honor for
                    classic + TBC + WotLK battlegrounds
  • makeSeasonal — 4 holiday tokens (Tricky Treats /
                    Brewfest / Coin of Ancestry / Stranger's
                    Gift) all flagged ResetsOnLogout to make
                    them event-bound

CLI added (5 flags, 592 documented total now):
  --gen-tokens / --gen-tokens-pvp / --gen-tokens-seasonal
  --info-wtkn / --validate-wtkn

Validator catches: tokenId=0 + duplicates, empty name,
unknown category, weeklyCap > maxBalance (cap unreachable),
ResetsOnLogout + AccountWide combo (incoherent — account
state survives logout by definition).
This commit is contained in:
Kelsi 2026-05-09 16:53:11 -07:00
parent 68812b6c41
commit b632554b5b
8 changed files with 606 additions and 0 deletions

View file

@ -1089,6 +1089,16 @@ void printUsage(const char* argv0) {
std::printf(" Print WCHC classes (id / power / hp scaling) + races (faction / starting zone) + outfit item lists\n");
std::printf(" --validate-wchc <wchc-base> [--json]\n");
std::printf(" Static checks: class+race ids unique, baseHealth>0, faction availability set, outfit refs resolve\n");
std::printf(" --gen-tokens <wtkn-base> [name]\n");
std::printf(" Emit .wtkn starter: 3 tokens (Honor / Marks / Stormwind Guard) covering Pvp + Reputation categories\n");
std::printf(" --gen-tokens-pvp <wtkn-base> [name]\n");
std::printf(" Emit .wtkn full PvP set: Honor (75k cap) + Arena (5k cap, weekly 1500) + 6 BG marks of honor\n");
std::printf(" --gen-tokens-seasonal <wtkn-base> [name]\n");
std::printf(" Emit .wtkn 4 holiday tokens (Tricky Treats / Brewfest / Coin of Ancestry / Stranger's Gift) — ResetsOnLogout\n");
std::printf(" --info-wtkn <wtkn-base> [--json]\n");
std::printf(" Print WTKN entries (id / category / max balance / weekly cap / flags / name)\n");
std::printf(" --validate-wtkn <wtkn-base> [--json]\n");
std::printf(" Static checks: tokenId>0+unique, name not empty, weeklyCap<=maxBalance, no Resets+AccountWide conflict\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");