Online Game Commands
 
 

City of Heroes - Bind / Macro Commands

 

Bind Command

 

Bind is basically a way of telling City of Heroes what a certain key should be doing. For instance as default "Backspace" will do an "autoreply" to an incoming message or tell. If you was not happy with this key you can open up the options panel and change it to a different key. "Bind" takes this one step further and gives you more option on your key commands.

A key binding always starts with /bind

Example:

/bind h "local HELP! $target is beating on me! HELP!"

Assuming you have a mob called "Mob_001" targeted, when you hit the h key this would display:

HELP! Mob_001 is beating on me! HELP!

 

/bind enter beginchat <color #FFFFFF><bgcolor #0000FF><border #FF0000><duration 10>

This will make your speech bubble have a red border, white text on a blue background and be displayed for 10 seconds every time you hit the enter key. For more info on CoH Speech Bubbles.

 

All CoH Commands can be placed into a key bind and can be a very useful and powerful tools.

 

Binding Multiple Commands to the Same Key

 

Lets expand our previous key bind that yelled for help with an emote. When duel command binds are used always make sure the text that you want to say comes first, then the emote, like this:

Example:

/bind h "local HELP! $target is beating on me! HELP! $$ emote overhere"

When you hit the h key now, this would still say locally HELP! Mob_001 is beating on me! HELP! but would also add the overhere emote to the action. Hopefully someone should notice you and come to your aid.

The $$ in the command line acts like a "and then" command and so two commands can be executed on the same line. Most CoH Commands can be combined like this but always have what you wish to say first.

 

Chord Keys: Multipule key combo's

 

Too further tweak you key binds, you can assign multipule key presses to them. This means 2 keys need to be pressed to activate the command.

Example:

/bind lshift+h "local HELP! $target is beating on me! HELP!"

When you hit the "left shift and h" together key now, this would say locally HELP! Mob_001 is beating on me! HELP!

Note: Always put the chord key first. As in the "lshift" part

 

Number pad keys can also be used, here is the commands for the keypad:

numpad1
numpad2
numpad3
numpad4
numpad5
numpad6
numpad7
numpad8
numpad9
numpad0
numpad.
numpad+
numpad-
numpad*
numpad/
numpadenter
tab

 

Mice can also be used, as follows:

lbutton - Left button on default mouse lay-outs.
rbutton - Right button on default mouse lay-outs.
mbutton - Middle button on default mouse lay-outs. (not recommended to be used as this is for +camrotate)
button4 - Thumb button.
button5 - No error, but needs to be tested.
button6 - No error, but needs to be tested.
button7 - No error, but needs to be tested.
button8 - No error, but needs to be tested.

 

Bind or NOT too Bind

 

The Bind command is not for queuing up multiple action commands (such as 3 attack commands) to execute in one go from one key. For that Scripts / Macros are used that can complete more than one task from a single key press. A key bind is like your movement keys, where no mouse is needed.

 

 

 

Macro / Script Commands

 

One major advantage of bind commands is that once created they are placed automatically in the powers tray. This is great for mouse users as the commands are now clickable from the tray. Unfortanalty the system tray has a max of 20 slots and a level 40 character will have 20 powers and so desisions need to be made on what you feel is needed most.

A macro always starts with /macro

Example:

/macro HELP "local HELP! $target is beating on me! HELP!"

Assuming you have a mob called "Mob_001" targeted, when you click the new macro called "HELP" from the system tray this would display:

HELP! Mob_001 is beating on me! HELP!

 

All CoH Commands can be placed into a key bind and can be a very useful and powerful tools.

 

Combining Multiple Commands to the Same Macro

 

Just like the bind command, macro's can be used to activate a few actions from the same tray icon.

Example:

/macro HELP "local HELP! $target is beating on me! HELP! $$ emote overhere"

When you click on the key macro, this would still say locally HELP! Mob_001 is beating on me! HELP! but would also add the overhere emote to the action. Hopefully someone should notice you and come to your aid.

The $$ in the command line acts like a "and then" command and so two commands can be executed on the same line. Most CoH Commands can be combined like this but always have what you wish to say first.

 

 

