City Of Heroes/Binds/TWUFIGTB

INTRODUCTION
Welcome to the Wholly Unofficial and Fairly Incomplete Guide to /bind, an attempt to collect all the information we know about the bind command and organize it in a way that will make using it a lot easier to understand. Bind is a very powerful tool for customising the way you play your game, and while it's a little confusing to use when you first get into it, it gets easier the more you play with it.

This guide will (hopefully) make it easier for you to:

- Understand what the /bind command does - Get a solid grasp on how it works, so you can play around with it on your own, and - Immediately start using /bind to remap your keyboard and mouse in ways that the basic options in-game will now allow

This guide was written by Curveball in his spare time. It was written based on his experiments during the beta program, and based on the tests and observations of others. Corrections have been made, and hopefully other people in the community with more in-depth knowledge of /bind will make corrections as they find them.

No developer oversaw or authorised the creation of this guide, and there is always the off-chance that on any given subject I have no idea what I'm talking about.

Why this guide exists
I have been playing around with /bind since my second week of testing, and one of the things that made it difficult to figure out what to do was that all the information you need exists in multiple locations. There is a list of official keybinds, a /bind FAQ, a /bind FAQ comments thread, a list of unofficial slash commands, my own thread on binding commands to your mouse, El_Presidente's thread on creating "toggle binds," various threads on keybinds.txt files, and more. All of these threads are useful and worth reading, but it helps if you go into any one of those threads with a general knowledge of all of them. This guide is an attempt to give you a fairly basic understanding of /bind so that you can read those threads and understand what everyone is talking about.

This guide also exists because the /bind commands can make the game more accessible to people who otherwise would not be able to play it. One of the first threads that I remember following with interest on the beta testing forums was started by a man who was disabled and had limited motor functions -- he could use either the keyboard or a mouse, but not both. This is exactly the kind of situation where the /bind command can shine -- while it can't solve his problem (both the mouse and keyboard are needed in this game, and you can't do away with either) it is possible to use /bind to make the game vastly easier to play and to minimize the awkward spots.

Acknowledgements
Back in the beta testing days I searched through threads gathering all the information I could find on /bind, and I took lots of useful info from a lot of people. There are a few people, however, who I want to acknowledge specifically, either because they were developers who were very accessible and helpful when it came to talking about the subject or because they were other testers who loved playing around with this stuff and talking about it as much as I did.

poz pohsyb SaberCat Weap0nX El_Presidente Jason Brannen

and since release there have been a few others who have been invaluable resources:

Grotus Vapors

I know there are more people who should be on this list, but at the moment I can't remember any of them (and alas, I only saved two threads from the old boards). I apologize if I left you off that list, and I thank you for your help. --Curveball.

UNDERSTANDING WHAT /BIND IS
City of Heroes comes with a set of predefined in-game navigation and control commands. Pressing the W key moves your character forward, pressing the A key rotates your character to the left, pressing the D key rotates your character to the right, and so on. If you're not happy with these commands, you can open up the options panel, press the controls button, and replace some of them with key strokes our mouse button clicks of your own choosing. But you can't do this with every single key in the game. If you want more control over how the in-game commands are assigned to keys, you must use /bind.

In it's simplest form, /bind tells the game "from now on, when this button is pressed I want you to trigger that action." That action could be anything -- start a power, bring up a UI panel, send a message to another player. It's even possible to assign multiple actions to the same bind, though there are limits, and the more complex your /bind the greater a chance that something unexpected (and perhaps unwanted) will happen. That button can be almost any button on your keyboard or mouse, though again there are some limits. But essentially, /bind is telling the game that when you press the F key you want to activate the Hover power.

What /bind is not
/bind is NOT a macro language, and it cannot be used to automate your actions. In some games it is popular to write macros or shortcuts that allow you to queue up a number of attacks: for example, to start out with jab, then punch, then haymaker, and then to repeat until you no longer have a target. This is not possible using /bind, though it is possible to do some interesting things with it that come close.

There are in fact macros in the game, but they are slightly different than macros in other games. Macros will also be covered at the end of this guide, since they share many similiarities to /bind (and enough differences to make them important).

USING /BIND: THE BASICS
Before you can understand how to use /bind properly, you need to know how to use "slash commands." Slash commands are commands that you send to the game while using the chat window. /bind is a slash command, so understanding how they work in general will help you understand how to use /bind specifically.

Tangent: a brief guide to slash commands
While you are in-game, press your ENTER key. You'll see a flashing prompt in your chat window. You've probably used this any number of times to say something to other players in game, either through the local, team, broadcast or query channels. You may also know that if you append a slash ("/") to certain words they will be interpreted as in-game commands. For example, if you have ever fallen through the city and find yourself standing in the middle of a big blue void, with the ghostly image of the city hanging above your head, you might press the ENTER key and type

/stuck

and voila! You re-appear at the entrance to the zone you were just in. City of Heroes saw the slash in front of "stuck" and realized that you were sending it a command. It then looked up "stuck" and saw that it needed to return you to the proper zone, and *poof* -- it was done.

Any time you put a slash in front of text in your chat window, City of Heroes interprets the word that follows as though it were a command, whether the command exists or not. For example, /g tells CoH that all of the text following the "g" should be send to the group channel (or the team channel).

So if I typed

/g I'd really like a ham sandwich.

Anyone in my team would see the following message

I'd really like a ham sandwich.

Some commands are a little more complicated -- not only will the game need to know the general command to tell it what to do, it will need a few pointers to show it how or where to do it. For example, /t or /tell informs the game that you want to send a single character on the server a private message. But which character?

The proper way to send a tell is to type the following:

/t [character name], Hey! Want to group?

[character name] in this case represents someone's actual name. So what you have to do is use the /t commend, then enter the character's name, then use a comma to separate the instructions from the message, then type the message. So

