All files / player-scene-model/src/play-options options.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
import type { BattleMode, LR2ExtraLevel } from '@be-music/player-engine/lanes';
import type { MineModifier, LongNoteModifier, ScrollModifier } from '@be-music/player-engine/lanes';
 
/** The player's nanasigroove GOOD2BAD / GREAT2BAD choice. */
export type CrazyJudgeOption = 'OFF' | 'GOOD2BAD' | 'GREAT2BAD';
/** nanasigroove's NOTES conversion a player can pick (#1184). */
export type CrazyNotesOption = 'OFF' | 'DOUBLE' | 'COPY' | 'DBLCOPY';
/**
 * The mine options the player picks under Mines: beatoraja's. nanasigroove's ADDMINE is a separate option
 * (`PlayOptions.crazyAddMine`), which plays as the engine's `NANASI_ADD` mine option.
 */
export type PlayerMineModifier = Exclude<MineModifier, 'NANASI_ADD'>;
import type { GaugePick, GaugeAutoShift, QualifiedOptionValue } from '@be-music/player-engine/ruleset';
import type { JudgeTimingAutoAdjust } from '@be-music/player-engine/display';
import type { BrowseSort, DifficultyFilter, KeysFilter } from '../browse/list-options.ts';
 
/**
 * Per-session gameplay tweaks the player picks on the select screen: hi-speed, autoplay, note arrangement, gauge type,
 * HIDDEN / SUDDEN and the lane cover, BGA display, and the list's sort and filters. The host owns the live values and
 * hands them to every play it launches; Be-Music Skins read them from `BeMusicSelectFrame.playOptions` /
 * `BeMusicDecideFrame.playOptions` and change them through `BeMusicSelectActions.setPlayOption` / `cyclePlayOption`.
 * Several fields mirror an LR2 `#SRC_BUTTON` type, noted per field.
 */
