nicoco007 / BeatSaberCustomAvatars

Beat Saber mod that allows the use of custom player avatars for in-game body presence.
GNU Lesser General Public License v3.0
262 stars 41 forks source link

Custom avatar not working #146

Closed CybrusWolf closed 1 year ago

CybrusWolf commented 1 year ago

Before doing anything else, please attach your latest log to this issue. It should be located at Logs\_latest.log in your Beat Saber installation's folder. (done, not sure if it appeared or not) _latest.log

Desktop (please complete the following information):

Describe the bug The custom avatars will not appear in the game, the option to select them are there, but upon selecting them, they don't show up (https://github.com/nicoco007/BeatSaberCustomAvatars/files/10691629/_latest.log)

Steps to reproduce Steps to reproduce the behavior: (https://github.com/nicoco007/BeatSaberCustomAvatars/files/10691597/_latest.log)

  1. Click avatars in mod menu
  2. select any avatar (templates or custom)
  3. no avatar appears in mirror
  4. reinstall DynamicOpenVR and manually add it to game folder
  5. select an avatar again
  6. an error message appears "Failed to load selected avatar. object reference not set to an instance of an object"

Note - reinstalling any mod resets DynamicOpenVR, and the avatars fail to appear without an error message again

Expected behavior The avatar of choice should appear in the mirror, on camera, or in first person

Screenshots If applicable, add screenshots to help explain your problem. Capture the custom avatar was removed, thinking that may have caused a problem

nicoco007 commented 1 year ago

Looks like this is caused by a bug in DynamicOpenVR that's been there for quite some time... sorry about that! I'll get a fix out ASAP.

CybrusWolf commented 1 year ago

Thanks for getting back to me, just please let me know when it’s fixed. One question though, will the fixed version be installed through ModAssistant or will I have to download and install DynamicOpenVR separately again?

nicoco007 commented 1 year ago

I did some digging and it looks like you've got a really old version of DynamicOpenVR installed. The error that's popping up in the log you attached hasn't existed for over 2 years - it was removed by https://github.com/nicoco007/DynamicOpenVR/commit/38ec04205fc4f47641746f191ca81cf18b962436. Your log file also reports version 0.4.0 being installed but the file that ends up being loaded has the version 0.1.0.

Can you try deleting these files from C:\Program Files\Oculus\Software\Software\hyperbolic-magnetism-beat-saber:

and re-installing DynamicOpenVR from ModAssistant?

CybrusWolf commented 1 year ago

It seems as though a version of DynamicOpenVR was installed through modassistant when installing the custom avatar mod, after removing the files you listed, the avatar option in the mod menu disappeared, reinstalling the latest version of DynamicOpenVR did not correct this problem either.

nicoco007 commented 1 year ago

Are both mods showing up as installed in ModAssistant? Is DynamicOpenVR showing v0.4.0 and Custom Avatars v5.2.11? If you have a file called DynamicOpenVR.BeatSaber.dll in your Plugins folder, could you delete it and try again? You shouldn't need that last one since it only works with SteamVR.

CybrusWolf commented 1 year ago

In modAssistant, Custom Avatars is showing v5.2.11 and DynamicOpenVr is showing v0.4.0. There is not a file called DynamicOpenVR.BeatSaber.dll in my plugins folder, there is one called DynamicOpenVR.manifest, but that's it. In the Libs folder, there is a DynamicOpenVR.dll file, but that appears to be the file enabling the avatar option in Beat Saber. These two files and the folder for DynamicOpenVr are the only instances of DynamicOpenVr in my Beat Saber folder

I just went to test something, it seems as though other mods are working as intended, are there any custom avatar specific files that are known to cause problems or that may be missing in my version for some reason (Tested NoodleExtension, Claws, and Chroma)

nicoco007 commented 1 year ago

In modAssistant, Custom Avatars is showing v5.2.11 and DynamicOpenVr is showing v0.4.0.

Sorry, just to clarify – are they both showing those versions in green text? If they are, that should mean you have all the required files... As to having extra files that might be messing with it, I've never heard of such a problem.

Could you confirm you're running the latest version of ModAssistant (1.1.30 as of writing) and you have game version 1.27.0 selected in the bottom left corner? Also, in the Options tab, is your install folder C:\Program Files\Oculus\Software\Software\hyperbolic-magnetism-beat-saber ?

I'm honestly not sure what's going on here - it looks like ModAssistant is installing the wrong version for some reason based on these lines in the log file you provided (note the Version=0.1.0.0):

[DEBUG @ 17:17:58 | IPA/LibraryLoader] Resolving library DynamicOpenVR, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null
[DEBUG @ 17:17:58 | IPA/LibraryLoader] Looking for file DynamicOpenVR.dll
[DEBUG @ 17:17:58 | IPA/LibraryLoader] Found file DynamicOpenVR.dll as C:\Program Files\Oculus\Software\Software\hyperbolic-magnetism-beat-saber\Libs\DynamicOpenVR.dll

If DynamicOpenVR shows up green in ModAssistant, it should be Version=0.4.0.0 since I believe ModAssistant checks all the existing files when checking if a mod is successfully installed.

CybrusWolf commented 1 year ago

Capture DynamicOpenVR is selected the latest log file shows: [DEBUG @ 22:31:54 | IPA/LibraryLoader] Resolving library DynamicOpenVR, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null [DEBUG @ 22:31:54 | IPA/LibraryLoader] Looking for file DynamicOpenVR.dll [DEBUG @ 22:31:54 | IPA/LibraryLoader] Found file DynamicOpenVR.dll as C:\Program Files\Oculus\Software\Software\hyperbolic- _latest.log (It's much longer, I've been playing a bit) magnetism-beat-saber\Libs\DynamicOpenVR.dll Game version is 1.27.0_3631146541 ModAssistant version is 1.1.30 File path is set as C:\Program Files\Oculus\Software\Software\hyperbolic-magnetism-beat-saber all the mod folders have appeared here, including CustomAvatars Other mods have seemed to work, even Camera2 In the avatar menu, no error shows up, but no avatar appears, not even the templates

nicoco007 commented 1 year ago

Oh okay, that's progress! I think the last problem is this:

[INFO @ 22:38:08 | Custom Avatars] [PlayerAvatarManager] Player height set to 0.1479334 m
[INFO @ 22:38:08 | Custom Avatars] [SpawnedAvatar(Template)] Avatar resized with scale: 0.02819612

Could you turn off "Automatic Player Height" in Player Settings and make sure "Player Height" is a number that makes sense?

CybrusWolf commented 1 year ago

The avatar is showing up, and is now visible, the templates are working as intended, but the custom avatar isn't tracking movements, I assume this is a problem with the avatar in untiy though

nicoco007 commented 1 year ago

Is the avatar that's not working yours or did you find it somewhere? If you're willing to share the .avatar file or the link to the download, I'd be happy to help figure out what's going on.

CybrusWolf commented 1 year ago

it was a purchased avatar base that has been reskinned, unfortunately I don't know how to share the file, as when I try to add either the unity file or the .avatar file, it says that github doesn't support the file type

nicoco007 commented 1 year ago

You can send it to me privately over Discord – my username is nicoco007#2939.

CybrusWolf commented 1 year ago

I just sent the friend request on Discord so private messages would work, it should be from CybrusWolfDragon#5865