Open theace0296 opened 4 years ago
Do you think this could be causing the all red blocks issue? If the note type is read incorrectly by Beat Saber, then maybe it just defaults to a red block?
Checking the json in the info.dat of the song that caused all red in a song editor program, the block type for all blocks seem to be either 0 or 1 so BeatSaber seem to read it as such, producing blue and red, and the generation seem to be correct. So it must be something else that the editors read to represent the blocks but I'm not sure what it might be...
Hi @ozzieem
Would you mind attaching the info.dat and {difficulty}.dat files that you encountered that produced all red blocks?
1st Powerwalkin' by Future Joust - [Electro Music] - undefined.zip
Hi, Sure. Basically all the songs that I've generated have had this issue in the editors, but this is the one I tested on BeatSaber and noticed that it showed the blocks correctly.
That might be why the editor messes it up but not Beat Saber. Beat Saber probably has some contingency that if the value is a string and not an int (like it should be), it converts it to an int. Whereas the editors are probably going off of the schema and thus read "0" and "1" (strings) as null or 0.
Yes, exactly like @theace0296 says, changing _type
to int fixes it, at least in Mediocre Map Assistant.
That might be why the editor messes it up but not Beat Saber. Beat Saber probably has some contingency that if the value is a string and not an int (like it should be), it converts it to an int. Whereas the editors are probably going off of the schema and thus read "0" and "1" (strings) as null or 0.
Hi, I just wanted to let you know that I modified the .dat file for the song I linked to change the value of _type from "0" to 0 and "1" to 1 respectively. And I'm happy to confirm as well that you are right. Now when I open the same song that previously only showed all red cubes in MMA, it instead shows all cubes as the correct color. Thank you!
So I suppose if this has been corrected in master, this issue as well as #43 can be closed.
https://github.com/duckfromdiscord/BeatMapSynthesizer-x/commit/33416630e002c1a35abb1358a399d9d28821aa59 Do this in master and the issue should be fixed.
On Line 85 the songAuthorName should have some value. See Info.dat schema for more info.
Also, on Line 308, Line 498, and Line 714, there it should read
int(num)
rather than justnum
, because when writing the difficulty.dat file it will sometimes put quotes around the note type. This goes against the schema as well, see difficulty.dat schema for more info.You can use https://jsonschemalint.com/ to test some maps, but I've found that sometimes a map won't be playable inside of Beat Saber because of this.