User:BlackSpectre/Testthis: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(59 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{wip}}
{{TOCright}}
{{TOCright}}
== Experience ==
== Introduction ==


Experience, or experience points (XP), measures a player character's life experience and progression through the game. It is primarily accrued by defeating [[enemies]] and completing [[mission]]s.
Welcome to The Incomplete and Unofficial Guide to {{slashcommand|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 customizing the way you play your game, and while it is a little confusing to use when you first get into it, it gets easier the more you play with it.


== Experience Requirements Table ==
This guide will (hopefully) make it easier for you to:


This table indicates the experience requirements for each [[level]] in both [[City of Heroes]] and [[City of Villains]].
* Understand what the {{slashcommand|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 {{slashcommand|bind}} to remap your keyboard and mouse in ways that the basic options in-game will now allow


{| border=0 cellpadding=0 cellspacing=0 style="border: 1px solid; text-align: right;"
=== Understanding What {{slashcommand|Bind}} Is ===
| style="background:#ddd;" |    '''Level'''   
 
| style="background:#ddd;" |    '''Incremental'''   
City of Heroes comes with a set of predefined or default 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 are not happy with these commands, you can open up the options panel, press the controls button, and replace some of them with key strokes or mouse button clicks of your own choosing.  But you cannot 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 {{slashcommand|bind}}.
| style="background:#ddd; border-right: 1px solid;" |    '''Cumulative'''   
 
| style="background:#ddd;" |    '''Level'''   
In its simplest form, {{slashcommand|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 user interface panel, send a message to another player, and so on.  It is even possible to assign multiple actions to the same bind, though there are limits, and the more complex your {{slashcommand|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.  Essentially, {{slashcommand|bind}} is telling the game that when you press the F key you want to activate the Hover power. Binds that players create are Custom Keybinds.
| style="background:#ddd;" |    '''Incremental'''   
 
| style="background:#ddd;" |    '''Cumulative'''   
=== What {{slashcommand|Bind}} Is Not ===
|-
{{slashcommand|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 [[Super Strength#Jab|Jab]], then [[Super Strength#Punch|Punch]], then [[Super Strength#Haymaker|Haymaker]], and then to repeat until you no longer have a target.  This is not possible using {{slashcommand|bind}}, though it is possible to do some interesting things with it that come close.
| 1   
 
| n/a   
There are in fact "macros" in the game, but they are different than macros in other games.  Macros will also be covered at the end of this guide, since they share many similarities to {{slashcommand|bind}} (and enough differences to make them important).
| style="border-right: 1px solid;" | 0   
 
| 26   
== Using {{slashcommand|Bind}}: The Basics ==
| 85,200   
 
| 446,119   
Before you can understand how to use {{slashcommand|bind}} properly, you need to know how to use [[Slash Commands|slash commands]].  Slash commands are commands that you send to the game while using the chat window.  {{slashcommand|Bind}} is a slash command, so understanding how they work in general will help you understand how to use {{slashcommand|bind}} specifically.
|-
 
| 2   
=== Tangent: A Brief Guide to Slash Commands ===
| 106   
 
| style="border-right: 1px solid;" | 106   
While you are in-game, press your ENTER key.  You will see a flashing prompt in your chat window.  You have 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 certain words to a slash ("/"), 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
| 27   
 
| 108,000   
: {{slashcommand|stuck}}
| 554,119   
 
|-
And voila!  You reappear 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.
| 3   
 
| 337   
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, {{slashcommand|g}} tells City of Heroes that all of the text following the "g" should be sent to the group channel (or the team channel).
| style="border-right: 1px solid;" | 443   
 
| 28   
So if you type:
| 135,000   
 
| 689,119   
: {{slashcommand|g}} I'd really like a ham sandwich.
|-
 
| 4   
Anyone in my team would see the following message:
| 582   
 
| style="border-right: 1px solid;" | 1,025   
: I'd really like a ham sandwich.
| 29   
 
| 166,650   
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, {{slashcommand|t}} or {{slashcommand|tell}} informs the game that you want to send a single character on the server a private message.  But which character?
| 855,769   
 
|-
The proper way to send a tell is to type the following:
| 5   
 
| 800   
: {{slashcommand|t}} ''character name'', Hey! Want to group?
| style="border-right: 1px solid;" | 1,825   
 
| 30   
''character name'' in this case represents someone's actual name.  So what you have to do is use the {{slashcommand|t}} command, then enter the character's name, then use a comma to separate the instructions from the message, then type the message.  So:
| 203,400   
 
| 1,059,169   
: {{slashcommand|t}} Curveball, Hey! Want to group?
|-
 
| 6   
Would cause the message "Hey! Want to group?" to show up in Curveball's text window.
| 1,237   
 
| style="border-right: 1px solid;" | 3,062   
All this really means is that when you are 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
| 31   
 
| 254,000   
: {{slashcommand|t}} Curveball Hey! Want to group?
| 1,313,169   
 
|-
City of Heroes wouldn't know what to do.  For all it knows, the character you are trying to send a message to is named "Curveball Hey! Want to group?" which is impossible, since the name field is not long enough and does not allow exclamation points or question marks.  The comma after the name is very, very important, because it tells the game "I have told you who to send the message to, now I am going to tell you the message."
| 7   
 
| 1,575   
Slash commands may optionally have underscores in them.  Any underscores in a slash command are ignored by City of Heroes.  This feature is handy for commands that are composed of multiple words to make the command more clear.  For example, all of the following commands are functionally equivalent:
| style="border-right: 1px solid;" | 4,637   
 
| 32   
: {{darkblue|/powexecname}} Temp Invulnerability
| 314,600   
: {{darkblue|/pow_exec_name}} Temp Invulnerability
| 1,627,769   
: {{darkblue|/_p_o_w_e_x_e_c_n_a_m_e_}} Temp Invulnerability
|-
 
| 8   
But the second version is arguably the most clear and readable.  In binds, no underscores are typically used so that more characters may be used in the command's parameters.  However, underscores are used in some game documentation and in keybind files (covered in a later section) and in this guide.
| 1,950   
 
| style="border-right: 1px solid;" | 6,587   
=== Bringing the Tangent Back On-Topic ===
| 33   
 
| 386,400   
That is all well and good, you ask, but what does that have to do with {{slashcommand|bind}}?  Well, two things:
| 2,014,169   
 
|-
* First, {{slashcommand|bind}} is a slash command, and you need to know how slash commands work in general.
| 9   
* Second, {{slashcommand|bind}} is a slash command that can trigger other slash commands.
| 2,680   
 
| style="border-right: 1px solid;" | 9,267   
=== Format of the {{slashcommand|Bind}} Command ===
| 34   
{{slashcommand|Bind}}, like {{slashcommand|t}} or {{slashcommand|tell}}, requires that you format your command very specifically.  The basic layout of a properly constructed {{slashcommand|bind}} command is:
| 470,600   
 
| 2,484,769   
: {{slashcommand|bind|trigger "command"}}
|-
 
| 10   
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 {{slashcommand|bind}} actually does (''command'').
| 3,125   
 
| style="border-right: 1px solid;" | 12,392   
Of course, none of that makes any sense unless you know what a trigger is and what a command is.
| 35   
 
| 571,200   
=== Triggers ===
| 3,055,969   
 
|-
A trigger is either a:
| 11   
 
| 3,600   
* single key
| style="border-right: 1px solid;" | 15,992   
* combination of keys
| 36   
* mouse click,
| 701,500   
* key and mouse click combination,
| 3,757,469   
* game controller/joystick button, or
|-
* combination of game controller buttons
| 12   
 
| 4,995   
A trigger activates the {{slashcommand|bind}} command.  It 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 keys, provided you can keep track of all of them.
| style="border-right: 1px solid;" | 20,987   
 
| 37   
Each key has a name that {{slashcommand|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:
| 854,700   
 
| 4,612,169   
* LSHIFT: the shift key on the left side of your keyboard
|-
* RSHIFT: the shift key on the right side of your keyboard
| 13   
* NUMPAD1: the "1" key on your number pad (as opposed to the row of numbers at the top of your keyboard)
| 6,405   
* LBUTTON: the left mouse button on a right-handed mouse (more commonly known as mouse button 1)
| style="border-right: 1px solid;" | 27,392   
* MBUTTON: the middle button on a three-button mouse (more commonly known as mouse button 3, often the scroll wheel on modern mice)
| 38   
* BUTTON4: usually the thumb button on modern mice
| 1,036,600   
 
| 5,648,769   
Some special keys called ''chord keys'' can be used in combination with other keys and mouse buttons.  They do not act as triggers themselves, but can be used with trigger keys to make new triggers.
|-
 
| 14   
For example, suppose you have set up the E key to trigger your Tanker's [[Invulnerability#Temp Invulnerability|Temp Invulnerability]] power.  In this case, E is a trigger; when you press it, it causes the power to activate.  So the {{slashcommand|bind}} command might look like this:
| 7,400   
 
| style="border-right: 1px solid;" | 34,792   
: {{slashcommand|bind}} e "''power activation command''"
| 39   
 
| 1,250,200   
(The specifics of the command are not important at the moment.  It will be dealt with in the next section. )
| 6,898,969   
 
|-
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 something like:
| 15   
 
| 9,093   
: {{slashcommand|bind}} LSHIFT+E "''another power activation command''"
| style="border-right: 1px solid;" | 43,885   
 
| 40   
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."
| 1,502,550   
 
| 8,401,519   
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.
|-
 
| 16   
When you are setting up a chord key and trigger key combination, separate them with the "+" symbol.  This tells the game that you are using both keys together.  {{slashcommand|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:
| 11,184   
 
| style="border-right: 1px solid;" | 55,069   
: {{slashcommand|bind}} e+lshift "''another power activation command''"
| 41   
 
| 1,692,900   
The game would read it as:
| 10,094,419   
 
|-
: {{slashcommand|bind}} e "''another power activation command''"
| 17   
 
| 13,000   
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.
| style="border-right: 1px solid;" | 68,069   
 
| 42   
For a complete list of keys and buttons available for players to use with {{slashcommand|bind}}, see [[List of Key Names]].
| 1,907,550   
 
| 12,001,969   
=== Commands ===
|-
 
| 18   
Commands are the instructions the game follows when a trigger is used. When talking about [[Binds|binds]], commands are usually other slash commands.  In fact, most of the time when you create a {{slashcommand|bind}}, you are assigning a slash command to a key or button.
| 15,950   
 
| style="border-right: 1px solid;" | 84,019   
But what are these commands?  There are a lot of them, and they can be found in these two locations:
| 43   
 
| 2,150,550   
* [[Keybind Profiles]], which provides lists of the different sets of default key bindings that a player may select.
| 14,152,519   
* [[List of Slash Commands]], which provides a list of all the slash commands.
|-
 
| 19   
=== Putting it all together ===
| 19,200   
 
| style="border-right: 1px solid;" | 103,219   
Now that you know what triggers are, what types of things those triggers can make happen, let's look at a simple {{slashcommand|bind}} command:
| 44   
 
| 2,421,900   
: {{slashcommand|bind}} E "pow_exec_name Temp Invulnerability"
| 16,574,419   
 
|-
This tells the game that whenever the e key is pressed, the power "Temp Invulnerability" should activate.
| 20   
 
| 23,400   
Pow_exec_name is a slash command.  To activate Temporary Invulnerability in your chat window, you would type:
| style="border-right: 1px solid;" | 126,619   
 
| 45   
: /pow_exec_name Temp Invulnerability
| 2,729,700   
 
| 19,304,119   
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.
|-
 
| 21   
One of the things you will notice in the {{slashcommand|bind}} example is that in the {{slashcommand|bind}}, the slash command was called without the actual "/." {{slashcommand|Bind}} assumes that you are going to send it a slash command, so the slash is unnecessary, and if you use the slash it will not work.
| 28,000   
 
| style="border-right: 1px solid;" | 154,619   
=== Correcting mistakes ===
| 46   
{{SlashCommandArticle|command=unbind|options=key|note=/unbind ''key'' entirely removes the custom binding on ''"key"'' and restores its default behaviour}}.
| 3,078,000   
{{SlashCommandArticle|command=unbind_all|note=/unbind_all removes all custom bindings from all triggers and restores the game's default keybindings for the currently selected [[Keybind Profiles|Keybind Profile]]}}.
| 22,382,119   
 
|-
== Binding Multiple Commands to the Same Key ==
| 22   
 
| 36,000   
The previous example was the simplest form of a {{slashcommand|bind}} command: a key triggered a single action.  Sometimes you might want to do something a little more complicated, to set up a bind so that when a single key is pressed, multiple things happen simultaneously.
| style="border-right: 1px solid;" | 190,619   
 
| 47   
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 action is actually two slash commands:
| 3,470,850   
 
| 25,852,969   
* {{slashcommand|powexec_name}} Temp Invulnerability
|-
* {{slashcommand|local}} I am invincible!
| 23   
 
| 45,000   
To do this, you need a way to tell {{slashcommand|bind}}, "But wait, I want you to do something else."  You do this by inserting "$$" between the two commands:
| style="border-right: 1px solid;" | 235,619   
 
| 48   
: {{slashcommand|bind}} E "local I am invincible!$$pow_exec_name Temp Invulnerability"
| 3,912,300   
 
| 29,765,269   
"$$" 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.
|-  
 
| 24   
You could do this with just about any power you want.  A popular keybind is to add a message to the [[Super Strength#Taunt|Taunt]] power, such as:
| 56,000   
 
| style="border-right: 1px solid;" | 291,619   
: {{slashcommand|bind}} T "local C'mere, ya pansy! Who wants some?$$pow_exec_name Taunt"
| 49   
 
| 4,410,450   
You can even do this to trigger more than one power with the same key:
| 34,175,719   
 
|-
: {{slashcommand|bind}} e "pow_exec_name Temp Invulnerability$$pow_exec_name Hover"
|    25   
 
|    69,300   
This turns on the the Temporary Invulnerability power and then turns on the [[Flight#Hover|Hover]] power.  (Unless Hover is already on, in which case it turns Hover off.)
| style="border-right: 1px solid;" |    360,919   
 
|    50   
=== Things to Consider When Using $$ ===
|    4,973,400   
 
|    39,149,119   
Spaces should be omitted between the commands that appear before and after the $$ symbols.  All of the examples in this guide adhere to that standard, but sometimes binds will be seen by developers who have used spaces on either or both sides of the $$ symbols.  Placing a space between $$ and your commands can cause things to break.  For example:
|-
{{slashcommand|bind}} H "pow_exec_name Healing Aura $$ local You are healed!"
| colspan=6 |
 
|-
Will not work.  Why?  Because the {{slashcommand|bind}} command is not being read as "execute 'Healing Aura'," it is being read as "execute 'Healing Aura '," with a space after the word Aura.  Since there is no such power as Healing-space-Aura-space, nothing happens.
| colspan=6 style="text-align: center; border-top: 1px solid;"| [[Veteran Levels]] require 5,608,000 XP for each level
 
|}
Strangely enough, you CAN use:
 
: {{slashcommand|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.
 
Nevertheless, in general, no spaces at all should be 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 cannot 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:
 
" {{slashcommand|bind}} 1 "pow_exec_name Punch$$pow_exec_name Jab$$pow_exec_name Haymaker"
 
The game would immediately try to set up Punch, an instant later be told to execute a Jab instead, and finally be overridden a second time and be told to perform a Haymaker.  The only action it would perform is the Haymaker.
 
There is an interesting trick you can use to get around this to an extent covered in the [[#Neat Things You Can Do with /Bind|Neat Things You Can Do with /Bind]] section.
 
== Using [[Variables]] in {{slashcommand|Bind}} ==
 
Sometimes you will want to create a binding that will require the use of information that you will not necessarily have at the moment.  You may not have it because you do not know it, or because that information changes, or because that information will be different depending on which character you are 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 that 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 [[:Category:Origins|origin]]
* $archetype: your character's [[Archetypes|archetype]]
* $level: your character's level
* $battlecry: your character's battlecry (set in your character's ID screen)
 
It is possible to supply this information yourself, but then the {{slashcommand|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 {{slashcommand|bind}} command like this:
 
: {{slashcommand|bind}} V "local Hello, I am $name, a level $level $origin $archetype. $battlecry"
 
This bind would cause whichever character you were using at the time to fill in those variables with information specific to their individual builds.  For three different characters, for example, the result may be:
 
* 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 it will be included in the battlecry string (which is why I did not include any in my bind.) Stormhaven, who has no 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 or object you are currently selecting, whether that is another hero, a civilian, a villain, or any other targetable object.  This variable can be very useful when you want to identify whomever or whatever you have targeted.
 
For example, you could create a {{slashcommand|bind}} command that would call out a specific villain whenever your tanker uses taunt:
 
: {{slashcommand|bind}} t "local C'mere, $target!$$pow_exec_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 informational ways as well.  For example, a keybind may be set up with the [[Teleportation#Teleport Target|Teleport Target]] power to inform group members when someone is being teleported with the following bind:
 
: {{slashcommand|bind}} T "group $target, prepare to be teleported to my location.$$pow_exec_name Teleport Target"
 
This sends a message across the group (team) channel letting everyone know that a character is about to be teleported to the hero using the power, and then activates the Teleport Target power.  For the  message to be more private, it could have done it this way:
 
: {{slashcommand|bind}} t "tell $target, Prepare to be teleported to my location.$$pow_exec_name Teleport Target"
 
In this example, the variable $target is actually part of the command.  Remember, {{slashcommand|tell}} needs a character name (followed by a comma) in order to know who to send the message to.
 
== Using {{slashcommand|Bind}} with Your Mouse ==
 
Mouse buttons are triggers just like standard keyboard keys are, so you can assign {{slashcommand|bind}} commands to them in 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 often 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, it does not seem possible to successfully use button 6, button 7 or button 8 in key bindings, but button 4 and button 5 seem to work just fine depending on the mouse.
 
=== 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:
 
: {{slashcommand|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 and 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.
 
=== MBUTTON/BUTTON 3 ===
 
Button 3 is bound to +camrotate, which allows you to rotate the camera around your character.
 
== Saving and Loading Key Bindings ==
 
If you want to save your custom keybinds to your hard drive, use the slash command {{slashcommand|bind_save}}.  This saves your custom keybinds in a file called keybinds.txt in your City of Heroes [[Default Folder|default folder]]. (C:\Games\Homecoming\Settings\Live by default).
: {{slashcommand|bind_save| }}
:: Saves the all current custom keybinds to keybinds.txt in the [[Default Folder|default folder]].
: {{slashcommand|bind_load| }}
:: Loads custom keybinds from the file keybinds.txt in the [[Default Folder|default folder]].
 
If you want to load the keybinds.txt file, use the slash command {{slashcommand|bind_load}}.  As long as the keybinds.txt file is still in your [[Default Folder|default folder]], it will load automatically.
 
If you would like to save '''''all''''' of your currently active keybinds, including both custom and default keybinds, use {{slashcommand|show_bind_all_file|fileName}}.
 
It is possible to load other text files with bind commands into the game simply by specifying the file name and location.  The full command is
 
: {{slashcommand|bind_load_file|full path or relative path}}
:: ''Full path'' would be the full path to the file, including spaces (if there is a space, the path needs to be in quotes).
:: {{slashcommand|bind_load_file}} C:\CoH\textfiles\judge.txt
::: The command would load the judge.txt file from the C:\CoH\textfiles directory.
:: ''Relative path'' would be any file or directory in the [[Default Folder|default folder]].
:: {{slashcommand|bind_load_file}} mybinds.txt
::: This would load the file c:\Games\Homecoming\Settings\Live\mybinds.txt.
:: {{slashcommand|bind_load_file}} \binds\otherbinds.txt
::: This would load the file c:\Games\Homecoming\Settings\Live\binds\otherbinds.txt {{slashcommand|bind_save_file}} follows the same rules.
: {{slashcommand|bind_save_file|full path or relative path}}
 
 
When a bind file is loaded using either {{slashcommand|bind_load}} or {{slashcommand|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 {{slashcommand|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 key bindings section of the [[#Neat Things You Can Do with /Bind|Neat Things You Can Do with /Bind]] section.
 
=== Understanding Keybinds.txt ===
 
The keybinds.txt file is the file that is created when you use the {{slashcommand|bind_save}} slash command.  It contains a list of all the custom 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 {{slashcommand|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 {{slashcommand|bind_load_file}}, you need to follow this format.  Use the {{slashcommand|bind}} command initially in the chat window, not in the keybinds.txt file.
 
== Using "Rotating Text Binds" ==
{{slashcommand|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 {{slashcommand|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 villain 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 is not the same thing over and over again, it may be a little tolerable for your teammates.
 
Now, you could go ahead and bind each taunt with your taunt power to a different key, but that would be wasteful.  Wouldn't 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 rotate through a set of different key bindings, but it is a little complicated.  The way you do this is by constantly replacing your current key binding with a new one using the command {{slashcommand|bind_load_file}}
 
=== A Brief Tangent:  A Recap of {{slashcommand|Bind_load_file}} ===
 
The {{slashcommand|bind_load}} slash command tells City of Heroes to load the keybinds.txt file in your City of Heroes application directory.  The {{slashcommand|bind_load_file}} slash command allows you to specify the name and location of the [[bindfile]] you want to load.  Thus, if the following commands are used:
 
: {{slashcommand|bind_load_file}} C:\keybinds\curveball.txt
: {{slashcommand|bind_load_file}} C:\keybinds\stormhaven.txt
: {{slashcommand|bind_load_file}} C:\keybinds\judge.txt
 
The game would go into your c:\keybinds directory and load whatever file name specified.
 
The curveball.txt, stormhaven.txt and judge.txt files might have a few commands specific to those characters.  For example, Stormhaven is a storm/electric defender, and the key used to bring up his hurricane power might be the same key used to bring up Curveball's teleport foe power.  When a new character is created, {{slashcommand|bind_load}} may be used to bring in my basic command set, and then {{slashcommand|bind_load_file}} c:\keybinds\curveball.txt (or stormhaven.txt, or judge.txt) might be used to bring in character-specific key bindings.
 
And because these files only require a few deviations from the custom keybinds.txt file, only a few commands are needed 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 ([[slashcommand|nop}}) and others are specific powers.
 
If wanted, in the default keybinds.txt, Commands may be created 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"
 
By pressing the numbers 1, 2, and 3 on the number keypad, a custom bind set can be loaded.
 
=== Back on Course: Creating a Rotating Text Bind ===
 
To set up a key that rotates between the five taunts 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, and taunt5.txt.  In each taunt file, you need to put in the {{slashcommand|bind}} command that gets executed.  So each file would look like this:
 
'''taunt1.txt'''
 
T "local Get over here!$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt2.txt"
 
'''taunt2.txt'''
 
T "local You're next.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt3.txt"
 
'''taunt3.txt'''
 
T "local Who wants some?$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt4.txt"
 
'''taunt4.txt'''
 
T "local C'mere, ya pansy.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt5.txt"
 
'''taunt5.txt'''
 
T "local Let's see what you've got.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt1.txt"
 
When taunt1.txt 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.  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 key binding 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.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt1.txt"
 
When you use the slash command {{slashcommand|bind_load}}, then T will be bound to emulate the taunt5.txt binding, and the first taunt binding will activate the next time T is pressed.
 
As long as you are willing to be patient and set up your files before you get into the game, you can create rotating text binds for just about everything.  For example, rotating text binds may be created for your mouse so that pressing a key loads one set of binds to the mouse to put it in "movement mode" and pressing it again loads another set of binds to put it in "default mode".
 
== Macros ==
 
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 will 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 buttons 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)|/pow_exec_tray]] slash command to identify which tray and which slot in that tray the icon is sitting.  You do this by using the {{slashcommand|macro}} command.
{{slashcommand|Macro}} is very similar to {{slashcommand|bind}}.  You are, in effect, binding a command to an object.  The main difference is that {{slashcommand|bind}} uses objects that already exist (keys on your keyboard) as the trigger, whereas {{slashcommand|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 {{slashcommand|macro}} is:
 
: {{slashcommand|macro|macroName "command(s)"}}
 
It is possible to do anything with {{slashcommand|macro}} that you can do with {{slashcommand|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 {{slashcommand|macro}} because it is so similar to {{slashcommand|bind}}.  Here is an example of macro creation to put the entire thing in context.
 
Let's say you want your character to have an emote/speech combination:  You want him to perform the ThumbsUp emote and say "Good work!"  But you don't want to devote a key to it — you need your keys for combat and navigation controls — but you decide it would be okay if you could just click on an icon in the power tray to perform that function.
 
The {{slashcommand|bind}} command would be for this:
 
: {{slashcommand|bind}} [some key] "em ThumbsUp$$local Good Work!"
 
For {{slashcommand|macro}}, [some key] is replaced by whatever name you want to give the macro:
 
: {{slashcommand|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 your Power Bar with the letters "GW" stamped on it.  You can now move that icon anywhere I want to on my tray, and clicking on it will cause your character to stick his thumb up in the air and say "Good Work!"
 
You can name your macro anything you like, but the icon has limited space to actually display the letters.  You will probably want to try to keep your macros down to one- or two-letter names so they can be read clearly on the icon tray.
 
That is the {{slashcommand|macro}} command in a nutshell.  Really, that's all there is to it.  {{slashcommand|Macro}} seems tricky because it is almost identical {{slashcommand|bind}}, and the "almost" throws people.  The primary difference between the two is that {{slashcommand|macro}} creates the object that triggers the command, and you need to tell the game what the object is named.
 
=== Saving Macros ===
 
Macros and their commands can be saved in a file, but there is no slash command to save the macros while in game. Instead you would need to type the macros into a text file manually, making sure that a double dollar sign ($$) is at the beginning of each macro command string. All the macros in the text file can then be automatically loaded into your character at once by using the {{slashcommand|bind_load_file}} command. For example:
 
A sample text file holding macros might look like this:
 
'''myMacros.txt'''
$$macro Hi "emote wave"
$$macro Yes "emote thumbsup"
$$macro Dance "emote dance"
 
Then, to load the macros into your character, type:
/bind_load_file \binds\myMacros.txt
 
 
===Rotating Text Macros===
 
By using macros stored in text files in combination with the {{slashcommand|bind_load_file}} and {{slashcommand|Macroslot}} commands, complex rotating text macros can be created (very similar to rotating text binds). This allows one macro to replace another macro in the same power tray slot. Basically, it lets the same macro button do different things on each click.
 
As with rotating text binds, text files first need to be created with the various bind and macro commands in them. {{slashcommand|bind_load_file}} is used to replace the bind commands, and the {{slashcommand|macroslot}} command is used to replace one macro button with another button containing the commands from the next text file.
 
The syntax or format for text macros are exactly like normal binds except a double dollar sign ($$) must appear at the beginning of the command string. The following is an example of a rotating text macro:
 
'''mFlyCC0.txt'''
$$macroslot 20 "FlyON" "cc 1$$Powexec_Toggle_On Fly$$Bind_Load_File /binds/mFlyCC1.txt"
   
   
'''mFlyCC1.txt'''
$$macroslot 20 "FlyOFF" "cc 0$$Powexec_Toggle_Off Fly$$Bind_Load_File /binds/mFlyCC0.txt"
To enable the rotating text macro, type the commands inside the first text file into the chat box with a slash "/" at the beginning. Then press the Enter key to create the macro button for the first time.
/$$macroslot 20 "FlyON" "cc 1$$Powexec_Toggle_On Fly$$Bind_Load_File /binds/mFlyCC1.txt"
When the macro button is clicked, the character's outfit will change to costume #1 and the character will start flying. When the same macro button is clicked again, the character's outfit will change to a different costume (costume #0) and Fly will turn off. Then when the macro button is clicked again, the character will change to costume #1 and start to fly again, and so on.
== Neat Things You Can Do with {{slashcommand|Bind}} ==
This is the section that has samples of some of the fun stuff you can do with the {{slashcommand|bind}} command.
=== Getting Around the "No Queued Attack" Rule ===
We have already learned that you cannot "queue up attacks" with {{slashcommand|bind}}, but there are ways to get around that limitation to an extent.  One of the participants in a "The Day I remapped my mouse with {{slashcommand|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. The second method was shared with me by the maker of Akai's proc calculator and doesn't execute multiple commands with one click, but instead executes a different attack on each click in a sort of loop.
==== Auto attack method ====
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:
: {{slashcommand|bind}} NUMPAD0 "pow_exec_auto Dark Blast$$pow_exec_name Moonbeam"
This is just the last bit of the original bind, which is much longer.  When the 0 button on the number keypad 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.  This is what happens:


==Experience Rewards ==
# Dark Blast is set up as an "autofire" power.
A character receives experience rewards for defeating an enemy based on their actual experience level relative to the defeated enemy's level. Some critters have a [[reward scale|Reward Scale]] multiplier that increases or decreases the amount of XP rewarded depending upon the difficulty of the critter. Defeating an enemy whose level is higher than your character's will grant the character more XP. Defeating a lower level enemy, less XP.
# Moonbeam is fired.
# Dark Blast will fire, recharge, fire, recharge, fire, recharge, etc.


With this bind, two attacks were set up, but only one is specifically fired off.


== Experience Boosts ==
===Rotating Text Bind Method===
There are several ways a player may boost their character's experience gain:
When a bind is executed, it is parsed from left to right, but powers activate from RIGHT to LEFT in the bind string because multiple powers in a single bind string will interrupt each other as they attempt to activate, leaving the last power in the string (far right) to be the first one to activate unhindered. Taking advantage of this, the user can create a series of binds that each execute an attack first, then load the next bind in a series to the same key. This allows multiple attacks to be bound to the same key and queued in a cyclic order. Here's an example of how to do it:
* A character that has accrued [[Patrol Experience]] will receive a 50% boost in XP until the Patrol XP runs out.
* The [[S.T.A.R.T.|P2W vendors]] in Atlas Park, Mercy Island, and Nova Praetoria offer various experience boosters as a gift from the game developers
* Certain temporary powers


Create a binds directory in the working directory of City of Heroes. In this example it's just called "binds".
Create a .txt file with the bind you want, omitting the "bind" portion in the file. Will name this file "attack1.txt"
NUMPAD0 "bind_load_file_silent /binds/attack2.txt$$pow_exec_name Moonbeam"
Create a second .txt file with the next attack in the series, again omitting the "bind" portion, that is all done by the "bind_load_file_silent" command. This file will be called "attack2.txt"
NUMPAD0 "bind_load_file_silent /binds/attack1.txt$$pow_exec_name Dark Blast"
You can see how one file points to the other in a circular chain. Lastly, just set it up in-game by using either of the bind commands


== Experience Distribution and Team Bonuses ==
/bind_load_file_silent /binds/attack1.txt
Each time NUMPAD0 is pressed, it will first execute an attack, then rebind that key to execute the next attack. I saw a Mastermind (@Nexros global) use this method to bind a single key to combine any and all inspirations into reds, then automatically feed them to his pets--all with one key!


The experience that a character gets while on a team is affected by the team's size and by their level relative to the enemies. Larger teams get a higher XP multiplier, but the rewards also get split more ways. Players on teams will receive less XP per critter, but the increased number of mobs and speed of defeats usually results in a greater total amount of XP by the end of a standard mission. A character who is [[sidekick]]ed, and hence one combat level below that of the team leader, will receive experience based on their actual level and not their boosted level.
===Splitting One Key Into Two Keys===


Mission completion experience is affected only by the character's actual level relative to the mission's. The full amount is awarded to each team member individually, with no split or weighting.
The plus (+) and minus (-) symbols can be used as prefixes in front of a bind command string. Adding a prefix to the beginning of a bind command string tells the game to execute the command(s) on key ''press'', and again on key ''release''. For example, suppose we bind the following to the "K" key:
+$$sprint
When the K key is pressed down the power Sprint will turn on. As long as the key is pressed and held down, Sprint will continue to stay on. When the key is released, Sprint will toggle off because the Sprint command was executed again.  


If used in combination with {{slashcommand|bind_load_file}} and rotating text binds, this can effectively split one key into two, and allows us to bind 2 completely different bind command strings to a single key... one on key press, and the other on key release. For example:
'''KeyPress.txt'''
K "+$$Sprint$$bind_load_file KeyRelease.txt"
'''KeyRelease.txt'''
K "+$$Athletic Run$$bind_load_file KeyPress.txt"
This will activate Sprint when the K key is pressed, and then activate Athletic Run when the key is released.


==Calculating Experience Rewards ==
=== Targeting the Nearest Enemy ===
The experience awarded by defeating an enemy is calculated using a base experience table and several multipliers. The standard formula for this is:</BR>
<span style="color:blue;">(Base XP x Reward Scale x Level Bonus x Team Size Bonus &#247; Team Size)</span> </BR>
and the result is rounded up. After this, any additional multipliers are factored in (such as XP boosters, Patrol XP, etc.), and the final result is rounded down (drop off the decimals).


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 it to target an enemy.  It will always choose the closest one to you:


=== Base Experience Rewards Table ===
: {{slashcommand|bind}} space "target_enemy_near"


These are the base experience reward values for each rank and level of critter. If playing solo, simply reference the level and rank of the enemy to get the critter's Base XP. For sidekicked characters on a team, the referenced enemy level is reduced to the player character's actual level plus the difference between the boosted combat level and the enemy level <span style="color:blue;">(enemy level + actual level - sidekicked level)</span>. If the enemy is one level greater than the the boosted level, the referenced enemy level will be one above the character's actual level. For example, a level 10 character is sidekicked to level 19 by a level 20 mentor and defeats a level 21 enemy (21+10-19=12). The level referenced for the base XP would be 12.
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 ===
||
{| class="wikitable" style="text-align:center"
! Level !! [[Minions|Minion]] !! [[Lieutenant]] !! [[Boss]]
|-
| 1 || 10 || 33 || 100
|-
| 2 || 10 || 33 || 100
|-
| 3 || 10 || 33 || 100
|-
| 4 || 10 || 33 || 100
|-
| 5 || 13 || 43 || 132
|-
| 6 || 14 || 48 || 144
|-
| 7 || 16 || 55 || 168
|-
| 8 || 18 || 60 || 180
|-
| 9 || 19 || 63 || 192
|-
| 10 || 20 || 67 || 204
|-
| 11 || 24 || 79 || 240
|-
| 12 || 30 || 99 || 300
|-
| 13 || 36 || 120 || 360
|-
| 14 || 44 || 147 || 444
|-
| 15 || 51 || 171 || 516
|-
| 16 || 52 || 175 || 528
|-
| 17 || 55 || 183 || 552
|-
| 18 || 56 || 187 || 564
|-
| 19 || 57 || 192 || 576
|-
| 20 || 60 || 199 || 600
|-
| 21 || 61 || 204 || 612
|-
| 22 || 62 || 207 || 624
|-
| 23 || 72 || 240 || 720
|-
| 24 || 82 || 276 || 828
|-
| 25 || 96 || 320 || 960
|}
||
{| class="wikitable" style="text-align:center"
! Level !! [[Minions|Minion]] !! [[Lieutenant]] !! [[Boss]]
|-
| 26 || 110 || 366 || 1100
|-
| 27 || 127 || 423 || 1270
|-
| 28 || 146 || 486 || 1460
|-
| 29 || 169 || 563 || 1690
|-
| 30 || 210 || 700 || 2100
|-
| 31 || 240 || 800 || 2400
|-
| 32 || 274 || 913 || 2740
|-
| 33 || 312 || 1040 || 3120
|-
| 34 || 353 || 1176 || 3530
|-
| 35 || 429 || 1430 || 4290
|-
| 36 || 484 || 1613 || 4840
|-
| 37 || 546 || 1820 || 5460
|-
| 38 || 658 || 2193 || 6580
|-
| 39 || 792 || 2376 || 7128
|-
| 40 || 892 || 2527 || 7582
|-
| 41 || 974 || 2597 || 7792
|-
| 42 || 1063 || 2657 || 7972
|-
| 43 || 1198 || 2795 || 8386
|-
| 44 || 1351 || 2927 || 8781
|-
| 45 || 1524 || 3048 || 9144
|-
| 46 || 1719 || 3438 || 10314
|-
| 47 || 1938 || 3876 || 11628
|-
| 48 || 2185 || 4370 || 13110
|-
| 49 || 2464 || 4928 || 14784
|-
| 50 || 2779 || 5558 || 16674
|}
|}


If you are 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:


=== Reward Scale ===
: {{slashcommand|bind}} RBUTTON "+forward$$+mouse_look"
This is the difficulty level of the enemy, typically based on the enemy's stats. The vast majority of critters in the game have a reward scale of 1, essentially no bonus. The Reward Scale bonuses can be found on the [[Reward scale]] page.
: {{slashcommand|bind}} LBUTTON "-mouse_look"
: {{slashcommand|bind}} MBUTTON "map"
: {{slashcommand|bind}} BUTTON4 "+up"
: {{slashcommand|bind}} LSHIFT+RBUTTON "+backward$$+mouse_look"
: {{slashcommand|bind}} LALT+RBUTTON "-mouse_look"


The first button is the basic navigation command.  When you click mouse button 2, 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.


=== Level Bonus ===
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 Level Bonus is based on the difference in levels between the player character and the defeated enemy.


{| class="wikitable" style="text-align:center"
The third mouse binding causes the zone map to pop up whenever you press mouse button 3.  
|-
| colspan="2" | When a character's level is BELOW the enemy's level, their xp and inf are increased:
|-
! Level Difference !! Level Bonus
|-
| 0 || 1
|-
| -1 || 1.2
|-
| -2 || 1.4
|-
| -3 || 1.6
|-
| -4 || 1.8
|-
| colspan=2 style="background:white; border-left:hidden; border-right:hidden;"  | &nbsp;
|-
| colspan="2" | When a character's level is ABOVE the enemy's level, their xp and inf are decreased.
|-
! Level Difference !! Level Bonus
|-
|0 || 1
|-
| +1 || 0.8
|-
| +2 || 0.6
|-
| +3 || 0.4
|-
| +4 || 0.2
|-
| +5 || 0
|}


The fourth mouse binding allows mouse button 4 to control when the character jumps.


=== Team Size Bonus ===
The fifth mouse binding acts just like the first, only instead of going forward the character moves backward.  
Every character on a team receives a bonus based on the number of members on the team. More teammates means a bigger bonus.


{|
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 pop-up menu.
||
{|class='wikitable'
|-
!Team Size
!Bonus
|-
|style="border-left:  2px solid blue; border-top: 2px solid blue;" | 1
|style="border-right:  2px solid blue; border-top: 2px solid blue;" | 1
|-
| style="border-left:  2px solid blue;" | 2
|style="border-right:  2px solid blue;" | 1.25
|-
|style="border-left:  2px solid blue;" | 3
|style="border-right:  2px solid blue;" | 1.5
|-
|style="border-left:  2px solid blue;" | 4
|style="border-right:  2px solid blue;" | 1.8
|-
|style="border-left:  2px solid blue;" | 5
|style="border-right:  2px solid blue;" | 2
|-
|style="border-left:  2px solid blue;" | 6
|style="border-right:  2px solid blue;" | 2.1
|-
|style="border-left:  2px solid blue;" | 7
|style="border-right:  2px solid blue;" | 2.2
|-
|style="border-left:  2px solid blue; border-bottom: 2px solid blue;" | 8
|style="border-right:  2px solid blue; border-bottom: 2px solid blue;" | 2.5
|-
|9
|2.728125
|-
|10
|2.9403125
|-
|11
|3.137313438
|-
|12
|3.319848038
|-
|13
|3.488606979
|-
|14
|3.644252522
|-
|15
|3.787419585
|-
|16
|3.918716797
|-
|17
|4.038727499
|-
|18
|4.148010714
|-
|19
|4.247102081
|-
|20
|4.336514756
|-
|21
|4.416740279
|-
|22
|4.488249408
|-
|23
|4.551492922
|-
|24
|4.606902401
|-
|25
|4.654890968
|}
||
{| class="wikitable"
|-
!Team Size
!Bonus
|-
|26
|4.695854008
|-
|27
|4.730169864
|-
|28
|4.758200501
|-
|29
|4.780292146
|-
|30
|4.796775912
|-
|31
|4.807968389
|-
|32
|4.814172219
|-
|33
|4.815676648
|-
|34
|4.812758056
|-
|35
|4.805680471
|-
|36
|4.794696058
|-
|37
|4.780045598
|-
|38
|4.761958939
|-
|39
|4.740655438
|-
|40
|4.716344385
|-
|41
|4.689225405
|-
|42
|4.659488853
|-
|43
|4.627316192
|-
|44
|4.592880351
|-
|45
|4.556346075
|-
|46
|4.517870264
|-
|47
|4.47760229
|-
|48
|4.435684311
|-
|49
|4.392251569
|-  
|50
|4.347432675
|}
|}


=== Selecting Teammates Using the Number Pad ===
This set of binds allows players to use the number pad to select their teammates and allies.  For buffing or any other team selecting activity, this can be simpler than clicking with the mouse or using shift-<number>.  Numbers 1-8 will select that particular team slot.  The zero key contains a targeting bind to assist with buffing pets or players that are not on the team. 


=== Examples ===
'''numberpad.txt'''
The standard experience forumla is <span style="color:blue;">(Base XP x Reward Scale x Level Bonus x Team Size Bonus &#247; Team Size)</span> rounded up.
numpad1 teamselect 1
numpad2 teamselect 2
numpad3 teamselect 3
numpad4 teamselect 4
numpad5 teamselect 5
numpad6 teamselect 6
numpad7 teamselect 7
numpad8 teamselect 8
numpad0 target_custom_next friend notteammate notmypet


If a level 15 solo character defeats a level 14 Skull Bone Daddy boss then (444 x 1.4 x 0.8 x 1 &#247; 1) = 497.28 --> rounds up to 498 XP.
Note that the above text box is designed for a [[Bind File]], such as c:\keybinds\numberpad.txt , which can then be loaded using the {{slashcommand|bind_load_file}} command.


If a level 20 character is sidekicked to level 29 by a level 30 mentor on a team of 4 and defeats a level 31 Crey Elite Security Agent lieutenant then the base XP level would be (31+20-29)=22, so (207 x 1 x 1.4 x 1.8 &#247; 4) = 130.41 --> rounds up to 131 XP.
One could also bind them in separate commands using:
: {{slashcommand|bind}} numpad1 "teamselect 1"
: {{slashcommand|bind}} numpad2 "teamselect 2"
: ...


Players can then customize other number pad keys to use buffs.  For instance, on characters that have Kinetics, one can use:
: {{slashcommand|bind}} add "powexec_name Increase Density"
: {{slashcommand|bind}} numpadenter "powexec_name Speed Boost"
This makes it easy to buff any single teammate or the whole team in succession.


<b>TIP:</b> Patrol XP is ridiculously easy to accrue. Make sure to check and factor it in if your character had Patrol XP.
The names of other keys on the number pad are: decimal, subtract, multiply, divide.


For a complete list of key names, see [[List of Key Names]].




==See Also==
== Source ==
* [[Veteran Levels]]
* [[Debt]]
* [[Patrol Experience]]
* [[S.T.A.R.T.#CustomXP1|Custom XP Rates]]


The original text of this article was derived from [http://web.archive.org/web/20080220072924/http://boards.cityofheroes.com/showflat.php?Number=371472 The Incomplete and Unofficial Guide to {{slashcommand|bind}} (1.1)] by Curveball.






{{Navbox Teaming}}
{{Navbox Binds}}


[[Category:Rewards]]
[[Category:Player Guides (Commands and Binds)]]

Latest revision as of 06:30, 16 November 2024

Introduction

Welcome to The Incomplete and Unofficial 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 customizing the way you play your game, and while it is 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

Understanding What /Bind Is

City of Heroes comes with a set of predefined or default 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 are not happy with these commands, you can open up the options panel, press the controls button, and replace some of them with key strokes or mouse button clicks of your own choosing. But you cannot 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 its 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 user interface panel, send a message to another player, and so on. It is 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. Essentially, /bind is telling the game that when you press the F key you want to activate the Hover power. Binds that players create are Custom Keybinds.

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 different than macros in other games. Macros will also be covered at the end of this guide, since they share many similarities 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 will see a flashing prompt in your chat window. You have 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 certain words to a slash ("/"), 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 reappear 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 City of Heroes that all of the text following the "g" should be sent to the group channel (or the team channel).

So if you type:

/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 command, 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 Curveball's text window.

All this really means is that when you are 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 are trying to send a message to is named "Curveball Hey! Want to group?" which is impossible, since the name field is not long enough and does not allow exclamation points or question marks. The comma after the name is very, very important, because it tells the game "I have told you who to send the message to, now I am going to tell you the message."

Slash commands may optionally have underscores in them. Any underscores in a slash command are ignored by City of Heroes. This feature is handy for commands that are composed of multiple words to make the command more clear. For example, all of the following commands are functionally equivalent:

/powexecname Temp Invulnerability
/pow_exec_name Temp Invulnerability
/_p_o_w_e_x_e_c_n_a_m_e_ Temp Invulnerability

But the second version is arguably the most clear and readable. In binds, no underscores are typically used so that more characters may be used in the command's parameters. However, underscores are used in some game documentation and in keybind files (covered in a later section) and in this guide.

Bringing the Tangent Back On-Topic

That is all well and good, you ask, but what does that have to do with /bind? Well, two things:

  • First, /bind is a slash command, and you need to know how slash commands work in general.
  • Second, /bind is a slash command that can trigger other slash commands.

Format of the /Bind Command

/Bind, like /t or /tell, requires that you 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,
  • key and mouse click combination,
  • game controller/joystick button, or
  • combination of game controller buttons

A trigger activates the /bind command. It 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 keys, provided you can keep track of all of them.

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 button 3, often the scroll wheel on modern mice)
  • BUTTON4: usually the thumb button on modern mice

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

For example, suppose you have set up the E key to trigger your Tanker's Temp Invulnerability power. In this case, E is a trigger; when you press it, it causes the power to activate. So the /bind command might look like this:

/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 something like:

/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, 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.

For a complete list of keys and buttons available for players to use with /bind, see List of Key Names.

Commands

Commands are the instructions the game follows when a trigger is used. When talking about binds, 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 button.

But what are these commands? There are a lot of them, and they can be found in these two locations:

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 "pow_exec_name Temp Invulnerability"

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

Pow_exec_name is a slash command. To activate Temporary Invulnerability in your chat window, you would type:

/pow_exec_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 in the /bind, the slash command was called without the actual "/." /Bind assumes that you are going to send it a slash command, so the slash is unnecessary, and if you use the slash it will not work.

Correcting mistakes

/unbind key

/unbind key entirely removes the custom binding on "key" and restores its default behaviour.

/unbind_all  

/unbind_all removes all custom bindings from all triggers and restores the game's default keybindings for the currently selected Keybind Profile.

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, to set up a bind 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 action is actually two slash commands:

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!$$pow_exec_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 keybind is to add a message to the Taunt power, such as:

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

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

/bind e "pow_exec_name Temp Invulnerability$$pow_exec_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 $$

Spaces should be omitted between the commands that appear before and after the $$ symbols. All of the examples in this guide adhere to that standard, but sometimes binds will be seen by developers who have used spaces on either or both sides of the $$ symbols. Placing a space between $$ and your commands can cause things to break. For example:

/bind H "pow_exec_name Healing Aura $$ local You are healed!"

Will not work. Why? Because the /bind command is not being read as "execute 'Healing Aura'," it is being read as "execute 'Healing Aura '," with a space after the word 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.

Nevertheless, in general, no spaces at all should be 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 cannot 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 "pow_exec_name Punch$$pow_exec_name Jab$$pow_exec_name Haymaker"

The game would immediately try to set up Punch, an instant later be told to execute a Jab instead, and finally be overridden a second time and be told to perform a Haymaker. The only action it would perform is the Haymaker.

There is an interesting trick you can use to get around this to an extent covered in the Neat Things You Can Do with /Bind section.

Using Variables in /Bind

Sometimes you will want to create a binding that will require the use of information that you will not necessarily have at the moment. You may not have it because you do not know it, or because that information changes, or because that information will be different depending on which character you are 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 that 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 battlecry (set in your character's ID screen)

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. $battlecry"

This bind would cause whichever character you were using at the time to fill in those variables with information specific to their individual builds. For three different characters, for example, the result may be:

  • 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 it will be included in the battlecry string (which is why I did not include any in my bind.) Stormhaven, who has no 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 or object you are currently selecting, whether that is another hero, a civilian, a villain, or any other targetable object. This variable can be very useful when you want to identify whomever or whatever you have targeted.

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

/bind t "local C'mere, $target!$$pow_exec_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 informational ways as well. For example, a keybind may be set up with the Teleport Target power to inform group members when someone is being teleported with the following bind:

/bind T "group $target, prepare to be teleported to my location.$$pow_exec_name Teleport Target"

This sends a message across the group (team) channel letting everyone know that a character is about to be teleported to the hero using the power, and then activates the Teleport Target power. For the message to be more private, it could have done it this way:

/bind t "tell $target, Prepare to be teleported to my location.$$pow_exec_name Teleport Target"

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 triggers just like standard keyboard keys are, so you can assign /bind commands to them in 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 often 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, it does not seem possible to successfully use button 6, button 7 or button 8 in key bindings, but button 4 and button 5 seem to work just fine depending on the mouse.

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 and 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.

MBUTTON/BUTTON 3

Button 3 is bound to +camrotate, which allows you to rotate the camera around your character.

Saving and Loading Key Bindings

If you want to save your custom keybinds to your hard drive, use the slash command /bind_save. This saves your custom keybinds in a file called keybinds.txt in your City of Heroes default folder. (C:\Games\Homecoming\Settings\Live by default).

/bind_save  
Saves the all current custom keybinds to keybinds.txt in the default folder.
/bind_load  
Loads custom keybinds from the file keybinds.txt in the default folder.

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 your default folder, it will load automatically.

If you would like to save all of your currently active keybinds, including both custom and default keybinds, use /show_bind_all_file fileName.

It is possible to load other text files with bind commands into the game simply by specifying the file name and location. The full command is

/bind_load_file full path or relative path
Full path would be the full path to the file, including spaces (if there is a space, the path needs to be in quotes).
/bind_load_file C:\CoH\textfiles\judge.txt
The command would load the judge.txt file from the C:\CoH\textfiles directory.
Relative path would be any file or directory in the default folder.
/bind_load_file mybinds.txt
This would load the file c:\Games\Homecoming\Settings\Live\mybinds.txt.
/bind_load_file \binds\otherbinds.txt
This would load the file c:\Games\Homecoming\Settings\Live\binds\otherbinds.txt /bind_save_file follows the same rules.
/bind_save_file full path or relative path


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 key bindings section of the Neat Things You Can Do with /Bind section.

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 custom 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, you need to follow this format. Use the /bind command initially in the chat window, not in the keybinds.txt file.

Using "Rotating Text Binds"

/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 villain 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 is not the same thing over and over again, it may be a little tolerable for your teammates.

Now, you could go ahead and bind each taunt with your taunt power to a different key, but that would be wasteful. Wouldn't 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 rotate through a set of different key bindings, but it is a little complicated. The way you do this is by constantly replacing your current key binding 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 your City of Heroes application directory. The /bind_load_file slash command allows you to specify the name and location of the bindfile you want to load. Thus, if the following commands are used:

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

The game would go into your c:\keybinds directory and load whatever file name specified.

The curveball.txt, stormhaven.txt and judge.txt files might have a few commands specific to those characters. For example, Stormhaven is a storm/electric defender, and the key used to bring up his hurricane power might be the same key used to bring up Curveball's teleport foe power. When a new character is created, /bind_load may be used to bring in my basic command set, and then /bind_load_file c:\keybinds\curveball.txt (or stormhaven.txt, or judge.txt) might be used to bring in character-specific key bindings.

And because these files only require a few deviations from the custom keybinds.txt file, only a few commands are needed 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 ([[slashcommand|nop}}) and others are specific powers.

If wanted, in the default keybinds.txt, Commands may be created 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"

By pressing the numbers 1, 2, and 3 on the number keypad, a custom bind set can be loaded.

Back on Course: Creating a Rotating Text Bind

To set up a key that rotates between the five taunts 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, and 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!$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt2.txt"

taunt2.txt

T "local You're next.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt3.txt"

taunt3.txt

T "local Who wants some?$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt4.txt"

taunt4.txt

T "local C'mere, ya pansy.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt5.txt"

taunt5.txt

T "local Let's see what you've got.$$pow_exec_name Taunt$$bind_load_file C:\keybinds\taunt1.txt"

When taunt1.txt 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. 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 key binding 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.$$pow_exec_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 first taunt binding will activate the next time T is pressed.

As long as you are willing to be patient and set up your files before you get into the game, you can create rotating text binds for just about everything. For example, rotating text binds may be created for your mouse so that pressing a key loads one set of binds to the mouse to put it in "movement mode" and pressing it again loads another set of binds to put it in "default mode".

Macros

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 will 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 buttons on the power bar. These icons can be activated with a mouse click, or can even be bound to keys if you use the /pow_exec_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(s)"

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 is so similar to /bind. Here is an example of macro creation to put the entire thing in context.

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

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 your Power Bar with the letters "GW" stamped on it. You can now move that icon anywhere I want to on my tray, and clicking on it will cause your character to stick his thumb up in the air and say "Good Work!"

You can name your macro anything you like, but the icon has limited space to actually display the letters. You will probably want to try to keep your macros down to one- or two-letter names so they can be read clearly on the 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 primary 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.

Saving Macros

Macros and their commands can be saved in a file, but there is no slash command to save the macros while in game. Instead you would need to type the macros into a text file manually, making sure that a double dollar sign ($$) is at the beginning of each macro command string. All the macros in the text file can then be automatically loaded into your character at once by using the /bind_load_file command. For example:

A sample text file holding macros might look like this:

myMacros.txt

$$macro Hi "emote wave"
$$macro Yes "emote thumbsup"
$$macro Dance "emote dance"

Then, to load the macros into your character, type:

/bind_load_file \binds\myMacros.txt


Rotating Text Macros

By using macros stored in text files in combination with the /bind_load_file and /Macroslot commands, complex rotating text macros can be created (very similar to rotating text binds). This allows one macro to replace another macro in the same power tray slot. Basically, it lets the same macro button do different things on each click.

As with rotating text binds, text files first need to be created with the various bind and macro commands in them. /bind_load_file is used to replace the bind commands, and the /macroslot command is used to replace one macro button with another button containing the commands from the next text file.

The syntax or format for text macros are exactly like normal binds except a double dollar sign ($$) must appear at the beginning of the command string. The following is an example of a rotating text macro:

mFlyCC0.txt

$$macroslot 20 "FlyON" "cc 1$$Powexec_Toggle_On Fly$$Bind_Load_File /binds/mFlyCC1.txt"

mFlyCC1.txt

$$macroslot 20 "FlyOFF" "cc 0$$Powexec_Toggle_Off Fly$$Bind_Load_File /binds/mFlyCC0.txt"

To enable the rotating text macro, type the commands inside the first text file into the chat box with a slash "/" at the beginning. Then press the Enter key to create the macro button for the first time.

/$$macroslot 20 "FlyON" "cc 1$$Powexec_Toggle_On Fly$$Bind_Load_File /binds/mFlyCC1.txt"

When the macro button is clicked, the character's outfit will change to costume #1 and the character will start flying. When the same macro button is clicked again, the character's outfit will change to a different costume (costume #0) and Fly will turn off. Then when the macro button is clicked again, the character will change to costume #1 and start to fly again, and so on.

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.

Getting Around the "No Queued Attack" Rule

We have already learned that you cannot "queue up attacks" with /bind, but there are ways to get around that limitation to an extent. One of the participants in a "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. The second method was shared with me by the maker of Akai's proc calculator and doesn't execute multiple commands with one click, but instead executes a different attack on each click in a sort of loop.

Auto attack method

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 "pow_exec_auto Dark Blast$$pow_exec_name Moonbeam"

This is just the last bit of the original bind, which is much longer. When the 0 button on the number keypad 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. 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, two attacks were set up, but only one is specifically fired off.

Rotating Text Bind Method

When a bind is executed, it is parsed from left to right, but powers activate from RIGHT to LEFT in the bind string because multiple powers in a single bind string will interrupt each other as they attempt to activate, leaving the last power in the string (far right) to be the first one to activate unhindered. Taking advantage of this, the user can create a series of binds that each execute an attack first, then load the next bind in a series to the same key. This allows multiple attacks to be bound to the same key and queued in a cyclic order. Here's an example of how to do it:

Create a binds directory in the working directory of City of Heroes. In this example it's just called "binds". Create a .txt file with the bind you want, omitting the "bind" portion in the file. Will name this file "attack1.txt" NUMPAD0 "bind_load_file_silent /binds/attack2.txt$$pow_exec_name Moonbeam" Create a second .txt file with the next attack in the series, again omitting the "bind" portion, that is all done by the "bind_load_file_silent" command. This file will be called "attack2.txt" NUMPAD0 "bind_load_file_silent /binds/attack1.txt$$pow_exec_name Dark Blast" You can see how one file points to the other in a circular chain. Lastly, just set it up in-game by using either of the bind commands

/bind_load_file_silent /binds/attack1.txt Each time NUMPAD0 is pressed, it will first execute an attack, then rebind that key to execute the next attack. I saw a Mastermind (@Nexros global) use this method to bind a single key to combine any and all inspirations into reds, then automatically feed them to his pets--all with one key!

Splitting One Key Into Two Keys

The plus (+) and minus (-) symbols can be used as prefixes in front of a bind command string. Adding a prefix to the beginning of a bind command string tells the game to execute the command(s) on key press, and again on key release. For example, suppose we bind the following to the "K" key:

+$$sprint

When the K key is pressed down the power Sprint will turn on. As long as the key is pressed and held down, Sprint will continue to stay on. When the key is released, Sprint will toggle off because the Sprint command was executed again.

If used in combination with /bind_load_file and rotating text binds, this can effectively split one key into two, and allows us to bind 2 completely different bind command strings to a single key... one on key press, and the other on key release. For example: KeyPress.txt

K "+$$Sprint$$bind_load_file KeyRelease.txt"

KeyRelease.txt

K "+$$Athletic Run$$bind_load_file KeyPress.txt"

This will activate Sprint when the K key is pressed, and then activate Athletic Run when the key is released.

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 it 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 are 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 2, 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.

The fourth mouse binding allows mouse button 4 to control when the character jumps.

The fifth mouse binding acts just like the first, only instead of going forward the character moves backward.

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 pop-up menu.

Selecting Teammates Using the Number Pad

This set of binds allows players to use the number pad to select their teammates and allies. For buffing or any other team selecting activity, this can be simpler than clicking with the mouse or using shift-<number>. Numbers 1-8 will select that particular team slot. The zero key contains a targeting bind to assist with buffing pets or players that are not on the team.

numberpad.txt

numpad1 teamselect 1
numpad2 teamselect 2
numpad3 teamselect 3
numpad4 teamselect 4
numpad5 teamselect 5
numpad6 teamselect 6
numpad7 teamselect 7
numpad8 teamselect 8
numpad0 target_custom_next friend notteammate notmypet

Note that the above text box is designed for a Bind File, such as c:\keybinds\numberpad.txt , which can then be loaded using the /bind_load_file command.

One could also bind them in separate commands using:

/bind numpad1 "teamselect 1"
/bind numpad2 "teamselect 2"
...

Players can then customize other number pad keys to use buffs. For instance, on characters that have Kinetics, one can use:

/bind add "powexec_name Increase Density"
/bind numpadenter "powexec_name Speed Boost"

This makes it easy to buff any single teammate or the whole team in succession.

The names of other keys on the number pad are: decimal, subtract, multiply, divide.

For a complete list of key names, see List of Key Names.


Source

The original text of this article was derived from The Incomplete and Unofficial Guide to /bind (1.1) by Curveball.