Macro V Bind Examples

 

Here is some commands that acheave the same result but are done via /bind and /macro:

--- Say Yes Localy ---
/bind f1 "local Yes"
/macro Yes "local Yes"

--- Say No Localy ---
/bind f2 "local No"
/macro no "local No"

--- Respite/dramatic Improvement/Resurgence ---
/bind f6 "$$ inspexec_name respite"
/macro respite " $$ inspexec_name respite"

--- Enrage/Focused Rage/Righteous Rage ---
/bind f7 "$$ inspexec_name enrage"
/macro rage "$$ inspexec_name enrage"

--- Luck/Good Luck/Phenomenal Luck ---
/bind f10 "$$ inspexec_name luck"
/macro luck "$$ inspexec_name luck"

Note: make sure there is a SPACE between the $$ and the power name.

From these examples iam sure you can now feel confedent that you can make your own from the CoH Commands List and CoH Power Names list.


More Macro Examples

 

/macro rofl "em laugh$$l ROFL"
/macro afk "em newspaper$$l afk a sec"
/macro point "em point"
/macro dance "em dance"
/macro dance "em boombox"

 

SAVING AND LOADING YOUR KEYBINDS

 

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

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

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

/bind_load_file [path]

So, for example,

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

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

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

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

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

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

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

 

 

USING "TOGGLE BINDS"

 

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

There is, however, a way around this.

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

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

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

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

a brief tangent: a recap of /bind_load_file

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

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

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

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

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

curveball.txt

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

stormhaven.txt

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

judge.txt

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

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

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

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

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

putting the tangent back on course: creating a toggle bind

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

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

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

taunt1.txt
taunt2.txt
taunt3.txt
taunt4.txt
taunt5.txt

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

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

--taunt2.txt--
t "local You're next.$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt3.txt"

--taunt3.txt--
t "local Who wants some?$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt4.txt"

--taunt4.txt--
t "local C'mere, ya pansy.$$powexec_name Taunt$$bind_load_file c:\keybinds\taunt5.txt"

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

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

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

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

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

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

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


 

MACROS

 

What do you do when you run out of keys to bind? Create icons.

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

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

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

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

The basic format for /macro is

/macro [macroname] "[command]"

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

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

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

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

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

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

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

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

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

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


 

NEAT THINGS YOU CAN DO WITH /BIND

 

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

Getting around the "no queued attack" rule

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

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

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

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

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

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

Targeting the nearest enemy

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

/bind space "target_enemy_near"

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

Remapping your mouse to control your movement

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

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

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

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

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

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

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

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


 

Default Key Binds
enter "show chat$$ startchat"  Start chat command
/ / "show chat$$ slashchat hover on/sprint off or vice versa
backspace autoreply reply to a tell
, "show chat$$beginchat /tell $target," start chat to target
' "quickchat" emote menu
tab toggle_enemy switch to next enemy
esc unselect untarget
m,n,t,c toggle map, nav, target, chat windows toggle windows visible/hide
func keys inspirations activate command
num keys power tray #1 activate abbilities from power tray
alt numkey power tray #2 activate abbilities from power tray
f6 /bind f6 "local RUN!" RUN!
f7 /bind f7 "say$$emote thumbsup" thumbs up
f8 /bind f8 "local HELP!!$$emote whistle" whistle for help
f9 /bind f9 "local level $level $archetype looking for team" advertise for team
f10 /bind f10 "say ATTACK!!$$emote attack" ATTACK!

 

 

 

Top Of Page

©Online Game Commands - City of Heroes

Age of Conan | Anarchy Online | Auto Assault | City of Heroes | Dark Age of Camelot | Eve Online | EverQuestEverQuest 2 | Final Fantasy XI | Guildwars | Gunbound | Half Life | Half Life 2 | Hellgate London | Linage 2 | Lord of the Rings Online PlanetSideQuake | Ragnarok | Runescape | Shadowbane | Stargate Worlds | StarTrek Online | Star Wars Galaxies | Matrix Online |Ultima Online | Unreal | UT2004 | Vanguard | Warhammer Online | World of Warcraft
Site Map  |  About us  |  Link To Us  |  Contact Us