Closed joeyparrish closed 2 years ago
Hey,
if you click on this:
you will notice it's all in there already, including key binds ;)
If you don't see your mod in there (or no mod settings at all), you probably did not use the default Config member of BaseUnityPlugin to create your config file.
PS: If you did not use the default Config member, you really should do that. It comes with even more perks: https://valheim-modding.github.io/Jotunn/tutorials/config.html
PPS: If you just don't see your key in the mod settings, you probably did not define a ButtonConfig for it and added that to the InputManager: https://valheim-modding.github.io/Jotunn/tutorials/inputs.html
Okay, thanks. That's very helpful.
User Story As a developer, I want to enable users to customize my mod's key bindings using the in-game settings menu so that they do not have to edit config files.
Envisioned Solution I'd like to be able to modify this dialog to include mod-specific key bindings:
Looking at the decompiled source of Valheim, it doesn't look especially easy. :-/
The
Settings
class has a list calledm_keys
, but each item has a hard-coded RectTransform with a button. I would guess that those might need to be moved and/or the dialog expanded to make room for any new settings.Alternate solution: Would it be possible to add another tab to the settings dialog, and put mod-specific configs there?