export interface PlayOptions {
  /** bmson zero-total recovery policy, shared by every skin family. */
  bmsonTotalMode: import('@be-music/player-engine/ruleset').BmsonTotalMode;
  /**
   * Visual scroll-speed multiplier. The chart's note-to-second mapping is unchanged; only the on-screen pixels-per-beat
   * scaling moves. Range matches gameplay's runtime adjust hotkeys (`ArrowUp` / `ArrowDown` during play).
   */
  hiSpeed: number;
  /** AC 34 CLASSIC HI-SPEED; false retains the source default controls. */
  classicHiSpeed: boolean;
  /** AC 32 measured FLOATING HI-SPEED, with source cover coupling and 0.5 keyboard steps. */
  floatingHiSpeed: boolean;
  /** AC 34 locks cover/LIFT geometry; floating START-double restores the initial visible time. */
  fixedDisplayArea: boolean;
  /** AC 32 measured normal level 1..20; 0 leaves the existing multiplier API active. */
  normalHiSpeedLevel: number;
  /** beatoraja display timing in integer milliseconds, -500..500; positive advances note drawing. */
  judgeTimingMs: number;
  /** beatoraja visual CONSTANT, distinct from HS-FIX CONSTANT and chart scroll modifiers. */
  visualConstant: boolean;
  noteDurationMs: number;
  constantFadeMs: number;
  /** beatoraja BPM GUIDE shows BPM-change and STOP markers on the lane. */
  bpmGuide: boolean;
  /**
   * AC 34 BPM-change warning: `<current> » <next>` in a framed box on the lanes, from 2 s of chart time before each BPM
   * change until the change (blue when the tempo rises, red when it falls).
   */
  bpmChangeWarning: boolean;
  /** beatoraja's GUIDE SE: the sound set's sound for each judgment plays at the judgment. Read as the play starts. */
  guideSE: boolean;
  /**
   * beatoraja's WINDOW HOLD: from the start of a play until its last note, the play takes START as held, so the START +
   * key controls (hi-speed, the lane cover) run on every key press (`ControlInputProcessor`, #1131).
   */
  windowHold: boolean;
  /** Whether the built-in skins show the judgment counts during a play. */
  judgeCounts: boolean;
  /** Whether the judge detail shows the keys' and the scratch's timing apart. */
  judgeDetailSplit: boolean;
  /** What the built-in skins show of a judgment's timing beside it: nothing, FAST or SLOW, or the offset in milliseconds. */
  judgeDetail: 'OFF' | 'FAST_SLOW' | 'MS';
  /** The score rate the SCORE RATE target paces towards, in percent. */
  scoreTargetRate: number;
  /** The built-in skins' judgment and combo moved down the lanes by this percentage of their height (negative is up). */
  judgePosition: number;
  /** AC 34 判定文字の表示位置, its on / off part: OFF draws no judgment or combo on any play screen. Display only. */
  judgeDisplay: 'SKIN' | 'OFF';
  /** AC 34 レーンの明るさ調整: the lanes' brightness in percent, 100 as the skin draws them and 0 black. Notes, bar lines and covers keep theirs. Display only. */
  laneBrightness: number;
  /** The score graph's fixed target (beatoraja's TargetProperty): a rank border, MAX or the next rank above the best record. A ghost's pacemaker takes its place while one runs. */
  scoreTarget: import('./score-target.ts').ScoreTargetId;
  /** beatoraja's mark processed note: a tap note judged before its time is drawn as processed until it goes. Display only. */
  markProcessedNotes: boolean;
  /** beatoraja's judge area display: the judge windows as coloured bands above the judge line. Display only. */
  showJudgeArea: boolean;
  /** LR2 mania chart option (0 = OFF, 10–100) ADD MINES: a mine may be put half-way across a gap of a key lane. */
  lr2AddMines: number;
  /** LR2 mania chart option (0 = OFF, 10–100) ADD LONGNOTES: a key note may be held half-way to the next object of its lane. */
  lr2AddLongNotes: number;
  /** LR2 mania chart option (0 = OFF, 10–100) LOUDNESS: each chord may be filled across the whole side. Turns long notes into their heads; no score is saved. */
  lr2Loudness: number;
  /** LR2 mania chart option (0 = OFF, 10–100) ADD NOTES: at each chord, each note may add a note on an empty lane. Turns long notes into their heads; no score is saved. */
  lr2AddNotes: number;
  /** LR2 mania option GAMBOL (LR2 rules only): 0 is OFF; 1 fixes the judge windows at VERY HARD; 2 also narrows GREAT and GOOD to 12 ms. Recorded as `play.lr2Gambol`. */
  lr2Gambol: 0 | 1 | 2;
  /** LR2 mania option SIDEJUMP (0 = OFF, 10–100): hops each note sideways on a 500 ms period, alternate notes in opposite directions. Drawing only. */
  lr2SideJump: number;
  /** LR2 mania option SPIRAL (0 = OFF, 10–100): circles each note about its own path every 300 ms, alternate notes in opposite directions. It is LR2's note effect, not beatoraja's SPIRAL lane option. Drawing only. */
  lr2SpiralEffect: number;
  /** LR2 mania option WAVE (0 = OFF, 10–100): shifts each note along the lane by a 1000 ms sine per lane, growing with the square of its distance. Drawing only. */
  lr2Wave: number;
  /** LR2 mania option SINCURVE (0 = OFF, 10–100): shifts each note sideways by a sine of its place along the lane. Drawing only. */
  lr2SinCurve: number;
  /** LR2 mania option NABEATSU (0 = OFF, 10–100): sways the notes and bar lines while the play clock's second is a multiple of 3 (from 50 up, also seconds 30–39 and seconds ending in 3). Drawing only. */
  lr2Nabeatsu: number;
  /** LR2 mania option HEARTBEAT (0 = OFF, 10–100): pulses each note's size on a 500 ms sine, twice as much in width as in height. Drawing only. */
  lr2Heartbeat: number;
  /** LR2 mania option CHAR (0 = OFF, 10–100): draws every n-th note at three times its distance, so it falls three times as fast. Drawing only. */
  lr2Char: number;
  /** LR2 mania option SUPERLOOP (0 = OFF, 10–100): turns each note about its landing point on the judge line, once every (120 − value) × 50 ms. Drawing only. */
  lr2SuperLoop: number;
  /** LR2 mania option TORNADO (0 = OFF, 10–100): shifts each note sideways by a sine of its lane and time, in proportion to its distance from the judge line. Drawing only. */
  lr2Tornado: number;
  /** LR2 mania option EARTHQUAKE (0 = OFF, 10–100): sways the whole play screen on 1000 ms and 1234 ms sines. Drawing only. */
  lr2Earthquake: number;
  /** LR2 mania option ACCELERATION: remaps each note's place along the lane (drawing only). RANDOM picks ACCELERATION or DECELERATION per note; it is not the lane option. */
  lr2Acceleration: 'OFF' | 'ACCELERATION' | 'DECELERATION' | 'RANDOM';
  /** AC 34 オートスクラッチ表示: whether the scratch notes AUTO SCRATCH plays are drawn. Display only. */
  autoScratchNotes: 'SHOW' | 'HIDE';
  /**
   * The automatic judge-timing adjustment of a manual play: beatoraja 0.8.9's calibration on PG/GR/GD, or LR2's ON /
   * SILENT (`autojudge` 1 / 2: a 1 ms step per ten hits; SILENT also loads no keysounds, BGM or BGA and hides the judge
   * display). Display-only; AUTO and replays never adjust. Stored settings and replays from before the modes hold a
   * boolean, read as `'BEATORAJA'` / `'OFF'`.
   */
  judgeTimingAutoAdjust: JudgeTimingAutoAdjust;
  /**
   * When `true`, every note auto-judges as PERFECT at its scheduled time. Mirrors the LR2 AUTOPLAY skin button
   * (`#SRC_BUTTON type=16`). Starting a chart in AUTO from the select screen (its `start` with `autoPlay`, such as a
   * Be-Music Skin's `autoPlay` action) also forces this on for that one play, whatever is stored here.
   */
  autoPlay: boolean;
  /**
   * BGA (background animation) display mode. Mirrors the LR2 `#SRC_BUTTON,type=72` cycle (OFF / ON / AUTOPLAY ONLY).
   * When `'AUTOPLAY_ONLY'` the BGA renders only when {@link autoPlay} (or a start in AUTO) is also active — matches
   * LR2 behavior where AUTOPLAY ONLY hides BGA during regular human-played sessions.
   */
  bga: BGAMode;
  /**
   * BGA frame size — `'NORMAL'` uses the skin's default `#DST_BGA` rect (op 30), `'EXTEND'` uses the larger variant
   * gated on op 31. Mirrors `#SRC_BUTTON,type=73`.
   */
  bgaSize: BGASize;
  /**
   * Score-graph (per-judge prediction line) display flag. Mirrors `#SRC_BUTTON,type=70` and ops 38 (off) / 39 (on). The
   * LR2 default skin gates its score-graph chrome on op 39 — toggling this on reveals those elements without needing a
   * dedicated renderer in the gameplay scene.
   */
  scoreGraph: boolean;
  /**
   * Difficulty filter for the bar list. `'ALL'` shows every chart; the named values restrict the list to charts whose
   * `#DIFFICULTY` matches the corresponding LR2 enum (1=BEGINNER.. 5=INSANE). Mirrors `#SRC_BUTTON,type=10` (cycling)
   * and types 91..96 (direct set).
   */
  difficultyFilter: DifficultyFilter;
  /**
   * Key-mode filter for the bar list. `'ALL'` shows every chart; the named values restrict the list to the charts of
   * that key mode. Mirrors `#SRC_BUTTON,type=11` cycling (LR2's ops 160=7K..164=9K); beatoraja's MODE button adds the
   * 24-key modes.
   */
  keysFilter: KeysFilter;
  /**
   * Sort order for the bar list. Mirrors `#SRC_BUTTON,type=12` cycling (off / level / title / clear); beatoraja's SORT
   * button adds artist, genre, BPM, notes and last play (see `BrowseSort`).
   */
  sort: BrowseSort;
  /**
   * HS-FIX mode picked from `#SRC_BUTTON,type=55`. Without HS-FIX (`'OFF'`) the visual scroll rate scales with the
   * chart's BPM, so high-BPM sections fly past while low-BPM sections crawl. The other modes apply a one-time HS
   * multiplier so the user's chosen HS feels consistent across the chart:
   *
   * - `'MAXBPM'` — pegs the user's HS to the chart's MAX BPM (slower segments scroll proportionally slower).
   * - `'STARTBPM'` — pegs to the chart's starting BPM (the header BPM, independently of `#BASEBPM`).
   * - `'MINBPM'` — pegs to MIN BPM (faster segments scroll faster).
   * - `'AVERAGE'` — pegs to the main BPM, the BPM the most notes sit at (beatoraja's MAINBPM), which BPM × N + STOP
   *   gimmicks do not skew the way a time average is.
   * - `'CONSTANT'` — LR2's fixed 150-BPM distance map, pausing on STOP and ignoring unsupported #SCROLL/#SPEED.
   *   Distinct from beatoraja visual CONSTANT, which limits note visibility instead.
   */
  hsFix: HSFix;
  /** AC 34 display-area information visibility; OFF keeps readouts controlled by the skin. */
  displayAreaInfo: 'OFF' | 'ON' | 'SUDDEN_ONLY' | 'HIDDEN_LIFT_ONLY';
  /**
   * 1P-side HIDDEN / SUDDEN effect picked from `#SRC_BUTTON,type=50`. Cycles OFF → HIDDEN → SUDDEN → HID+SUD on each
   * click. Drives the opaque mask over the 1P keyboard / scratch lanes. SP charts only render this side; DP charts pair
   * it with {@link hiddenSudden2P}.
   */
  hiddenSudden1P: HiddenSuddenMode;
  /**
   * 2P-side HIDDEN / SUDDEN effect picked from `#SRC_BUTTON,type=51`. Independent from the 1P value — LR2's panel UI
   * exposes per-side cycle buttons because real players sometimes want, e.g., HIDDEN on their dominant side and OFF on
   * the other.
   */
  hiddenSudden2P: HiddenSuddenMode;
  /**
   * Shutter / LANE COVER coverage (0..1) — the fraction of the playfield the LANE COVER (and any active HIDDEN / SUDDEN
   * masks) occupies. Drives slider `type=4 / 5` on the panel-1 shutter track. Adjustable via the 1P 4-key / 6-key
   * (`KeyD` / `KeyF`) when panel 1 is open. Independent from {@link laneCover} — height is preserved across ON/OFF
   * toggles so the user doesn't have to redial it after re-enabling the cover.
   */
  shutter: number;
  /**
   * LANE COVER ON / OFF toggle. In LR2's SYSTEM OPTION panel this is the binary state shown next to the "LANE COVER"
   * label — distinct from {@link shutter} (which is the height). When OFF, the gameplay-side mask is hidden regardless
   * of `shutter`. When ON, the mask renders at the `shutter`-derived height.
   */
  laneCover: boolean;
  /** beatoraja LIFT: stored fraction retained while disabled, independently per play side. */
  lift1P: number;
  lift2P: number;
  liftOn1P: boolean;
  liftOn2P: boolean;
  /** beatoraja 0.8.9's three launcher choices. */
  judgeAlgorithm: 'combo' | 'duration' | 'lowest';
  /** AC LEGACY NOTE removes CN/BSS; beatoraja REMOVE removes every long note. */
  longNoteModifier: LongNoteModifier;
  /** beatoraja ADD probability, 0..1, default 1. */
  longNoteRate: number;
  /** beatoraja EXTRA; source type selector is unimplemented upstream. */
  extraNoteDepth: number;
  extraNoteScratch: boolean;
  sevenToNinePattern: import('@be-music/player-engine/lanes').SevenToNinePattern;
  sevenToNineType: import('@be-music/player-engine/lanes').SevenToNineType;
  battleMode: BattleMode;
  /**
   * LR2 D-BATTLE: keep scratch objects playable, as LR2's hidden `randSC` command does (a side's buttons 12 and 13 held
   * together at decide, OpenLR2 `Main.cpp` L1242-L1247, `LR2f.cpp` L27432-L27438).
   */
  dBattleScratch: boolean;
  /**
   * That-Which-Must-Not-Be-Named M-RAN per player (two-player play only): MIRROR applied after a RANDOM-type arrangement,
   * so a player with it plays the mirror image of the other's chart.
   */
  mRan1P: boolean;
  mRan2P: boolean;
  /** beatoraja CUSTOM JUDGE (`PlayerConfig.customJudge`) and its window / long-note margin rates in percent. */
  /** beatoraja LN MODE (`PlayerConfig.lnmode`): the mode of a chart whose long-note mode is undefined. */
  longNoteMode: 'LN' | 'CN' | 'HCN';
  customJudge: boolean;
  /**
   * PRACTICE (beatoraja's `PracticeProperty`, under every judge ruleset): play only the bars picked on the chart's score
   * when the chart is started (`resolvePracticeSelection`'s range) and play them again when they end. The range belongs
   * to that start, not to the options. `practiceGauge` is one of the judge ruleset's own
   * gauges (`resolvePracticeGaugeTypes`), or another source's qualified with it (`beatoraja:ASSIST-EASY`), which keeps
   * that source's gauge under every judge ruleset (ADR 0019). A 0 judgerank or TOTAL keeps the chart's; both are read on the judge ruleset's
   * own tables and do nothing under That-Which-Must-Not-Be-Named. `MODE` keeps the play mode's gauge category, which
   * only beatoraja has.
   */
  practice: boolean;
  practiceGauge: PracticeGaugePick;
  practiceGaugeCategory: PracticeGaugeCategory;
  practiceStartGauge: number;
  practiceJudgeRank: number;
  practiceTotal: number;
  /** How many bars of rest a PRACTICE play gives before its range (0 starts at the range). */
  practiceRestBefore: number;
  /** How many bars of rest a PRACTICE play gives after its range (0 ends at the range). */
  practiceRestAfter: number;
  /**
   * A PRACTICE play keeps a long note held into its range from before it, played from its head (`PlayPractice.carriedLongNotes`,
   * a Be-Music extension); off drops it, as beatoraja's `PracticeModifier` does.
   */
  practiceCarriedLongNotes: boolean;
  customJudgeKeyPerfectGreat: number;
  customJudgeKeyGreat: number;
  customJudgeKeyGood: number;
  customJudgeScratchPerfectGreat: number;
  customJudgeScratchGreat: number;
  customJudgeScratchGood: number;
  customJudgeLongNoteMargin: number;
  lr2ExtraMode: boolean;
  lr2ExtraLevel: LR2ExtraLevel;
  mineModifier: PlayerMineModifier;
  /**
   * nanasigroove's GOOD2BAD / GREAT2BAD (#1177): a GOOD, or a GREAT and a GOOD, moves the gauge as a BAD does. A chart's
   * own `774:CRAZY_GOOD2BAD` / `GREAT2BAD` wins.
   */
  crazyJudge: CrazyJudgeOption;
  /** nanasigroove's HELLJUDGE (#1185): every judgment's window narrowed by its own ratio. A chart's own wins. */
  crazyHellJudge: boolean;
  /**
   * nanasigroove's ADDMINE (#1185): mines scattered along every lane, nanasigroove's placement and damage. While it is on
   * it replaces the beatoraja mine option (`mineModifier`), as a chart's own `774:CRAZY_ADDMINE` does.
   */
  crazyAddMine: boolean;
  /** nanasigroove's NOTES DOUBLE / COPY / DBLCOPY (#1184). A chart's own wins. */
  crazyNotes: CrazyNotesOption;
  /** beatoraja timeline BPM/STOP/SCROLL removal or generated SCROLL, independent of visual CONSTANT. */
  scrollModifier: ScrollModifier;
  /** beatoraja ADD: change every 1..1024 section lines (default 4), with width 0..1 (default 0.5). */
  scrollSection: number;
  scrollRate: number;
  /** Gauge auto-shift (beatoraja's policies), along the judge ruleset's own gauge ladder. */
  gaugeAutoShift: GaugeAutoShift;
  bottomShiftableGauge: import('@be-music/player-engine/ruleset').GaugeShiftBottom;
  /**
   * 1P side auto-scratch flag picked from `#SRC_BUTTON,type=44`. When true the scratch lane (channel 16) auto-judges as
   * PERFECT at every note's scheduled time, so the player only has to play the keys.
   */
  autoScratch1P: boolean;
  /** 2P side auto-scratch (`#SRC_BUTTON,type=45`, channel 26). */
  autoScratch2P: boolean;
  /**
   * DP FLIP toggle picked from `#SRC_BUTTON,type=54`. When true, 1P and 2P lane channels are swapped at chart-prepare
   * time. Only DP charts have lanes on both sides, so SP charts are unaffected. LR2 has no dedicated op for DP FLIP —
   * it's a pure gameplay-side transformation.
   */
  dpFlip: boolean;
  /**
   * Note-arrangement mode for the 1P keyboard lanes (channels 11..15 + 18 + 19). Mirrors `#SRC_BUTTON,type=42`. Scratch
   * (channel 16) is never touched.
   *
   * - `OFF` — original chart layout
   * - `MIRROR` — reverse the lane order (1↔7, 2↔6, 3↔5)
   * - `RANDOM` — chart-wide random permutation of the lanes, the same option in every source (beatoraja's draw, with
   *   LR2's fixed key)
   * - `R-RANDOM` — chart-wide cyclic rotation, optionally reflected, excluding regular and mirror
   * - `S-RANDOM` — per-note random assignment (chord shapes are NOT preserved): LR2's and AC's without jack avoidance,
   *   beatoraja's with it
   * - `H-RANDOM` — beatoraja per-row random assignment with a configurable jack threshold
   * - `SPIRAL` — beatoraja row rotations, frozen during active holds
   * - `RANDOM-EX` — beatoraja chart-wide permutation including scratches/wheels
   * - `ALL-SCR` — beatoraja scratch priority with time-based fallback
   * - `CONVERGE` — LR2 selected-lane concentration, or beatoraja PMS streak-based concentration
   * - `SCATTER` — LR2 previous-row avoidance, with active-LN reservations
   * - `SCATTER-CORRECTED` — explicitly corrected 9KEY SCATTER, excluding LR2 beta3's tenth destination
   * - `S-RANDOM-CORRECTED` — LR2's 9KEY S-RANDOM without that tenth destination
   * - `CONVERGE-CORRECTED` — LR2's CONVERGE without the tenth destination and with the 2P target on the key picked
   * - `SYNCHRONIZE-RANDOM` — That-Which-Must-Not-Be-Named BATTLE: one RANDOM draw, identical on both sides
   * - `SYMMETRY-RANDOM` — That-Which-Must-Not-Be-Named BATTLE: one RANDOM draw, mirrored on the 2P side
   *
   * S-RANDOM and CONVERGE name a different algorithm in each source, so they carry it (`lr2:S-RANDOM`,
   * `beatoraja:CONVERGE`); a bare one runs the judge ruleset's own (ADR 0019). Older values `lr2:RANDOM`,
   * `beatoraja:RANDOM`, `____:RANDOM` and `____:S-RANDOM` read as `RANDOM` and `lr2:S-RANDOM`.
   */
  random1P: RandomMode;
  /** beatoraja H-RANDOM jack threshold in 16th-note BPM units (1..1000, default 120). */
  hRandomThresholdBPM: number;
  randomSeed1P: string;
  randomSeed2P: string;
  /**
   * LR2 randFix key index: after RANDOM, the original key 1 moves to this key (0 = off; 9 KEY ignores it). LR2 CONVERGE
   * concentrates on it, 0 using the mode default (scratch, or key 5 for PMS).
   */
  randomFixedLane1P: number;
  randomFixedLane2P: number;
  lr2RandomScratch1P: boolean;
  lr2RandomScratch2P: boolean;
  /** 2P side note arrangement (channels 21..25 + 28 + 29). */
  random2P: RandomMode;
  /**
   * 1P gauge variant (`#SRC_BUTTON,type=40`):
   *
   * - `GROOVE` — LR2 default cumulative gauge (start 20 %, clear 80 %)
   * - `HARD` — survival gauge (start 100 %, fail at 0 %)
   * - `DEATH` — instant-death (start 100 %, any miss = 0)
   * - `EASY` — gentler GROOVE (clear 60 %)
   *
   * A bare gauge is the judge ruleset's own gauge of that name. A pick qualified with its source (`lr2:HARD`,
   * `beatoraja:EX-HARD`) keeps that source's gauge under every judge ruleset (ADR 0019, #1171); a skin's button labels it
   * by its gauge type and steps on from it (`cyclePlayOptionValue`).
   */
  gauge1P: GaugePick;
  /** 2P gauge variant (`#SRC_BUTTON,type=41`), bare or qualified like `gauge1P`. */
  gauge2P: GaugePick;
}
 
