Section 4
4.0 WORKING WITH BINDS
4.1 Single Commands
So, now that you have a bindfile, what are you going to do with it? So let's switch back to STO quick and enter the Options:Key Binds menu. Scroll to the bottom and you'll find the default keybinds under the heading "Gameplay Windows". Cryptic has already assigned these as:
i = Inventory
k = Skills
u = Status
o = People
j = Missions
l = Log
m = Map
There are very specific commands associated with these functions. If you hover your cursor over the item "Inventory", a window pops up with "Use manually with /GenSendMessage Root ShowInventory". This means that, if you enter "/GenSendMessage Root ShowInventory" in the chat window, your inventory window will open. Enter it again and the window disappears. You now have control of the inventory window. Hover over each of the actions listed and the associate command will be shown.
Skills = /GenSendMessage Root ShowPowers
Map = /GenSendMessage Root ShowMap
... etc.
To avoid the previous window calamity that got me started binding, I changed all these actions to "Control+" commands:
Skills = Control+k "GenSendMessage Root ShowPowers"
People = Control+p "GenSendMessage Root ShowPeople"
Missions = Control+j "GenSendMessage Root ShowMissions"
Captain's Log = Control+l "GenSendMessage Root ShowCaptainLog"
Map = Control+m "GenSendMessage Root ShowMap"
Fleet = Control+f "GenSendMessage Root ShowFleet"
Remote Contact = Control+h "GenSendMessage Root ShowRemoteContacts" (This is hailing Starfleet.)
Tickets = Control+t "GenSendMessage TicketWindow_Root ShowWithoutScreenshot" (Used to view any Bug Tickets.)
Assignments = Control+a "GenSendMessage Root ShowShipCrewAssignments"
Status = Control+s "GenSendMessage Root ShowStatus"
Tray Powers = Control+w "GenSendMessage Root ShowTrayPowers"
Inventory = Control+i "GenSendMessage Root ShowInventory"
Note: some of the command keys have been changed to facilitate mnemonic recall and accommodate my play style. 'S' is used for Status instead of 'U'. 'P' is now People instead of 'O'.
If you use the mouse to navigate, like I do, you can cut'n'paste these commands directly into your bindfile. All you WASD-ers (I should open thread about the inefficiency of that.), you can do the same without fear that your A & S keys will be hijacked.
The next step is to clear the previous designations to prevent my window calamity from still occurring. (Remember I said I'd fix that.) To do so, you simply use double-quotes (""). So, add these:
i ""
k ""
u ""
O ""
j ""
l ""
m ""
One more step and we're done ...
You will note that there are many keys with "(null)" next to them. The means that there was no value present when you created the file. You have to remove the '(null)' because the game doesn't recognize this as a valid command and will deny your file. So, just do a find/replace. In notepad, ctrl+h opens this window. In the "find" type (null). Do not put anything in "replace". Press "Replace All" and voila all the nasty nulls disappear.
Phew. Finally, With these changes made, save your bindfile. Just to make sure the changes are there open it again and, hopefully these changes are in place, close it again.
Now, let's test the magic. Go to STO and load (/bind_load_file <filename>.txt) your bind file. Press 'Control' and tap the 'I' key. You should see your Inventory window pop open. Do it again and it closes. 'Control+M' opens and closes your map.
Bravo, you're on your way to becoming a keybind freakazoid like me. (Binds are like tatoos ... once you have one, you want more.)
Alright, I lied. Open that file and let's add a few more ...
/bind Add throttleadjust .10
- or –
Add "throttleadjust .10"
Effect: When the numberpad plus key is tapped the ship's throttle will increase by one-tenth(.10).
/bind subtract throttleadjust -.10
- or –
subtract "throttleadjust -.10"
Effect: When the numberpad subtract key is tapped the ship's throttle will decrease by one-tenth(.10).
4.1.1 THE EXCEPTION TO THE RULE
updated: 101208
Now, there is an exception to every rule and here it is: Commands differ when it comes to chat channels, but the syntax remains the same. You simply drop the use of quotation marks ("") all together.
Example:
/bind a Team Welcome to my parlor, gentlemen.
- or –
a Team Welcome to my parlor, gentlemen.
Effect: When the A-key is tapped, "Welcome to my parlor, gentlemen." is expressed in the Team chat channel.
One final note, you cannot have linefeeds (code that moves the cursor down one line) in the string, so be careful if you put these together in an editor. Notepad has a "Word Wrap" feature (under Format) that I disable when saving the file.
My thanks to Naevius for pointing this out.
4.2 Multiple Commands
Okay, you are well on your way to being a Binder. But wait, what's that you say? Yeah, I've got the single command binds down; that's easy peasy, but didn't you say something about targeting blah-blah and healing blah-blah one key? Well, that's more than one command. So, now your wondering: How do I do make that magic happen?
Well, …
The key to using multiple commands is concatenation. That's a big word for putting multiple commands one after the other. To do this you use $$ (double dollar signs). So our now our bind command looks something like:
/bind <key> <toggle><command> <param1> $$ <toggle><command2> <param2> $$ ...
- or -
<key> "<toggle><command> <param1> $$ <toggle><command2> <param2> $$ ..."
Example:
Let's say you use the three tray display which causes you to loose your bridge crew display and weapons display. (The one with the bridge officers in their pretty colors and their powers next to them.) I can give all that back with one of my favorite keybinds:
/bind F5 GenJailAdd Hud_Weapons_Root $$ GenJailAdd Hud_Bridgecrew_Trays_Root
- or -
F5 "GenJailAdd Hud_Weapons_Root $$ GenJailAdd Hud_Bridgecrew_Trays_Root"
Effect: Tapping F5 opens the weapons HUD display and opens the Bridge Crew Tray.
4.3 Toggle Commands
Several commands use toggles, either plus (+) or minus (-), to turn them on or off. These operators I have classified as Non-continuous and Continuous.
By placing a + (plus) in front of a command, the command is ON while your key is pressed, and off when released. Using ++ (double-plus) causes the action to continue even after the key is released.
The syntax for a non-continuous commands is:
/bind <key> <bin><command><param1><...>
- or -
<key> “<bin><command>"
Example:
/bind numpad4 +left
- or -
numpad4 “+leftâ€
Effect: Causes you to turn left while the number pad 4-key is pressed. The turn stops when the key is released.
You could assign another key with -left. When pressed it will cause the first pressed key to stop the left turn. However, this is negated by simply releasing the initial key.
The second toggle command, Continuous, uses the ++ (double plus). With this toggle the bind is activated when the key is tapped and deactivated when the key is tapped again. This TOGGLES (hence the name) the command ON and OFF.
Example:
/bind numpad4 ++left
- or -
numpad4 “++leftâ€
Effect: TApping the 4-key on the number pad results in a continuous left-hand turn. When the key is tapped again, the turn is canceled.
4.4 Using Powers (in space)
To use your powers and your Bridge Officer powers in space you need be able to reference their location within the powers display. The powers display is divide into ten (10) trays by ten (10) slots. If you use the three-tray display you see:
3rd Tray = A1 A2 A3 A4 A5 A6 A7 A8 A9 A0
2nd Tray = C1 C2 C3 C4 C5 C6 C7 C8 C9 C0
1st Tray = 1 2 3 4 5 6 7 8 9 0
For the purposes of binding, the trays are numbers 0 thru 9; with the first (1st) tray being 0 and the last (10th) being 9. Your slots are similarly numbered starting at 1 = 0 and going to 0 (or 10) = 9. This convention stems from the fact that counting actually starts at zero (0) not one (1); hence 0, 1, 2, 3 … not … 7, 8, 9, 0.
So to use the fourth (4th) power in Second (2nd) tray designated by C4, you can use Control+4 to execute the associated power. Alt-8 gets the eighth (8th) power in the third (3rd) tray and so on.
When using powers in keybinds you have to identify the power by tray and slot convention. Using the previous examples: C4 is Tray1 Slot3 and A8 is Tray2 Slot7. The quick way to make this translation is to subtract one from the tray and slot you are looking to use.
The syntax for binding a tray power is:
/bind <key> +TrayExecByTray <tray> <slot>
- or -
<key> “+TrayExecByTray <tray> <slot>â€
Notice the plus (+) before the command used to activate the command. This is an execute command.
So, let's use those examples. We'll put Beam Overload in the C4 position and Target Subsystems Shields in the A8 position. To activate either one you would use:
/bind Control+4 +TrayExecByTray 1 3
- or -
Control+4 “+TrayExecByTray 1 3â€
Effect: Pressing the control key and tapping the 4-key would activate your beam overload. And ...
/bind Alt+8 +TrayExecByTray 2 7
- or -
Alt+8 “+TrayExecByTray 2 7â€
Effect: Pressing the Alt key and tapping the 8-key activates your Target Subsystems Shields.
4.5 Using Multiple Powers
Now, you say, “That's all well and great but those are the default binds Cryptic provides. I want more.†(Don't you always.) “What about putting more than one together?†To which I say, Auntie Em its a twister. It's a twister!, er ... use this syntax:
/bind <key> +TrayExecByTray <tray> <slot> $$ +TrayExecByTray <tray> <slot> $$ ...
- or -
<key> “+TrayExecByTray <tray> <slot> $$ +TrayExecByTray <tray> <slot> $$ ...â€
So, using the beam overload/target subsystems shields examples. The bind looks something like this:
/bind 4 +TrayExecByTray 2 7 $$ +TrayExecByTray 1 3
- or -
4 “+TrayExecByTray 2 7 $$ +TrayExecByTray 1 3â€
Effect: Tapping the 4 key activates the Target Subsystems Shields. Tapping it again then activates beam overload.