Target target targeting my target
#1
I wish this game had the targeting options that Tie Fighter had. I would like to have a button for: Change my target to the object that it targeting my current target.
This would allow me to click the priests icon, hit that button, then taunt and sunder. Rinse and repeat. Unfortinitly, I dont know how to make this happen.

Is anyone aware of a macro that could be made that could do this? I have not gotten into creating macros at all yet, and this seems like a good place to start.

Dobuya - 52 Orc Warrior - Proudmoore server
Reply
#2
Ravage,Mar 3 2005, 04:41 PM Wrote:I wish this game had the targeting options that Tie Fighter had.  I would like to have a button for: Change my target to the object that it targeting my current target.
This would allow me to click the priests icon, hit that button, then taunt and sunder.  Rinse and repeat.  Unfortinitly, I dont know how to make this happen.

Is anyone aware of a macro that could be made that could do this?  I have not gotten into creating macros at all yet, and this seems like a good place to start.

Dobuya - 52 Orc Warrior - Proudmoore server
[right][snapback]69664[/snapback][/right]

I believe you can do that through the /assist command and a macro.

Macro Information
Reply
#3
Tal,Mar 3 2005, 01:55 PM Wrote:I believe you can do that through the /assist command and a macro.

Macro Information
[right][snapback]69667[/snapback][/right]

I think it is more complicated than this. I do not believe there is an API function for "what is targeting something".

This is the list of targeting functions:

ClearTarget() - Clears the selected target.

TargetByName("name") - Selects the specified player as the current target.

TargetLastEnemy() - Selects the last targetted enemy as the current target.

TargetNearestEnemy({reverse}) - Selects the nearest enemy as the current target.

TargetNearestFriend() - Selects the nearest member of your party.

TargetUnit("unit") - Selects the specified id as the current target.

TargetUnitsPet("unit") - Selects the specified unit's pet as the current target.

Can you even call assist on an unfriendly target? If so, it might be possible to write
a mod (too long for a macro I believe) that did:

Code:
Target friendly (i.e. the priest), store that unit in a variable
Cycle through all unfriendly targets (not sure how to do that, hmmmm)
For each unfriendly target do:
 "Assist" unfriendly target
 If current target == stored target (from 1 above),
   target unfriendly target and break
Reply
#4
I must admit to not understanding the WoW scripting much (mostly because I never really looked at it) but if I'm not mistaken I have effectively used assist on mobs. In fact I'm pretty sure by pressing assist multiple times I can string together "assist chains" depending on targetting.

An example is if a party member is whacking on a mob (presumably in an assist situation) and the mob is not whacking on that party member. If you target that member and hit /assist it will switch your target to that mob. I believe, iirc, that if you then press assist again it will change your target to that (other) party member that the mob itself is targetting. It seems to me like this funcionality, if accessible somewhere, could be used for the desired purpose. It's just a matter of if the client can easily extract a mob's current target and if you can efficiently scan mob targets to determine if they might be attacking your priest (or other specific party member).

Not sure how long it would take in game time to cycle through all mobs in range and check each of their targets, stopping at the first one (or some other designated termination point) that is targetting the party member that you are targetting...

Edit: I just realized the algorithm I wrote here is pretty much the same thing that vor_lord wrote in the above post. I do think that you can call assist on an enemy though which was why I originally replied. You just have to find out how to access that information.

- mjdoom
Stormrage:
Flyndar (60) - Dwarf Priest - Tailoring (300), Enchanting (300)
Minimagi (60) - Gnome Mage - Herbalism (300), Engineering (301)
Galreth (60) - Human Warrior - Blacksmithing (300), Alchemy (300); Critical Mass by name, Lurker in spirit
ArynWindborn (19) - Human Paladin - Mining/Engineering (121)
Reply
#5
mjdoom,Mar 3 2005, 02:18 PM Wrote:I must admit to not understanding the WoW scripting much (mostly because I never really looked at it) but if I'm not mistaken I have effectively used assist on mobs.  In fact I'm pretty sure by pressing assist multiple times I can string together "assist chains" depending on targetting.

[right][snapback]69670[/snapback][/right]

Well, this information means this little mod might be possible. The only hard part now is how do I walk through nearby unfriendly mobs? If anyone knows how to do that (or has an idea) I will write this mod.
Reply
#6
vor_lord,Mar 3 2005, 04:24 PM Wrote:Well, this information means this little mod might be possible.  The only hard part now is how do I walk through nearby unfriendly mobs?  If anyone knows how to do that (or has an idea) I will write this mod.
[right][snapback]69685[/snapback][/right]

I posted a thread in Blizzard's UI forum (the only forum where you can fairly consistently find conversation in the average to above average IQ range):

Target what is targeting my target

Doesn't look like there is a reliable way to accomplish this, and it will soon fall off the front page.
Reply
#7
With the patch and the fixing of tab targeting, I have gone ahead and written this mod. It seems to work on the testing I could do with just myself. I will need to try it out in a real party and see how effective it really is. The real limiter is probably the effectiveness of tab targeting.

If it seems to work under real testing, I'll make it available for people to play with if anyone is interested.