/** Allowed values for {@link PlayOptions.hsFix}. */
export type HSFix = 'OFF' | 'MAXBPM' | 'MINBPM' | 'AVERAGE' | 'CONSTANT' | 'STARTBPM';
 
/** Allowed values for {@link PlayOptions.hiddenSudden1P} / `hiddenSudden2P`: which ends of the lanes are covered. */
export type HiddenSuddenMode = 'OFF' | 'HIDDEN' | 'SUDDEN' | 'HID+SUD';
 
/**
 * Lane-option values; resolveRandomModes supplies the choices. A source-qualified S-RANDOM or CONVERGE runs its source's
 * algorithm under every ruleset, and a bare one the judge ruleset's own (ADR 0019). RANDOM is one option for every source.
 * `RANDOM+` is nanasigroove's, which only a chart's `774:RANDOM_RANDOM+` selects (#1244): it is never offered to the
 * player and never stands for an LR2 or beatoraja option.
 */
export type RandomMode =
  | QualifiedOptionValue<'S-RANDOM' | 'CONVERGE'>
  | 'OFF'
  | 'MIRROR'
  | 'RANDOM'
  | 'R-RANDOM'
  | 'S-RANDOM'
  | 'SPIRAL'
  | 'H-RANDOM'
  | 'ALL-SCR'
  | 'RANDOM-EX'
  | 'S-RANDOM-EX'
  | 'RANDOM+'
  | 'RANDOM_PLAYABLE'
  | 'S_RANDOM_PLAYABLE'
  | 'CONVERGE'
  | 'SCATTER'
  | 'SCATTER-CORRECTED'
  | 'S-RANDOM-CORRECTED'
  | 'CONVERGE-CORRECTED'
  | 'SYNCHRONIZE-RANDOM'
  | 'SYMMETRY-RANDOM';
 
/** PRACTICE's GAUGE TYPE of any judge ruleset. */
export type PracticeGaugeType = import('@be-music/player-engine/ruleset').PracticeGaugeType;
 
/** Allowed values for {@link PlayOptions.practiceGauge}: a bare PRACTICE gauge type, or one qualified with its source. */
export type PracticeGaugePick = import('@be-music/player-engine/ruleset').PracticeGaugePick;
 
/** Allowed values for {@link PlayOptions.practiceGaugeCategory}: `MODE` or a beatoraja GAUGE CATEGORY. */
export type PracticeGaugeCategory = 'MODE' | import('@be-music/player-engine/ruleset').BeatorajaGaugeCategory;
 
/** Allowed values for {@link PlayOptions.bga}. */
export type BGAMode = 'OFF' | 'ON' | 'AUTOPLAY_ONLY';
 
/** Allowed values for {@link PlayOptions.bgaSize}. */
export type BGASize = 'NORMAL' | 'EXTEND';
 
/** The choices of each enum / on-off play option, in their LR2 button cycle order: what a skin can pick from. */
export type PlayOptionChoices = {
  readonly [K in keyof PlayOptions]?: readonly PlayOptions[K][];
};