|Macros and Binds|
I am writing this FAQ to explain how to make your own macros and keybinds in City of Heroes. These follow a very simple formula, but are somewhat complicated at the same time. Before I begin, please note a certain term I will be using: substitution. That has no trick meaning to it, but to explain macros I will use a substitution to make the formula simple. Think of it like a math problem.
Macros are like powers as they appear as an icon in your tray. This way you can click on an icon instead of pressing a key.
The basic macro formula is as follows:
/macro MACROTITLE "COMMAND YOURCHOICEOFACTION"
That is a very simple macro which will perform one simple thing. Note the following substitutions.
MACROTITLE = The title of your macro, usually no more than 4 letters. COMMAND = The command you are about to execute, like speaking or emoting YOURCHOICEOFACTION = This is where you designate WHAT you're saying or doing.
A completed macro that makes a character simply say "Hello!" would look like this:
/macro HI "say Hello!"
That command will put a little bubble in your power-tray with the word HI on it, and when clicked your character will say "Hello!"
Binds are much the same way, except it uses /bind and instead of a title, a key which you want to press to execute the action. It would be a good idea to choose your keys wisely, as several keys on the keyboard already have default game binds. For example, the T key can show and hide your target box, but if you bind to that key with something else, its previous action will be removed.
/bind u "say Hello!"
The above bind will make you say "Hello!" just like the macro, except you must press the U key to use it. Of course you are NOT restricted to only saying hello. You can say anything you want just as long as you put it in the formula correctly. Or you don't have to say anything at all! You can perform an EMOTE instead. If you don't know what an emote is, then put this guide down and don't look at it again until you do. For those of you that DO know what they are, then you probably know how to perform them in-game. You know how to right? Click on the little speech bubble icon next to the chat entry box and select a category then select an emote? Well, inside that list you can find a list of almost all of the in-game emotes, and here's how to code them for a macro.
/macro HI "emote hi"
That command will put a little bubble in your power-tray with the word HI on it, and when clicked your character will wave hello. Simple!
Now let's take another step up and learn how to do two things at once. To do this, you make a macro like normal, but add two dollar signs between two commands to do two things at once.
/macro HI "emote hi$$say Hello!"
Note how there are no spaces in between the end of the EMOTE ACTION and the dollar signs, as well as no spaces between the dollar signs and the COMMAND. That is important! Your macro will not work if there are spaces! The above macro will put a little bubble in your power-tray with the word HI on it, and when clicked your character will wave hello, and say "Hello!" at the same time.
The next step is to learn about targets. When making a macro you can have your character say the name of whoever you have targeted with the word "$target" in your formula. That is no typo, it really is a dollar sign in front of the word target. This function works like normal text in a macro.
/macro HI "emote hi$$say Hello, $target!"
If you have nothing targeted, the above macro will put a little bubble in your power-tray with the word HI on it, and when clicked your character will wave hello, and say "Hello, $target!" BUT, if you have, say, a person named Bob targeted, will put a little bubble in your power-tray with the word HI on it, and when clicked your character will wave hello, and say "Hello, Bob!" This works with any target, and is a fun thing to use when encountering enemies. In combat against a Hellion you could click a macro, using the target function, which says "You're going to jail, Blood Brother Slicer!" and then point at the enemy.
The trickiest macro to make, in my opinion, is a command which can link a Power and a Command. Please note your power trays; you should have three of them. If you do not see three rows within which to place powers, then put down this guide until you have all three open, one on TOP, one in the MIDDLE and one on the BOTTOM. Now, I would like to state, I have yet to find a way to execute a power in the TOP tray, so please do not put any powers there. Personally, I use the top tray for all of my macros, and the middle and bottom trays for my powers. Each tray holds 10 slots labeled from 1 to 9 and then 0. If you look at your tray, they are clearly marked. Lets say you want to link a chat saying to the move "Brawl" which every character has. Place the "Brawl" icon in slot 1 of the bottom tray, the very bottom left slot of all the trays.
/macro POW "powexec_slot 1$$say Take that!"
The above macro when clicked will use the power in SLOT 1 in the BOTTOM power-tray, and your character will say "Take that!" The command used here is "powexec_slot" and then there is a space, followed by the slot number of your choice. If brawl were in SLOT 5, then /macro POW "powexec_slot 5$$say Take that!" would do the exact same thing as the above macro. To use a power in the MIDDLE tray, the formula is mostly the same.
/macro POW "powexec_altslot 1$$say Take that!"
Please note how the "powexec_slot 1" has now become "powexec_altslot 1" instead. The "alt" stands for alternate, meaning your alternate tray, the MIDDLE tray. Hope you're not confused yet.
Next we have new command the Costume Change command. This one is very easy but only works after level 20 when you have more than one costume.
/macro COS "cc 1$$say Do you like my new outfit?"
Notice the command is a simple "cc" followed by a space and then the number one. There are four costume slots if you'll notice, and from left to right their numbers are 0, 1, 2, and 3. The above macro will switch to the costume in the SECOND costume slot because the number listed is 1. It's moderatly confusing considering you use the number 1 for your second costume, and the number 2 for the third, and 3 for the fourth, but it makes sense when you remember the first costume is 0.
Finally, you're ready to make your own macro! Have fun!