All you do is bind a key to it. Then target a friendly, and hit the key. It should select a nearby enemy that is targeting your friendly. I did do quite a bit of testing to make sure that it does something sane when no enemy is available, when you've targeted an enemy instead, when no enemy nearby is targeting your friendly, etc.
Reply
#8
vor_lord,Mar 23 2005, 11:47 PM Wrote:All you do is bind a key to it.  Then target a friendly, and hit the key.  It should select a nearby enemy that is targeting your friendly.

Thos sounds cool, froody, and very useful. When you hit the key, does it select the mob targeting your target immediately, or does it have to shift through a few targets first?

I would be interested in this mod, maybe you could post some of the code here.
Reply
#9
Xanthix,Mar 24 2005, 10:05 AM Wrote:Thos sounds cool, froody, and very useful. When you hit the key, does it select the mob targeting your target immediately, or does it have to shift through a few targets first?

I would be interested in this mod, maybe you could post some of the code here.
[right][snapback]71762[/snapback][/right]

It shifts through a number of targets, but you won't notice it as it is basically instantaneous. From the user's standpoint, it looks like you just now have a reverse assist key.

When you look at the code, you may think "Agh! awful hack!" because I basically cycle through tab 15 times (or until I find a match). The idea is that it will select the nearest mob to you that has your friendly as its target. The reason for the hack of searching 15 times (or whatever number you want) is because the silly WoW interface is name based, and you can't differentiate reliably between same named mobs.

But this works unless you have more than 15 mobs within TAB targeting range. And I can up the number if someone thinks that is necessary.

Let me try it out in combat tonight, and clean up the debugging information. Then I'll make it available for download by linking it here.

If it seems to work well enough under actual usage, then maybe I'll even post on the UI forum and become famous :rolleyes:
Reply
#10
Even if the code is a little down-and-dirty, I'd really like to see the algorithm you use. I'm curious, and I have an idea for an interesting mod. Even if you don't post it in the UI forum (although I think lots of people would love it!), would you consider posting at least the targetting code it here?
Reply
#11
Xanthix,Mar 25 2005, 02:21 PM Wrote:Even if the code is a little down-and-dirty, I'd really like to see the algorithm you use. I'm curious, and I have an idea for an interesting mod. Even if you don't post it in the UI forum (although I think lots of people would love it!), would you consider posting at least the targetting code it here?
[right][snapback]71902[/snapback][/right]

Ok, here it is. I still haven't used it on an honest-to-goodness instance run, but I think it works pretty well (now that tab targeting works). Friday night after our Zul'Farrak run I will put it up for download.

Any good ideas for a name? I called it AggroHelper but that isn't informative or interesting.

Edit:

I forgot to mention that I will credit Ravage with the idea for the mod. Do you want to be credited as Ravage or something different/more specific?

Code:
-- The real work of the mod
function AggroHelper()
 -- If disabled, don't do anything
 if ( AggroHelper_disabled ) then return; end
 local orig_target = UnitName("target");

 if ((orig_target == nil) or (UnitIsEnemy("target", "player"))) then
   return;
 end

 local cur_enemy_target;
 local cur_enemy;
 local i;

 AggroHelper_Debug("Aggro Help for " .. orig_target .. "!");

 for i = 1,AggroHelper_target_search_limit do
   TargetNearestEnemy();
   cur_enemy = UnitName("target");
   if ((cur_enemy == nil) or (UnitIsFriend("target", "player"))) then
     AggroHelper_Announce(" **  No enemy targetable  **");
     break;
   end
   -- We have found an enemy within range of the function.  Now "assist" it
   AssistUnit("target");
   cur_enemy_target = UnitName("target");
   AggroHelper_Debug(" --- checking " .. cur_enemy .. " : " .. cur_enemy_target .. " ---");

   if (cur_enemy_target == orig_target) then
     -- We have found a match!  Target the last enemy, it should be the right one.
     TargetLastEnemy();
     AggroHelper_Debug(" ** selected " .. UnitName("target") .. " **");
     return;
   end

 end

 -- If we reach here, after AggroHelper_target_search_limit tries, we couldn't
 -- find a suitable candidate.  Target our original target again, as that
 -- seems to be the least surprising thing to do.
 AggroHelper_Announce(" ** No enemy found targeting " .. orig_target .. " **");
 TargetByName(orig_target);
end
Reply
#12
Thanks for the post, vor_lord.

I think it might be possible to extend this functionality. If you can find out which player mob X is targetting, why not find out which player a BUNCH of mobs are targeting? I think that you could use the "tab" functionality to walk through all the mobs, recording which player each is attacking. I think the hardest part would be knowing how many mobs there are (ie, when to stop tabbing).

It's an interesting idea I've been thinking about. I know a lot of tanks would love a "who is smacking who" display. Unfortunately if I understand this correctly doing the scan would break auto-attack.
Reply
#13
Xanthix,Mar 28 2005, 11:59 AM Wrote:Thanks for the post, vor_lord.

