The purpose for this guide is to provide more detailed information on HOW binds work so that the would-be bind designer can more intelligently craft their own binds or troubleshoot them. This guide grew out of my desire to understand why a bind I created worked, and I figured I might as well write down what I’ve learned in the hope that someone else might find the information useful. I have gathered the information in this guide from many different sources: the City of Heroes Forum, my own testing and experience, and from fellow gamers such as Innovator, Blueray, Cockaroach, Samuel_tow, and Zerotemp. It is my hope that presenting this information in one concise document will help others to create superb binds much easier than if they had to track down all this information on their own. This guide assumes the reader is familiar with the /bind command in City of Heroes/Villains and has mastered its more common functions as detailed in other venues such as Curveball's excellent The Wholly Unofficial And Fairly Incomplete Guide To /Bind. As such, many details on how to create and use binds are omitted from this document. If you are new to binds, please read Curveball's guide above, read the binds section in the COH manual, and familiarize yourself with making binds before you read this guide. STOP! READ CURVEBALL'S GUIDE ABOVE FIRST!
TABLE OF CONTENTS: Multiple toggle binds are binds that contain more than one toggle power.
There are 6 commands used to activate a toggle power in a bind: The first five commands operate in the same way as powexec_name (1-5), while the powexec_toggleon command operates in a distinctly different manner. The length of a bind can not exceed 255 characters (including spaces). The game does not count the key name, the blank space after the key name, nor the beginning and end quotes toward the 255 character limit. It only counts what is between the quotes. Omitting underscores "_" in commands such as powexec_name, powexec_toggle_on and bind_load_file, and leaving out unneeded spaces is one way to cut and decrease the character count, in order to enable longer binds. For example, "powexec_name" becomes "powexecname," "bind_load_file" becomes "bindloadfile," etc. Underscores aren't even read by the command parser, and only serve to make commands easier to read. In fact, bind_load_file is the same as bindloadfile, or bindload_file, or b_i_n_d_l_o_a_d_f_i_l_e. When your binds get lengthy, space becomes precious because of the limit to the text size of a bind, so it's a good practice to leave underscores out. However, for the purposes of this guide, the published (easier to read) form of command names will be used. A common mistake among players is to type "POWER_exec_name." This is not a command and will result in an error if used. The correct spelling is "POW_exec_name" Incidentally, a list of all the slash commands in the game can be obtained by typing "/cmdlist" into the chat box (without the quotes). The slash command list currently used by the game pops up in the global box, and you can copy this to the clipboard using the "/copychat global" command, and then paste it into a word processing file for your future reference. Since slash command lists are often made obsolete by subsequent game updates, this method ensures you have the most current and complete list of slash commands for the game. The Powexec_name command toggles on a power if it is off, and toggles off a power if it is on. The first way to create multiple toggle binds is by using the powexec_name
command. For example: The bind above attaches 4 powers to a single key: Invincibility, Unyielding, Temp Invulnerability, and Super Jump. However, only one power will turn on whenever a key is pressed, but which one? The Power Activation Sequence in multiple toggle binds is fairly straight forward but it is critical to understanding binds. Toggle powers in binds activate from right to left. When binds containing a string of multiple powexec_name commands is executed, the bind shuts off ALL currently active powers in the bind string, and turns on the first non-active power starting from the right or end of the bind string. For ease of explanation, the first toggle power starting from the right will be designated A, the second power from the right as B, the third C, and so on (eg., /bind <key> "powexec_name D$$powexec_name C$$powexec_name B$$powexec_name A"). Which toggle power turns on greatly depends upon whether or not a power is on or off at the time the bind is executed. So assuming first that all powers in the bind are off, the power activation sequence would go something like this: First the bind will attempt to turn on power A. If A is already on, then B will turn on. If B is already on, then A will turn on. If both A and B are on, C will turn on. If A, B, and C are on, then D will turn on, and so on. The bind searches for the first non-active power to turn ON starting from the right, while turning OFF all currently active powers in the bind string. So binds will always try to activate Power A first, unless it is already ON. Needless to say, if all the powers in the bind script are currently turned on, the bind will turn them all off. This bind, for example, will toggle on and off between Fly and Sprint, while turning off Unyielding and Invincibility (if they were on, otherwise no action): /bind Y "powexec_name Invincibility$$powexec_name
Unyielding$$powexec_name
Sprint$$powexec_name Fly"
Power commands are activated from right to left (<--) because powers interrupt each other when exectued in a series. When you activate a power, there is a slight delay between when it queues and when it activates. This time is too short for anything to happen, but it is longer than the time it takes the game to exectue the next command in the bind. Essentially, each new step interrupts the previous one, effectively working only with the last step backwards from right to left. Deactivating a toggle power, however, takes no time for the game to accomplish and therefore can not be interrupted. So a bind string that toggles, activates, or toggles off a series of active powers will be able to toggle them all off simultaneously. When taken together, the activation and deactivation behaviors of power commands determine the power activation sequence. The typical multiple toggle bind will usually have only 2 toggle powers in it (toggling between A and B). However, inserting more than two toggle powers in a bind can ensure that those additional powers are turned off when the desired power is turned on (useful for conserving endurance, etc.). Powerexec_name also has fewer characters than powexec_toggleoff (discussed below), and therefore may be a more efficient choice for minimizing bind string length. Further, it is sometimes necessary to have a third or even fourth power in the bind script – especially if the bind utilizes the "toggle key" function, is part of a text/toggle bind, or toggle powers are combined with movement and other types of commands within the same bind script. The second way to create multiple command toggle binds is to string together a series of powexec_toggleon commands in the bind script (eg., /bind <key> "powexec_toggleon D$$powexec_toggleon C$$powexec_toggleon B$$ powexec_toggleon A"). Powexec_toggleon commands only turn powers on and can not turn off a power. Conversely, powexec_toggleoff only turns powers off. With the powexec_toggleon command we can successively turn on several powers using only one key, but with multiple key presses. The bind will execute each power command from right to left. Upon the first key press, the bind will attempt to activate power A. Upon the second key press, power B will activate. Upon the third key press, power C, and so on. Powexec_toggleon will IGNORE powers that are already on, and will seek out the next non-active power from the beginning of the chain onward with each successive key stroke. If all of the powers in the bind string are already on, no action will be taken. In addition, it appears that powexec_toggleon follows the same power activation sequence as powexec_name, with the one exception that it will not turn powers off. Powexec_toggleon makes turning on powers using only one key much easier.
Before this command existed, the only way to have one key turn on multiple
toggle powers was to create a text/toggle bind that required the creation
of multiple text files to operate. With this command, one bind will do
it all! In addition, in some cases we may only want the bind to turn
on the power so that we may turn the power off manually. In others we
may use the powexec_toggleon to ensure that a toggle power is not turned
off accidentally. This feature to ignore command entries depending upon the on/off state of a power can cause some confusion if both powexec_toggleon and powexec_toggleoff are used together in the same bind. Consider this bind, for example: /bind <key> "powexec_toggleon A$$powexec_toggleoff A" This bind behaves similarly to a typical one power powexec_name bind, yet the way the commands are arranged is not at all like we would expect a powexec_name bind to look like. We might think that toggle_ON should swap places with toggle_OFF for the bind to work properly (and indeed it will work fine this way). However, because powexec_toggleoff ignores powers that are already turned off, the first command in the bind string is skipped over (assuming the desired power is already off before the bind is executed) and the next command in the string (toggle_on) is run instead. This means that when the bind key is first pressed, it will amazingly turn the power ON.
Multiple powexec_name and powexec_toggleon commands may be combined in the same bind. Mixed binds will operate in the same manner as described for the powexec_name command above – from right to left, with the same base power activation sequence. The only difference, and it’s a big difference, is that powers turned on with the powexec_toggleon command will remain ON, while the powers activated with powexec_name will toggle on and off. Also powexec_toggle commands may be ignored in the bind depending upon the on/off state of the power. This makes for some interesting possibilities. For example, with the
following bind we can turn two powers on, and then toggle on and off
between the last two powers (C and D) instead of the first two (A and
B) as is usually the case: The reason this works is because the bind will ignore any instances of powexec_toggleon whose powers are already on. So once powers A and B are turned on, the bind treats power C as if it were the first command in the bind string. This is also true for powexec_toggleoff, except it ignores powers that are already off rather than on.
Multiple powexec_name and powexec_toggle commands for
the SAME POWER can cause some baffling results, behave contrary to
the normal bind rules,
and "lock up" a bind so that it no longer works. Believe it
or not, these quirks can actually come in handy when trying to design
a bind that works the way we want it to work. More importantly, understanding
how multiple powexec commands for the SAME POWER affect binds is crucial
for understanding how some binds behave when executed under less than
optimal conditions, such as when lag is affecting game play or when a
bind key is pressed too quickly. Under these poor conditions, entire
bind strings are often duplicated and treated as one bind or separate
text binds merged so that we end up executing multiple commands for the
same power. For ease of use, "A" will represent the duplicated power. I will give an example bind showing the combination and sequence of commands, and then an explanation of the bind’s behavior: /bind <key> "powexec_NAME A$$powexec_NAME
A" /bind <key> "powexec_TOGGLEON A$$powexec_TOGGLEON
A" /bind <key> "powexec_TOGGLEOFF A$$powexec_TOGGLEOFF
A" /bind <key> "powexec_TOGGLEOFF A$$powexec_TOGGLEON
A" /bind <key> "powexec_TOGGLEON A$$powexec_TOGGLEOFF
A" /bind <key> "powexec_NAME A$$powexec_TOGGLEON
A" /bind <key> "powexec_TOGGLEON A$$powexec_NAME
A" /bind <key> "powexec_TOGGLEOFF A$$powexec_NAME
A" /bind <key> "powexec_NAME A$$powexec_TOGGLEOFF
A"
From the table and information above we can draw some simple conclusions: 1) whenever 2 instances of Powexec_NAME occur in a bind string, a conflict
will always result In any bind string that has two commands that would create a conflict when executed, a conflict will occur regardless of what other powexec <same power> commands reside in the bind string. For example, when powexec_NAME <same power> and powexec_TOGGLEON <same power> are combined, the bind will function normally. But if you add another instance of powexec_NAME <same power>, a conflict will result when the command is executed, turning the power on and locking up the bind: This bind will operate normally: But this bind will create a conflict: Text binds were explained fairly well in Curveball’s Guide to Binds in his "Using ‘Toggle Binds’" section. Some have used his nomenclature of "toggle binds" to describe this method of bind making, while others have used "text binds" to describe the same thing. I have chosen to refer to these types of binds as "text binds" in order to avoid confusion with both "toggle powers" and "toggle keys." Text binds are binds imported into the game from one or more text files residing on your computer that replace the current key bindings. This ability to replace binds on keys with the press of a button gives us the ability to assign more than one bind to a single key. By "bind" I mean a full bind string consisting of one or more commands. We achieve this by using the BIND_LOAD_FILE command to import binds that we have placed in separate text files that reside somewhere on our computer. When a bind is imported from a text file, it overwrites (erases and then replaces) the current bind on the key with the bind that is in the text file. This allows us to execute one bind string residing in a specific text file when the key is pressed, and then another bind string from a different text file when the key is pressed again, and so on. Essentialy, "bind_load_file" allows us to create a key that replaces itself with a different bind when used. The easiest way to create a text file for a text bind is to use Notepad in Windows, but any text editor will do as long as the file is saved as a plain text file (.txt). Text binds must also be written in a certain format for the game to recognize them. It is essentially the same format as a normal bind, except the /BIND command is omitted. The entry starts with the name of the key you are binding, and then the bind string. So a bind in a text file would look like this: Y "local Up, Up, and AWAY!!$$powexec_name Fly" You can actually assign binds to several keys at once by simply adding them to the text file, like so: Y "local Up, Up, and AWAY!!$$powexec_name Fly" To load a text bind, type in /BIND_LOAD_FILE [drive]\[file location]\[file name]. For example, /bind_load_file C:\coh\binds\textbind1.txt. This would import the textbind1.txt file and any binds that resided in the file into the game. A word should be said about minimizing path and filename length here. It would be best to choose a path and file name that was short, with as few characters as possible, in case the space is needed for other commands in the bind string. To minimize path length, you could create a very short directory name on the root drive, such as C:\1\bindfile.txt. Perhaps a better alternative would be to create a new sub-directory named "binds" (or anything you like) in the City of Heroes game directory for your text binds, like so: C:\program files\city of heroes\binds\. The game will automatically start in the game’s directory, so typing the drive and game directory is unnecessary. The path to a game sub-directory named "binds" can be shortened to ".\binds\" when using BIND_LOAD_FILE (note the period before the first backslash). So the full command and path would look like this: /bindloadfile .\binds\bindfile.txt . For the BIND_LOAD_FILE command to work, long filename and directory names (meaning names having greater than 8 characters) may be used, but the game will not accept blank spaces in the names of the directories and files on your computer. For example, this bind will NOT work because of all of the blank spaces in the path: /bind_load_file c:\program files\city of heroes\my binds\testing the bind length.txt Merely one blank space in only one of the names above will spell doom for the bind, and an error like this one will pop up in the global chat window of the game: “Usage:bindloadfile takes 1 args, you gave <#>.” To avoid this error, the best solution would be to simply create or use directories and file names without any blank spaces in them. I’d also recommend that your directory and file names not exceed 8 characters in length, just to avoid potential complications (although at the moment this is not required). Also, if you use a sub-directory in the City of Heroes game directory for your binds, the “.\directoryname” switch described above will work well. Lastly, you can use the MS DOS 8.3 standard naming convention to translate the long directory/file names that contain spaces into a syntax the game can understand without actually changing the file/directory names on your computer. To do this, shorten a long name to the first six characters of the original name, ignoring blank spaces, followed by a tilde (~) and a unique number -- plus the 3 character file extension if one exists. If the short name is a duplicate of another name in the same directory, make sure the number at the end of the name is different than the number of the duplicate directory/file. For example, the error-producing path: “c:\program files\city of heroes\my binds\testing the bind length.txt” can be translated into a working path that looks like this: c:\progra~1\cityof~1\mybind~1\testin~1.txt
The real value of text binds is not merely the ability to replace current key binds with binds stored in text files, but rather the ability of a text bind to replace ITSELF with a different bind when it is executed, such as the sample text bind below. The steps to create a text bind are fairly straight forward. First, you would create the text files and write the binds you want in them. To do this, use the program named Notepad (or any text editor) that comes with Windows (click Start -->Programs-->Accessories-->Notepad). Then you would use the /BIND_LOAD_FILE command to load the text bind. For example, in the chat box you would type: /bind_load_file "C:\[file location]\textbind1.txt". In the example below I created 3 text files: "textbind1.txt," "textbind2.txt," and "textbind3.txt." Consider these sample text bind files: TEXTBIND1.TXT: TEXTBIND2.TXT: TEXTBIND3.TXT: Essentially what happens is that when the "Y" key is pressed, the bind in textbind1.txt is executed, turning on Fly, but it also loads a new key binding for the "Y" key residing in textbind2.txt. It is the BIND_LOAD_FILE command at the far right of the bind string that loads the second text file. When the "Y" key is pressed again, the bind from textbind2.txt is executed, Hover turns on, and the bind replaces itself with the bind in textbind3.txt. When the key is pressed the third time, the bind in textbind3.txt is executed, Sprint turns on, and the bind from the first text file is loaded again – to loop around and start over again. Text binds allow us to use one key to load different binds or even different sets of binds (for one or multiple keys). This can be very useful for binds where we want a different set of bind commands to execute when one key is pressed; or for a certain command to activate on the first key press, but not on the second key press; or a myriad of other invaluable uses. "Toggle Keys," for lack of a better name, are already part of City of Heroes. We use them whenever we press the movement direction keys W, A, S, D, X; the space bar, the Left Alt and Left Control keys, and many others. A toggle key executes every command in a bind upon key PRESS, and then executes every command in the bind again upon key RELEASE. Toggle keys help by allowing us to activate powers quicker, using less keystrokes. For example, a bind using 6 powexec_toggleon commands would take 6 keystrokes to turn all the powers on; whereas, adding "+" at the beginning of the bind would allow us to turn on all 6 powers in only 3 keystrokes – because the bind is executing twice per keystroke (once when the key is pressed, and again when the key is released). A toggle key is created by adding the "+" prefix command at the beginning of a bind string (eg., /bind <key> "+down$$powexec_name B$$powexec_name A"). Notice the "+" attached to the "+down" command at the beginning, far left, of the bind string example above. This tells the game to execute the whole bind on key press, and again upon the release of the key. Any movement or similar command that includes a "+" at the beginning will cause the key to behave as a toggle key if it is placed as the first command in the bind string (eg., /bind <key> "+up$$powexec_name B$$powexec_name A"). In the bind above, Jump (the "+up" command) and power A will be activated when the key is PRESSED (and will continue to activate until the key is released). When the key is RELEASED Jump and power A will be turned off, and power B will turn on. Powers A and B toggle on and off between each other because of the toggling rule and power activation sequence of the powexec_name command (see above). Placing a "+" prefix at the beginning of any bind string will cause the key to act as a toggle key. Even the "+" prefix by itself (either with or without a space after it) will create a working toggle key (e.g., /bind <key> "+ $$powexec_name B$$powexec_name A"). However, a "+" prefix alone will now generate an error message in the game (as of the Issue 8 game update). To avoid the error message, a command needs to be paired with the "+" prefix, preferably a command that does nothing and merely acts as a placeholder. There are at least several commands, as of the date of this writing, that meet this criteria and can be used to make good working toggle keys. They are: target_custom_near To make a toggle key with these commands you would use them exactly as they are written above without the tags (arguments or variables) that these commands would normally require to operate. Remember, we don't want them to operate. So a toggle-key bind using one of the above commands would look like this: /bind <key> "+target_custom_near$$powexec_name B$$powexec_name A" Another command you could use to make toggle keys is the "gototray" command (e.g., /bind <key> "+gototray$$emote wave"). This method uses 3 less characters than the "+down$$-down" method, however, it also switches your bottom power tray to the #1 tray every time you press the bind key. If you can live with that, then it's a fine command to use. The point here is that as long as it works for you, any command is fine, and you might have to try several as time progresses and game updates alter the way binds work. In addition to the plus (+) prefix, there is the double plus (++) prefix. When the prefix "++" is used with a command at the beginning of a bind string (eg., /bind <key> "++forward$$powexec_name B$$powexec_name A"), it serves to turn the toggle key function OFF. This means that the bind string will only be executed once per keystroke, and will not be executed upon key press and again upon key release. This also means that, as in movement commands, the command will continue to execute until the key is pressed again. There is one last caveat. When using toggle keys, it is important to make sure that you don’t press and release the key too quickly. A very fast keystroke will sometimes cause the game to run the commands at key press and key release at the same time, essentially tacking on the same set of binds at the end of the original and treating the whole thing as one bind. Also, client-server-client lag (delays when your computer attempts to communicate with the game’s server, and visa versa) can cause the same error. Perhaps the most confusing, but also the most valuable, function for toggle keys is when they are used in combination with the "bind_load_file" command to create "toggle key text binds." Text binds are binds that reside in separate text files and that utilize the BIND_LOAD_FILE command to replace the current key bind with another from the text file (see TEXT BINDS above). What adding the "+ " tag to the beginning of text bind does is to allow us to execute one bind string residing in a specific text file on key press, and then another bind string from a different text file on key release. With this, we can often circumnavigate around limitations placed on us by the game, and execute commands in combination that otherwise would be impossible. For example, say you wanted your super hero to simultaneously leap into the air with a jump, turn on Fly with the "F" key, and make sure Sprint is turned off; but you ALSO wanted to be able to turn Fly off and Sprint on with a second stroke of the SAME key. Using a toggle key text bind we can create a bind that works in the desired manner, such as this bind below: FLY1.TXT: FLY2.TXT: FLY3.TXT: FLY4.TXT: The above toggle key text bind will execute the first bind (fly1.txt) and load the second on the key press, and execute the second bind (fly2.txt) and load the third on the key release. Then it will execute the third bind (fly3.txt) and load the fourth on the second key press, and execute the fourth bind (fly4.txt) and load the first bind again on key release – looping back to start over again. This simulates an on/off toggle key for two powers (Fly and Sprint), something impossible to do without toggle key text binds. As an aside, in prior game updates, not only could the "+ " tag at the beginning of binds be used without a command name attached to it, but in the second bind a place holder consisting of merely a blank space after the first quotation mark and before the first command separator ($$) could often suffice IF only "+ " was used alone in the previous bind string and not attached to a movement command. The blank space before the first "$$" command separators for each text bind was often necessary for this toggle key arrangement to function properly. For example: TEXTBIND1.TXT: TEXTBIND2.TXT: This method of creating a toggle key was used to cut down or reduce the number of characters used in a bind, and also allowed us to create a toggle key without movement commands mucking up the works – but it appears that the bind routine is altered slightly with each new game update, rendering this feature unreliable at best, if not entirely non-functional. The movement direction commands are actually toggles (eg., +forward, +backward, +left, +right, +up, etc.). This means that when a direction command is issued, it will stay on until the command is issued again to turn it off. In game, these commands appear to be special commands – turning on during key press, and off upon key release – but what is really happening is that the movement command executes upon key press (turning on the power), and then executes the same command again upon key release (turning off the power) – in short, utilizing the "+" prefix or "toggle key" function. The "++" prefix, on the other hand, serves to turn the toggle key function OFF. When used with a movement command (eg., ++forward, ++backward, ++left, etc.), the prefix will cause the command to be toggled ON, and will continue to activate, until the button is pressed again, toggling it off. Anything you can toggle (using ++ or +/-) you can explicitly turn on or off by adding the argument 1 (on) or 0 (off) after them (eg., /bind Y "up 1$$powexec_name"). For most commands that take a numeric argument (including the toggles), you can check the current value by issuing the command without any arguments. Click powers can be executed using any of the powexec commands. As indicated by Curveball’s Bind Guide, only one click power can be activated at a time (unless powexec_auto is also used to activate a second click power). A mixed click and toggle bind will pretty much behave as a normal toggle bind as described above with one big exception… when a click power is executed a second time, the click power will either be activated or queued up to be activated once it has recharged – and NOT toggled on and off. This means that if a click power is placed as the first power to activate in a bind string, no other powers will be executed (excepting powexec_auto), no matter how many times the bind key is pressed. For example: /bind <key> "powexec_name TOGGLE$$powexec_name TOGGLE$$powexec_name CLICK" This bind above will only execute the click power. Therefore, it’s usually best to place a click power command after all of the toggle power commands in the bind string – or at least somewhere other than at the beginning of the string – so that toggle powers have a chance to execute before the click power. This command only works for click powers that are not interruptable, and will not work for toggle powers. Interruptable powers are those that have a interrupt time (like sniper attacks, assassin strike, or powers in the medicine pool, etc.). Essentially, powexec_auto sets a click power on auto-fire – allowing the click power to activate automatically upon recharge until auto-fire is deselected. This command toggles auto-fire on and off, and can be placed ANYWHERE in the bind for it to work. However, if more than one powexec_auto command is included in a bind string, the command will only turn auto-fire on, and will NOT turn auto-fire off. As with other powexec commands, powexec_auto command is executed from right to left in the bind string (eg., /bind Y "powexec_auto D$$powexec_auto C$$powexec_auto B$$powexec_auto A"). So in unlikely cases where multiple powexec_auto commands are used together, only the first power (A) will be set on auto-fire. This may be useful to avoid turning auto-fire off if the same bind key is pressed again. In addition, if two powexec_auto commands are used for the SAME POWER in a bind (eg., "powexec_auto Gash$$powexec_auto Gash"), they will cancel each other out and prevent the command from executing (neither turning auto-fire on nor off). When powexec_auto is used in the same bind with either powexec_name or powexec_toggleon/off, it will execute on every keypress regardless of it’s location in the bind string. However, it is a best practice to place powexec_auto commands at the end of the bind string, after all other powexec commands have had a chance to execute in order to avoid any potential power activation problems. (eg., /bind <key> "powexec_auto D$$powexec_name C$$powexec_name B$$powexec_toggleon A") Besides the normal ways to toggle powers off using powexec_NAME and powexec_TOGGLEOFF commands, powers can also be turned off by adding the following commands to the end (right) of a bind string: Powexec_unqueue -- cancels a queued power. It will also turn off any powers that are included in the same bind string, as long as the powexec_unqueue command is executed in the bind following the normal power activation sequence. So the best place to put the command, if you want to turn powers off, is at the end of the bind string (far right) to make sure it’s activated, like so: /bind Y "powexec_name invincibility$$powexec_name unyielding$$powexec_name fly$$powexec_unqueue" This bind will only turn the powers off, and will not turn them on. When used with powexec_toggleon, the unqueue command will cause the bind not to function. When used with the powexec_toggleoff command, the unqueue command will turn off all powers and cancel queues. Powexec_abort -- cancels the auto-attack power and the queued power. It behaves exactly like powexec_unqueue above, including turning powers in the bind string off, as well as canceling queues and auto-fire. It should be noted that using powexec_abort or unqueue will cause weapons and such to be put away, and force you to redraw them before attacking. To clear a bind from a key use either of the following commands: "/BIND <key> NOP" is the official method of getting rid of a bind on a key. "NOP" stands for "non-operation" and you can use it with or without quotes in the bind command. However, I have found this command to be inconsistent. If NOP doesn’t work, binding a blank space to the key will also erase the bind currently assigned to the key (note the space between the quotes " "). Clearing a bind from a key is not merely a tool to erase a mistake, but can come in very handy for designing text binds that assign a bind to the left mouse button and then need to remove it. Incidentally, the left-click mouse command is the only action in the game whose action can not be remapped to a different key. Additionally, the binding on a key can be reset by using the UNBIND command. For example: /unbind W. This will remove any bind you have placed on the key and replace it with the default key binding. It's an excellent "Oops!" command to fix mistakes easily. I highly recommend it. You may wish to return ALL of your keys to the default key bindings that existed when you first bought the game or created the character. In this case, click on Menu in the game, then Options, then click on the Keymapping tab, and click on the "Reset Keybindings" button. In fact, I recommend you get familiar with the Keymapping tab. It can often be easier to assign certain actions to keys using the Keymapping options than creating binds manually. You can also reset all of your keybinds by using the slash commands /unbind_all or /keybind_reset. Types of powers/commands:
The order or sequence in which you arrange command types in your bind strings is crucial for the proper operation of your bind. If you were paying attention while you were reading this guide, you’d already know most of what I’m about to explain. Of course, arranging your bind commands in the order I am about to suggest is not, usually, a rule set in stone. You are free to experiment with different arrangements, many of which I suspect would work fine. All commands in a bind string are executed from left to right (-->), but power commands are activated from right to left (<--). This means that the first command (from the left) in a bind string will be read and executed first, and the last (far right) command will be read and executed by the game last. However, Powexec commands in the bind string will be activated in reverse order (from right to left). This is because powers interrupt each other when exectued in a series. Text strings, emotes, movement (for non-interruptable powers) and so on will not interrupt a power before it is activated, nor will deactivating toggle powers. Taking this notion that commands can interrupt or cancel other commands into consideration, we can determine a preferred order or parsing in which to write and arrange commands in bind strings. The following is an example bind with the preferred parsing: /bind Y "+forward$$CC 0$$team I am ready now, $target.$$emote thumbsup$$powexec_auto Gash$$powexec_name Dark Blast$$powexec_name Fly$$bind_load_file C:\[file location]\ready.txt" Rewriting the bind above using the command types would look like this: /bind Y "MOVEMENT commands$$MISCELANEOUS commands$$TEXT commands$$EMOTE commands$$AUTO-FIRE commands$$CLICK POWER commands$$TOGGLE POWER commands$$FILE LOADING commands"
Prefixes (such as + and -) or commands that contain prefixes (such as +forward and -down) that define a bind string as a "toggle key bind" must be placed first in the bind string so that the "toggle key" function will be activated. If the "toggle key" function is not desired, then the commands that contain prefixes, such as Movement commands, may be placed anywhere in the bind string. Next come Text and Miscellaneous commands because they take no time to execute. These are placed near the beginning to minimize their interference with other commands, but really can be placed anywhere in the bind string. Then Emotes are executed because their animations take time to process. Keep in mind, however, that movement commands cancel out the animations of emotes (as do the animations of powers when activated). The game can not process or combine multiple animations simultaneously, so it provides a hierarchy that determines which animations are executed and in what sequence. First come animations of powers, then come movement animations, and then come emotes (which are often simply cancelled out). After this come auto-fire commands so they do not interfere with click or toggle power execution (these are placed last in the power activation sequence, which means they are placed first before other power commands in the bind string). Next come click power commands because no toggle power command will activate after a click power has activated (think power activation sequence). Then come toggle power commands. These come after click power commands in the bind string so they will activate first. Finally, File Loading commands (such as "bind_load_file") execute last, after all of the other commands. This ensures that the other commands in the bind string are executed before the new text bind (with new bind commands) is loaded and attempts to execute. Remember, the very first command from the left is the command that will be read and executed first, even if power commands are activated in reverse sequence. It should be noted that whenever possible, blank spaces between commands should be avoided in bind strings, especially before or after command seperators ($$), in order to help ensure that the bind functions properly. Unfortunately, we all will encounter LAG at one time or other while playing COH, so saying a few words about how LAG adversely affects binds and what we can do to adjust our binds to ensure they operate correctly is probably worthwhile. This is especially true for me, since I’ve been playing with a low speed 56k dial-up connection. Lag seems to affect the operation of my binds far more than others who are on a broadband connection. Lag occurs when the game’s computer (server) is having trouble communicating with your computer (client), and visa versa. There can be pauses, hiccups, and slowdowns in bind execution; and sometimes a bind might not execute at all. I am certainly no expert on this subject, but three things appear to happen to binds during lag: 1. two binds are executed as one bind string, In my experience, the most common bind error when executed under lag conditions is that the bind string is duplicated, tacked onto the end of the first bind, and then both are executed as one bind string. This happens almost exclusively with toggle key binds because the bind is executed twice very quickly – once upon key press and again upon key release – which essentially duplicates the bind. So a bind such as this one: /bind Y "+up$$powexec_name Sprint$$powexec_name Fly" might be turned into a bind string that looks something like this one during lag conditions: /bind Y "+up$$powexec_name Sprint$$powexec_name Fly$$+up$$powexec_name Sprint$$powexec_name Fly" The twin instances of "powexec_NAME Fly" would cause a command conflict and the bind would malfunction (see the section UNDERSTANDING MULTIPLE POWEXEC COMMANDS FOR THE SAME POWER above). Toggle key text binds that load multiple binds from text files add a layer of complexity to this problem that can be very confusing. Instead of loading the same bind twice (once on key press and again on key release), a toggle key text bind would load the bind string in the first text file (on key press) and in the second text file (on key release) at the same time, and then execute both as if they were one long bind string. Consider this toggle key text bind, for example: TEXTBIND1.TXT: TEXTBIND2.TXT: Under LAG conditions or if the key is pressed too quickly, the commands at key press and key release from the toggle key text bind above would often be combined into one long bind string that might look something like so: Y "+up$$powexec_toggleoff Fly$$bind_load_file c:\ [file location]\textbind1.txt$$+up$$powexec_name Sprint$$powexec_name Fly$$bind_load_file c:\[file location]\textbind2.txt" My guess (and it is only a guess) about what is really happening behind the scenes with toggle keys and lag is that when the bind key is pressed and released, the game attempts to execute the bind but communication fails between the client/server, and the command is not processed. Instead, the first set of commands issued on key press and the second set of commands issued on key release are stored in a "queue," waiting to be executed when communication is re-established. Once communication is resumed, the game runs both bind strings at the same time as one bind. When designing or troubleshooting a bind using the toggle key function, it’s important to take into consideration the possibility that bind commands may be duplicated sometime during game play. Creating binds that, if duplicated or combined, will not cause same-power command conflicts is easier said than done, however. Whether or not a command conflict occurs depends on the specific commands used in the bind as well as their sequence in the bind. Your best bet would be to look at the UNDERSTANDING MULTIPLE POWEXEC COMMANDS FOR THE SAME POWER section above, and see what would happen if any of your toggle key binds were duplicated or combined, and then experiment with different command arrangements that might not cause conflicts if repeated. There is, however, one saving grace here. Duplicate instances of the powexec_TOGGLEON <same power> command will not cause conflicts, so it may be safer to use powexec_toggleon to turn on powers instead of powexec_name. The second thing that might happen during lag is that a bind command (or the bind string) may be truncated because of loss of communication and data. For example, "powexec_name Unyielding" might be truncated to "powexec_name Unyieldi" or "powexec_na" or "pow". Truncated or partial commands will be ignored by the game. It might mess up your power activation sequence (which power activates when), but other than this, partial commands really don’t cause any trouble, they simply will not function is all. Needless to say, a truncated command won’t turn on/off a power. The best bet to try to avoid this is simply to use multiple powexec_toggleon <same power> commands to make sure that at least one of the complete commands is executed. Unfortunately, duplicating other powexec commands in a bind might cause problems, depending upon the specific commands used in the bind and their location in the bind string. The third thing that happens to binds during lag is that delays in power activation occur. You might press a key, and some commands may be executed, but a power may not turn on except after a lengthy pause. I don’t know why it works, but I’ve found that adding at least two powexec_toggleon <same power> commands to a bind string sometimes eliminates power activation delays in binds. For example, /bind Y "+up$$powexec_name Sprint$$powexec_toggleon Fly$$powexec_toggleon Fly". It’s odd I know. It shouldn’t work, and often it doesn’t, but what can I say? Try it and see.
For some excellent examples of binds, check out Black
Spectre's Binds here.
In order to create binds in City of Heroes/Villains, you'll need to know the names of the keys on the keyboard so you can bind commands to them. Some keys can only be bound using the designated name for the key, while other keys use their own symbol or character for binding purposes. There is often more than one name for a specific key: a primary name and a secondary name. Primary names are fully supported by the game, and I highly recommend you use those over the secondary names. The secondary names will work fine in binds, however some game features such as the ability to use the "/unbind" command to restore the default key binding to the key will not work for most secondary names (with a couple exceptions). To unbind keys where you have used the secondary name, simply unbind the key twice using both the secondary and primary names. I had previously endeavored to present a complete list of all key names for every key on a standard keyboard, and I got very close. The previous list was compiled by thoroughly and meticulously scouring the original City of Heroes forums and many other websites for any mentions of keyboard keys and binds by players. Now in 2023, I have access to the actual data files of the game. In the code I found about 15 additional key names that have not been previously documented, and have included them here in this list (and the list at the Homecoming Wiki). This list also includes descriptions for many of the more obscure or potentially confusing keys. Descriptions were not made for key names that are generally self-explanatory. The key names in this list are arranged according to the rows on the keyboard from top to bottom and/or according to specific groupings or clusters of keys on the keyboard. The game can recognize many more keys than have been exposed for players to use. If you have a keyboard key that is not on this list, you may still be able to re-map it through the Keymapping tab in the Options window. Further, the game might interpret your unknown key as a different key name that can be used with binds, and the Keymapping tab may tell you this as well. I am indebted to @Curveball and @Storyteller for their work on key names. They discovered the bulk of the key names we know today. As usual, compiling this list would have been much more difficult without the trailblazing work done by those before me… work of extraordinary magnitude. They have my gratitude. :)
TROUBLESHOOTING BINDS This short quide will help you quickly figure out why your bind doesn't work and how to fix it. This is called "Troubleshooting," and this guide will help you with the most common mistakes, errors, and binding problems that can occur. Troubleshooting binds is not necessarily an easy task. It often takes work, determination, and a relentless tenacity that would put the Terminator to shame. This entire Advanced Bind Guide can be viewed as one big troubleshooting manual, and that is indeed one of its intended purposes. That said, there are several standard things you can do to figure out why your bind doesn't work. Try the following steps one at a time and see if any one or all of them work for you. Your goal is to eliminate as many of these causes as possible and eventually narrow down the options to a single culprit. Remember, there might not be only one cause for an inoperable bind, but there might be many causes. Binds are finicky. If they're not perfect, they simply won't work. Step 1: Save Your Current Binds Step 2: Check The Bind's Syntax
Step 3: Check the Key Name Step 4: Check the Parsing Step 5: Is The Command "Over-Bound"? Step 6: Reset The Key Step 7: Try It On A Different Key Step 8: Reset All Your Binds
TROUBLESHOOTING TEXT BINDS: "Bind_load_file" is the single most important command for creating and using text binds. There are several potential things that might go wrong while using text binds (in addition to the above), and I'll list them below:
Well, that's it for basic troubleshooting. I hope this has helped, and as usual, good luck with all your binding efforts!
Back to Black Spectre's Home on the Web
|