Friday, May 18, 2012

Pimp my UI: Help/Harm Macros

Macros: not this complicated.
Inspiration, yay! Those who read last week's post will know that I've been seeking a topic to blog about for a few weeks now (my post buffer used to be 2 weeks long, and I used it all up). Then, a friend of mine who's leveling a priest sent me a simple whisper asking about help/harm macros. How could I have forgotten to write about something so core to the class? So, this week, it's all about macros.

Macro Basics

While I bet a lot of my readers have heard of macros before, here's a short introduction for those who haven't. A macro is a short program you can write to convert a single key-press or mouse-click into more than one game action. Generally, anything you could do with the chat box is something you can make a macro do, like saying something in chat, inviting someone to your group, or even casting a spell. Unlike most real-world programming languages, macros are designed to be simple, and you don't need to learn a lot to make use of them. Macros are part of the game, you don't need any addons to use them, and they're completely approved by Blizzard.

To make a macro, first, open the macro window by typing /m into the chat box and hitting enter.

Help/harm macros are simple macros you can write to condense one helpful spell and one harmful spell into a single button, freeing up space on your keyboard and action bars. You'll see two tabs near the top of the window, General Macros and Specific Macros. You'll probably want character specific macros for today. Once you've selected the kind you want, click the New button in the bottom-right corner. This will open a smaller window for you to name the new macro and pick an icon for it. Once you've done that, click Okay. You'll now have a new blank macro button in your macro window, and a blinking cursor in the box below labelled "Enter Macro Commands:". Type the macro commands in there (I'll explain this part in a little while), then drag the macro button onto your action bars just like a normal spell.

As I mentioned above, macros can do anything you could from the chat box, and to make it do something, you just put that command in the macro. To do more than one thing in the same macro, just put the next command on the next line. Today I'll be focusing on casting spells, but if you're interested in doing other things, here's some further reading: Slash Commands on WoWWiki (a little outdated, but still good.)

Making a Help/Harm Macro

Help/harm macros are simple macros you can write to condense one helpful spell and one harmful spell into a single button, freeing up space on your keyboard and action bars. Normally, you can't use multiple spells that have a global cooldown in the same macro, but help/harm macros can because they only try to use a single spell at a time.

You make a macro cast a spell like this:

That will cast Flash Heal when you activate the macro. You can use any spell name or item name, and it will try to cast the spell, use the item or equip the item. So far, this macro's not any better than just putting Flash Heal on your action bar. Now we'll make it do something Flash Heal can't on it's own: work when you target an enemy.

This will cast Flash Heal if you were targeting a friendly player, and cast Mind Flay if you were targeting an enemy. Cool huh? Now you only need a single button for both spells. For any macro command, you can put a set of square brackets between the command itself and the rest of the line. Anything between the square brackets will modify how the command works. [help] makes it skip the command if you're not targeting a friendly target. [harm] makes it skip the command if you're not targeting an enemy. You can also preface any modifier with "no" to make it mean to opposite. For example:

This is almost the same as before, but now it will also heal you if you're not targeting anything. (Of course, it might also strip you out of Shadowform if your target dies right before you hit the macro! Oops!) Anyway, using these tags, you can build your own macros to do whatever you need.

Advanced Macro Construction

Here are some more modifiers I find useful:
  • [mod] - Only do this if you're also holding a modifier key (meaning, Shift, Ctrl, or Alt.)
  • [exists] - Only do this if you actually have a target.
  • [spec:1] or [spec:2] - Only do this if you're in your primary or secondary talent specialization.
  • [form] - Only do this if you're in a form (meaning, in Shadowform.)
  • [dead] - Only do this if your target is dead.
  • [mounted] - Only do this if you're riding a mount.
  • [@player] - Use this on yourself instead of your target.
  • [@focus] - Use this on your focus instead of your target.
You can also set multiple different modifiers to the same command. For example:

This will use Power Word: Shield on myself if I hold a modifier key, or use Power Word: Shield on my target if I'm targeting a friendly player. By putting multiple modifiers together in the same set of square brackets, separated by commas, they all apply together. By making a separate set of square brackets, the next set will only be attempted if the first set gets skipped. You can also put [] with nothing in it to make it just try to cast the spell with no modifiers at all if the other brackets got skipped.

By creatively using all the tools I've provided here, you can fit a ton more stuff onto your bars, and make some pretty handy stuff. Soon you'll be making complex macros like these ones that I use:

1 comment:

  1. Thanks this will help a lot. I've tryed to set up my macros a time or two with mixed results Haveing command wording and seqince to follow should help get me on the right track.