SUPPORT ACCOUNT CLANS
Welcome, Unregistered.
 

Thread: Tower AI miniguide

Results 1 to 20 of 20
  1. #1

    Tower AI miniguide

    Tower AI is not, as it may appear, and as many falsely claim, random, but is actually completely deterministic.

    There are two layers of Tower AI: hero protection, and everything else.

    Rule 1: The tower will attack any hero that attacks an enemy hero.*

    *Spells don't count. This includes manually casting orbs (ie Vindicator's, Arachna's)!
    "Attacking" means "starting your autoattack animation". Unlike with creeps, you can right click an enemy hero and not draw tower fire until your hero actually lifts his arm to attack. You can cancel your attack animation by moving, stopping, holding, etc. and still get shot by the tower.

    Rule 2: The tower will attack nearby units, with priority given to units attacking it, and then to units closest to it.

    Three things trigger a tower to check for new targets: Any unit attacks an ally hero in range; the current target dies or leaves the tower's range; a possible target enters the range of a tower which has no targets at the moment.
    When the first trigger (attack on enemy hero) occurs, the tower checks what its current target is doing. If the current target is not actively attacking an enemy hero, it will switch to a new target.^ However, if the target has not stopped attacking a hero, the tower will continue to attack it.

    The second trigger basically returns the tower to its neutral state. Then, if other heroes are still attacking heroes, the tower will pick a new, closest one. Otherwise, it will pick the closest unit that is attacking the tower and fire on it until it dies, leaves, or something attacks an ally hero; if nothing is attacking the tower at the moment, it will pick the closest unit and fire on it until it dies, leaves, or something attacks an ally hero.
    If it runs out of targets, the tower waits for something to come in range, and fires on it.

    ^This means that if you and an ally are attacking an enemy hero under a tower and the tower is shooting at you, you can press Hold and wait until the tower fires on your ally. Then you can continue attacking, and the tower will continue to attack your ally unless your ally dies, leaves the range, is disabled, or presses Hold himself.

    Now with video! Thanks to siknoz!
    Quote Originally Posted by siknoz View Post
    Here ya go, ran in practice mode literally about 15min ago, sorry I don't really do editing so you'll just have to take it as is.

    1st vid - Vindicator at enemy tower
    http://www.youtube.com/watch?v=xMbr8lTd-7E
    1st set of attacks - Right-Clicked his Master's Incantation, notice that when this is set to auto-cast, that I draw aggro from the tower immediately
    2nd set of attacks - Regular ranged attacks draw aggro immediately
    3rd set of attacks - Individually casting\clicking Master's Incantation, in this I do not draw any aggro at all. I am also standing BEHIND my units so according to the AI it will not attack me because it will attack the closest or Lowest HP target, neither of which I am.

    2nd vid since someone asked about it
    http://www.youtube.com/watch?v=uV9S6jldJHA

    Electrician's hold doesn't draw aggro, Pyromancer using all 3 spells within tower range, does not draw aggro. I lowered the fps on the vid a little bit so you can see the tower attacks a little better.

    Hope this helps...
    Quote Originally Posted by siknoz View Post
    Made another quick vid to show some mechanics for the tower ai as well.

    http://www.youtube.com/watch?v=dbzZpeAyHR8

    Notes :

    Segment 1 - Shows that you can attack the tower while the tower currently has a target, as long as you stop attacking before that creep dies, and as long as there is another unit that is closer to the tower than you, it will not attack you. This is good for when you want to put some damage on the tower but don't have insta-wave kill ability.

    Segment 2 - If you continue to attack the tower, after the current target is dead, the tower will attack you.

    Segment 3 - Tower will attack the CLOSEST ATTACKING target, which means that if you are attacking the tower with creep and YOU are the closest target, the tower will attack you.

    Segment 4 - Even though you may be the closest target, if another unit is attacking the tower, the tower will target that unit first.

    Hopefully the 3 vids I posted in the thread will answer most questions people had about the mechanics of towers in HoN.
    practical experiments (reproducible):
    Take for example this situation: Demented Shaman and some Hellbourne creeps approach a tower. The tower targets the first creep that gets in range and kills it, then picks another melee creep and targets it. Meanwhile Demented Shaman is attacking the tower.
    Now, some Legion creeps come. The Hellbourne creeps switch to attacking the Legion creeps, while Demented Shaman continues to attack the tower. Because this isn't a Rule 1 trigger, Demented Shaman will not be shot at if the melee creep that is targeted is still alive. In fact, Shaman can keep that creep alive longer through healing and Arcane Hide in order to get even more attacks in on the Tower. However, when the creep is about to die, Demented Shaman should stop attacking the tower and let it acquire a new target before he continues to attack the tower - otherwise, the tower will attack him, and he will be forced to back away if he doesn't want to be shot at.

    In another situation, Keeper of the Forest and two Forsaken Archers are attacking a Legion Succubus next to a Legion tower. (Training mode okay >.>) Tree moves in first and gets shot at by the tower for attacking Succubus. Then, the two Forsaken Archers (let's call 'em FA and FB) move in and begin attacking Succubus. Now, the tower will continue to attack Tree until I press the Kill! button and he dies. Then, because FA is closer to the tower, the tower attacks FA. Now if FA presses hold and waits for FB to continue attacking Succ, the tower will attack FB. FA can then continue attacking Succ without getting shot at, even though she is closer to the tower, until FB gets Mesmerized by Succ. At that point FA will be the only one attacking Succ, and she will be fired upon.

    Credit goes to Meowshi's guide to Heroes of Newerth Basics for the basic info, and to those who questioned me and got me to investigate further. As always, any feedback and independent information is appreciated.
    I maintain an open call for any replays, videos, or other such evidence that contradicts anything in here.

    I am aware of the issue of it switching targets between creeps and sinoz was able to explain it.
    Quote Originally Posted by siknoz View Post
    Ok, I finished the video, I even added in a bonus for ya ^_-

    In the first segment it basically does what you said it does. Exactly the way I explained, since the ranged creep was technically the FIRST unit to attack me, the tower switched from the melee to the ranged.

    In the second segment it shows that I can manipulate it and make it attack a different melee creep too. Notice the melee creep attacks me before any other units do, so the tower switches from its current target, to the attacking target.

    http://www.youtube.com/watch?v=kHYplTAGVwI

    Enjoy..hopefully this answered Cordial's question.

    Also if you want to avoid having the tower switch targets, simply move up enough to allow the melee creep to attack you(actually swing at you), after that the tower target will be LOCKED and won't change.
    follow my sig for the full thread and discussion on this topic in mechanics forum.


    Tips: (training ground section, for new players to learn how to not die to towers)
    (if I repeat my self in here it's because the above section is posted in Mechanics and in Training Grounds, while the bottom section is posted only in Training Grounds)


    There is one important concept to remember here: Once the tower acquires a target, it will continue to attack that target until it dies, moves out of range, or a higher priority trigger causes a new target. This is almost always true, with exceptions when multiple heroes on the same team are attacking enemy heroes.

    In practical application:
    -when a creep wave attacks a tower, then breaks off to attack the next enemy creep wave, you can keep hitting the tower until the creep the tower was targeting dies; it will then re-target the nearest unit that is still attacking it - don't let that be you unless you're confident you can survive it.
    -While your creeps are attacking a tower, you can attack it relatively safely as long as it has reason to attack creeps. A melee hero accompanied by melee creeps can walk up and attack the tower freely, so long as he backs off when the melee creeps die*. He can continue to attack it while it's attacking a ranged creep, but the ranged creeps die fast, so it's often safer to wait for the next batch of melee creeps or walk ahead and distract the next enemy creep wave, if you're confident you won't be jumped by the enemy heroes. Ranged heroes with more range than a ranged creep can stand just behind the ranged creeps and attack until there are no more creeps to act as shields.
    In these ways you maximize damage done to the tower while minimizing the damage you take.

    *(melee creeps have 90 attack range while no hero has less than 100 attack range, so your creeps will be closer than you. If you press M for move and target the tower, then start attacking it after you get there, when the tower kills a creep, you'll be the next one it target, because you're zero away from it! So if you're somebody like a beefy Sand Wraith that wants to tank the tower, Move up to it before attacking it.)

    -If you attacked and killed an enemy hero in tower range, and there are no other enemy heroes around, nothing your teammates can do will stop the tower from attacking you until you leave/die, short of killing the tower. If another enemy hero enters the fray, your teammates can attack him So leave (try not to die), unless as above you can take the tower's punishment long enough for your team to kill it. After you've left the tower's range, you can come back and resume attacking the tower, which will have transferred its target to either the nearest attacking unit, or if no units are attacking it, the nearest unit.
    -while "tower diving" (chasing an enemy hero into tower range to try and kill him), if the tower is already attacking something else, wait until the last second to actually right-click the enemy hero, it can save you 1-2 shots from the tower. After you kill the enemy hero, get out as fast as possible. The same applies if there is nothing else for the tower to attack but you; finish the enemy hero and leave as fast as possible, as even if your creeps come into range, the tower will continue to attack you.
    (Final note, aside from all this PvE stuff, your enemies can use Homecoming Stone to teleport behind you if you tower dive, so use discretion!)
    These points should make it a bit easier to survive fights near towers.


    -Training Grounds thread discussion: feel free to skip, this is just for documentation purposes

    edit- more notes:
    Quote Originally Posted by Vulpes View Post
    Ok, so how do you explain the tower shooting twice at a Melee Creep and then switching to another?
    It happens quite regularly, most often if none of my Creeps are nearby.

    3 Melee Creeps are attacking the tower, I come to pull them away from it, Tower kills the one he shot at first, two left.
    He shoots two times at one Creep, I wait for the third shot to hit so I can last hit (while I am running in circles around the tower).
    Then it shoots & proceeds to kill the last Melee left, without any apparent reason.
    I've been able to reproduce this, both with large groups of creeps and once or twice with only two. This seems to happen when you move too far away from a creep while kiting it; I've never had the tower switch targets while I'm standing still.
    There's the obvious case of the target switching to the tower while the other creep still chases you. But it seems that sometimes you simply move far enough away from the creep that it loses its way. This is weird, as I'm sure we've all experienced creeps chasing us from the lane across the map, but it might be that the creeps "reaquire" a target periodically. (at least, while the target is moving away from them). It's certainly true that if you have 10 creeps chasing you and you move faster than them, some of them in the back will just leave. I think this is what's causing the AI to behave unintuitively in this case.

    edit - This is sort of explained by my current theory. It's hard to fully describe this without more knowledge of creep AI, which I don't have.

    edit - So I've done a bunch more testing in practice mode.
    I used both Legion and Hellborne heroes under Local Test Client (ie me) control, and Legion and Hellborne heroes under no control, to try to eliminate any error that might happen due to the mechanics of controlling more than one hero in your name (the thing that makes it notoriously hard to test Chronos' bubble mechanics).
    If anyone has better results from live matches, that would be greatly appreciated! Now that replays are out I'll be studying them. Goodbye free time :/
    Anyway. For example:
    I move near tower and don't attack. Tower attacks me. I tablet of command the npc up to the tower. He auto attacks it and it draws tower fire. Whatever I do short of attacking an enemy hero will not stop this.
    I repeat but there are enemy heroes nearby. The npc attacks the enemy heroes. If I disable the enemy hero (for example, with electrician's grip), [b]and then tell my hero to attack a hero, this causes the target to switch. However, having my hero attack while the npc is still attacking won't cause a switch.
    Due to this (and some other research) I've altered the rules of the towers. They now explain what to do if your friend needs less heat on him and hopefully (given enough knowledge of creep AI, an entirely more frustrating to test science) explain Vulpes' mystery. I also tested orbwalking!

    So to answer your question, r_a_i_n, in practice mode at least, if your friend hits hold and you attack another enemy hero, you will draw tower fire. However, so long as you're both attacking enemy heroes, or if there's no enemy hero available, your friend has to move out of the tower's attack range. Hopefully this works in a real game; some testing this week should let me give you a definite answer.

    For instance, I can't reproduce (in practice mode) a tower switching from a level 3 target to a level 2 target. All the interactions between level 1 and 2 work as I've described them, but I can't get it to stop attacking something close to it and switch to something actually attacking it. Level 3->1 works fine. Any match experience, or replay that clearly shows it (or disproves it!), would save me some time.
    ^- I think I've figured this out. I think the existence of a third rule is a myth!
    Last edited by light_rain; 03-04-2010 at 09:06 PM.

  2. #2
    Nice guide. 1-UP.
    Last edited by TreeHorse; 01-08-2010 at 01:42 PM.
    SRY u are make wrong, threadhost- - i am make crush of maney games 1v5....x1000000
    mb u not gosu like my
    ur forumfriend whatsayu
    no thx

  3. #3
    if the tower is already attacking something else, wait until the last second to actually right-click the enemy hero, it can save you 1-2 shots from the tower
    great tip

  4. #4
    I love it.

  5. #5
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    USWEST (GMT -8)
    Posts
    1,797
    We're working on a FAQ compilation thread right now, I think this would be a great addition.
    New to Heroes of Newerth? Find help in the Training Grounds.

    TreeHorse is not an employee of S2 Games. Be warned: He will rage at you.

  6. #6
    Very nice guide. I'll add this to the FAQ at some point.

    Forum Moderators are not S2 Games employees. My posts in no way represent the view of S2 Games or any of its staff.

    Please use the report post function to have me review a post that you believe is breaking the Forum Rules.
    Check the Sticky Threads for additional information on this sub-forum and the Announcement Threads for more information about Heroes of Newerth as a whole!

    -----------------------------

    Having trouble getting started? The Training Grounds and Project Epoch can help!
    I am of the firm opinion that subtracting "raging stupidity" from anyone's voice can only cause them to sound more like myself.

  7. #7
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Oct 2009
    Posts
    5,420
    Ok, so how do you explain the tower shooting twice at a Melee Creep and then switching to another?
    It happens quite regularly, most often if none of my Creeps are nearby.

    3 Melee Creeps are attacking the tower, I come to pull them away from it, Tower kills the one he shot at first, two left.
    He shoots two times at one Creep, I wait for the third shot to hit so I can last hit (while I am running in circles around the tower).
    Then it shoots & proceeds to kill the last Melee left, without any apparent reason.

    E: Good Stuff of course. Just the Creep thingie really bugs me..

  8. #8
    Quote Originally Posted by Vulpes View Post
    Ok, so how do you explain the tower shooting twice at a Melee Creep and then switching to another?
    It happens quite regularly, most often if none of my Creeps are nearby.

    3 Melee Creeps are attacking the tower, I come to pull them away from it, Tower kills the one he shot at first, two left.
    He shoots two times at one Creep, I wait for the third shot to hit so I can last hit (while I am running in circles around the tower).
    Then it shoots & proceeds to kill the last Melee left, without any apparent reason.

    E: Good Stuff of course. Just the Creep thingie really bugs me..
    I've never witnessed this, but it's possible the creeps are "aggroing" you more than once, which may mean I have the priority not quite right. When I say "it's possible" I mean I have no idea how they coded it, but maybe that's it. I'll try to duplicate this in test mode over the weekend and update if I have the priorities wrong.

  9. #9
    bump - updated with Vulpes' question. Should be ready for the FAQ

  10. #10
    Good read right here, TY.
    Does the walker choose the path, or the path choose the walker?

  11. #11
    Offline
    Account Icon
    Join Date
    Nov 2009
    Posts
    67
    I think there are to many useless info in here. Can anyone just please tell me:

    1) What should I do to make tower stop attacking me if there are my creeps around me (In DoTA you had to order force attack order on your creep and tower would change it's target)
    2) If there is me + my friend attacking enemy hero next to the tower and my friend is getting low hp due to tower hitting him. Is there any way to make tower change the target?

  12. #12
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    61
    First question: You can't deny your own creep (within tower range) and force the tower to change target from you to somone else. It will only work in DoTA . The only way to get rid of tower aggro is to have a team mate attack an enemy hero.

    Not sure about second question, better not guess.
    Last edited by Cordial; 01-28-2010 at 11:16 AM.

  13. #13
    about r_a_i_n second question, i guess you have to go closer to the tower and right click (attack cmd) the enemy hero again. not sure though, wait for confirms.

  14. #14
    Okay. NOW I feel it's 95% ready. Thanks for getting me to test that, within the end of the week I should have this confirmed.

    And the denying trick does NOT work in HoN, dota only. Sorry.

  15. #15
    Offline
    S2 Staff Member S2 Games Staff
    Join Date
    Jul 2009
    Posts
    33,879
    Bump. I think this thread needs to be moved to Mechanics .

    Or a mod can just copy the thread to Mechanics

    S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
    -----------------------------


    Tech Support and Customer Support: https://www.heroesofnewerth.com/support/


    Look for my highlighted text (important information) and grey text (interesting but not required information).

  16. #16
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    1,028
    There is one important concept to remember here: Once the tower acquires a target, it will continue to attack that target until it dies, moves out of range, or a higher priority trigger causes a new target.
    That's not true at all though. Towers can and frequently do switch targets *between creeps of the same priority* for no apparent reason. I've observed on plenty of occasions where the tower would hit a sapling twice and switch to another sapling directly adjacent to it.

    I guess one thing worth noting is that this generally tends to happen when a defending wave arrives and the attacking creeps switch from targeting the tower to the creeps. Perhaps because this switch usually results in some kind of movement, the tower somehow switches to a creep that's closer to it?

    Alternatively, maybe it has to do with the fact that the creeps were attacking a defending hero, and then switched to attacking the defending creeps... thus lowering their collective priority and forcing the tower to re-evaluate/reacquire a new target.
    Last edited by tanis; 01-27-2010 at 07:44 PM.

  17. #17
    Quote Originally Posted by tanis View Post
    I guess one thing worth noting is that this generally tends to happen when a defending wave arrives and the attacking creeps switch from targeting the tower to the creeps. Perhaps because this switch usually results in some kind of movement, the tower somehow switches to a creep that's closer to it?

    Alternatively, maybe it has to do with the fact that the creeps were attacking a defending hero, and then switched to attacking the defending creeps... thus lowering their collective priority and forcing the tower to re-evaluate/reacquire a new target.
    I go into more detail later in the post on this. I have noticed the tower switching targets but never without other factors such as the hero kiting the creeps at the edge of the tower's attack range, or kiting the creeps such that the target falls severely behind (and presumably stops aggroing on the hero), or other targets showing up. So it doesn't switch randomly, just based on triggers that are difficult to observer and track.

    Sure this can go in mechanics but I've been busy and haven't finished polishing it to the point where I'd call it done, so I'd be embarrassed if it showed up there right now :P I should have more time on the weekend to do more testing/rewriting.

  18. #18
    If a hero ceases his activity through a disable or the Hold command, another hero (or creep) that triggers the same or higher level will become the new target.
    Does this part mean that if I accidentally move too close to the tower (closer than 90) and the tower acquires me as a target, if I simply hit 'H', the target will acquire one of the creeps (who are also attacking the tower) instead?

    If so, that's definitely handy to know.
    Last edited by krucifix; 02-08-2010 at 01:23 AM.
    • When Match Making fails to load a game, please re-queue automatically.
    • When the message "The server is full" pops up re-open the Public Game's Listing.
    • Include a fully featured in-game web browser. Allows for ease of downloading replays AND has many LAN league/tournament possibilities.

  19. #19
    Quote Originally Posted by krucifix View Post
    Does this part mean that if I accidentally move too close to the tower (closer than 90) and the tower acquires me as a target, if I simply hit 'H', the target will acquire one of the creeps (who are also attacking the tower) instead?

    If so, that's definitely handy to know.
    So I've been focusing on this and on my weird rule 2-3 interaction and I've come up with a working hypothesis! I'm bumping this thread (and rewriting the main part) and I'll crosspost a version without discussion to the Mechanics forum. I'm leaving a request for counterproof open since until I get a look at the code itself I can't be sure, but so far this theory matches all of my observations.

    and the answer, unfortunately, is no - that trick only applies to attacking heroes. But thank you very much for the question!

  20. #20
    Light rain is credit to forums

Posting Permissions

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