clarification on tower aggro

Discussion in 'Advanced Mechanics' started by koticgood, Oct 25, 2011.

  1. koticgood

    koticgood Well-Known Member

    So I found this:
    1) Unit (heros have higher priority) atacking Hero, with low HP, that are in low range from tower
    2) Unit (heros have higher priority) atacking Hero, with low HP, that are in bigger range from tower
    3) Unit (heros have higher priority) atacking Hero, with higher/full HP, that are in low range from tower
    4) Unit (heros have higher priority) atacking Hero, with higher/full HP, that are in bigger range from tower
    5) Goblin Land Mines
    6) Units atacking the tower, that are in low range from tower (low HP)
    7) Units atacking the tower, that are in bigger range from tower (low HP)
    8) Units atacking a non-hero ally, that are in low range from tower (low HP)
    9) Units atacking a non-hero ally, that are in bigger range from tower (low HP)
    10) Extremly low HP unit "running around"
    11) Venomancer Wards
    12) Curent target of the tower
    13) Units atacking the tower, that are in low range from tower (full/high HP)
    14) Units atacking the tower, that are in bigger range from tower (full/high HP)
    15) Units atacking a non-hero ally, that are in low range from tower (full/high HP)
    16) Units atacking a non-hero ally, that are in bigger range from tower (full/high HP)
    17) Siege weapons atacking the tower
    18) Siege weapons atacking an ally (but normaly siege weapons atack only the tower if in tower range)
    19) Summoned units atacking allys
    20) other units

    Few questions,
    1) "Unit (heros have higher priority) atacking Hero, with low HP, that are in low range from tower" Somewhat confusing the way it is written, but I assume the "low HP" is the state of the attacking unit, not the attacked hero?
    2) What is this "low hp", "full/high hp state," is it just over 50% one state, under 50% is another? Also, what state is exactly 50% considered, if 50% is indeed the tipping point.
    3) How does the tower choose between targets at the same range (aka bunch of melee units attacking tower from same distance)
    4) What qualifies as an "extremely low hp unit running around" :ninja:
    5) I assume priority number 12 is there to indicate that anything above #12 will draw tower aggro from it's current target. This is the part that is really making me doubt, and the reason for this post. I thought, from a practical sense, I had everything worked out that I needed (just from empirical trial/error), but this would change that. If I'm attacking the tower, and I am considered in the "high/full hp" state, whatever that is, and the tower is attacking me, and I either drop a plague ward, drop a goblin mine, or the one I doubt the most, simply that a low hp (once again, whatever that means) allied creep is attacking an enemy creep, the tower will shift it's aggression to said allied creep/plague ward/goblin mine even though I'm attacking the tower? I never knew you could just drop a plague ward to drop tower aggro ...

    Thanks for any help.

    edit:
    6) Say an army of summons is attacking a tower, and a group of "full/high hp" heroes come and attack the tower. Since the heroes are a higher priority, but not high enough that the aggression will switch, will the tower attack the current "summoned unit" until it's dead, or is there a length of time where the AI will check for a new target, even if it's below #12? And even if the summons are right next to the tower, at extremely low hp, and attacking the tower, the new target acquired will be a hero, even if he/she is full hp and attacking the tower from far away? I guess I don't understand the "summoned units" priority, and whether or not they ever fall into any of the other categories. If so, step 16 and step 19 seem contradictory.
     
    Last edited: Oct 25, 2011
  2. MassBalance

    MassBalance Well-Known Member

    Pretty sure this list isn't right... where did you get it???

    Because its pretty easy to attack a tower with no creeps and lycan and let teh wolves take the aggro.
     
  3. Dithrin

    Dithrin Member

    from my understanding the tower will continue to attack the same target till dead or out of range.

    if tower is attacking you, instead of running out of range, simple hit "a" for attack then select one of your creeps(greater than half hp seems to work best), this will reset the tower aggro and the tower will select a different target, this will let you get more hits on the tower instead of running out then back in.
     
  4. Varuka

    Varuka Well-Known Member

    Tower aggro works the same as a ranged creep, except tower is immobile.

    Don't waste your time trying to memorize lists like that. The answer to questions 1 through 6 are basically "No, it doesn't work like that."

    The reason towers turn to attack heroes who right-click their allies is because of the exact same trigger that causes creeps to turn and attack heroes who right-click their allies. Tower aggro and creep aggro are essentially one and the same.
     
  5. koticgood

    koticgood Well-Known Member

    Not sure I understand your point. When I'm laning near a tower, i know that even if I'm not attacking a hero, I shouldn't be the closest to the tower after the creep it's attacking dies. I know that I should stop attacking as a creep is about to die when I'm pushing, then resume attacking after the tower chooses a new creep instead of me. I know many things like that via experience.

    If that list is correct, it explains some of the things I know and would definitely help improve with new knowledge. So, I don't get your post at all. If what you're trying to say is that the list is wrong and stupid, do you have a link to correct tower-behavior?
     
  6. n(0_0)b-Yoyo

    n(0_0)b-Yoyo Member

    How does the aggro change when there is an observer in the game?
     
  7. Varuka

    Varuka Well-Known Member

    I'm not saying the list is incorrect/stupid (I'd upload counterexamples if I wanted to say that), I'm just saying it's just not a good way to represent tower aggro within Advanced Mechanics. Targets are selected based on hardcoded priority and aggro behaviors, and an overriding trigger which forces an attack on any unit attacking or issued an attack order against a hero. Here's the requested reading material:

    Guide to Aggro - YouTube
    http://www.playdota.com/forums/518372/harass-heroes-without-drawing-aggro/
    http://www.playdota.com/forums/255146/how-does-tower-agro-work/
    http://www.playdota.com/forums/228014/creep-aggro/

    And for aggro with observers:
    http://www.playdota.com/forums/322593/weird-aggro-towers-creeps-observers/
     
    Last edited: Oct 25, 2011
  8. Legends0

    Legends0 Member

    Pretty much this.

    I find that the tower will change targets if you right click their allies, but if you just spell casting / orb walking it will not so long as a creep is closer to it than you are.
     
  9. koticgood

    koticgood Well-Known Member

    @varuka
    One of those links says that Icey removed "hp state" from tower behavior, so that would explain my doubt about it, as well as answering question 5 (said creep would follow priority #16, and the tower would not change targets). It would also make questions 1, 2, and 6 void. The same link also answers question 3. So everything is as I had thought I understood it. The only thing left to clarify is plague wards/goblin mines/summoned units, as their position on the list is confusing, and I can't find anything about them.

    @legends0
    Obviously ... (except that by allies you mean allied heroes, and whether a creep is closer to the tower to you or not when orbwalking/casting is irrelevant until the tower's current target dies, and orbwalking/casting is no different than doing nothing)
     
    Last edited: Oct 25, 2011
  10. Saworz

    Saworz Well-Known Member

    nice find.
     
  11. EebstertheGreat

    EebstertheGreat Forum Manager

    Whoever said that is wrong. Hardcoded AI still chooses units with low hp (iirc <25%) first.

    I guess the following facts are most relevant for AI targeting. Note that these apply to all units, not just towers, but I'm calling it a "tower" here for simplicity.

    [nqb]1. It is mostly hardcoded. The few triggers that exist completely override it.
    2. When a tower chooses an enemy target, it will continue attacking it for up to seven seconds or until it can no longer hit it (e.g. out of tower range).
    3. Towers choose new targets based on at least four factors: the units' targets (so units attacking the tower or its allies are prioritized over other units), the units' hp, the units' proximity (closer creeps get hit first), and the units' priority (which is a number set individually for each unit).
    4. When the current target attacks an ally with more than 25% hp, the tower will immediately choose a new target, but that target could be the same unit.
    5. When any unit attacks a hero, a trigger is run that orders enemy creeps in a triggered 500 aoe to attack that unit. Two seconds later its last attack-move (waypoint) order is repeated, ending the aggro. This trigger has a two second cooldown.
    6. Siege units are ordered by triggers to attack nearby towers periodically.
    7. Neutral creep AI is different. Specifically, neutral creeps always prioritize "player" over neutral factions, so if you pull when there are observers in the game, pushing the Sentinel and Scourge into Neutral Hostile and Neutral Victim slots, the neuts and lane creeps will fight you instead of eachother.[/nqb]
    There are of course many other details of AI one could tease out, but these seven should really answer 99.9% of the AI questions on this forum.
     
  12. DLRevan

    DLRevan Well-Known Member

    Minor clarification for tower AI


    This is a rather minor detail, but regarding point two, when does the tower switch targets when a unit can no longer be hit (eg, out of range)? Specifically, does it 'decide' the instant the target is gone from its range, or does it do so only when firing a new shot?