Skip to content

feat(quests): source objective targets from Hypixel resource with drift check#860

Draft
ugcodrr wants to merge 2 commits into
mainfrom
feat/quest-objective-targets
Draft

feat(quests): source objective targets from Hypixel resource with drift check#860
ugcodrr wants to merge 2 commits into
mainfrom
feat/quest-objective-targets

Conversation

@ugcodrr
Copy link
Copy Markdown
Member

@ugcodrr ugcodrr commented May 30, 2026

Summary

  • Adds a committed generated map (objective-targets.generated.ts) of all 127 Hypixel quest ids → objective targets, sourced from GET https://api.hypixel.net/v2/resources/quests and sorted for deterministic diffs
  • Extends QuestOption with an optional objectives?: Record<string, number> field; createGameModeQuests populates it at module load time from the generated map — quests with no match in the map are unchanged
  • Adds apps/scripts/src/regen-quest-targets.js — a maintenance script that fetches the live resource, regenerates the committed map, and prints a 4-category drift report
  • Adds quests:regen script aliases to both apps/scripts/package.json and packages/schemas/package.json

Local definitions remain the source of truth for all propertyKeys, leaderboard metadata, display order, names, and coverage. The Hypixel resource is consumed only for numeric objective targets.

Drift report (as of generation)

Running pnpm scripts quests:regen reports these known mismatches between our local schema and the Hypixel resource:

Category ID
Local not in Hypixel bedwars_weekly_challenges → resource has bedwars_weekly_challenges_win
Local not in Hypixel duels_kills → resource has duels_killer
Local not in Hypixel prototype_pit_* → resource uses pit_* prefix (player data uses prototype_pit)
Local not in Hypixel vampirez_vampirez_weekly_kill → doubled prefix bug; field already contains the prefix

These are pre-existing schema issues, not introduced by this PR. They are not fixed here (fields/propertyKeys are frozen per the design).

Regen command

pnpm scripts quests:regen
# or from schemas package:
pnpm --filter schemas quests:regen

…ft check

Add a committed generated map of quest objective targets keyed by Hypixel
quest id, a drift-check/regen script, and wire the targets into QuestOption
so they are available at the schema layer without any runtime fetch.

- packages/schemas: add objective-targets.generated.ts (127 quests from
  the live Hypixel quests resource, sorted for deterministic diffs)
- packages/schemas: extend QuestOption with optional `objectives` field;
  createGameModeQuests now populates it from the generated map at module
  load time — quests without a match are unchanged
- apps/scripts: add regen-quest-targets.js — fetches live resource,
  regenerates the committed map, and prints a 4-category drift report
  (local missing from Hypixel, Hypixel missing from local, target changes,
  and fuzzy/containment near-mismatches)
- apps/scripts, packages/schemas: add `quests:regen` script alias

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
statsify Ready Ready Preview, Comment Jun 1, 2026 9:51am

* Introduced MonthlyQuests and updated questMetadata structure
* Improved quest entries filtering and sorting logic
* Added support for tracking quest progress with current and target values
* Updated various quest modes to reflect new field names and structures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant