ValheimPlus icon indicating copy to clipboard operation
ValheimPlus copied to clipboard

[BUG] custom hotkeys get reset to deafults when connecting to a server

Open dudeofawesome opened this issue 3 years ago • 5 comments

  • OS: Windows Client & Linux Server
  • Valheim Game Version: 0.206.5
  • V+ Mod Version: 0.9.9.7

Describe the bug

Custom keybinds like 1st person toggle and rolling work fine in single player, but when connecting to a multiplayer server, they seem reset to defaults. If I choose to sync the server's keybinds, then they work according to the server's settings, but I can't find a way to get my client's keybinds to be used.

To Reproduce

Steps for the devs to reproduce the behavior:

  1. Set custom V+ client keybinds
  2. Set serverSyncsConfig = true on client and server
  3. Set serverSyncHotkeys = false on client and server
  4. Play singleplayer, custom hotkeys work
  5. Play multiplayer, hotkeys reset to default

Expected behavior

Being able to set custom hotkeys per client in multiplayer

Troubleshooting

See the description above.

Additional context

  • Installed mods: BepinEx, ValheimPlus, ReviveAllies

  • Unsure if this is relevant, but my server's config file has spaces around all =, eg: rollForwards = T. It looks like there at least used to be a bug related to this; maybe there's been a regression?

  • I've noticed in the client logs, there's messages about not invalid settings when loading the synced settings

    [Info   : Unity Log] 02/12/2022 21:09:57: VERSION check their:[email protected]  mine:[email protected]
    
    [Info   : Unity Log] Version generator started.
    [Info   : Unity Log] Version generated with enforced mod : [email protected]
    [Info   : Unity Log] 02/12/2022 21:09:59: -------------------- SENDING VPLUGCONFIGSYNC REQUEST
    
    [Info   : Unity Log] 02/12/2022 21:09:59: client got keys 4
    
    [Info   : Unity Log] 02/12/2022 21:09:59: client got location icons
    
    [Info   : Unity Log] 02/12/2022 21:09:59: Icons:2
    
    [Info   : Unity Log] 02/12/2022 21:09:59: Session auth respons callback
    
    [Info   : Unity Log] 02/12/2022 21:10:06: Unpacking compressed mapdata 15479
    
    [Info   : Unity Log] 02/12/2022 21:10:07: Starting respawn
    
    [Info   : Unity Log] Loading config section AdvancedBuildingMode
    [Info   : Unity Log]  Section not enabled
    [Info   : Unity Log] Loading config section AdvancedEditingMode
    [Info   : Unity Log]  Section not enabled
    
    …
    
    [Info   : Unity Log] Loading config section Hotkeys
    [Info   : Unity Log]  Loading key rollForwards
    [Warning: Unity Log]  Could not load data of type UnityEngine.KeyCode for key rollForwards
    [Info   : Unity Log]  Loading key rollBackwards
    [Warning: Unity Log]  Could not load data of type UnityEngine.KeyCode for key rollBackwards
    [Info   : Unity Log] Loading config section Kiln
    [Info   : Unity Log]  Section not enabled
    
    …
    

dudeofawesome avatar Feb 13 '22 05:02 dudeofawesome

Isn't the server overriding the local settings the documented behavior? In that case this would rather be a feature request than a bug.

I also have trouble with the AdvancedEditingMode keybindings though :)

cougarten avatar Feb 22 '22 17:02 cougarten

I'm seeing a possibly related issue: any keybind I change from default on the server seems to fail to get loaded properly on the client even when hotkey syncing is on.

Example: I changed the key for entering advanced build mode from F1 to F6, however when connecting to the server:

[Info   : Unity Log] Loading config section AdvancedBuildingMode
[Info   : Unity Log]  Loading key enterAdvancedBuildingMode
[Warning: Unity Log]  Could not load data of type UnityEngine.KeyCode for key enterAdvancedBuildingMode

May file a separate issue, but not yet sure the issue isn't on my end.

crsmithdev avatar Feb 22 '22 18:02 crsmithdev

My understanding is that serverSyncHotkeys = false would allow each client to set their own custom hotkeys for each enabled section. Am I misunderstanding this option?

dudeofawesome avatar Feb 23 '22 23:02 dudeofawesome

I'm experiencing the same issue with serverSyncHotkeys = false not working. I have the setting set to false on both my server and my local config, but am seeing the same behavior as @dudeofawesome .

ryderstorm avatar Apr 19 '22 16:04 ryderstorm

The issue still seems to reproduce. While "serverSyncHotkeys = true", on both server and client, the server's hotkeys are enforced in multi-player; after setting "serverSyncHotkeys = false" on both client and server, the server's hotkeys are still enforced.

Tested with hotkeys: ; Roll forwards on hot key pressed. rollForwards = Mouse4 ; Roll backwards on hot key pressed. rollBackwards = Mouse3

carolluparu avatar Jan 02 '23 05:01 carolluparu