I think it might be possible to extend this functionality. If you can find out which player mob X is targetting, why not find out which player a BUNCH of mobs are targeting? I think that you could use the "tab" functionality to walk through all the mobs, recording which player each is attacking. I think the hardest part would be knowing how many mobs there are (ie, when to stop tabbing).

Add in the fact that as mob and player positions change, so might the ordering of a tab sequence. If this didn't happen you might be able to cycle a large number of times and identify a sequence to infer the actual number of mobs. You're right, with that bit of information you could keep the rest straight.

The name-based extension system is a real mystery to me. I can only assume that Blizzard thought it would be easier for non-programmers to hack the UI if it was name-based. It's a silly system and I'm sure in no way reflects how the actual data structures are implemented.

Quote:It's an interesting idea I've been thinking about. I know a lot of tanks would love a "who is smacking who" display. Unfortunately if I understand this correctly doing the scan would break auto-attack.
[right][snapback]72146[/snapback][/right]

I think you're right about the auto-attack issue also. Certainly you would try to write it so that at the end of the scan you targeted the original (I think there is even an AttackTarget function), but can you really reliably tell what your original target was after such a scan? And would your swing timer be reset even if you could?

That said (let me think out loud):

A channel chat approach might be an option. You'd have to have everyone in the group install something that automatically announced in a reserved channel what was beating on them. Then a log parser would keep track of such things, but you'd also have to keep track of kills and remove them from the list, ugh, name resolution again. Sounds like a mess.

I agree that this kind of mod would be very nice.
Reply
#14
Cool! This should come in very handy.

You can credit me as Ravage as that is my handle on here and at www.theoldergamers.com
You could also credit me as Dobuya on Proudmoore Horde if you want as that is my main.

So, does all this go into a mod file in the AddOns folder, or into a macro? I am not entirely sure how to impliment this.
Reply
#15
Ravage,Mar 28 2005, 04:48 PM Wrote:Cool!  This should come in very handy.

You can credit me as Ravage as that is my handle on here and at www.theoldergamers.com
You could also credit me as Dobuya on Proudmoore Horde if you want as that is my main.

So, does all this go into a mod file in the AddOns folder, or into a macro?  I am not entirely sure how to impliment this.
[right][snapback]72190[/snapback][/right]

This is a full addon, implemented as a binding. You can try it out (just remember I still haven't really tested it in a tense combat situation) and let me know if it is at all useful.

It may be that in a typical battle the TAB targetting just isn't getting the job done -- but I guess we will see. If it is battle-worthy, then I'll post it in the UI forum. And -- I need a decent name too :blink:

I have put it up for download here:
Vor_lord's Mods

I have included a readme but it's a very simple mod.

Let me know if you have any trouble downloading, installing, or using it. I'm not yet ready to post this on the UI forums -- maybe you and Xanthix can help me put it through its paces.
Reply
#16
I will give this a try tonight. I will be heading into either sunken temple or BRD, so it should get a good workout.
Reply
#17
vor_lord,Mar 28 2005, 07:30 PM Wrote:Let me know if you have any trouble downloading, installing, or using it.  I'm not yet ready to post this on the UI forums -- maybe you and Xanthix can help me put it through its paces.
[right][snapback]72199[/snapback][/right]

Sure, happy to help! I just think it's cool you made the mod so quick. I am interested in testing this one and maybe extending it.
Reply
#18
I just saw this forum thread on the WoW forums asking for the basic functionality of your AggroHelper mod. You might want to check it out. I would have posted but the login server is down (surprise surprise).

Interestingly, someone wrote a macro that might work as a "lite" version of the feature. It hasn't been tested though and I am not sure if it is equivalent:

/script for i=1,8 do TargetNearestEnemy(); AssistUnit("target"); if "HealerNameHere" == UnitName("target") then break end; end; TargetLastEnemy();
Reply
#19
Xanthix,Mar 29 2005, 09:46 AM Wrote:I just saw this forum thread on the WoW forums asking for the basic functionality of your AggroHelper mod. You might want to check it out. I would have posted but the login server is down (surprise surprise).

Interestingly, someone wrote a macro that might work as a "lite" version of the feature. It hasn't been tested though and I am not sure if it is equivalent:

/script for i=1,8 do TargetNearestEnemy(); AssistUnit("target"); if "HealerNameHere" == UnitName("target") then break end; end; TargetLastEnemy();
[right][snapback]72266[/snapback][/right]

This is indeed a lite version of what I have written. It has identical logic. The main difference is that the healer (the target you are trying to help) is hard coded. This also lets it skip some of the error checking.
Reply
#20
Oh man, I am in heaven. This thing works great.
I did run into some oddities and one error.

I discovered that you could target a mob, and it would set your target on the player that is targeting this mob. Might be useful in a large group to focus your attack power buffs on players actually attacking a specific mob.

I also noticed that it would not tell you who is targeting a member of an opposing faction. The reason for this is that, while it appears you can assist mobs, you cannot assist members of the opposite faction. This limits it's usefulness in PvP and Battlegrounds, however that is not any concern of mine.

Finally, if you target a non-aggressive mob (one with a yellow name above their head), and then hit the hotkey, you get an error for some reason. Somehting about a nil value. I did not write down the error, but I can tonight if you need.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)