1. #1
    Stood in the Fire McSpriest's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    In a Hole
    Posts
    459

    Tips for making a more efficient Macro

    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.
    Last edited by McSpriest; 2012-03-20 at 07:04 PM. Reason: Updated 03/20/12

  2. #2
    For [@mouseover] condition for Dispel Magic, that will always return true, since it's not actually checking for an existence of unit under your mouseover so it will never get to [] part.
    What you want is [@mouseover,exists] or [@mouseover,help] (help implies exists).
    nodead is commonly included into healer macros and although it makes the macro longer, you do not get stuck on blue hand (and have to hit esc) if the player dies mid-cast and you avoid error messages too.

  3. #3
    Stood in the Fire McSpriest's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    In a Hole
    Posts
    459
    Quote Originally Posted by Sedivy View Post
    For [@mouseover] condition for Dispel Magic, that will always return true, since it's not actually checking for an existence of unit under your mouseover so it will never get to [] part.
    What you want is [@mouseover,exists] or [@mouseover,help] (help implies exists).
    nodead is commonly included into healer macros and although it makes the macro longer, you do not get stuck on blue hand (and have to hit esc) if the player dies mid-cast and you avoid error messages too.
    thank you i had help in there, but in the process of re-typing this i left it off for some reason

  4. #4
    Deleted
    13 and 14 aren't the only inventorySlotIDs. You can use any inventory slot ID. Probably want to mention that.

  5. #5
    Stood in the Fire McSpriest's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    In a Hole
    Posts
    459
    Quote Originally Posted by Treeston View Post
    13 and 14 aren't the only inventorySlotIDs. You can use any inventory slot ID. Probably want to mention that.
    good point i'll post a link to a list of them as well

  6. #6
    I really didn't get the reasons given for shortening macro text.
    1. Are there any performance implications to having a shorter macro?
    2. Does the processing engine treat [@mouseover] and [target=mouseover] differently?

    if none then i would rather stick with [target=mouseover] instead of some complex albeit shortened code (space permitting). This guide seems to be intended for newbies / beginners and in that sense anything cryptic would only confuse and deter them from exploring further.

    Shortening macros is fine if it was a programming language / compiled language but in a pseudo language code you would want it to be opposite

    /2c

  7. #7
    Stood in the Fire McSpriest's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    In a Hole
    Posts
    459
    Quote Originally Posted by palthis View Post
    I really didn't get the reasons given for shortening macro text.
    1. Are there any performance implications to having a shorter macro?
    2. Does the processing engine treat [@mouseover] and [target=mouseover] differently?

    if none then i would rather stick with [target=mouseover] instead of some complex albeit shortened code (space permitting). This guide seems to be intended for newbies / beginners and in that sense anything cryptic would only confuse and deter them from exploring further.

    Shortening macros is fine if it was a programming language / compiled language but in a pseudo language code you would want it to be opposite

    /2c
    it was more a response to seeing people asking why their macro wasn't working when their macro was something along the lines of"
    Code:
    #showtooltip Judgement
    /use hand of gul'dan
    /cast [target=focus,modifier:shift,harm]Judgement;[target=target,harm]judgement;
    /cast[harm,@player]Flash of light; Holy Light
    and my first thought to those questions was "well of course you don't see the problems since you are thorwing way more crap in there than you should." It seems that one of the major reasons why people have problems is that they put so much extra stuff into a macro that they can't identify their mistake. I'm more trying to give people tips for cleaning up their macros so (hopefully) they have an easier time of troubleshooting

  8. #8
    Very cool, I will take definitely try and implement these shortcuts. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •