Tips For a More Efficient Macro
After reading some people's macro's on this forum I thought it might help to post some tips for making your macro more efficient.
Why Minimize My Macro?
Macros are limited to 255 characters in length and each character is limited to 16 macros (more per account). The purpose of minimizing your macro is to keep from wasting space, and hopefully fit everything you need into one macro. It also saves typing and makes it easier to change should you ever need to. Just remember the simpler the better. Also a cleaner macro will be easier to troubleshoot / diagnose if there is a problem. Keep in mind however that just because you have more room in a macro does not mean you need to fill the space with extra code.
What Should I Macro Together?
Try to macro together abilities or functions you will want to do off the same key. this can mean abilities in combination with one another, the same ability used in different ways, or abilities that are similar in nature but have different purposes (like multiple kinds of dispels for a priest). For example macroing together switching stances as a warrior to pop shield wall and shield wall is a good idea. Also, my personal favorite macro includes all priest dispels in one button and which dispel is cast is determined by a modifier key. a common macro includes an ability you want to use on different targets depending on the situation, it might be your focus, your target, or your target's target. you don't want to macro abilities together that shouldn't be used off the same button or abilities which do not relate. For example a rogue macroing combo point generating and combo point using abilities into the same button is probably not the best option. A Hunter macroing in deterrence and rapid fire together is usually not good either.
Shortening Your Macro
There are a couple tips for those looking to shorten their macro's code.
"@" replaces "target=" it saves considerable space and cleans up the macro significantly
/use and /cast are interchangeable, but /use is shorter
You can use InventorySlotIDs to replace spelling out the name of the equipped item in a macro. this means you don't need to worry about updating the macro every time you get a new trinket and you save space.
/use 13 activates your top trinket /use 14 activates your bottom one
for a list of all Inventory and bag slot ID's click here: InventorySlotId
Example:
Code:
#showtooltip Fireball
/use 13
/use 14
/use [@focus,harm][]Fireball
[] will always return with a true therefore it will cast as if you cast the spell normally (on your target or you depending on what you are targeting and what the spell is)
If you are using the same spell firing under different conditions or even to different targets you only need to use it once in the macro
Example:
Code:
/use [@focus, mod:shift,harm]Judgment;[@mouseover,harm]judgement;[@target,harm]judgement;judgement
can be shortened to
Code:
/use [@focus,mod:shift,harm][@mouseover,harm][]Judgement
you can macro several abilities into one /use if you do it right. using a semi-colon ";" acts as a "else" statement. also remember that a macro reads left to right and with ";" it will keep going until it gets a "true" response at which time it will execute the command.
using #showtooltip and the [?] icon will allow you to change the tooltip and spell icon based on what casting
example:
Code:
#showtooltip
/use [@mouseover,mod:alt,Help][mod:alt]Cure Disease;[mod:shift]Mass Dispel;[@mouseover,help][]dispel magic
A Word or Two About Cast Sequences
using "/castsequence' can be a very powerful way to macro several abilities that activate the GCD together in an order in which you commonly use them. however if used incorrectly they will actually cause more problems. for example macroing together abilities which generate focus, Runic power, rage or combo point with ones that use or consume them can cause a problems. If the macro stalls out on an ability that uses the focus, runic power, rage, or combo points then it wont proceed to the abilities which generate that resource which are available. the best course of action is to put the abilities on separate macros / buttons. In the very least use a modifier to separate when to generate vs consume the resource for abilities. also note that when a cast sequence reaches the end it will loop back to the beginning this means you can't have opening / single use abilities then repeatable abilities in the same macro.
So What Now?
Macro's can accomplish complex tasks that would otherwise be more difficult if not impossible to do. The best macros are ones that are simple yet give your character much more control. Try to clean up your macros and see what fun you can have with them. Don't be afraid to try something new, it might work out better than your current setup.
remember if you get stuck ask for help either within your guild or on these forums under the "Ask It! Macro's" thread.
If you have anything to add or comments and corrections please feel free to post them
This is still a work in progress I'll keep working on it, check back later.