McKay42 / McOsu

Custom unofficial osu! practice client with Virtual Reality support
GNU General Public License v3.0
426 stars 40 forks source link

[Bug] Cannot load maps created and imported from osu!lazer to osu!stable #375

Closed FlySlime closed 9 months ago

FlySlime commented 9 months ago

Importing maps from osu!lazer to osu!stable works fine on stable, however when trying to load these maps in McOsu we get the error message: Error: Couldn't load beatmap metadata :(

To replicate this:

  1. Create a map in lazer
    1. For example, go into the editor for a map of your choice in lazer and create a new difficulty. In this case you'll get a map called <difficulty name here> (copy)
  2. Export your beatmaps from lazer to stable using https://github.com/kabiiQ/BeatmapExporter
  3. Afterwards, open McOsu and try to load the map we created
FlySlime commented 9 months ago

Running Steam with the terminal and attempting to load a map from lazer, we get the following output:

Osu::onBeforePlayStart()
Osu::updateMods()
Osu::updateWindowsKeyDisable()
Osu::updateConfineCursor()
Osu::updateWindowsKeyDisable()
OsuBeatmapStandard::onBeforeLoad()
Ignoring unknown/invalid beatmap version 128
Osu Error: Couldn't load beatmap metadata /home/flyslime/.local/share/osu-wine/osu!/Songs/905621 GYZE - HONE
STY (Chanci)/GYZE - HONESTY (Chanci) [RIGHTEOUSNESS OF MORALITY (copy)].osu
FlySlime commented 9 months ago

It seems like the problem is that within the .osu file for the song, the first line where it states osu file format cannot have the value of v128. If I change it to e.g. v14 it works fine. So pretty much when exporting from osu!lazer to osu!stable, the .osu files have v128 which is not compatible with McOsu.

The compatible .osu file looks like this:

osu file format v14

[General]
AudioFilename: audio.mp3
AudioLeadIn: 0
PreviewTime: 242846
Countdown: 0
SampleSet: None
StackLeniency: 0.4
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1

<rest of of the .osu file here>

Whereas the imported version looks like this:

osu file format v128

[General]
AudioFilename: audio.mp3
AudioLeadIn: 0
PreviewTime: 242846
Countdown: 0
SampleSet: None
StackLeniency: 0.4
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1

<rest of of the .osu file here>

I think this should be a relatively easy fix then? @McKay42

The code in question: https://github.com/McKay42/McOsu/blob/8edcffdaf9deaa42a3e4b7ccbb9d49a457e083a7/src/App/Osu/OsuDatabaseBeatmap.cpp#L55C5-L55C5

As a temporary fix I increased the limit to 128 for now.

McKay42 commented 9 months ago

This was already discussed on Discord, osu_beatmap_version will be bumped to 128 and any bugs that may pop up will be fixed. Maybe I'll push the change on the weekend idk.

McKay42 commented 9 months ago

For now you can add osu_beatmap_version 128 to your /<Steam>/steamapps/common/McOsu/cfg/osu.cfg.

FlySlime commented 9 months ago

For now you can add osu_beatmap_version 128 to your /<Steam>/steamapps/common/McOsu/cfg/osu.cfg.

Oh wow, that's way easier than compiling everything lol. Thanks :D!

McKay42 commented 9 months ago

For now you can add osu_beatmap_version 128 to your /<Steam>/steamapps/common/McOsu/cfg/osu.cfg.

Oh wow, that's way easier than compiling everything lol. Thanks :D!

Make sure you check out the in-game console (SHIFT + F1). Could also be entered there, but it would not save, so adding it to your cfg file makes it permanent.