Repository navigation
BMS Ruleset English
The BMS ruleset enables loading and playing external .bms/.bme/.bml/.pms libraries in Ez2Lazer.
It relies on Ez2Lazer extension interfaces (external library sync, analysis writeback, keysound preview, and ruleset extensions), so use a compatible Ez2Lazer build.
BMS UI strings follow the same language as osu! (Chinese when CurrentUICulture is zh*, English otherwise). Wiki quotes in-game labels in backticks.
-
Settings -> BMS: library paths and BMS behavior; includes Build BMS analytics database /构建 BMS 分析库and Open BMS library path wizard /打开 BMS 曲库设置向导. -
Settings -> Ez: analysis/extended behavior toggles (affects xxySR and analysis visibility). - Standard BMS song select (Carousel): footer Refresh library only.
- BMS song select (tables / Qwilight layout): three panes (tables·folders·filters | chart list | detail); footer Refresh library, Build analytics, Add table URL, Open tables folder.
- Table files live under
EzBMS/tables/(.bmtor beatoraja-compatible JSON). They do not write osu collections and are not mixed with RajaFAVORITESQL filters. - Import by:
- Sync built-in tables in Settings / song select (fetches the curated SP/DP/PMS table URL catalog);
- dropping files into
EzBMS/tables; - or pasting a table URL into the search box and tapping Add table URL.
- Matching uses chart content MD5/SHA256. After upgrading, run Refresh library at least once. Missing charts show as not imported; if the table entry has a download URL, use footer Open download /
D/ Enter to open the publisher page (charts are not redistributed).
- In
Settings -> BMS, use打开 BMS 曲库设置向导to add one or more BMS root folders (you can also maintain the path list outside the wizard). - Open any BMS song select screen and run
刷新曲库(scan + sync metadata; also writes content hashes). - Run
构建 BMS 分析库in settings, or构建分析库on the dedicated song select screen (updates stars, xxySR, KPS, etc.). - (Optional) Import difficulty tables, then browse table → level → chart in the left pane.
- Switch several charts and confirm loading and metrics look correct.
- After path changes, run
刷新曲库again. - After upstream merge/rebase, run
刷新曲库, then构建 BMS 分析库(or Raja构建分析库) so indexes stay current. - If you moved data folders manually, back up
realm/ sqlite files before rebuilding indexes.
After the BMS library path wizard (or equivalent path configuration), on-disk folders are converted into unified metadata shared by song select, difficulty, and gameplay. Core flow: scan -> sync -> load.
flowchart LR
pathSetup[PathSetup] --> scanIndex[BMSBeatmapManagerScan]
scanIndex --> realmSync[BMSOsuLibrarySynchronizerSync]
realmSync --> realmMeta["RealmMetadata extSet FilesMap"]
realmMeta --> workingBeatmap[WorkingBeatmapCacheLoad]
workingBeatmap --> decoder[BMSBeatmapDecoder]
decoder --> panelAndPlay[SongSelectPanelAndGameplay]
- Configured paths are scanned and indexed.
- Index results sync into game-readable beatmap sets and file mappings.
- Song switching, difficulty calculation, and gameplay loading all use the same mapping.
- Scan layer:
BMSBeatmapManager+ sqlite index. - Sync layer:
BMSOsuLibrarySynchronizerwrites Realm (ext:set,ExternalContentRoot, relativeFilespaths). - Load layer:
BeatmapManager.GetWorkingBeatmap->WorkingBeatmapCache->ExternalBeatmapCompositeFileStore->Decoder.
- Main difficulty calculation path (mania difficulty pipeline).
- Core judgement/score components from mania (with BMS ruleset extensions on top).
- BMS charts convert to mania structures when a shared pipeline requires it.
- External library path and file-mapping sync.
- Keysound/background audio event handling. BMS has no separate main track: channel
01BGM and note keysounds are both samples fired at a point in time, so the "main audio" is just the BGM events along the timeline.BmsKeysoundManagerpresents it:Preparehands the whole sample batch to a background thread (PreloadTask), and both the player loader and the song-select preview wait for that task instead of blocking the update thread, then fire samples by event time. The chart's BGM events are also merged into the storyboard audio layerBMSBackgroundSamples. - Legacy chart text-encoding detection (UTF-8 / GBK(936) / Shift-JIS(932) / system ANSI): decoded titles, artists and
#WAV/#BMPfilenames have to match the real file names on disk, or keysounds go silent. Candidates are ranked by evidence: first whether the chart's referenced media actually exists under a given decode, then mis-decode fingerprints (reading GBK as Shift-JIS turns Chinese into runs of half-width katakana and private-use characters), and only then the system code page preference. On a Chinese system that means GBK charts decode as 936.- Known limitation: on a CP936 system, a Japanese Shift-JIS chart whose
#WAVlist is pure ASCII leaves no usable evidence, so CP936 wins by preference. (Japanese filenames, or a decode that forces mis-decode artefacts on the alternative, still select Shift-JIS correctly.)
- Known limitation: on a CP936 system, a Japanese Shift-JIS chart whose
- BMS-side analysis aggregation (xxySR/KPS, etc.).
Symptom: file-not-found logs when switching charts (often hashed path segments).
Cause: stale file mapping/index or changed folder layout.
Fix:
- Run
刷新曲库on a BMS song select screen. - Then run
构建 BMS 分析库(settings or Raja song select). - If it still fails, verify the configured root exists and subfolders were not moved/renamed.
Symptom: 刷新曲库 fails with RealmResultsVisitor, NotSupportedException, NotImplementedException, etc.
Cause: old binaries or sync queries out of date after merge/rebase.
Fix:
- Rebuild fully and run the latest binaries.
- Run
刷新曲库again and check import/skip logs. - If it still fails, provide a full stack trace (file + line) for diagnosis.
Symptom: xxySR appears, but official stars are empty or you see Failed to calculate beatmap difficulty.
Cause: beatmap load or difficulty pipeline did not enter the mania-reuse path.
Fix:
- Run
刷新曲库, then构建 BMS 分析库. - Switch several charts and watch for remaining difficulty errors.
- If only some charts fail, check those folders and asset completeness.
Symptom: performance logs show many pending scheduler tasks.
Cause: preview scheduling load or rapid chart switching.
Fix:
- Use a build that includes preview scheduling caps.
- Leave and re-enter BMS song select.
- If it persists, attach performance log snippets for maintainers.
Symptom: no BGM ("main audio") in gameplay and possibly a silent song-select preview; charts show garbled titles, artists or keysound filenames (typically Chinese destroyed while Japanese looks fine). Cause: BMS charts are authored in legacy encodings, and Chinese libraries are mostly GBK(936) or UTF-8. If keysounds are not preloaded, or the detected encoding disagrees with the real file names on disk, sample lookups fail and are skipped silently. Reading GBK bytes as Shift-JIS renders Chinese as half-width katakana that looks like Japanese; mojibake metadata already written to Realm can only be corrected by a rescan. Fix:
- Run
刷新曲库: the first scan after this update re-parses every chart indexed by older parsing logic (a stale parse version forces a re-parse), rewriting imported titles/artists/filenames with the new encoding decision. That pass is slower than the usual incremental scan; later scans are incremental again. - Confirm
AutoPreloadKeysoundsis enabled in设置 -> BMS(with it off, audio still plays but every lookup reads from disk on demand, which can stutter on entering a chart or starting a preview). - If only one chart is silent, check that the files its
#WAVdirectives point at actually exist in the chart folder (including case andWAV//RES/subfolders). - If it still fails, attach the chart filename and the
[BMS]-prefixed runtime log for the maintainer.
Minimal validation after each merge:
-
刷新曲库(sync completes without errors). -
构建 BMS 分析库(analytics pipeline completes). - Switch multiple charts (load OK; official stars and xxySR both visible).