How to Keybind your Hotbars
It seems hotbar keymapping is becoming more and more of an issue for people as I've been recieving two to three PMs, in-game tells or seeing posts here asking if this or that hotbar can be set up to allow keymapping. The answer is of course, yes, but it takes some work. I'm hoping with this post will answer some of the questions and give the necessary directions on how to go about making the changes. If after reading this you still don't understand or are having trouble, post here so that somebody can help you. Please don't PM or message me directly. There's just too many people using my mod to be able to help every person trying to tweak it. Now, on to business...
The Three Piece Puzzle
Key combo's are bound to hotbars in the user.ini file. There are three pieces to the puzzle that must all fit together for your key combo to make the hotbar slot fire.
The first piece of information you need is the searchKey of the WindowBank definition for the hotbar found in the hotbar's xml file. Let me describe WindowBank's for a second. A WindowBank is the xml code name for a hotbar. WindowBanks are a series of button slots that repeat either horizontally or vertically based on offset parameters. This means if a hotbar as seen in the UI that has more than one row then that hotbar is making use of more than one WindowBank to make that happen because there's no way to tell a WindowBank to lay itself out in multiple rows. For reference, I've included the list at the bottom of this post of all hotbars and their searchKey's from the Drox UI.
The second step and the most important is the aliases definition in the user.ini file. Here's an example hotbar alias:
Aliases=(Command="SGOUI HOTKEY 1 wb_h4",Alias="HBar4Key01")
Aliases=(Command="SGOUI HOTKEY 2 wb_h4",Alias="HBar4Key02")
Before I get into the details of this remember one very important fact: the game only supports 174 alias definitions and they must be numbered sequentially with no number repeated.
Now, in those aliases above, the SGOUI command has three parameters that are being passed to it. The first is HOTKEY which tells it we want to define a hotkey. The second is the slot number of the WindowBank we're assigning on this particular aliases definition. And the third is the searchKey value of the WindowBank. Here's another example showing the full set of aliases for th N52 hotbar:
Aliases=(Command="SGOUI HOTKEY 1 wb_n52_r1",Alias="N52KeyN1")
Aliases=(Command="SGOUI HOTKEY 2 wb_n52_r1",Alias="N52KeyN2")
Aliases=(Command="SGOUI HOTKEY 3 wb_n52_r1",Alias="N52KeyN3")
Aliases=(Command="SGOUI HOTKEY 4 wb_n52_r1",Alias="N52KeyN4")
Aliases=(Command="SGOUI HOTKEY 5 wb_n52_r1",Alias="N52KeyN5")
Aliases=(Command="SGOUI HOTKEY 1 wb_n52_r2",Alias="N52KeyN6")
Aliases=(Command="SGOUI HOTKEY 2 wb_n52_r2",Alias="N52KeyN7")
Aliases=(Command="SGOUI HOTKEY 3 wb_n52_r2",Alias="N52KeyN8")
Aliases=(Command="SGOUI HOTKEY 4 wb_n52_r2",Alias="N52KeyN9")
Aliases=(Command="SGOUI HOTKEY 5 wb_n52_r2",Alias="N52KeyN10")
Aliases=(Command="SGOUI HOTKEY 1 wb_n52_r3",Alias="N52KeyN11")
Aliases=(Command="SGOUI HOTKEY 2 wb_n52_r3",Alias="N52KeyN12")
Aliases=(Command="SGOUI HOTKEY 3 wb_n52_r3",Alias="N52KeyN13")
Aliases=(Command="SGOUI HOTKEY 4 wb_n52_r3",Alias="N52KeyN14")
The N52 hotbar is an example of a hotbar that uses more than one WindowBank in order to lay out three rows of button slots. Five in the first and second rows and 4 in the third row. Notice the number following HOTKEY increments on each aliases line from 1 to 5 and then starts over at 1 again. On the line where it starts at 1 again you'll see the searchKey parameter also changed to wb_n52_r2. The "_r2" in my naming convention means row 2, but the "_r2" could have been anything if I had used something else when naming the searchKey for the WindowBank.
If you wanted to remove the N52 keybinding definitions and instead set up aliases definitions for the 3x4 hotbar it would look like this:
Aliases=(Command="SGOUI HOTKEY 1 wb_3x4_1_r1",Alias="3x4Bar1R1K1")
Aliases=(Command="SGOUI HOTKEY 2 wb_3x4_1_r1",Alias="3x4Bar1R1K2")
Aliases=(Command="SGOUI HOTKEY 3 wb_3x4_1_r1",Alias="3x4Bar1R1K3")
Aliases=(Command="SGOUI HOTKEY 1 wb_3x4_1_r2",Alias="3x4Bar1R2K1")
Aliases=(Command="SGOUI HOTKEY 2 wb_3x4_1_r2",Alias="3x4Bar1R2K2")
Aliases=(Command="SGOUI HOTKEY 3 wb_3x4_1_r2",Alias="3x4Bar1R2K3")
Aliases=(Command="SGOUI HOTKEY 1 wb_3x4_1_r3",Alias="3x4Bar1R3K1")
Aliases=(Command="SGOUI HOTKEY 2 wb_3x4_1_r3",Alias="3x4Bar1R3K2")
Aliases=(Command="SGOUI HOTKEY 3 wb_3x4_1_r3",Alias="3x4Bar1R3K3")
Aliases=(Command="SGOUI HOTKEY 1 wb_3x4_1_r4",Alias="3x4Bar1R4K1")
Aliases=(Command="SGOUI HOTKEY 2 wb_3x4_1_r4",Alias="3x4Bar1R4K2")
Aliases=(Command="SGOUI HOTKEY 3 wb_3x4_1_r4",Alias="3x4Bar1R4K3")
One final note on aliases, the "Alias" entry must be unique and it is what you will see in the list of bindable items on the Controls tab of the Vanguard's Settings window.
The third piece of the keybinding puzzle are the bindings lines in user.ini file. Here's what they look like:
The "Alias" name given to a hotkey definition in the aliases section above is referenced in the "Command" portion of the bindings line. The Key is the numeric key value for a given key on the keyboard and the Ctrl, Alt, Shift are used to define the full combo of keys involved. In the example above, binding 65 has Key 49 (the 1 key) and shift is true so the key combo defined is [Shift]-.
Now before you get all worried about bindings, don't. You don't really need to define them by hand. About the only manual edit you might want to do is when you remove aliases to also remove the bindings for them. I think the game will remove them automatically, but it's good habit to clean up yourself any unnecessary entries.
So, you should be asking now, "How do I put the third piece of the puzzle into place if I don't edit the bindings manually?" It's rather easy actually. Just start up the game, open the Vanguard Settings window and go to the Controls tab. When you scroll down the list on that tab you should see your new aliases. Just click the first button for each alieas and hit the key combo you want to set up.
In the immortal words of the Looney Tunes cartoons...
"That's all Folks!"
But how do I switch window banks?..
Since I know this question will be asked shortly after the mapping works, let me try to head it off at the pass.
In the Drox UI, I removed the arrow buttons that let you switch banks and took out the default Shift-# keybindings for switching banks on the main hotbar. Place of these I've added keybinds for switching all four horizontal hotbars at once through 4 banks. I also did this for the G15 and N52 hotbars as well. The keybinds are Ctrl-F1 through Ctrl-F4 for the horizontal bars, Ctrl-F5 through Ctrl-F8 for the G15, and Ctrl-F9 through Ctrl-F12 for the N52.
Now say you've removed keybinds for the N52 and want to set up new aliases to allow your 3x4 hotbars to switch banks. Well you're in luck, because I've built in support into the xml definition for the 3x4 hotbars to allow 4 banks as well. To make a WindowBank support multiple banks, it needs to have numBanks="1", showSpinner="true" and then it needs placeholder entries for UpButton, DownButton and a TextField. In my files these are set so they don't display.
Here are some example aliases entries that allow the N52 hotbar to switch banks.
Aliases=(Command="SGOUI HOTKEYBANK 0 wb_n52_r1|SGOUI HOTKEYBANK 0 wb_n52_r2|SGOUI HOTKEYBANK 0 wb_n52_r3|SGOUI HOTKEYBANK 0 wb_n52_marker",Alias="N52Bank01")
Aliases=(Command="SGOUI HOTKEYBANK 1 wb_n52_r1|SGOUI HOTKEYBANK 1 wb_n52_r2|SGOUI HOTKEYBANK 1 wb_n52_r3|SGOUI HOTKEYBANK 1 wb_n52_marker",Alias="N52Bank02")
Aliases=(Command="SGOUI HOTKEYBANK 2 wb_n52_r1|SGOUI HOTKEYBANK 2 wb_n52_r2|SGOUI HOTKEYBANK 2 wb_n52_r3|SGOUI HOTKEYBANK 2 wb_n52_marker",Alias="N52Bank03")
Aliases=(Command="SGOUI HOTKEYBANK 3 wb_n52_r1|SGOUI HOTKEYBANK 3 wb_n52_r2|SGOUI HOTKEYBANK 3 wb_n52_r3|SGOUI HOTKEYBANK 3 wb_n52_marker",Alias="N52Bank04")
They follow a similar command definition structure as the HOTKEY definitions but use a HOTKEYBANK parameter to indicate we want to change banks. The number following the HOTKEYBANK is the bank number to switch to (starting with zero). And the third parameter is again the searchKey for the WindowBank to change. Now you've obviously noticed that there are multiple commands seperated by | characters. The aliases command only supports four or five commands at once so you can't go crazy, but it does let you set up the command to switch all four banks needed for each 3x4 hotbar. One problem though with the limit is that you won't be able to set up all three 3x4 hotbars to change banks on the same aliases line. You can create the aliases (or change existing ones) and set up the bindings just like you did above for the hotkeys.
What could go wrong?
Q. Why isn't my alias entry in the list of bindable controls in the Settings window?
A. Something is wrong with your aliases definition.
Q. Why don't I see key labels on my hotbar slots?
A. First you need an ability in a slot for the key label to show up. If you have one there and don't see the key label, then the problem is with the binding. Go to the Controls tab of the Vanguard Settings window and double check your entries.
Q. I've got my binding set and the alias name was there but I still don't have a key label.
A. Double check to make sure the searchKey in the aliases definition matches the searchKey in the xml for that hotbar.
Q. Some of my hotkeys work but only for half my hotbar. After the Nth slot they don't work.
A. Make sure you haven't tried to define more than 174 aliases.
Drox UI Hotbar and WindowBank searchKey's
Main Bar = m_wb
Horiz 2 = wb_extra
Horiz 3 = m_ref_rightv0
Horiz 4 = wb_h4
Vert 1 = m_ref_left1
Vert 2 = m_ref_right0
Vert 3 = m_ref_right2
Vert 4 = wb_v4
3x4 1 = wb_3x4_1_r1 / wb_3x4_1_r2 / wb_3x4_1_r3 / wb_3x4_1_r4
3x4 2 = wb_3x4_2_r1 / wb_3x4_2_r2 / wb_3x4_2_r3 / wb_3x4_2_r4
3x4 3 = wb_3x4_3_r1 / wb_3x4_3_r2 / wb_3x4_3_r3 / wb_3x4_3_r4
Numpad *[=] = wb_numpad_r1
Numpad 789 = wb_numpad_r2
Numpad 456 = wb_numpad_r3
Numpad 123 = wb_numpad_r4
Numpad 0 = wb_numpad_zero
Numpad . = wb_numpad_period
Numpad + = wb_numpad_plus
G15 = wb_g15_r1 / wb_g15_r2 / wb_g15_r3 / wb_g15_r4 / wb_g15_r5 / wb_g15_r6
N51 = wb_n52_r1 / wb_n52_r2 / wb_n52_r3