MTarget
MTarget is an addon that (primarily) assists in targeting through the replacement of tokens in macros. It announces the variables to the raid/party to allow synchronization of targets.
Through the replacement of tokens with values macros can be rewritten on the fly as group and situations dictate.
Note: Given that this is working with macros the updating of the macros can only occur when out of combat.
Version 2 removes the use of the unit ids. Using names works better because the group repositioning and tracking could not be performed effectively (zoning in and out of dungeons could easily break it) and wasn't needed.
It now includes a minimap icon so a LibDataBroker launch add-on is no longer required.
Commands
To view the command line commands run /mtarget help
. For a more detailed description of the commands and menu actions have a look at the Commands page.
Options
There are a number of configurable options for MTarget available in the addon tab of the Interface options. Go to Options for a description of the options.
I would recommend having the following options turned on:
- Auto Write Macros
Examples
The following are two example macros that I use (for more go to Examples):
Hunter Misdirection Macro Template
/cast [@$tank,help,nodead][target=pet] Misdirection
When joining a party I assign the value tank to the name of the tank by right clicking on their name plate choosing the MTarget menu and the tank option and the macro gets rewritten to replace $tank with the player's name. In this way it can free up focus from tradition focus macros to be used for other uses. So after assigning the value of $tank you end up with the following macros:
Hunter Misdirection Macro
/cast [@MrTank,help,nodead][target=pet] Misdirection
Paladin Beacon of Light Macro Template
/cast [@$maintank,help,nodead][@$offtank,help,nodead][help,nodead] Beacon of Light
When joining a raid I assign the value "maintank to the name of the main tank by right clicking on their name plate choosing the MTarget menu and the maintank option and the same for offtank. The macro gets rewritten to replace $maintank and "$offtank" with the players' names. This goes beyond the scope of a focus macro because you essentially have two focuses. Additionally through the broadcast mechanism the main and offtanks could be assigned by a raid leader and distributed to the raid automatically.
So after assigning the value of $maintank and $offtank you end up with the following macros:
Paladin Beacon of Light Macro
/cast [@MrsMainTank,help,nodead][@MrOffTank,help,nodead][help,nodead] Beacon of Light
Tutorial
For a quick tutorial on using this addon have a look at the Getting Started page
Anybody still using this? The 'Mtarget' menu is faded out on the portrait frame, but it works if you right click a name in chat.
To fix the error about GetNumRaidMembers() / (GetNumPartyMembers(), replace the following in MTarget_Broadcast.lua (there's two places it occurs)
if (GetNumRaidMembers() > 0) then
targ = "RAID";
elseif (GetNumPartyMembers() > 0) then
targ = "PARTY";
end
if (IsInRaid()) then
targ = "RAID";
elseif (IsInGroup()) then
targ = "PARTY";
end
I use this addon many year... I use to binkey the off tank (tank2) (im healer)...why blizzard dont make a shorcut i dont get it....they put just "one" focus shortcut key.
Just tested Wow BFA IT works !! you have to install ACE3 too.
please make it work for BFA,it's very good i like it so much
I am having an issue where it is constantly spamming tha talent update message despite my talents not changing at all.
It seems like this addon isn't quite working on my wow. None of the commands work - it is correctly installed and appears in the interface window 'addons' - but the 'template'button remains in grey (non-clickable). The only thing that seems to work is 'right click portrait, MTarget - name'
I would like to have my lifebloom/rejuvenation macro work on main and offtank ;)
Not sure what's happening, but it seems after a recent patch, I have to reload my gui every time for new values I assign to appear in a macro. After I reload it once, it then works when I assign a new value from then on out, but I have to do this at least once when I log on if I want to change a value.
Example:
Log on.
Set a new value fo "maintank," but my macros with $maintank do not change.
/reload
value just set for "maintank" now appears in macros and any new value I assign also changes.
But I have to /reload before it works at all.
How can I set this to target and cast on a Arena Enemy's Name, so if they vanish/displacer/ect... I don't lose my focus.
You'll have to experiment but I'm not sure this will work - at least not with a [@playername] type.
You might be able to do
/target ${cctarget}
/cast Cyclone
Otherwise you can try
/cast [@${cctarget}] Cyclone
but I'm not sure it'll work. You might be able to use this macro with setting the value by using the 'Set Variable' option and setting it to arena1, arena2, arena3 - but you'll have to enter those manually in the popup window that comes up (or just use the slash command /mtarget set cctarget=arena1).
In case anyone else gets this, the reason that I got it was that I had deleted a macro that was used as a template.
After removing the template from my saved variables file for mtarget it was fixed.
You can delete it in game with
(You can see the list of existing templates with"/mtarget listtemplates")
I'll see about adding an option to automatically delete a template when the macro is deleted (there appears to be an event that fires that I can use).
I feel like a noob while trying to configure this one :-) What I would love to achieve is:
- I have 3 (or whatever I would need) macro's that would auto change depending on who is set as tank/offtanks in raid situation or auto assigning tank to first macro when joining LFG;
- broadcast "Misdirection casted on MrTank" in the right channel (party or raid depending where I am) when I cast MD;
- display assigned tanks names on macro buttons in my bar;
Shortly I would love to achieve something close to the old and famous Tyra Magic Macros funcionality.
Can I do that? Or at least some of this? If so, can I ask nicely for a few tips how-to?
Regards! :-)
You can do some of that namely:
You can set up 3 macros (do we ever have 3 tank fights any more? :) ) - but something like
and just replace $maintank with $offtank and $offofftank for example - you'll then get maintank, offtank, offofftank listed in your MTarget menu. You'll end up with a version of your points. However a couple of things:
1. That'll just be doing a say. You can get it to go to your party or raid depending on which you are in, but the functions that used to be used to determine this have been removed with 5.0.4 so I'd have to experiment to find out exactly.
2. The other problem is that'll announce it even if it fails (e.g. if you press it while it is on cooldown). You can perhaps work around this with another addon (there are some that'll detect combat events and announce them) - traditionally I'd suggest using aftercast, but that hasn't been updated in about 3 years.
Changing the displayed name isn't possible either as I need that to match the macro to its template. The best you can do is give them meaningful names e.g. MainTank, OffTank etc but that does mean you need to keep track of who is who!
Ok, thanks for tips :-)
I downloaded the new files for 5.0.4, but the addon doesn't seem to be loading. When I type /mtarget help, I get the standard " type /help for a listing of a few commands" message.
Did you click 'Load out of date addons'? If not then that would be the problem. I managed to mark it as an addon for 5.4 instead of 5.0.4 so it was saying the addon was out of date (when it fact it was ready for the future!!).
Anyway I've updated that now and so the new version should fix it.
I downloaded the latest, but it still wasn't loading. Loading out of date addons worked great though! I didn't realize that was an option..thank you :)
Sorry I meant after your first comment I updated it again to fix the version number. There aren't any other changes, so loading the out of date addons achieves the same thing as downloading it again!