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!
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.
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:
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.
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
great tipif 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
We're working on a FAQ compilation thread right now, I think this would be a great addition.
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!
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..
Good read right here, TY.
Does the walker choose the path, or the path choose the walker?
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?
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.
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.
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).
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.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.
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.
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.
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 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.
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.
and the answer, unfortunately, is no - that trick only applies to attacking heroes. But thank you very much for the question!