mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 11:33:52 +00:00
feat(editor): add WPRG (PvP Ranking grades) — 122nd open format
Novel replacement for the hardcoded 14-rank vanilla WoW PvP ladder (Private through Grand Marshal Alliance, Scout through High Warlord Horde). Each entry binds one (factionFilter, tier) combination to its display name, weekly RP threshold to maintain rank, lifetime honor for first-time achievement, title prefix for player- name display, and tier-set gear reward. The vanilla rank-ladder system used a weekly RP-decay mechanic that punished any week without play with rank- loss; this catalog stores both the weekly threshold (maintenance) and the lifetime threshold (achievement) since both are needed for accurate rank-progression simulation. Three preset emitters spanning the rank ladder: makeAllianceRanks (7 lower-tier ranks Private through Knight-Lieutenant), makeHordeRanks (7 mirrored Horde titles Scout through Blood Guard with identical honor thresholds — factionFilter disambiguates the shared "Sergeant" title), makeHighRanks (8 high-tier ranks across both factions Knight-Captain through Lt. Commander, tiers 8-11 with the iconic legendary battlegear shoulder unlocks). Tier 14 (Grand Marshal / High Warlord) intentionally omitted from presets — it's the legendary top-rank that historically required dedicated 24/7 grinding. Catalog supports tiers 1..14 in the schema; consumers extend as needed. Validator's most novel checks: per-(faction, tier) tuple uniqueness — two ranks at the same tier for the same faction would tie at runtime when the rank- progression UI looks up "what's tier 5 for Alliance?" Plus per-faction honor-threshold monotonicity — a higher tier requiring less honor than a lower tier would let players "downrank" by gaining honor, which is a content authoring bug. Format count 121 -> 122. CLI flag count 1276 -> 1281.
This commit is contained in:
parent
3e14b7b5b1
commit
4ce07d5ca9
10 changed files with 783 additions and 0 deletions
121
include/pipeline/wowee_pvp_ranks.hpp
Normal file
121
include/pipeline/wowee_pvp_ranks.hpp
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace pipeline {
|
||||
|
||||
// Wowee Open PvP Ranking Grades catalog (.wprg) —
|
||||
// novel replacement for the hardcoded 14-rank PvP
|
||||
// ladder vanilla WoW shipped (Private through Grand
|
||||
// Marshal for Alliance, Scout through High Warlord for
|
||||
// Horde). Each entry binds one (factionFilter, tier)
|
||||
// combination to its display name, weekly RP threshold
|
||||
// to maintain rank, lifetime honor for first-time
|
||||
// achievement, title prefix, and tier-set gear reward.
|
||||
//
|
||||
// Cross-references with previously-added formats:
|
||||
// WCHC: factionFilter uses the WCHC faction-mask
|
||||
// convention (1=Alliance, 2=Horde).
|
||||
// WIT: gearItemId references the WIT item catalog
|
||||
// (the rank-tier set piece — typically the
|
||||
// legendary battlegear shoulders unlocked at
|
||||
// high ranks).
|
||||
// WPVP: WPRG supersedes the older WPVP simpler PvP
|
||||
// currency catalog where rank-progression
|
||||
// semantics matter.
|
||||
//
|
||||
// Binary layout (little-endian):
|
||||
// magic[4] = "WPRG"
|
||||
// version (uint32) = current 1
|
||||
// nameLen + name (catalog label)
|
||||
// entryCount (uint32)
|
||||
// entries (each):
|
||||
// rankId (uint32)
|
||||
// nameLen + name
|
||||
// descLen + description
|
||||
// factionFilter (uint8) — 1=Alliance, 2=Horde
|
||||
// tier (uint8) — 1..14 vanilla rank
|
||||
// ladder
|
||||
// pad0 (uint8) / pad1 (uint8)
|
||||
// honorRequiredWeekly (uint32) — RP threshold per
|
||||
// week to maintain
|
||||
// honorRequiredAchieve (uint32) — total RP for
|
||||
// first-time
|
||||
// achievement
|
||||
// prefixLen + titlePrefix — e.g. "Sergeant"
|
||||
// gearItemId (uint32) — 0 if no gear
|
||||
// reward at this
|
||||
// tier
|
||||
// iconColorRGBA (uint32)
|
||||
struct WoweePvPRanks {
|
||||
enum FactionFilter : uint8_t {
|
||||
AllianceOnly = 1,
|
||||
HordeOnly = 2,
|
||||
};
|
||||
|
||||
struct Entry {
|
||||
uint32_t rankId = 0;
|
||||
std::string name;
|
||||
std::string description;
|
||||
uint8_t factionFilter = AllianceOnly;
|
||||
uint8_t tier = 1;
|
||||
uint8_t pad0 = 0;
|
||||
uint8_t pad1 = 0;
|
||||
uint32_t honorRequiredWeekly = 0;
|
||||
uint32_t honorRequiredAchieve = 0;
|
||||
std::string titlePrefix;
|
||||
uint32_t gearItemId = 0;
|
||||
uint32_t iconColorRGBA = 0xFFFFFFFFu;
|
||||
};
|
||||
|
||||
std::string name;
|
||||
std::vector<Entry> entries;
|
||||
|
||||
bool isValid() const { return !entries.empty(); }
|
||||
|
||||
const Entry* findById(uint32_t rankId) const;
|
||||
|
||||
// Returns all entries for one faction sorted by
|
||||
// tier. Used by the rank-progression UI to render
|
||||
// the ladder.
|
||||
std::vector<const Entry*> findByFaction(uint8_t faction) const;
|
||||
|
||||
// Returns the entry for a specific (faction, tier)
|
||||
// combination. Used by the weekly-honor processor
|
||||
// to look up "what's the threshold for tier 7?"
|
||||
const Entry* findByTier(uint8_t faction,
|
||||
uint8_t tier) const;
|
||||
};
|
||||
|
||||
class WoweePvPRanksLoader {
|
||||
public:
|
||||
static bool save(const WoweePvPRanks& cat,
|
||||
const std::string& basePath);
|
||||
static WoweePvPRanks load(const std::string& basePath);
|
||||
static bool exists(const std::string& basePath);
|
||||
|
||||
// Preset emitters used by --gen-prg* variants.
|
||||
//
|
||||
// makeAllianceRanks — 7 lower-tier Alliance ranks
|
||||
// (Private through Knight-
|
||||
// Lieutenant, tiers 1-7).
|
||||
// makeHordeRanks — 7 lower-tier Horde ranks
|
||||
// (Scout through Blood Guard,
|
||||
// tiers 1-7) with mirrored
|
||||
// honor thresholds.
|
||||
// makeHighRanks — 4 high-tier Alliance ranks
|
||||
// (Knight-Captain through
|
||||
// Commander, tiers 8-11).
|
||||
// Plus 4 mirrored Horde
|
||||
// (Legionnaire through Lt.
|
||||
// Commander).
|
||||
static WoweePvPRanks makeAllianceRanks(const std::string& catalogName);
|
||||
static WoweePvPRanks makeHordeRanks(const std::string& catalogName);
|
||||
static WoweePvPRanks makeHighRanks(const std::string& catalogName);
|
||||
};
|
||||
|
||||
} // namespace pipeline
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue