by Kinsie » Thu Sep 06, 2018 1:26 am
This came up on the ZDF Discord earlier today, and I figure I should probably make some noise about it here.
If you're adding custom key bindings to your mod, then
please, for the love of all that is unholy, use the "addkeysection" keyword in KEYCONF! I've seen a number of mods like QC:DE and Trailblazer that don't do this, because they implement their keybinds in their own MENUDEF menus instead of KEYCONF. This means that the keybindings will pollute the default [Doom.Bindings] section of the INI, meaning they'll be defined
globally, meaning ugly error messages when someone presses that key while playing another mod, keys getting rebound and general inconvenience all around.
(The bottom of my [Doom.Bindings] section, with a bunch of keybinds relating to various mods both recent and long-forgotten.)
(The results of trying to press those keys without those mods loaded. Ugly!)
(A common cause: Keybinds in custom menus, instead of in the Customize Controls section)
When using the addkeysection keyword, however, the binds will be seperated into a mod-specific section of the INI. This means, most importantly of all, that users can use the same key for different purposes in different mods without having to rebind the key everytime they change mods, or without causing error messages in other mods.
(How addkeysection-effected binds are stored seperately. The "f" key bind here overrides the one in the global bindings, as a bonus.)
It takes two seconds and shows a little extra consideration for your player. There's no reason
not to do it.
This came up on the ZDF Discord earlier today, and I figure I should probably make some noise about it here.
If you're adding custom key bindings to your mod, then [b]please, for the love of all that is unholy, use the "[url=https://zdoom.org/wiki/Adding_keysections]addkeysection[/url]" keyword in KEYCONF![/b] I've seen a number of mods like QC:DE and Trailblazer that don't do this, because they implement their keybinds in their own MENUDEF menus instead of KEYCONF. This means that the keybindings will pollute the default [Doom.Bindings] section of the INI, meaning they'll be defined [i]globally[/i], meaning ugly error messages when someone presses that key while playing another mod, keys getting rebound and general inconvenience all around.
[img]https://i.imgur.com/2LxoKi0.jpg[/img]
[i](The bottom of my [Doom.Bindings] section, with a bunch of keybinds relating to various mods both recent and long-forgotten.)[/i]
[img]https://i.imgur.com/M5q3qHs.jpg[/img]
[i](The results of trying to press those keys without those mods loaded. Ugly!)[/i]
[img]https://i.imgur.com/MOpzNmO.jpg[/img]
[i](A common cause: Keybinds in custom menus, instead of in the Customize Controls section)[/i]
When using the addkeysection keyword, however, the binds will be seperated into a mod-specific section of the INI. This means, most importantly of all, that users can use the same key for different purposes in different mods without having to rebind the key everytime they change mods, or without causing error messages in other mods.
[img]https://i.imgur.com/2KfXpVu.jpg[/img]
[i](How addkeysection-effected binds are stored seperately. The "f" key bind here overrides the one in the global bindings, as a bonus.)[/i]
It takes two seconds and shows a little extra consideration for your player. There's no reason [i]not[/i] to do it.