Thursday, November 18, 2010

Insanely Easy WOW Macro Guide page 2: You're going to make a macro, part 1

This is part 2 of the macro guide. Rock part 1 before you come here.

Page 2: You're going to make a macro, part 1
Page 3: You're going to make a macro, part 2
Page 4: You're not going to make a macro: Basic Macro Theory
Page 5: Basic Macro Commands list

Here we introduce your educational tool and initiate the pictorial section. You will follow along and get a full understanding of how your new awesome tool works while learning about basic macro editing.

Read on.

We're going to be using the explain-o-matic to make the edits, functions, and parts of a macro very apparent to you. I believe the use of this tool will expedite your lessons, and be a very useful tool in the future. So please follow along and use it.

For now open the explain-o-matic in a separate window or tab depending on your browser and personal preference.

I'm going to start out by browsing a macro at that sounds useful in a random class page, then we're going to use the explain-o-matic to make the macro our own.

This is you: "wait, this macro guide isn't going to have me in game opening /m and teaching me to make my first macro to pointlessly say "hello world" while I stare at commands I don't understand then give up because I can't separate the parts or what I'm trying to make is impossible?"

Me: No, this guide isn't going to do that

Alright, so I went to the priest macros to grab an example and found:

#showtooltip Dispel Magic
/cast [target=mouseover,exists] Dispel Magic; Dispel Magic


1. Copy paste that into the explain-o-matic.

2. Click "explain this macro"

3. Read the explanation

4. Mouseover parts of the macro on the right hand side, see them highlighted on their line of script on the left hand side. Take a moment to recognize what parts of the macro are where when highlighted, as this is what will be teaching you much of what we do as we change things around.

Now, what I want to do with this macro is make it into a cat druid macro. I can be, say, chomping down on a delicious flag carrier and notice he's being healed by some clown and want to slow that healer down quickly and perhaps rocket boot back to the flag carrier if he's close to death with my pals on him, or the opposite of chomping on the healer but the flag carrier is about to enter tunnel in WSG.

First thing is first, I want the tooltip to be for Feral Charge - Cat.

To make this edit, mouseover the dispel magic on the explain side of the explain-o-matic in the row that explains the show tooltip. It shows you where the spell shown comes from on the left side, not that it wasn't obvious, but this is how crazy easy this tool is going to make your editing.

Change the dispel magic part to Feral Charge - Cat in the top window that holds your actual macro script. Be careful with spelling, Feral Charge - Cat is harder with the dash between. Hit explain macro to update the explanation.

Now the button on this macro will show the graphic for Feral Charge - Cat, and we can see it's CD so we know when it's available.

Next, we'd like the macro to actually cast Feral Charge - Cat, not dispel magic, mouseover both the other dispel magic commands on the explain side and change them both to Feral Charge - Cat.

1: Mouseover The first dispel magic listed and locate it in the script.

2: Mouseover the second dispel magic and locate it's script.

3: Change both to Feral Charge - Cat and hit explain this macro

Hitting "explain this macro" will pop up yellow question marks where it doesn't understand in the actual script if you typed incorrectly or deleted/wrote over a part by accident.

Now we can see that our new macro casts Feral Charge - Cat on our mouseover, if it exists, and if it doesn't it casts it on our target. It also shows the tooltip for Feral Charge - Cat so our button looks normal and we can see it's cooldown easily.

Normally we'd be at a good testing stage, but this particular macro is kinda sloppy, so it's a good time to learn about conditionals to add to make it a bit more intelligent. If you are in a battleground and have a target, but your mouse is resting over your good pal healyMchealsalot, this macro will try to feral charge healyMchealsalot and give an error. If your mouse was over a corpse it would give an error as well. Let's fix it up.

You can see that this macro already has a condition to it, "exists", meaning it only tries to cast it on the mouseover target if a mouseover target exists. However, we only want to try to attempt to cast Feral Charge - Cat on enemies that aren't dead. This way if we haven't moused over a living enemy target it casts it on our target, which is probably our intent.
Mouseover "exists" in the explanation to highlight where it is.

Where you see [target=mouseover,exists], you can add commas and more conditions to the macro for the mouseover portion. [target=mouseover,exists,nodead,harm] makes it so it only casts on mouseover if the mouseover is an enemy: harm, and the enemy is alive: nodead. This will skip the random errors and truly let us use this macro as intended.

You can see where we've added ",nodead, harm"

Edit that in, hit explain, and read the explanation, pretty sweet, right? Now we can replace our normal feral charge button on our cat bar with this macro, as it wont accidentally give errors or cast in a way we did not intend. I'll go over how to copy paste the macros into game later on so this part doesn't get too bloated.

This is our final macro, after hitting explain, check out our explanation.

