Leagues Implementation Roadmap
The end goal: a fully playable Leagues V (Raging Echoes) recreation — all Leagues windows working,
The end goal: a fully playable Leagues V (Raging Echoes) recreation — all Leagues windows working, map/region selection, a tasks system that awards points, points/tasks gating relic & region unlocks, the Combat Masteries (weapon-talent) system, and a full onboarding flow.
Guiding architecture (established)
The Leagues UI is varp-driven: the server owns the truth (points, relics, regions, tasks,
masteries), pushes varps/varbits, and the cache's own cs2 renders the panels. Buttons send
if_button server ops; the server responds (set varps / runClientScript). So every feature is the
same shape: model state server-side → push the varps the panel reads → handle the panel's buttons.
See SLICE.md for the mechanics already reverse-engineered, RESEARCH.md §5
for the core-engine design.
Leagues is a world property (map_flags_cached bit 30); enabled per-login by LeagueRealmScript.
Phase 1 — Leagues windows + interactions (make every panel work)
The League side panel opens in the journal tab (DONE). Now wire each panel: open it, populate it from
state, handle its buttons. The side-panel buttons (server if_button): areas_button=656:40,
tasks_button=656:36, mastery_button=656:32, relics_button=656:44, rank/summary.
- 1a. Side-panel buttons → open sub-panels. Handle each
if_button→ open the corresponding interface (league_relics655,league_tasks657,league_combat_mastery311, areas/region map,league_rank/league_summary). - 1b. Relics panel. Open + populate the relic grid from state; handle the relic-click flow
(
runClientScript(league_relic_expanded_view, …)) → detail/confirm → set the relic-selection varbit + animation. (Mechanism mapped in SLICE.md.) - 1c. Region/Areas map. Open the map; show unlocked vs locked regions; handle region-select → set the unlocked-region bitfield varp.
- 1d. Tasks panel. Open + populate the task list (filters by tier/region/skill/completed); wire the filter buttons. (Data comes from the Phase-3 task system.)
- 1e. Combat Masteries panel (
league_combat_mastery311). Open + show Melee/Ranged/Magic ladders; handle point-spend buttons. (Logic in Phase 4.) - 1f. Rank / Summary / Rewards panels: open + populate.
Phase 2 — Server-side Leagues state model (the engine foundation)
- 2a. PlayerLeagueState: points, taskPoints vs taskCount, selected relic per tier (1..8), unlocked-region set, mastery points + per-style tiers, task-completion bitset, trophy tier.
- 2b. Varp bridge: one place that pushes the cache varps from state (relic varbits, region bitfield, point counters, mastery vars) so all panels stay in sync.
- 2c. Persistence: save/load league state (extend rsmod's SQLite player store).
- 2d. PlayerModifiers pipeline (RESEARCH.md §5): XP multiplier, boosted-drop whitelist, run-energy/etc. — recomputed on relic/mastery change; read by every XP grant / drop roll.
Phase 3 — Tasks system (extensible)
- 3a. Task model as data:
{id, name, area, category, difficulty(tier), points, trigger}— a catalog we add to over time (start small, grow). Externalize (toml/registry) for easy authoring. - 3b. Event-bus matcher: subscribe to skill/combat/inventory/quest/location events; match against active task triggers; on completion → mark bitset, award points + task-count, push varps, toast/notify.
- 3c. Task UI data: feed the Phase-1d panel (counts, per-task state, filters).
Phase 4 — Progression gating
- 4a. Relics: points thresholds unlock relic tiers (T1=0, …); selecting a relic applies its modifier set (via PlayerModifiers).
- 4b. Regions: task-count thresholds unlock region slots; enforce region locking at transitions/teleports/respawns/assignment-generators (NOT per-tile walls).
- 4c. Combat Masteries: a capped point pool from specific tasks; spend into Melee/Ranged/Magic tiers (sequential within a style); apply the combat-formula hooks + shared cross-style passives.
Phase 5 — Onboarding (start-to-playing)
- 5a. Tutorial on first login (replace the
league_tutorial_completedskip): the Leagues intro, then unlock the panels. - 5b. Starting-region picker + starter stat/item grants + Ironman/instant-restock rules.
- 5c. Loop closed: player logs in → tutorial → picks region → does tasks → earns points → unlocks relics/regions/masteries. That's a playable Leagues.
Suggested execution order
- Phase 1a (side-panel buttons open the sub-panels) — quick, high-visibility, proves the whole panel layer.
- Phase 2a–2b (minimal state model + varp bridge) — needed to populate anything meaningfully.
- Phase 1b (relics pick end-to-end) — the first complete interactive feature.
- Phase 3 (tasks) — the heartbeat that makes points real.
- Phase 4 (gating) + Phase 1c/1e (regions, masteries).
- Phase 5 (onboarding) — ties it together into a playable league.
Build the state model + varp bridge early; every panel becomes "push the right varps" after that.
Project Evaluation — State of the Base & Build Order (2026-06-29)
A full audit of the rsmod base to decide what to build before layering more Leagues V mechanics.
Combat notes — NPC attackability & the "Attack" option (A3 findings)
How player-initiated PvM is offered to the client, and why the "Attack" option sometimes appeared