bs-manager icon indicating copy to clipboard operation
bs-manager copied to clipboard

[FEAT.] : Making Beat Saber settings per game

Open Mickalebc opened this issue 1 year ago • 11 comments

I have an issue when switching between the newer versions of the game and the older versions where different controller settings need to be used, and I need to redo them every time I switch versions.

I want to be able to have the settings files for Beat Saber for controller offsets to not be synced between the games and for the setting to be switched out before the game opens.

Just like you link the folders in order to sync them between all games like a songs folder for example. You could have a folder for the game settings for each version and then the settings get linked from the actual game's settings file location to the folder eliminating the issue with the offsets being different for 1.30 and 1.29.1 and having to redo them. ;)

Otherwise, when I play, I have to switch out the files between game versions which using the version switcher in BSManager, thanks.

Mickalebc avatar Jun 07 '23 16:06 Mickalebc

Hi, Can't you just unlink the "UserData" folder of BS versions 1.30 and 1.29.1?

Zagrios avatar Jun 07 '23 17:06 Zagrios

Hi, Can't you just unlink the "UserData" folder of BS versions 1.30 and 1.29.1?

No, the settings are not stored there, it is stored at C:\Users\micka\AppData\LocalLow\Hyperbolic Magnetism\Beat Saber

Mickalebc avatar Jun 08 '23 19:06 Mickalebc

Seems like this could be accomplished by copying the files from a local folder there when "Launch" is clicked, and then when the game closes, copying the data back down to the local folder. It would be kind of a "hacky" solution But unless there was a way to sandbox it to a local folder, it seems to be the only logical way.

AltyFox avatar Jun 18 '23 09:06 AltyFox

Doing some toying around, in CMD you can change an environment variable for a local session with "set"

But since BeatSaber uses "LocalLow" that is entirely dependent on how they coded the game to use appdata LOCALAPPDATA = Local, so you could access it by %LOCALAPPDATA%Low but if BeatSaber uses a %appdata%\..\LocalLow that would change how this needs to be done, though it is entirely possible

AltyFox avatar Jun 18 '23 09:06 AltyFox

Thanks to Lulu in BSMG, it seems to resolve to this path %userprofile%\AppData\LocalLow\<companyname>\<productname> If one were to set the %userprofile% environment variable in the context of BeatSaber on launch, it would effectively sandbox it.

AltyFox avatar Jun 18 '23 09:06 AltyFox

After some experimentation, it seems something else is defining the path other than env variables. I overwrote my env variables for every path I could think of and it's still going to the real AppData\LocalLow folder.

AltyFox avatar Jun 18 '23 23:06 AltyFox

I know that you are peoperly going at this to solve the issue, but there is a solution that could be done with just having an extra folder in the instances folder that it hard linked every time the version is launched.

Mickalebc avatar Jun 18 '23 23:06 Mickalebc

Hard linking seems like a bad idea, as that could cause complications by changing symlinks over and over again. It feels like the better solution would to just copy the data into it and keeping the data local to the game install, with the "master" steam version being in its own folder.

AltyFox avatar Jun 18 '23 23:06 AltyFox

I've done more toying with this, and nothing I can come up with is working. I think the only options would be to rename the original to _bak, and every launch copy in the saved files, and copy them back out once the game is closed, but this would require BSManager to stay open, which could cause conflict. The second would be to mklink for each launch, which would be cleaner. I just don't know how well the NTFS filesystem will handle that over time.

AltyFox avatar Jul 05 '23 05:07 AltyFox

I've done more toying with this, and nothing I can come up with is working. I think the only options would be to rename the original to _bak, and every launch copy in the saved files, and copy them back out once the game is closed, but this would require BSManager to stay open, which could cause conflict. The second would be to mklink for each launch, which would be cleaner. I just don't know how well the NTFS filesystem will handle that over time.

Or it just just copy and replace the file simply before it launches the game and it only does that when you hit launch, it goes: copy ans replace settings, open game.

Mickalebc avatar Jul 05 '23 06:07 Mickalebc

Yeah but if BSManager doesn't copy the files back down. Then the settings would be lost on the next launch, which could cause data loss if BSManager were closed before the game for some reason. I'm thinking a Junction is the best method here, honestly.

AltyFox avatar Jul 05 '23 14:07 AltyFox