You just learned a few things. exists, harm, and nodead are conditionals. Later we'll cover the many more choices you have to use to make your macros intelligent and never fail... or succeed in wasting your moves.
You also learned a command, /cast. Clearly it works for things you wouldn't actually consider "casting" per say. You also just played with a parameter, target=mouseover. There are many more choices for commands, parameters, and conditionals. We're doing well so far, by the end you will be able to identify all parts on your own or with the explain-o-matic, and either make any macro you like intelligent to do exactly what you want, or take that decision into your own hands. I bet you're getting the hang of the explain-o-matic as well.


Lets say I didn't dig on the idea of having the fact that I happen to be moused over a certain target decide for me to cast on that particular target. Let's pretend for a second that I'm a keyboard turner and the idea of my mouse over random things frightens and annoys me. Let's continue with our macro from before, and allow me to physically make the decision to cast on a mouseover with what we call a modifier key. Let's pretend we just found our macro we just made on the internet and want to hack it up a little more than the last one.

Right now we have:
#showtooltip Feral Charge - Cat
/cast [target=mouseover,exists,nodead,harm]Feral Charge - Cat;Feral Charge - Cat

What we currently have

First, I'm making the decisions here on this macro. So we can ditch the previous conditionals. Mouse over them in the explain side and identify them, and delete them. Then hit explain. They are: exists, nodead, and harm.

#showtooltip Feral Charge - Cat
/cast [target=mouseover]Feral Charge - Cat;Feral Charge - Cat

Now we need to tell it when it is allowed to do that first function set, of casting on mouseover rather than my target. What we do is add Mod;alt to the mix inside the brackets. If you are unsure where in the macro the new info needs to be, mouseover the portion of the macro that needs the info added to it to see it's script.

Adding in mod:alt to the mix, separated by a comma as with other conditionals

#showtooltip Feral Charge - Cat
/cast [mod:alt,target=mouseover]Feral Charge - Cat;Feral Charge - Cat

My mod is alt, hit explain and check that action out. Other possible modifiers are shift and ctrl.

This tutorial suggests you just find a modifier key macro and paste it in to work from there, but this particular example works to show you how we can use mod keys as part of the conditional and parameter portion of a macro.


Now that we're on mod keys, let's try to use mod keys to swap between spells, rather than targets.

/cast [modifier:alt] Incinerate; Immolate

Paste that into the explain-o-matic. You'll see when the alt key is held down it casts incinerate, when no mod is held it casts immolate.

The macro as it is now

It also shows the tooltip on your bar of whatever is about to be cast, meaning if you hold alt it shows incinerate, and if you have no modifier held down, it shows immolate. Personally that's extremely sloppy for me, I like to watch my cooldowns, and immolate has no cooldown, so why would I want to normally watch the spell with no cooldown's tooltip? This person must have a cooldown addon. But we're not going to use it for that anyways, so we'll cover fixing those things later. Right now I'm placing my rocket boots on my keyboard and want to ditch drain mana, let's say. I'd like to place drain mana under drain life, they are closely related, it sounds like a good organizational move to me.

Well, this is crazy easy, isn't it? I want when I press alt modifier to cast drain mana, and drain life when I press no modifier.

Explain-o-matic says:
If you were holding the alt key then: Cast Incinerate on the currently targeted unit

Well, I'm gonna replace incinerate with drain mana, since that's what I want to cast on alt press.

Then explain-o-matic says:
Cast Immolate on the currently targeted unit

So I'm going to replace immolate with drain life, since drain life is what I'd like to cast normally, with no modifier. We end up with:

/cast [modifier:alt]drain mana;drain life

The final macro explained

We also end up with a free button on my keypad for my rocket boots, and all is right with the world.

We started out having pictures for every tiny step, and they're slowly disappearing, wtf? Yes, yes we have. I think you're getting the hang of the explain-o-matic by now. I want you to follow along with it for every example for the next two parts, if you'd be so kind. Remember that for most mistakes the explain-o-matic will pop up with a yellow question mark by the error. Also remember you can easily find the areas you want to work on in a macro by mousing over their part of the explanation.

We've learned a lot already. We can now use modifier keys to have 2 spells on one key, we can have a macro choose our target for us if a mouseover exists, and we can tell a macro the target we want by physically pressing a modifier key.

Next I'm going to fix up some macros I've found for use with my characters. It should be relatively fast for me, please follow along with the explain-o-matic. Then we'll cover the library of available commands, conditionals and parameters and what not to do. Then you're making your own! That is if you haven't already had an idea and made one already.

Page 2: You're going to make a macro, part 1

Page 3: You're going to make a macro, part 2
Page 4: You're not going to make a macro: Basic Macro Theory

Page 5: Basic Macro Commands list

No comments:

Post a Comment