feat: JudgeDisplayPro

Merged
CL
2mo ago
+1104-8

[!NOTE]
Medium Risk
Wide Harmony surface on judge rendering, scoring, and result IL; incorrect patches could skew FAST/LATE stats or break on game updates, though behavior is gated by per-player enable flags.

Overview
Adds JudgeDisplayPro, a per-player mod that overrides tap, touch, slide, and break judge sprites and visibility from new in-game option rows, with settings persisted across music select.

Gameplay integration: Harmony hooks on JudgeGrade, SlideJudge, and related paths apply display modes (judge-only, FAST/LATE, colored, hidden) and critical-perfect rules; touch judges get monitor index via thread-local state from parent notes, slides via SlideRoot bindings. Score handling sets DispJudge from critical mode, adjusts FAST/LATE counts when timing is shown, and transpiles ResultProcess.OnStart to read judge display from GameScoreList instead of raw user data.

Infrastructure: GameSettingsManager patches under a lock; new GameSettingsManagerSprites patches MusicSelectProcess.GetOptionValueSprite for custom option preview sprites from a registered asset bundle (judgedisplaypro embedded resource). SongConstantSort drops unused compressed level.ab fallback; level.ab path moves under Resources/.

Reviewed by Cursor Bugbot for commit 9d0a300ae2358b7e5e98c7567dbf11a33d8b2bc4. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by Sourcery

引入可配置的 JudgeDisplayPro 用户体验(UX)Mod,用于自定义游戏内判定视觉效果,并让分数/统计信息显示与画面中显示的内容保持一致。

新功能:

  • 新增 JudgeDisplayPro Mod,支持为每位玩家单独设置,控制 PERFECT(含 break)、GREAT、GOOD 以及 critical(“大P”)判定的可见性和显示样式。
  • 将 JudgeDisplayPro 集成到游戏选项 UI 中,包括通过 GameSettingsManagerSprites 从内嵌的 asset bundle 加载自定义选项贴图(sprites)。
  • 使用基于存储的 UserSettings 模型,在不同游戏会话之间为每位玩家持久化 JudgeDisplayPro 设置。

改进:

  • 通过在首次应用补丁时使用锁进行保护,使 GameSettingsManager 的补丁注册线程安全。
  • 调整点击(tap)、触摸(touch)、长按(hold)和滑条(slide)音符的游戏内判定渲染,使 JudgeDisplayPro 设置决定显示哪些判定/判定时机贴图。
  • 通过对 GameScoreList 打补丁以及对 ResultProcess.OnStart 进行 transpile,使 FAST/LATE 计数器和结算画面的判定显示与 JudgeDisplayPro 行为保持一致。

构建:

  • 将新的 judgedisplaypro asset bundle 注册为内嵌资源,并通过移除未使用的 compressed level.ab 回退选项,简化 SongConstantSort asset bundle 的加载逻辑。
Original summary in English

Summary by Sourcery

Introduce a configurable JudgeDisplayPro UX mod that customizes in-game judge visuals and keeps score/stat displays consistent with what is shown.

New Features:

  • Add JudgeDisplayPro mod with per-player settings to control visibility and style of PERFECT (including break), GREAT, GOOD, and critical (“大P”) judgments.
  • Integrate JudgeDisplayPro with the game options UI, including custom option sprites loaded from an embedded asset bundle via GameSettingsManagerSprites.
  • Persist JudgeDisplayPro settings per player across sessions using a storage-backed UserSettings model.

Enhancements:

  • Make GameSettingsManager patch registration thread-safe by guarding first-time patch application with a lock.
  • Adjust gameplay judge rendering for tap, touch, hold, and slide notes so JudgeDisplayPro settings drive which judge/timing sprites appear.
  • Align FAST/LATE counters and result screen judge display with JudgeDisplayPro behavior by patching GameScoreList and transpiling ResultProcess.OnStart.

Build:

  • Register the new judgedisplaypro asset bundle as an embedded resource and simplify SongConstantSort asset bundle loading by removing the unused compressed level.ab fallback.
Original summary in English

Summary by Sourcery

引入可配置的 JudgeDisplayPro 用户体验(UX)Mod,用于自定义游戏内判定视觉效果,并让分数/统计信息显示与画面中显示的内容保持一致。

新功能:

  • 新增 JudgeDisplayPro Mod,支持为每位玩家单独设置,控制 PERFECT(含 break)、GREAT、GOOD 以及 critical(“大P”)判定的可见性和显示样式。
  • 将 JudgeDisplayPro 集成到游戏选项 UI 中,包括通过 GameSettingsManagerSprites 从内嵌的 asset bundle 加载自定义选项贴图(sprites)。
  • 使用基于存储的 UserSettings 模型,在不同游戏会话之间为每位玩家持久化 JudgeDisplayPro 设置。

改进:

  • 通过在首次应用补丁时使用锁进行保护,使 GameSettingsManager 的补丁注册线程安全。
  • 调整点击(tap)、触摸(touch)、长按(hold)和滑条(slide)音符的游戏内判定渲染,使 JudgeDisplayPro 设置决定显示哪些判定/判定时机贴图。
  • 通过对 GameScoreList 打补丁以及对 ResultProcess.OnStart 进行 transpile,使 FAST/LATE 计数器和结算画面的判定显示与 JudgeDisplayPro 行为保持一致。

构建:

  • 将新的 judgedisplaypro asset bundle 注册为内嵌资源,并通过移除未使用的 compressed level.ab 回退选项,简化 SongConstantSort asset bundle 的加载逻辑。
Original summary in English

Summary by Sourcery

Introduce a configurable JudgeDisplayPro UX mod that customizes in-game judge visuals and keeps score/stat displays consistent with what is shown.

New Features:

  • Add JudgeDisplayPro mod with per-player settings to control visibility and style of PERFECT (including break), GREAT, GOOD, and critical (“大P”) judgments.
  • Integrate JudgeDisplayPro with the game options UI, including custom option sprites loaded from an embedded asset bundle via GameSettingsManagerSprites.
  • Persist JudgeDisplayPro settings per player across sessions using a storage-backed UserSettings model.

Enhancements:

  • Make GameSettingsManager patch registration thread-safe by guarding first-time patch application with a lock.
  • Adjust gameplay judge rendering for tap, touch, hold, and slide notes so JudgeDisplayPro settings drive which judge/timing sprites appear.
  • Align FAST/LATE counters and result screen judge display with JudgeDisplayPro behavior by patching GameScoreList and transpiling ResultProcess.OnStart.

Build:

  • Register the new judgedisplaypro asset bundle as an embedded resource and simplify SongConstantSort asset bundle loading by removing the unused compressed level.ab fallback.