Beat Saber 1.11.1 Update (and other things)#19
Conversation
… for local lyrics
…e` buttons to song settings
|
Ok, I think I'm finally satisfied with it. 🙄 |
|
Thanks for all your work! I took a quick look but there are a lot of changes so I'll need some time to review everything. I'm also unable to test changes since I don't have a VR headset anyway, so I'd be glad if someone else can confirm that the changes work as intended. As for versioning, I originally wanted to use the version scheme |
|
You can test with mouse/keyboard if you still own the game using FPFCToggle and MusicEscape. |
|
I've been testing this, there's a strange issue with the BeatSinger mod menu for the song doesn't close correctly if you switch view. It seems to remain open behind the other menus. Other than that, works perfectly. Thanks for the update! Many thanks |
|
I'll probably do something else with the song testing thing. Too much bug potential with moving the main screen out of view. |
|
On the Index, it turns out the toggle is bound to squeezing the left controller or pressing the A button on the left controller, squeezing the controller is probably what I kept repeatedly triggering accidentally. |
|
Latest link up there should fix the lyric testing UI problems. |
| } | ||
| } | ||
|
|
||
| public static JSONArray ToJsonArray(this IEnumerable<Subtitle> subtitles) |
There was a problem hiding this comment.
I don't like this much, since seeing a ToJsonArray in the wild make it seem as if ToJsonArray is a generic function that works for all IEnumerables (and that looks like it "pollutes" the namespace).
There was a problem hiding this comment.
If it makes a difference, the extension only works (and shows up in Intellisense) for IEnumerable<Subtitle>. My thinking was Subtitle doesn't care how it's being serialized, so I made that method an extension instead of including it in the Subtitle class.
There was a problem hiding this comment.
@Zingabopp Thanks! I have a few requests but I only had the time to review the first three commits.
Edit: I forgot to mention this before but I think you should set the new version to 1.2.0, since I was already using 1.1.0.0. Also, this is a pretty significant change so if you're comfortable with it, please add your name to the "authors" sections in metadata.
@ChipWolf There is already a setting for changing the toggle key, but I forgot to document it. In the mod preferences, you can set ToggleKeyCode = 1, replacing 1 with a value from https://github.com/71/BeatSinger/blob/master/BeatSinger/Helpers/ConInput.cs (the values appear to be available here).
|
|
||
| var sceneSetupData = (GameplayCoreSceneSetupData)SceneSetupDataField.GetValue(sceneSetup); | ||
| var sceneSetupData = Access_SceneSetupData(ref sceneSetup); | ||
| //(GameplayCoreSceneSetupData)SceneSetupDataField.GetValue(sceneSetup); |
There was a problem hiding this comment.
If your new code works, I think you can remove this (same thing below).
|
|
||
| if (inputDevices.Exists(x => x.name.IndexOf("rift", StringComparison.InvariantCultureIgnoreCase) != -1)) | ||
|
|
||
| if (XRDevice.model.IndexOf("rift", StringComparison.InvariantCultureIgnoreCase) != -1) |
There was a problem hiding this comment.
I think XRDevice.model is now deprecated.
| @@ -0,0 +1,65 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
There was a problem hiding this comment.
Where does this file come from? Same question for Directory.Build.props. I suppose it's some shared template?
There was a problem hiding this comment.
Yeah, it's a set of build targets I'm including in the BeatSaberModdingTools templates. It's nicer than using post build events when other people are working on the project because it uses BeatSaberDir for the output and does some other things like verifying the version in manifest.json matches AssemblyVersion and automatically zips releases for BeatMods
| /// <summary> | ||
| /// Container for subtitles. | ||
| /// </summary> | ||
| public sealed class SubtitleContainer : IEnumerable<Subtitle> |
There was a problem hiding this comment.
Looking at its usage, I think we should prefer a completely immutable data structure, so either we only build it when we have all necessary information, or we add a WithSubtitles function which returns a new Container. Overall I like this idea though!
| if (Settings.VerboseLogging) | ||
| Plugin.log?.Debug($"{level.songName} is {(customLevel != null ? "" : "not ")}a custom level."); | ||
| if (customLevel != null && LyricsFetcher.GetLocalLyrics(customLevel.customLevelPath, subtitles)) | ||
| SubtitleContainer container = null; |
There was a problem hiding this comment.
Ideally we'd only have the SubtitleContainer or the subtitles to avoid having to think about both variables in all those possible branches.
The ideal solution IMO is a SubtitleContainer.Builder class that we'd use everywhere instead of List<Subtitle>, but this may be a lot of work for not much.
| } | ||
| return array; | ||
| } | ||
| public static JSONObject ToJson(this SubtitleContainer subtitles) |
There was a problem hiding this comment.
Here and in some other places: please separate methods with an empty line.
(Also in other places but the GitHub code viewer doesn't make it easy to see them: please make sure all indentation is made with spaces instead of tabs, and please make sure all files end with a newline)
|
Hi there guys. I miss this mod, and I was wondering what the holdup was? |
|
I haven't had time to test the changes, especially since I no longer have a VR headset (there are ways to test it, but I haven't gotten around to it). I think the best thing you (probably @Zingabopp if they're interested, since they already fixed what was needed) can do is fork the project. I'll mention the fork on the README if you decide to do that. |
|
In that case I'll wait a bit and see if @Zingabopp gets back to us. I wouldn't want to steal their thunder by grabbing their changes before they have a chance. :) |
|
Any word on this, Singing along it beat saber really is one of my favorite things haha |
|
Given that @Zingabopp hasn't replied in over a month, I think you can take it @MaverickMartyn :) @Neo4114, I took a very quick look and the mod that @Zingabopp linked in the first comment doesn't seem to do anything sketchy. I don't know if it works, but you can try it out. |
|
@71 Thanks so much for the reply!, to be fair i am running this on the newest version of Beat saber aswell |
|
Did you drop the .zip file or the .dll inside of it? Make sure it's the .dll. And yeah if the Beat Saber version has changed since then, it might no longer be compatible :( |
|
Sadly yes, :( i just followed standard procedure when dealing with mods , |
|
Alright, good luck! Start by changing |
|
Yep, looks like the API slightly changed... To find the new equivalent entities I'd recommend using dnSpy and looking into the assemblies of Beat Saber. That's how I did it:
Not sure about Input either. I don't remember, but maybe it's a deprecated Unity API? |


Converted to BSIPA and updated for Beat Saber 1.11.1.
Includes fixes and settings from this fork.
Improvements:
timeOffsetandtimeScalelyrics.jsoncan be either a JSON array as before, or a JSON object containing the array andtimeOffsetandtimeScalesettings.Let me know if you want me to do a version bump.
Closes #17
BeatSinger-1.2.0-bs1.11.1-001c3b2.zip