Usable Key Binding System
driest
Germany Join Date: 2013-02-21 Member: 183251Members, NS2 Playtester, Reinforced - Shadow, WC 2013 - Supporter
Hello all,
I'm sure this issue has been brought to your attention a few times already but since there have been no improvements in this direction in the last year and the implementation itself is extremely simple , I would like to suggest you improve the key binding system. Basically there already is ConsoleBindings.json and you can rebind some keys, but only very few and to a very limited range of actions (like join a team etc.).
What is really necessary is to be able to rebind ALL keys to ALL actions, and since the aliens play so very different from the marines there should be a possibility to bind the same key to different actions depending on what team your on.
Due to lack of official support this has already partially been addressed by mod authors, but due to consistency checking this only works on very few servers and you have to use the old system on all others.
I really can't understand why a game as customizable as NS2 still has a control setup worse than every other game I know. I mean, being unable to bind an alternate key for an action? Even half life 1 could do this, and were talking 1998! I have searched the forums and found a few threads suggesting similar things (like the ability to change the MouseWheel direction. Guys, I can't tell you how many times I killed myself with Xenocide while trying to parasite someone in the heat of battle). But not even once I did find an actual statement from a developer why they are ignoring this for years now, even if it's repeatedly being pointed out as a very simple to fix but annoying flaw in their game. I spend a frustrating 2 hours yesterday trying to somehow hack options.xml or ConsoleBindings.json to make the mousewheel only switch between weapon1 and weapon2 to prevent further Xenoxice kills but finally resorted to just creating a makro in my mouse driver to switch to parasite, fire it and switch back to bite.
The only argument I can think of that suggests leaving some keybindings not customizable is that people will start writing pistol scripts or binding jump or shoot on their mousewheel to spam commands. However, they can do this as easily with Autohotkey or their mouse driver. This is basically why the pistol script problem was fixed using a cooldown timer between shots, which of course is the right way and can also be applied to other problems (like spamming the mousewheel).
What I think is a stronger argument that suggests to make the keyboard fully customizable is that these bugs can be fixed, but if you don't and use this horrible binding system to prevent people from creating pistol scripts and whatnot in the game, you allow everyone using a custom mouse config or autohotkey to still exploit these issues. Also you push all honest players that just want to rebind some controls that simply don't suit them to resort to similar tools, which may lead to them creating unfair makros like the parasite makro or pistol scripts because now it's so easy and partially fixes their problem.
So could one of the devs please point out why you are not addressing this issue?
I'm sure this issue has been brought to your attention a few times already but since there have been no improvements in this direction in the last year and the implementation itself is extremely simple , I would like to suggest you improve the key binding system. Basically there already is ConsoleBindings.json and you can rebind some keys, but only very few and to a very limited range of actions (like join a team etc.).
What is really necessary is to be able to rebind ALL keys to ALL actions, and since the aliens play so very different from the marines there should be a possibility to bind the same key to different actions depending on what team your on.
Due to lack of official support this has already partially been addressed by mod authors, but due to consistency checking this only works on very few servers and you have to use the old system on all others.
I really can't understand why a game as customizable as NS2 still has a control setup worse than every other game I know. I mean, being unable to bind an alternate key for an action? Even half life 1 could do this, and were talking 1998! I have searched the forums and found a few threads suggesting similar things (like the ability to change the MouseWheel direction. Guys, I can't tell you how many times I killed myself with Xenocide while trying to parasite someone in the heat of battle). But not even once I did find an actual statement from a developer why they are ignoring this for years now, even if it's repeatedly being pointed out as a very simple to fix but annoying flaw in their game. I spend a frustrating 2 hours yesterday trying to somehow hack options.xml or ConsoleBindings.json to make the mousewheel only switch between weapon1 and weapon2 to prevent further Xenoxice kills but finally resorted to just creating a makro in my mouse driver to switch to parasite, fire it and switch back to bite.
The only argument I can think of that suggests leaving some keybindings not customizable is that people will start writing pistol scripts or binding jump or shoot on their mousewheel to spam commands. However, they can do this as easily with Autohotkey or their mouse driver. This is basically why the pistol script problem was fixed using a cooldown timer between shots, which of course is the right way and can also be applied to other problems (like spamming the mousewheel).
What I think is a stronger argument that suggests to make the keyboard fully customizable is that these bugs can be fixed, but if you don't and use this horrible binding system to prevent people from creating pistol scripts and whatnot in the game, you allow everyone using a custom mouse config or autohotkey to still exploit these issues. Also you push all honest players that just want to rebind some controls that simply don't suit them to resort to similar tools, which may lead to them creating unfair makros like the parasite makro or pistol scripts because now it's so easy and partially fixes their problem.
So could one of the devs please point out why you are not addressing this issue?
Comments
Still can't command with V for voice as you end up recycling your base.
Edit: I meant thread, not threat!
Also why you can bind "Taunt" to any key where "Chuckle" can only be accessed through a menu. I want to use Chuckle whenever i get out of tight situations with Skulk to further annoy marines. But i'm not going to use it through menus and get killed because its so slow.
Do what I do and press Q before talking every time.
The ground work for bindable everything should already be in place from a mod that was made (I know it at least allows you to bind chuckle!).
Maybe this can be looked at to be made official.
Your post drives tears in my eyes. I am sure there were complains about the underdeveloped key binding system. I remember especially the commander problems with non US layout keyboards. Guess what @UWE, believe it or not, but you have also non US customers! And one fact is that this problem isn't solved up to this day. It is still a workaround!!! What is holding you back @UWE? Do something or say something about this issue so we all know you, @UWE, knows about this problem and will address it.
It isn't a question whether key binding should be improved but more of a question when. In my opinion it should have been done 1 year ago at the release date. I undestand there are problems you just didn't know would come up e.g. the problem with Reinforcement Program that induced the 32bit problem. I understand it is not easy nowadays to support 32bit systems hence the fact that video games have with higher visual quality a more resource demanding habit. The 32bit problem is by far not a standard problem but by all gods in the world improving the key binding system IS! Start working on this issue NOW, if you already hadn't! I guess I am not the only one who would like to shout out such a demand.
Basically @UWE is my generalized category for the dev staff of Unknown Worlds.
Just to grab the attention: @hugh, @max, @chops, @dushan, @squeal_like_a_pig, @steverock, @acedude and last, oh boy, so not least @flayra (sorry Brian "BadAssRealName" Cronin, didn't find your forum nick). Tell us all at least the status of a key binding system that deserves to be named so. I am sorry that I am so upset about this topic but in a whole year I didn't hear or read the least of a bit that would assure me that @UWE is concerned about this issue.
EDIT: typos due to rage writing.
I seriously wish we had this, that way I'd be able to copy all my config files onto a cloud and whenever I swap computers or reformat, I can just copy/paste all the files to a folder and be done with it.. not place in one file and then have everything else not saved; also an autoexec!
And in the future, I mean it's not the biggest of issues but I think we really need separate binds for the commander, too many of my actions keys overlap with commander keys; I know there's mods for it but they don't work everywhere afaik
edit: I forgot what I was going to type in this edit.. but I'll edit it again if I remember.. lol
Talk to more server owners, get them to add the bindings mod. It technically could be possible to make my mod client side, but it would be near impossible to get it to pass consistency. Due to people not showing barely any interest in it, I didn't bother. Really only Survival of the fattest runs it AFAIK, I would have thought a lot more people would want to use it than that.
You can edit everything that currently exists in Steam/userdata/USERID/4920/remote/options.xml.
Well, thank you for your effort @SamsusDroid, but that is not what I searched for. I want to bind keys per alien class and per marine gear level and of course for the commander. Those keybindings would of course switch automatically depending on the class or gear you are currently have. Also I want to change quickswap priorities so I don't kill my self accidentally with xenocide when I want to use parasite in a rush. Can I have all that without failing a consistency check and being denied by a server?
http://steamcommunity.com/sharedfiles/filedetails/?id=178532446 passes consistency.
Great, now there just needs to be a per class/gear/commander binding system.
Alien:
-NumPadEnter -- Begin Evolving
-NumPad1 -- Select Skulk
-NumPad2 -- Select Gorge
-NumPad3 -- Select Lerk
-NumPad0 -- Select Fade
-NumPadPeriod -- Select Onos
-NumPad9 -- Select Carapace
-NumPad6 -- Select Regeneration
-NumPad8 -- Select Phantom
-NumPad5 -- Select Aura
-NumPad7 -- Select Adrenaline
-NumPad4 -- Select Celerity
Armory:
-1 -- Purchase Mines
-2 -- Purchase Shotgun
-3 -- Purchase Welder
-4 -- Purchase Cluster Grenades
-5 -- Purchase Nerve Gas
-6 -- Purchase Pulse Grenades
-7 -- Purchase Grenade Launcher
-8 -- Purchase Flamethrower
Prototype Lab:
-1 -- Purchase Jetpack
-2 -- Purchase Minigun Exo
-3 -- Purchase Railgun Exo
-1 -- Purchase Dual-Exo Upgrade
So basically you want the options that are there now, but 1 for each team.
YUUUUP!
EDIT: and of course the bindings change automatically dependent on class/gear like I said before.
EDIT2: and not just per team but also per alien class skulk/gorge/lerk/fade/onos and gear marine/jetpacker/exo
No, it would not be to much, it is a necessity. You can always have a standard preset per side. And people like me do a setup per class/gear. It is a question of choice which we don't have right now!
Definetely not. The keybinding system at the moment is a complete and utter mess. There are 2 locations for Bindings, in obscure and undocumented places (don't tell me that and are easy to find). I can't find any documentation on what keys are bindable and some simply don't appear to be (The mouse wheel up and down for example, there is just the mouse axis Z aparently). Both configs being different formats (xml vs. json) doesn't really help the issue, also there is no list of commands anywhere.
The way I understand it now (and I have to guess because it's not documented anywhere) is that there are actions that have bindings that can be configured in options.xml, as well as console commands that can be configured in ConsoleBindings.json. Some actions have console commands (like j1, j2), some do not (like Jump). I could not find an exhaustive list of console commands or actions, does one exist? Also, ConsoleBindings configures actions by keys and options.xml configures keys by actions, which further confuses anyone trying to mess with them.
What is missing and is very important:
What is missing that would be nice to have:
Don't know if this is an exhaustive list but that's what's bothering me most at the moment. And @SamusDroid, your mods are great and all but as you said yourself they need to be run by the server which you can't count on. Having a great control setup when playing on one server and another one on all the others doesn't exactly improve the overall experience .
So imho the keybinding system needs a complete rework, or at least some polish and documentation. And @Max, it's nice that these files are synchronized with steam but I don't see how this affects any of the problems I mentioned. But thanks for joining the discussion, it is appreciated.
Secondly, http://steamcommunity.com/sharedfiles/filedetails/?id=178532446 does not need to be ran by the server.
Now for the explanation.
options.xml. This file contains all the settings for things like the options menu, server browser, mods, etc.., or any setting you want to quickly save and retrieve at any given time. It is sycned with the Steam cloud. You write to this file with Client.SetOptionString("name", value), SetOptionBoolean("name", value), other value types, etc... and retrieve the values with Client.GetOptionString("name", defaultvalue), Client.GetOptionBoolean("name", defaultvalue), etc... You then use "if GetIsBinding(keypressed, "name")" or "if key == InputKey.MouseButton0" in the Functionname:SendKeyEvent(key, down) to detect whether or not the button is pressed.
You can set "categories" or "Sections" to house certain options.
Ex: Client.SetOptionFloat("input/mouse/acceleration-amount", accelerationAmount)
ConsoleBindings.json. This file is where binds are stored. It is not sycned with the Steam cloud. You write to this file when you type "bind <key> <function>" into the console. This assigns a key to a command. This file is different because unlike options.xml, you can only bind keys to functions that can be typed into the console, whereas options.xml has predefined variable set to each "value" and you are just changing the value, which is then input into something else. Console commands are functions defined, which when typed into the console, call a function corresponding to it's Event.Hook. If no Event.Hook exists then it has nothing to point it to the correct function. The way bind works is when you type something in the console it is the equivalent to Shared.ConsoleCommand(""). Which is what bind is doing when a key pressed matches a bind in ConsoleBindings, it does "Shared.ConsoleCommand("name associated to command"). Like in the example below, the "setsoundvolume" points to OnCommandSetSoundVolume. Then that function does things.
Ex:
Event.Hook("Console_setsoundvolume", OnCommandSetSoundVolume)
So if I were to do "bind J setsoundvolume 50" it would create it in Consolebindings,
and then if you were to press J, it gets the function assigned to that key, and inputs that into Shared.ConsoleCommand("setsoundvolume 50")
Not everything in the game has a function though. There is not simply a "OnCommandChuckle() function for example. So you can't just type "bind H Chuckle" and expect it to magically bind Chuckle to H.
Why you say? Because in VoiceOrders.lua it defines if a key should have a KeyBind for it.
In order for you to bind Chuckle, you must change the bottom line to KeyBind = "Chuckle" being the reference to BindingsDialog.lua and InputHandler.lua where you define the key to be used from the available keys***
BindingsDialog:
InputHandler.lua: Which tells that Chuckle is assigned to the H keycode. Because each key is assigned a keycode.
BindingsDialog gets referenced by GuiMainMenu where it creates the options menu and sets the values you bind to in the options, which are then created in options.xml.
The reason my mod needs to be server side is because it needs to send the order to the commander which is the AlertTechId = kTechId.None part of above. These are the notifications on the commands screen when you request an enzyme for example:
Which requires stuff to be added to TechTreeConstants and TechData if you want to make something like the "Acknowledged" order like in my mod if you want the commander to see when you say an order.
You can find all these by using the "Find in files" feature of Decoda, and searching "Event.Hook("Console_". Every one of Event.Hook("Console_commandname", function) has a function that is called when you type the command into the console.
***
No key name provided. Below are the valid key names:
S, Period, F5, F11, F7, U,
W, MouseButton3, RightShift, Clear, F9, Comma,
JoystickButton8, NumPadAdd, MouseButton7, MouseButton0, Up, F14,
Help, JoystickSlider0, Break, NumPad6, D, F15,
MouseButton1, NumPad9, MouseButton2, Left, AppMenu, JoystickZ,
F, NumPad2, Decimal, NumLock, NumPadPeriod, Tab,
J, JoystickButton6, NumPad0, Scroll, RightBracket, NumPad3,
Grave, Backslash, PrintScreen, P, JoystickButton7, F2,
JoystickButton2, NumPad1, MouseZ, JoystickButton4, F4, Back,
R, Right, F6, T, N, Apostrophe,
JoystickButton3, JoystickPovW, Minus, JoystickSlider1, X, MouseY,
V, End, MouseX, LeftAlt, Z, LeftWindows,
NumPadEnter, Capital, A, JoystickPovE, RightWindows, JoystickPovS,
JoystickPovN, JoystickButton10, JoystickButton9, C, JoystickButton5, LeftShift,
NumPadMultiply, Less, JoystickButton1, JoystickButton0, Y, JoystickY,
Delete, H, Space, Down, PageUp, JoystickX,
B, NumPad4, G, Num2, JoystickRotationY, Home,
F1, Num3, Num0, I, F12, NumPad7,
Num1, F8, JoystickRotationZ, LeftControl, Semicolon, Num8,
PageDown, NumPadEquals, MouseButton5, Num4, NumPadDivide, NumPad5,
Equals, M, MouseButton6, Num5, F13, L,
Return, Num7, K, RightAlt, Insert, Num6,
O, LeftBracket, F10, Escape, NumPad8, NumPadSubtract,
JoystickRotationX, Pause, Slash, Q, E, RightControl,
F3, Num9, MouseButton4
I guess it could be possible to combine them together but I don't even know how you would go about doing that. Just thinking about that makes my head hurt.
If something is unclear let me know because I'll probably post this on the wiki at some point. and it took me a while to write this so it might not flow very well #:-S
What an adventure \o/ yay Comprox
When going through a reformat and re-installing NS2, several things just don't store on the cloud (in my experience) -- this was a while ago so asking for me to recall it now isn't really possible, I just know that after reformat some things saved and a bunch of other things didn't
Also an autoexec is basically a config where you can put either bindings/settings/input commands and have them 'execute' everytime the game is launched to ensure the settings never changed, people would basically copy their entire settings/playerconfigs into an autoexec and change all the values to their preference then store the file on a cloud, now everytime they'd go somewhere they'd bring this one file and it'd adjust everything in their settings/bindings/input and etc so they wouldn't need to carry several modified files, they'd have one file that would be executed and adjust all the files that come default with the game
If someone has reformated for ns2 recently, hopefully they'd be better able to tell you exactly which files do not save, but I could be wrong and it could have been something only I experienced? (although I'm positive things did not remain the same)
Comprox fixed Samus
^-Edit-v
No fun
Edit: doesn't look like it's just me :-??
I think I broke it.