/t Curveball, Hey! Want to group?

Would cause the message "Hey! Want to group?" to show up in my text window. Which, by the way, is not necessarily a great idea because he's not the best defender ever made. Caveat Emptor...

All this really means is that when you're using a complicated slash command you often have to be very specific in telling City of Heroes what you want to happen, and that often you have to give it that information in a very specific way. For example, if you typed

/t Curveball Hey! Want to group?

City of Heroes wouldn't know what to do. For all it knows, the character you're trying to send a message to is named "Curveball Hey! Want to group?" which is impossible, since the name field doesn't allow exclamation points or question marks. The comma after the name is very, very important, because it tells the game "I've told you who to send the message to, now I'm going to tell you the message."

Bringing the tangent back on-topic
That's all well and good, you ask, but what does that have to do with /bind? Well, two things:

- First, /bind is a slash command (as I've already said) and you need to know how slash commands work in general - Second, /bind is a slash command that can TRIGGER OTHER SLASH COMMANDS.

You'll see what I'm talking about later.

Parsing a /bind command
/bind, like /t or /tell, requires that you parse (format) your command very specifically. The basic layout of a properly constructed /bind command is

/bind [trigger] "[command]"

First you identify the slash command (/bind). Then you identify what key will start the command ([trigger]) and then you place quotes around what the /bind actually does ([command]).

Of course, none of that makes any sense unless you know what a trigger is and what a command is.

Triggers
A trigger is either a:

- single key - combination of keys - mouse click, or - key and mouse click combination

that activates the /bind command. A trigger can be pressing the e key, or clicking mouse button 1, or pressing the left shift key in combination with either the e or mouse button 1. Combinations of keys and mouse buttons allow you to map a lot of very specific commands to a limited number of keyboards, provided you can keep track of all of them in your head.

Each key has a name that /bind uses to differentiate it from other keys. The majority of the names are pretty easy to figure out -- for example, the e key is "e", and the F1 key is "F1." But because some keys on your keyboard share the same name, City of Heroes has assigned them unique, more complex names to set them apart. For example:

lshift -- the shift key on the left side of your keyboard rshift -- the shift key on the right side of your keyboard numpad1 -- the "1" key on your number pad (as opposed to the row of numbers at the top of your keyboard) lbutton -- the left mouse button on a right-handed mouse (more commonly known as mouse button 1) mbutton -- the middle button on a three-button mouse (more commonly known as mouse butotn 3, often the scroll wheel on modern mice) button4 -- usually the thumb button on modern mice

Some special keys can be used in combination with other keys and mouse buttons. These keys are called chord keys -- they do not act as triggers themselves, but can be used with trigger keys to make new triggers.

For example, suppose you've set up the e key to trigger your tanker's Temporary Invulnerability power. In this case, E is a trigger -- when you press it, it causes the Temporary Invulnerability power to activate. So the /bind command might look like

/bind e "[power activation command]"

(The specifics of the command are not important at the moment. It will be dealt with in the next section. )

The e key is very convenient to access in combat, and if you want you can combine it with a chord key in order assign another command to it. So you could have

/bind lshift+e "[another power activation command]"

which would tell the game "when the left shift chord key key is pressed, and then (while the left shift key is still pressed down) the e trigger key is pressed, execute the following command."

In the first example, pressing the e key allows you to trigger a power. In the second example, pressing the left shift key and e key together allows you to trigger another power entirely -- the shift key is essentially making the e key a completely new trigger.

When you are setting up a chord key and trigger key combination you separate them with the "+" symbol. This tells the game that you are using both keys together. /bind commands are read from left to right, so if you are using chords in a trigger you must always use the chord key FIRST. If you typed

/bind e+lshift "[another power activation command]"

the game would read it as

/bind e "[another power activation command]"

and OVERWRITE your original e binding. It does this because e is a trigger key, and cannot chord -- so it sees "oh, there's an e, I can't do anything else" and skips right to the command in quotation marks.

Commands
A command is the instructions the game follows when a trigger is pressed. Commands are usually other slash commands -- in fact, most of the time when you create a /bind you are assigning a slash command to a key or mouse button.

But what are these commands, you ask? Well there are a lot of them, and they're scattered around the forums, but the most important ones can be found in these two locations:

- APPENDIX A (which can be found at the end of this guide) provides a list of all the default keybindings -- which keys trigger which navigation and combat actions, that sort of thing - APPENDIX B (which can be found at the end of this guide) provides a list of all the slash commands that existed as of the time of the posting. It may or may not be up to date -- there may be new slash commands, and some of the listed commands may no longer work.

Putting it all together
Now that you know what triggers are, what types of things those triggers can make happen, let's look at a simple /bind command:

/bind e "powexec_name Temp Invulnerability"

This tells the game that whenever the e key is pressed, the power "Temporary Invulnerability" should activate.

Now, powexec_name is a slash command. If you were to activate Temporary Invulnerability in your chat window, you'd type

/powexec_name Temp Invulnerability

and the power would trigger (assuming you had it). By binding that command to the e key, you save a lot of time, especially in combat.

One of the things you will notice in the /bind example is that the slash command was called out without the actual "/." /bind assumes that you are going to send it a slash command, so the slash is not only unnecessary, but it will break the command.

BINDING MULTIPLE COMMANDS TO THE SAME KEY
The previous example was the simplest form of a /bind command: a key triggered a single action. Sometimes you might want to do something a little more complicated, set up a binding so that when a single key is pressed, multiple things happen simultaneously.

In keeping with our previous example, let's say that when the Temporary Invulnerability power is triggered you want to have your character say "I am invincible!" Well, that is actually two slash commands:

/powerexec_name Temp Invulnerability /local I am invincible!

To do this, you need a way to tell /bind "but wait, I want you to do something else." You do this by inserting "$$" between the two commands:

/bind e "local I am invincible!$$powerexec_name Temp Invulnerability"

"$$" can be thought of as "and then" -- you are telling the game "say 'I am invincible!' AND THEN trigger the Temporary Invulnerability power." The game will do just that -- in that order -- though it will happen so quickly it will appear to occur simultaneously.

You could do this with just about any power you want. A popular keybinding is to add a message to the taunt power, like

/bind t "local C'mere, ya pansy! Who wants some?$$powerexec_name Taunt"

You can even do this to trigger more than one power with the same key:

/bind e "powerexec_name Temp Invulnerability$$powerexec_name Hover"

This turns on the the Temporary Invulnerability power and then turns on the Hover power. (Unless Hover is already on, in which case it turns Hover off.)

Things to consider when using $$
Some developers have recommended omitting spaces between the commands that appear before and after the $$ symbols. All of the examples in this guide adhere to that "standard," but some of the examples the developers have used in various threads do not. However, placing a space between $$ and your commands can cause things to break. For example:

/bind h "powexec_name Healing Aura $$ local You are healed!"

will not work. Why? Because the /bind command is not being read as "execute 'Healing Aura'," it's being read as "execute 'Healing Aura '" -- note there is a space after Aura. Since there is no such power as Healing-space-Aura-space, nothing happens.

Strangely enough, you CAN use

/bind h "local You are healed! $$ powexec_name Healing Aura"

and it WILL work. This is because the first command is a text message, and City of Heroes doesn't care if a text message ends in an exclamation point or a space.

At any rate, I suggest leaving no spaces at all between your first command, the $$, and the second command... and third command... and fourth command... etc.

What you CANNOT do with multiple actions
The one thing you can't do when you bind multiple actions to the same key is set up a macro that will execute one attack, then a second attack, then a third attack, and so on. If you tried to do the following:

/bind 1 "powexec_name Punch$$powexec_name Jab$$powexec_name Haymaker"

then the game would immediately try to set up punch, an instant later be told to execute a jab instead, and finally be overridden a third time and be told to perform a haymaker. And the only thing it would do is perform a haymaker.

There is an intesting trick you can use to get around this to an extent -- it's covered in "Neat things you can do with /bind."

USING VARIABLES IN /BIND
Sometimes you will want to create a binding that will require the use of information that you won't necessarily have at the moment. You may not have it because you don't know it, or because that information changes, or because that information will be different depending on which character you're playing (and you want a common set of key bindings for all your characters). City of Heroes currently supports six variables that you can use as placeholders, which will be substituted with the actual information when it is available.

Five of the variables are placeholders for information about your own character:

$name -- your character's name $origin -- your character's origin $archetype -- your character's archetype $level -- your character's level $battlecry -- your character's batlecry

It is possible to supply this information yourself, but then the /bind command would be specific to that character only, and if you ever exported the key bindings and imported them into another character you would have redo those /binds. Besides, your level changes throughout the game.

With these variables, it is possible to have a /bind command like this:

/bind v "local Hello, I am $name, a level $level $origin $archetype. $battelcry"

This bind would cause whichever character you were using at the time to fill in those variables with information specific to their individual builds. If we were to use my characters, for example:

Curveball "Hello, I am Curveball, a level 10 magic defender. You have GOT to be kidding me!"

The Judge "Hello, I am Judge, a level 11 mutant tanker. You are... guilty."

Stormhaven "Hello, I am Stormhaven, a level 12 mutant defender. "

Note that if the battlecry has its own punctuation (as both Curveball's and the Judge's do) it will be included in the battlecry string (which is why I did not include any in my bind.) Stormhaven, who has not battlecry, says nothing -- but there is still a trailing space between the period at the end of the first sentence and where the battlecry would start.

The last variable is $target, which acts as a placeholder for the name of any OTHER character you are currently selecting -- what that character be another hero, a civilian, or a villian. This variable can be very useful when you want to identify whoever you've targeted.

For example, you could create a /bind command that would call out a specific villian whenever your tanker uses taunt:

/bind t "local C'mere, $target!$$powexec_name Taunt"

If you had selected a Hellion Gunner and selected the t key, your character would say "C'mere, Hellion Gunner!" and activate the Taunt power.

This can be used in benign ways as well. I recently teamed up with a character who used the teleport friend power, and had a key binding set up to inform group members when this was happening. I believe he used a key binding similiar to

/bind t "group $target, prepare to be teleported to my location.$$powexec_name Recall Friend"

This sent a message across the group channel letting everyone know that a character was about to teleported to the hero using the power, and then activated the Recall Friend power. If he had wanted the message to be more private, he could have done it this way:

/bind t "tell $target, Prepare to be teleported to my location.$$powexec_name Recall Friend"

In this example, the variable $target is actually part of the command -- remember, tell needs a character name (followed by a comma) in order to know who to send the message to.

USING /BIND WITH YOUR MOUSE
Mouse buttons are trigger keys just like your standard keyboard keys are, so you can assign /bind commands to them in pretty much the same manner.

The trigger key names for each of the mouse buttons are listed below.

lbutton -- the left mouse button on a right-handed mouse. It is usually referred to as "Mouse Button 1" when used in the context of both left and right handed mice. rbutton -- the right mouse button on a right-handed mouse. It is usually referred to as "Mouse Button 2" when used in the context of both left and right handed mice. mbutton -- the button between Mouse Button 1 and Mouse Button 2. In modern mice it usually doubles as the scroll wheel. It is usually referred to as "Mouse Button 3." button4 button5 button6 button7 button8

Buttons 4 through 8 are used to describe extra buttons your mouse may have. At present (29 March 2004) it does not seem possible to successfully use button5, button 6, button 7 or button 8 in key bindings. Button4 seems to work just fine.

lbutton/button 1
Button 1 is used in-game when you select targets (friendly, unfriendly and neutral) and click on items in the user interface (or certain objects in game). It seems to resist being overridden. You cannot, for example, attempt to REPLACE its default "click" binding with another command. Attempts to do so cause both commands to execute.

For example:

/bind lbutton "+forward"

Does not replace button 1's default functionality with "forward" -- instead, when you press down on button 1, a "click" is triggered AND your character moves forward. This could have some awkward consequences -- if your mouse was resting over a power icon in the power tray, for example, and you clicked on the button to move forward you would also click on that power.

rbutton/button 2
Button 2 is used in-game to "right click" on objects in order to see the options on their cascading menu. This is extremely important because it gives you access to the complete descriptions of powers, or the ability to trade with other characters.

Button 2 is easier to override than button 1, but it still retains the ability to pop up a right-click menu, no matter what you do to it. For example, I currently have my mouse set so that pressing button 2 puts it in a permanent mouse look mode until I hit another key to bring it out of it. If I do this when hovering over a button on the power bar, the popup menu appears even though the mouse has disappeared and there's no way to access anything on it. I have to hit the escape key to make the menu disappear before I can continue playing the game.

mbutton/button 3
Button 3 is a weird button. It seems to be permanently bound to +camrotate, which allows you to rate the camera around your character. I have been able to override this key command for short periods of time, but eventually +camrotate suddenly re-attches itself to mbutton, while retaining the functionality of whatever else is bound to it. I can't figure out exactly why this happens or why it sometimes happens immediately and why it sometimes doesn't happen for an hour.

SAVING AND LOADING YOUR KEYBINDS
If you want to save your keybindings to your hard drive, use the slash command /bind_save. This saves your keybinds in a file called keybinds.txt, located in the root directory of your c: drive.

If you want to load the keybinds.txt file, use the slash command /bind_load. As long as the keybinds.txt file is still in the root directory of your c: drive, it will load automatically.

It is possible to load other text files with keybinding commands in it simply by specifing the file name and location. The full command is

/bind_load_file [path]

So, for example,

/bind_load_file c:\coh\textfiles\judge.txt

would load the judge.txt file from the c:\coh\textfiles directory.

When a bind file is loaded using either /bind_load or /bind_load_file, the new file does not REPLACE the old file, it is MERGED with it. If a keybinding conflicts between the current file and the file being loaded, the binding in the file being loaded is used... but any key binding mentioned in the current file that is not present in the file being loaded is left alone.

Thus you can use /bind_load_file to load a keybinds file that has only two entries in it, and only those two entries will be changed. This is useful in the toggle keybindings section of the "Neat things you can do with /bind" chapter.

Understanding Keybinds.txt
The keybinds.txt file is the file that is created when you use the /bind_save slash command. It contains a list of all the triggers and commands you have defined for the character you saved it from.

This is a sample of what keybinds.txt looks like:

Q "powexec_name Hurricane" R "powexec_name Sprint" RALT "alttraysticky" RBUTTON "+forward$$+mouse_look" SHIFT+RBUTTON "+backward$$+mouse_look" ALT+RBUTTON "nop" RIGHT "+turnright"

Notice the /bind command is not used at all. All you see is the trigger and the command. If you want to make custom keybind files (that can be loaded with the slash command /bind_load_file) then you need to follow this format. Use the /bind command in the chat window, not in the keybinds.txt file.

USING "TOGGLE BINDS" (different than powexec_toggleon)
/bind is designed to tie a specific command to a specific key. The command might be fairly elaborate, involving an action, speech, a remapping of auto-attack, and a few combinations of slash commands, but each time you press the key it always invokes the same command. "One key, one command" is the way /bind was intended to work.

There is, however, a way around this.

Let's say that you want to bind some text to your character's taunt power, so that your character will actually taunt the villian when the power is activated. But you don't want to use the same text time after time after time, because you don't want your group to get annoyed. So you come up with five different taunts:

"Get over here!" "You're next." "Who wants some?" "C'mere, ya pansy." "Let's see what you've got."

These taunts will add a little variety to your character's taunting power, and because it's not the same thing over and over again may be a little tolerable for your teammates.

Now, you could go ahead and bind each taunt with your taunt power, each to a different key, but that would be wasteful. Wouldnt' it be more convenient if you hit one taunt key, and each time you did so it called up a different taunt? It is possible to configure a key to "toggle" through a set of different keybindings, but it's a little complicated. The way you do this is by constantly replacing your current keybinding with a new one, using the command /bind_load_file

a brief tangent: a recap of /bind_load_file
The /bind_load slash command tells City of Heroes to load the keybinds.txt file in the root directory of your C: drive. The /bind_load_file slash command allows you to specify the name and location of the keybinding file you want to load. Thus, I use the following commands:

/bind_load_file c:\keybinds\curveball.txt /bind_load_file c:\keybinds\stormhaven.txt /bind_load_file c:\keybinds\judge.txt

and the game would go into my c:\keybinds directory and load whatever file name I specified.

The curveball.txt, stormhaven.txt and judge.txt files have a few commands specific to those characters -- Stormhaven is a storm/electric defender, and the key I use to bring up his hurricane power is the same key I use to bring up Curveball's teleport foe power. The key I use to bring up The Judge's temporary invulnerability power is the same I use to bring up Curveball's force field power. When I create a new character that has a similar archetype to one of these, I first use /bind_load to bring in my basic command set, then I use /bind_load_file c:\keybinds\curveball.txt (or stormhaven.txt, or judge.txt) to bring in archetype-specific keybindings.

And because these files only require a few deviations from my default keybinds.txt file, I only need to include a few commands in each:

curveball.txt

e "powexec_name Personal Force Field" w "nop" q "powexec_name Teleport Foe" f "nop" t "nop"

stormhaven.txt

e "powexec_name Steamy Mist" w "powexec_name Freezing Rain" q "powexec_name Hurricane" f "powexec_name Hover" t "nop"

judge.txt

e "powexec_name Temp Invulnerability" w "nop" q "nop" f "nop" t "powexec_name Combat Jumping"

Each of these files only import five keybinds. Some of those keybinds are simply commands that overwrite what was originally there and replace it with nothing (nop) and others are specific powers.

If I wanted, in my default keybinds.txt I could create commands that automatically loaded these:

numpad1 "bind_load_file c:\keybinds\curveball.txt" numpad2 "bind_load_file c:\keybinds\stormhaven.txt" numpad3 "bind_load_file c:\keybinds\judge.txt"

then by hitting the numbers 1-3 on my number pad I could automatically load a custom bind set.

putting the tangent back on course: creating a toggle bind
To set up a key that toggles between the five taunts I listed earlier in this section, you need to create custom keybind files for each of them. These keybind files need to contain three things:

- the command to speak the taunt, - the command to activate the taunt command, and - the command to load the next taunt binding

The first thing you need to do is to create five keybind files:

taunt1.txt

taunt2.txt

taunt3.txt

taunt4.txt

taunt5.txt

In each taunt file, you need to put in the /bind command that gets executed. So each file would look like this:

--taunt1.txt-- t "local Get over here!$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt2.txt" --taunt2.txt--

t "local You're next.$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt3.txt" --taunt3.txt-- t "local Who wants some?$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt4.txt" --taunt4.txt-- t "local C'mere, ya pansy.$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt5.txt" --taunt5.txt-- t "local Let's see what you've got.$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt1.txt"

When taunt 1 is active, pressing t will cause the character to say "Get over here! and activate the taunt power. At the same time, City of Heroes loads the taunt2.txt file and (since the bind command is for the same key) overwrites the t key with the new binding. So the next time t is pressed the character says "You're next." and the taunt power is launched again -- and this time, taunt3.txt is loaded, and THAT binding replaces the current one, and so forth and so on until finally taunt5.txt rebinds the key to load taunt1.txt, and the cycle starts over again.

Because the toggle bind is only loading and replacing one keybinding at a time, the process takes place very quickly.

Now the only thing left to do is to actually bind t to the first toggle command. You can either do this manually or you can add it to your keybinds.txt file:

t "local Let's see what you've got.$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt1.txt"

when you use the slash command /bind_load, then t will be bound to emulate the taunt5.txt binding, and the next time t is pressed the first taunt binding will activate.

As long as you are willing to be patient and set up your files before you get into the game, you can create toggle binds for just about everything. I was able to create a toggle bind for my mouse: pressing a key loaded one set of binds to my mouse (to put it in "movement mode") and pressing it again loaded another set of binds (to put it in "default mode").

MACROS (brief)
What do you do when you run out of keys to bind? Create icons.

By the time you've reached 40th level in City of Heroes you'll have roughly 20 powers. Some of those powers will be powers you need to activate, some won't. If every single power required activation, they would take up two full trays on your power bar...

... so why are there nine trays? Why, so you can create your own icons, of course!

In City of Heroes it is possible to create your own icons on the power bar. These icons can be activated with a mouse click, or can even be bound to keys if you use the /powexec_tray slash command to identify which tray and which slot in that tray the icon is sitting. You do this by using the /macro command.

/macro is very similar to /bind -- you are, in effect, binding a command to an object. The main difference is that /bind uses objects that already exist (keys on your keyboard) as the trigger, whereas /macro creates the trigger and then associates the command to it. The trigger it creates is a new icon that sits on the first empty slot on your power bar.

The basic format for /macro is

/macro [macroname] "[command]"

It is possible to do anything with /macro that you can do with /bind. The only major difference is that instead of pressing a key to trigger the command, you click on the macro icon sitting in the power bar. You can also use any key bindings associated with the slot it is sitting in (for example, if it were in the second slot on the first tray of the power bar, you could press the 2 key to activate the macro) but you cannot bind a key directly to the macro itself.

People are often confused by /macro because it's so similar to /bind. Here's an example of macro creation to put the entire thing in context.

Let's say I want the Judge to have an emote/speech combination: I want him to perform the ThumbsUp emote and say "Good work!" But I don't want to devote a key to it -- I need my keys for combat and navigation controls -- but I decide it would be all right if I could just click on an icon in the power tray to perform that function.

I know what the /bind command would be for this:

/bind [some key] "em ThumbsUp$$local Good Work!"

For /macro, [some key] is replaced by whatever name you want to give the macro:

/macro GW "em ThumbsUp$$local Good Work!"

typing that in the command window will cause a new icon to appear in the first empty slot on the first available tray on my Power Bar... with the letters "GW" stamped on it. I can now move that icon anywhere I want to on my tray, and clicking on it will cause the Judge to stick his thumb up in the air and for him to say "Good Work!"

You can name your macro anything you like, but the icon has limited space to actually display the letters. I try to keep my macros down to one or two-letter names so they can be read clearly on my icon tray.

That is the /macro command in a nutshell. Really, that's all there is to it. /macro seems tricky because it is almost identical /bind, and the "almost" throws people. The only difference between the two is that /macro creates the object that triggers the command, and you need to tell the game what the object is named.

NEAT THINGS YOU CAN DO WITH /BIND
This is the section that has samples of some of the fun stuff you can do with the /bind command. Most of these ideas are not my own -- they were picked up here and there from people far more ingenious than I.

Getting around the "no queued attack" rule
We've already learned that you can't actually "queue up attacks" with /bind -- but there is away to get around that limitation, to an extent. One of the participants in my "The Day I remapped my mouse with /bind" thread had an ingenious bind that did no less than SEVEN actions. The last two actions were to attack with two different ranged attacks.

How did he do it? By not really attacking the first attack -- instead, he just set it up so that attacking would be the immediate consequence of the command:

/bind numpad0 "powexec_auto Dark Blast$$powexec_name Moonbeam"

This is just the last bit of the original bind, which is much longer. When the 0 button on the number pad is pressed, Dark Blast is set up as an automatically fired power -- that is, it will fire at an enemy is selected and within range of the attack. After Dark Blast is set to auto, Moonbeam is fired. So this is what happens:

1. Dark Blast is set up as an "autofire" power. 2. Moonbeam is fired. 3. Dark Blast will fire, recharge, fire, recharge, fire, recharge, etc.

With this bind, you essentially set up two attacks, but you only specifically fire off one.

Targeting the nearest enemy
The tab key is nice for quickly moving from enemy target to enemy target, but how do you quickly attack the closest enemy to you? It's easy -- first you tell the game to target no-one at all, then you tell to to target an enemy -- it will always choose the closest one to you:

/bind space "target_enemy_near"

When you press the space bar, the game will drop any target you currently have and then target the closest enemy.

Remapping your mouse to control your movement
If you're not satisfied using your keyboard to control all your movement, you can bind navigation and movement keys to your mouse buttons. To give you greater mouse control. The following examples assume you have a four button mouse:

/bind rbutton "+forward$$+mouse_look" /bind lbutton "-mouse_look" /bind mbutton "map" /bind button4 "+up" /bind lshift+rbutton "+backward$$+mouse_look" /bind lalt+rbutton "-mouse_look"

The first button is the basic navigation command. When you click mouse button two, the mouse enters "mouse look" mode. The mouse pointer disappears when you move the mouse to the left or right, your character turns left or right. When you move your mouse up or down, your character looks up or down (and if flying, your character tilts up or down). Now every time you press down on mouse button 2 your character will move forward.

The second binding ends mouse look -- when you actually need to use your mouse to click on something, click on mouse button 1 and your pointer will reappear.

The third mouse binding causes the zone map to pop up whenever you press mouse button 3. Mouse button 3 will probably continue to stay mapped to +camrotate, so you can still use it rotate the camera around your character. It is alternately annoying and amusing to see one happen when you're only interested in the other.

The fourth mouse binding allows mouse button 4 to control when the character jumps. I find that controlling jumps with my thumb gives me a lot more control over my timing.

The fifth mouse binding acts just like the first, only instead of going forward the character moves backward. Sometimes I find I have to re-enter the first mouse binding after entering this one, because it accdentally writes over the first. Re-entering the bind usually solves the problem, but it can sometimes be problematic.

The sixth mouse binding allows me to right-click on objects with my mouse when I have the left alt key pressed down in order to bring up the popup menu.

APPENDIX A: DEFAULT KEYBOARD BINDINGS
This is the list of default keyboard bindings as of 29 March 2004.

Movement
w +forward

a +left

s +backward

d +right

q +turnleft

e +turnright

r ++autorun

f follow

space +up

x +down

View
rbutton +mouse_look

pageup +camrotate

mbutton +camrotate

pagedown camreset

b ++third

mousewheel +camdistadjust

Chat
enter "show chat$$startchat"

/ "show chat$$slashchat"

"show chat$$slashchat"

Backspace autoreply

, "show chat$$beginchat /tell $target, " (Starts /tell to target)

' quickchat /bind " start_chat$$afk 'your message here'" must include ""

Powers
z powexec_abort

1 "powexec_slot 1"

2 "powexec_slot 2"

3 "powexec_slot 3"

4 "powexec_slot 4"

5 "powexec_slot 5"

6 "powexec_slot 6"

7 "powexec_slot 7"

8 "powexec_slot 8"

9 "powexec_slot 9"

0 "powexec_slot 10"

lalt+1 "powexec_altslot 1"

lalt+2 "powexec_altslot 2"

lalt+3 "powexec_altslot 3"

lalt+4 "powexec_altslot 4"

lalt+5 "powexec_altslot 5"

lalt+6 "powexec_altslot 6"

lalt+7 "powexec_altslot 7"

lalt+8 "powexec_altslot 8"

lalt+9 "powexec_altslot 9"

lalt+0 "powexec_altslot 10"

f1 "inspexec_slot 1"

f2 "inspexec_slot 2"

f3 "inspexec_slot 3"

f4 "inspexec_slot 4"

f5 "inspexec_slot 5"

home "powexec_name Sprint"

end "powexec_name Rest"

Tray
lalt +alttray

ralt alttraysticky

= next_tray

- prev_tray

lalt+= next_tray_alt

lalt+- prev_tray_alt

lcontrol+1 "goto_tray 1"

lcontrol+2 "goto_tray 2"

lcontrol+3 "goto_tray 3"

lcontrol+4 "goto_tray 4"

lcontrol+5 "goto_tray 5"

lcontrol+6 "goto_tray 6"

lcontrol+7 "goto_tray 7"

lcontrol+8 "goto_tray 8"

lcontrol+9 "goto_tray 9"

lcontrol+0 "goto_tray 10"

Team
lshift+1 "team_select 1"

lshift+2 "team_select 2"

lshift+3 "team_select 3"

lshift+4 "team_select 4"

lshift+5 "team_select 5"

lshift+6 "team_select 6"

lshift+7 "team_select 7"

lshift+8 "team_select 8"

Windows
m "map"

n "nav"

p "powers"

\ "menu"

t "target"

c "chat"

Misc

tab toggle_enemy

lshift+tab toggle_enemy_prev

rshift+tab toggle_enemy_prev

esc unselect

sysrq screenshot

f6 "local RUN!"

f7 "say $$ emote thumbsup"

f8 "local HELP! $$ emote whistle"

f9 "local level $level $archetype$$local Looking for team"

f10 "say ATTACK! $$ emote attack"

f11 "emote hi$$local Hi, My name is $name, and I'm a $origin $archetype and a Libra. I believe in justice and long evening walks on rooftops."

A note about the "+" and "++" prefixes in some of these commands
The short explanation of the + and ++ prefixes is that they represent how persistently the command will be carried out. Most of these keybindings represent "press and fire" commands -- that is, you press down on the button and the action will be performed once, until the button is pressed again.

With a "+" prefix the command will be carried out for as long as the button is pressed down, and ceases as soon as the button is no longer being pressed. For example, the default binding for the w key is +forward. For as long as the w key is pressed down your character will continue moving forward... but as soon as the button is no longer being pressed, the character stops moving.

With a "++" prefix the command will be toggled "on" and will continue to be activated until the button is pressed again, toggling it "off." If the w key were bound to ++forward, pressing the w key once would cause the character to move forward, and that character would continue to move forward until the w key were pressed again.

Any command that has a + prefix can work with a ++ prefix, and vice versa. This can lead to some nearly redundant commands. For example, ++forward works almost the same as ++autorun -- you run until you turn the command off. However, ++autorun will be turned off if you move forward or backward, while ++forward is only turned off by moving forward.

APPENDIX B: KNOWN LIST OF SLASH COMMANDS
'''If you know any slash commands that are not listed, please add them. This list is in alphabetical order.'''

/afk [message] Marks the player as Away From Keyboard (with given message)

/alttray Toggle the secondary tray while a key is being pressed. (for keybinds)

/alttraysticky Toggle the secondary tray

/auction [message] Send message to request channel

/autoreply Start an automatic reply for client

/autorun Toggles autorun

/b [message] Send message to entire map (broadcast)

/beginchat [string] Starts chat-entry mode with given string

/bind [key] [command] Binds a key to any command in this list - 'bind m map’ will activate the Map with the ‘m’ key.

/bindlist Will list all keybinds

/bind_load Will load the c:\keybinds.txt file

/bind_load_file [file location/file name] Will load the named file from the specified location

/bind_save Will save a file in c:\, called keybinds.txt with all your current keybinds

/broadcast [message] Send message to entire map

/bug [bug subject] Report a bug. Enter a short description of any length.

/camdist [distance] Sets the distance in feet that the third person camera pulls back behind the avatar

/camdistadjust Adjusts the camera distance relative to the current camera distance. Reads mousewheel for input.

/camreset Resets the camera behind the player.

/chat Toggles the chat window

/chat_cycle Steps to the next chat channel in the list

/chat_set [channel] Sets the chat channel to the given channel. Channel is the first letter of the channel you want to be current. You can also type the whole word.

/contextmenu [slot#] Activate an context menu slot

/copychat_b Copy the last X lines from bottom chat window into the clipboard

/copychat_t Copy the last X lines from top chat window into the clipboard

/demote Demote supergroup member one rank

/disable2D Toggles UI

/e [string] Emotes a text string

/em [string] Emotes a text string

/emaildelete [message num] Delete message

/emailheaders Request email headers

/emailread [message num] Request message

/emailsend [name] [subject] [body] Send message

/emote [string] Emotes a text string. There are also animated emotes. They are listed in detail on the Emotes page

/estrange [name] Remove player from friend list

/f [message] Talk to friends

/findmember Displays a list of players in your current zone looking for a team with their name, archetype and level

/fl Display friend list

/follow Toggles follow mode

/friend [name] Add player to friend list

/friendlist Display friend list

/fullscreen Sets video mode to fullscreen

/g [message] Send message to group channel

/goto_tray [tray#] Go to specified tray number. Can also use /goto_tray_alt and /goto_tray_alt2 for your middle and top trays.

/group [message] Send message to group channel

/hide [window] Forces the named window to be hidden. (Synonym: window_hide)

/i [name] Invite player to join team

/ignore [name] Ignore User

/ignorelist Displays a list of ignored users

/inspexec_name [inspiration name] Activate an inspiration by name

/inspexec_slot [slot#] Activate an inspiration slot in the first row

/inspexec_tray [tray#] [slot#] Activate an inspiration slot in the given row and column

/inspirationslot [slot#] Activate an inspiration slot

/invite [name] Invite player to join team

/k [name] Kick player from team

/kick [name] Kick player from team

/kiosk home Pop up the kiosk info for the nearest kiosk. (Assuming you're close enough.)

/l [message] Send message to your area (same as ‘local’)

/leaveteam Leave your current team

/local [message] Send message to your area

/lookup Adjusts camera angle up

/lookdown Adjusts camera angle down

/loot Brings up interact menu

/macro [macro name] "[command]" Add a macro to first empty slot

/macroslot Add a macro to provided slot

/manage Go to the enhancement management screen

/map Toggles the map window

/maximize Maximizes window

/me [string] Emotes a text string

/menu Toggles the Menu

/namecaptain Renames the captain rank

/nameleader Renames the leader rank

/namemember Renames the member rank

/nav Toggles the navigation window

/netgraph Toggles network statistics

/next_tray Go to next tray

/next_tray_alt Go to next secondary tray

/nop No operation, does nothing (use to clear a bind from a key)

/p [name], Send a message to only one player

/popmenu [menu] Pops up the named menu at the current mouse location

/powexec_abort Cancels the auto-attack power and the queued power.

/powexec_altslot [slot#] Executes the given power slot from the alternate tray.

/powexec_auto [power name] Sets the auto-attack power to given named power (or blank to shut it off, or toggles if it's on already).

/powexec_name [power name] Executes a power with the given name.

/powexec_slot [slot#] Executes the given power slot from the current tray.

/powexec_toggleoff [power name] Toggles off a power.

/powexec_toggleon [power name] Toggles on a power.

/powexec_tray [slot#] [tray#] Executes a power in the given tray and slot.

/prev_tray Go to previous tray

/prev_tray_alt Go to previous secondary tray

/private [name], Send a message to only one player

/promote Promote supergroup member one rank

/quickchat Pops up the quickchat menu

/quit Quits game

/req [message] Send message to request channel

/request [message] Send message to request channel

/s [message] Send message to your area

/say [message] Sends the given text on the current chat channel.

/screenshot Save a .tga format screenshot

/screenshotui Toggle inclusion of UI in screenshots

/sell [message] Send message to request channel

/show [window] Forces a named window to open. (Synonym: window_show)

/sg [message] Send message to super group channel

/sg_accept Receives a supergroup accept

/sg_decline Receives a supergroup decline

/sgcreate Start a supergroup

/sgi [name] Invite player to join supergroup

/sginvite [name] Invite player to join supergroup

/sgk [name] Kick player from join supergroup

/sgkick [name] Kick player from join supergroup

/sgleave Leave your current supergroup

/sgsetcostume Sets supergroup costume parameters

/sgsetmotd Sets supergroup “Message of the Day”

/sgsetmotto Sets supergroup motto

/sgstats Display supergroup info in chat window

/showfps Show current frame rate

/sidekick [name] Invite player to be your sidekick

/sidekick_accept Accept an invitation to be a sidekick

/sidekick_decline Decline an invitation to be a sidekick

/sk [name] Invite player to be your sidekick

/slashchat Starts chat-entry mode with slash

/startchat Starts chat-entry mode

/stuck Tries to get a player unstuck

/supergroup [message] Send message to super group channel

/t [name],[message] Send a message to only one player

/target Toggles the target window

/target_enemy_far Target farthest enemy

/target_enemy_near Target nearest enemy

/target_enemy_next Target next farther enemy from your current target (wraps)

/target_enemy_prev Target next nearer enemy from your current target (wraps)

/target_friend_far Target farthest friend. A friend is any friendly player or pet, not just teammates.

/target_friend_near Target nearest friend

/Target_friend_next Target next farther friend from your current target (wraps)

/target_friend_prev Target next nearer friend from your current target (wraps)

/team [message] Send message to group channel

/team_accept Receives a team accept

/team_decline Receives a team decline

/team_select [member#] Select specified Team member. Example: /team_select 7 would select the 7th team member. This will not allow you to select yourself.

/tell [name], [message] Send a message to only one player

/third Toggles first/third person view

/toggle [window] Show a window if hidden, hide a window if shown. (Synonym: window_toggle)

/toggle_enemy Cycles through targetable enemies

/toggle_enemy_prev Cycles through targetable enemies (in reverse, wraps)

/trade [name] Invite player to trade

/trade_accept Receives a trade accept

/trade_decline Receives a trade decline

/tray Toggles the tray window

/unfriend [name] Remove player from friend list

/unignore [name] Unignore User

/unselect Unselects currently selected thing

/unsidekick No longer mentor (or be a sidekick)

/unsk No longer mentor (or be a sidekick)

/whisper [name], [message] Send a message to only one player

/whoall Print who's on this map

/window_color Changes the window colors

/window_hide [window] Forces the given window to be hidden. (Synonym: hide)

/window_resetall Resets all window locations, sizes, and visibility to their defaults.

/window_show [window] Forces the given window to be shown. (Synonym: show)

/window_toggle [window] Show a window if hidden, hide a window if shown. (Synonym: toggle)

/windowcolor Changes the window colors

/y [message] Send message to entire map

/yell [message] Send message to entire map

/zoomin Adjusts the camera distance relative to the current camera distance

/zoomout Adjusts the camera distance relative to the current camera distance

Custom Chat Bubbles
<> commands can be used with any chat channel prefix (/page, /tell, /whisper, /request, /auction, etc.)

/say Sets the background color of the chat balloon for that message only. Color can use html colors like #FF0000 or html color names like Papaya Whip.

/say Sets the balloon color for that message only

/say Sets the text color for that message only

/say Sets the size of the text in the chat balloon for that message only. The number must be between .6 and 1.25

APPENDIX C: NAMED KEYS
This Appendix contains a list of all the known "named keys" that can be used with the /bind command. A "named key" is a key that you must identify with a name rather than with a symbol: for example, the left shift is called "lshift" when using it with /bind.

These keys are fairly self-explanatory:

numlock

pageup

pagedown

insert

delete

home

end

backspace

tab

esc

F1-F12

These keys are a bit more obscure:

capital (The Caps Lock key)

scroll (The Scroll Lock key)

tilde (The "`" and "~" key, on the numbers row of your keyboard -- usually)

up (up arrow)

down (down arrow)

left (left arrow)

right (right arrow)

Chord Keys

lshift/rshift (left and right shift keys)

lcontrol/rcontrol (left and right control keys)

lalt/ralt (left and right alt keys)

Fn (on laptops, this is the key that accesses "special laptop commands" on your keyboard. It acts as a chord key)

Mouse Keys

lbutton

rbutton

mbutton

button4

button5

button6

button7

button8

Keypad Keys

numpad0

numpad1

numpad2

numpad3

numpad4

numpad5

numpad6

numpad7

numpad8

numpad9

add

divide

multiply

subtract

Joystick Keys
NOTE: These commands seem to work erratically at best.

Joypad Names

joypad_up

joypad_down

joypad_left

joypad_right

Joystick Buttons

joy1

joy2

joy3

joy4

joy5

joy6

joy7

joy8

joy9

joy10

joy11

joy12

joy13

joy14

joy15

joy16

joy17

joy18

joy19

joy20

joy21

joy22

joy23

joy24

joy25

X/Y Axis Joystick Controls

joystick1_up

joystick1_down

joystick1_left

joystick1_right

Z/Zrot controls

joystick2_up

joystick2_down

joystick2_left

joystick2_right

Xrot/Yrot

joystick3_up

joystick3_down

joystick3_left

joystick3_right

Pov1-Pov3 hat

povX_up

povX_down

povX_left

povX-right