Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AiMod support for modding #12091

Open
DeviousPanda opened this issue Mar 20, 2021 · 7 comments
Open

AiMod support for modding #12091

DeviousPanda opened this issue Mar 20, 2021 · 7 comments
Assignees
Labels
area:editor priority:2 Moderately important. Relied on by some users or impeding the usability of the game

Comments

@DeviousPanda
Copy link

DeviousPanda commented Mar 20, 2021

Right now lazer has no internal way to check for errors that can be undetectable or almost impossible to find within a beatmap

while a good solution would be to add AiMod into lazer, the actual release of lazer gives a great opportunity to upgrading the old AiMod to be up to date with the current modding standards

it's probably worth having a discussion on what (if any) modding support you want to add to lazer (and im also sure that alot of the bng/nat groups would like to give input on different features a modding assistant could have) but i see huge potential with a up to date AiMod within the game, which could also act like an auto ranking criteria checker

(split from #12020)

@bdach
Copy link
Collaborator

bdach commented Mar 20, 2021

I think that there is an interesting avenue to explore here, in integrating https://github.com/Naxesss/MapsetVerifier with lazer directly. The good news is that its processing components are C# already, but the bad news is that it's coupled to a custom beatmap parser. And well, we probably ought to ask for permission first.

@mcendu
Copy link
Contributor

mcendu commented Mar 20, 2021 via email

@Naxesss
Copy link
Contributor

Naxesss commented Mar 20, 2021

I'd be interested in helping out with integrating Mapset Verifier into lazer.

Design-wise the main interest is probably the Check class and its subclasses BeatmapCheck, BeatmapsetCheck, and GeneralCheck.

Check Argument Notes Usage
BeatmapCheck Beatmap Run for each Beatmap. Checks isolated to a single beatmap (e.g. unsnapped objects).
BeatmapsetCheck Beatmapset Run for each Beatmap. Checks on each beatmap + requiring context of the set (e.g. checking for inconsistencies with other beatmaps in the set).
GeneralCheck Beatmapset Run once per Beatmapset. Checks on the set as a whole (e.g. checking the files in the song folder).

This way, BeatmapChecks can be run concurrently on each Beatmap, where each Beatmap in a Beatmapset can be processed as such concurrently as well, along-side BeatmapsetChecks and GeneralChecks. All checks return IEnumerable<Issue>, where the templates of the Issues are decided by the respective Check.

For a simple example, the CheckPreview class (extending BeatmapsetCheck) has two types of issues it can give:

IssueTemplate IssueType Description Arguments
Not set Problem Preview time is not set. N/A
Inconsistent Problem Preview time is inconsistent, see {difficulty}. difficulty

Here's how it's displayed in the application if both issues are present:

image

I figure we could do something similar for lazer. Possibly as a tab like compose, timing, etc.

image

Allowing users to create custom checks would be really useful considering that the RC changes quite often, so this is something we may want to consider designing around.

@peppy
Copy link
Sponsor Member

peppy commented Mar 21, 2021

A good starting point may be to add a new tab in the editor alongside the existing ones, and show issues in a similar tabulated format to how timing is done. Improving the design and UX could come as a secondary pass.

I'd probably push back against custom rules, as I'd hope the ones in the game would be kept up-to-date and flexible enough to a point this would not be required.

Note that currently we only load the active difficulty. You could quite easily parse the others, but I'd start with just focusing on the current one to begin with for simplicity.

@peppy
Copy link
Sponsor Member

peppy commented Mar 24, 2021

As an aside, the osu-stable code base for AiMod is relatively portable, and written with extensibility in mind. If someone is looking to take this task on and would like that code as a reference, let me know and I'll extract it out.

@peppy peppy added the priority:2 Moderately important. Relied on by some users or impeding the usability of the game label Apr 21, 2021
@peppy
Copy link
Sponsor Member

peppy commented Apr 21, 2021

The majority of this has now been implemented, but will keep this issue open to track completion of all required checks to bring this up to parity.

@Naxesss
Copy link
Contributor

Naxesss commented Jul 13, 2021

Now that we've added a few checks I'm going to list and organize them so it's easier figure out what to work on next, as well as to highlight what is currently blocked and what I'm uncertain of. I'll be updating this as I go.

Here are all checks from Mapset Verifier and their respective status in lazer. These are sorted by priority (0 = very common and/or severe) and then by difficulty of implementation. This includes most if not all relevant checks from AiMod.

Status

✔️ Done
🟡 Done, but not merged
❌ Not looked at yet
✖️ Unnecessary
🛑 Blocked

All Rulesets

Check Status Difficulty Priority
Missing background. ✔️ #12361 0
Multiple or missing audio files. ✔️ #12492 🛑 Can't check multiple¹. 0
Inconsistent or unset preview time. 🛑 Can't check inconsistent¹. 🟡 ² 0
Inconsistent metadata. 🛑 ¹ 🟡 ² 0
Inconsistent uninherited lines, meter signatures or BPM. 🛑 ¹ 0
Too high or low audio bitrate. ✔️ #12492 ★★ 0
Unsnapped hitobjects. ✔️ #12588 ★★ 0
Concurrent hitobjects. ✔️ #12588 ★★ 0
Inconsistent mapset id, countdown, epilepsy warning, etc. 🛑 ¹ 🟡 ² ★★ 0
Low volume hitsounding. ✔️ #13669 1
Too short hitsounds. ✔️ #13871 1
0-byte files. ✔️ #13871 1
Inconsistent video usage. 🛑 ¹ 1
Objects too close together. ❌ (< 10 ms) 1
Too high or low background resolution. ✔️ #12492 ★★ 1
Lowest difficulty too difficult for the given drain/play time(s). 🛑 ¹ ★★ 1
Audio channels in video. ✔️ #13871 ★★ 1
Delayed hitsounds. ★★★ 1
Wrongly or inconsistently snapped hitobjects. 🛑 ¹ ★★★ 1
Too high video resolution. 2
Missing genre/language in tags. 🟡 Not PRed yet 2
Unicode in romanized fields. 🟡 Not PRed, will batch together with other metadata checks. 2
Abnormal difficulty settings. 2
Too short drain time. 2
Zero-length objects. ✔️ #13874 2
Too high sprite resolution. ★★ 2
Incorrect marker format. ★★ 2
Incorrect marker spacing. ★★ 2
Incorrect format of (TV Size) / (Game Ver.) / (Short Ver.) / (Sped Up Ver.) in title. ★★ 2
More than 20% unused audio at the end. ★★ 2
Incorrect hitsound format. ★★ 2
Slider tick rates not aligning with any common beat snap divisor. ★★ 2
Unused timing lines. ❌ Possibly unnecessary. Made to prevent shifts in timing due to uninherited lines rounding their time to an integer, even when the cursor is at a decimal time (e.g. snapped to prior timing). May work differently in lazer. ★★ 2
Overlay layer usage. 3
Inconsistent video offset. 🛑 ¹ 3
Unsnapped kiai. 3
Abnormal amount of slider nodes. 3
First line toggles kiai or is inherited. ❌ Possibly unnecessary. Nothing to inherit, causing undefined behaviour. Kiai causes the entire intro prior to the line to act as if in kiai. May work differently in lazer. 3
Incorrect audio format. ★★ 3
Imbalanced hitsounds. ★★ 3
Breaks only achievable through .osu editing. ❌ Possibly unnecessary. Can throw off break timing in a way where gameplay happens while the break visuals are still going. Not visible in the editor, making it easy to miss. May work differently in lazer. ★★ 3
Frequent finish hitsounds. ★★★ 3
Concurrent or conflicting timing lines. ✖️No longer be possible with the new control point system. It is possible to add another point 0.000001 ms earlier/later, but doesn't seem worth implementing a check for. - -
Unused files. ✖️ Unused files are automatically removed. - -
Issues with updating or downloading. ✖️ Made to prevent bugs specifically in stable and its interaction with BSS. Could feasibly be made into upload restrictions in lazer if anything is still an issue. - -

osu!-specific

Check Status Difficulty Priority
Long periods without hitsounding. ✔️ #13669 + checks other rulesets as well (TODO: probably need to exclude taiko, though). ★★ 0
Offscreen hitobjects. ✔️ #12361 ★★ 0
Hitobject is unaffected by a line very close to it. ★★ 0
Object too close or far away from previous. ✔️ #13606 ★★★ 0
Multiple reverses on too short sliders. 1
Too short sliders. ✔️ #13874 1
Too short spinner. ✔️ #13874 1
Objects close in time not overlapping. ✔️ #13606 + checks when it should overlap too. ★★ 1
Too short spinner time or spinner recovery time. ★★ 1
Perfect stacks too close in time. 2
Too dark or bright combo colours or slider borders. ★★ 2
Perfectly overlapping combination of tail, head or red anchors. ★★ 2
Obscured reverse arrows. ★★ 2
Burai slider. ★★★ 2
Default combo colours without forced skin. 3
Storyboarded hitsounds. ★★ 3

¹ - Editor lacks context of other difficulties, so any check that compares difficulties cannot be implemented.
² - Not PRed. Didn't realize it wouldn't work in-game, but will keep checks & tests around for whenever this gets unblocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editor priority:2 Moderately important. Relied on by some users or impeding the usability of the game
Projects
None yet
Development

No branches or pull requests

6 participants