Hiviexd / MVTaikoChecks

A set of osu!taiko Mapset Verifier checks
3 stars 2 forks source link

Add checks for conflicting Kiai or volumes #3

Closed hongaaronc closed 1 year ago

hongaaronc commented 1 year ago

Summary

Often when a red line is used in a map, a green line should be placed concurrently to preserve SV. Sometimes this concurrent green line can have conflicting Kiai enablement or hitsound volumes.

The green line takes priority in this case, so this isn't technically unrankable or causing an issue. However it's fragile and can easily break when changes are applied to a map, due to stuff like addressing rounding errors or blunders when offsetting green lines.

Also, even in the case when it's not breaking anything - conflicting Kiais/volumes may still be indicative of the unintended Kiai/volume being applied, so I think it makes sense to warn the mapper in all of these cases.

These checks also technically happen for red/red concurrent lines, and green/green concurrent lines. Base MV already has checks to catch these and warn them as unrankable, but I don't see this hurting either so I left the warnings that these checks produce in as well.

Approach

Implemented the Kiai/Volume checks as two separate ones, but they're almost identical logically.

General logic is as follows:

  1. Iterate through all pairs of "adjacent-by-index" timing lines (both red and green)
  2. Determine if the "adjacent-by-index" lines are actually concurrent
  3. If concurrent, check if kiais/volumes don't match
  4. If they don't match, add it to a hashset to de-dupe (in case there's 3 or more concurrent lines)
  5. Emit issues for each element in the hashset

Known issues

Testing

Tested by inting some maps and checking if it works. Tested with red/green, green/green, red/red. Also tested with 3 or more concurrent lines. All of these cases work fine.

hongaaronc commented 1 year ago

Im dumb MV already has this as a minor check