Why do monsters attack certain targets?
#1
I noticed when playing a wind druid and a fire druid that cetain monsters would go after me instead of my merc. On the winf druid, unlike most monsters, nightmare hephasto went straigt after me when I had hurricane on instead of my merc. He latched onto the druid for some reason, and when I was running away, he wouldn't switch targets. Same with normal Lister and a fire druid that was using fissure.

So I was wondering how different monsters pick their targets. Diablo apparently goes after the big physical or weapon dsmager, normal monsters go after the closest at certain times, how bout others?
I may be dead, but I'm not old (source: see lavcat)

The gloves come off, I'm playing hardball. It's fourth and 15 and you're looking at a full-court press. (Frank Drebin in The Naked Gun)

Some people in forums do the next best thing to listening to themselves talk, writing and reading what they write (source, my brother)
Reply
#2
Everything in the game has a threat rating, which determines the order they're attacked in by NPCs/monsters. I remember there being a topic on it sometime ago, but don't remember all of the details. I think the way it worked was that players had a threat rating of 10, mercs/minions 7, decoy 15, and monsters affected by attract of something higher than decoy. Bear in mind that the actual numbers are probably wrong, but I think they're accurate in the threat order.

I'm not sure if there are attacks that will change your threat rating, but it seems likely, considering how monsters will go after Fire Golems and Holy Freeze mercs after even if there's a higher threat rating something around.

Also, once a monster/npc is locked onto a target, it'll stay on that target until it attacks or something interrupts it (ie casting a minion summoning spell so that it will run into it before it gets to you, or being hit by holy fire and the like), then it'll go to the closest target with the highest threat rating.
Alea Jacta Est - Caesar
Guild Wars account: Lurker Wyrm
Reply
#3
The other night, a friend and I were taking on Meph in Normal with a Paladin (Zeal/Conc) and a Barbarian (Axe/Double Swing). I was playing the Paladin and Meph was consistently targetting me. I would back off to heal and he would switch to the Barb, but as soon as I came in range again, I became the target again. I tried circling round in various ways to no effect. This doesn't explain anything, but I thought it was weird at the time.

-- CH
Reply
#4
Wyrm,Aug 10 2004, 04:54 PM Wrote:Everything in the game has a threat rating, which determines the order they're attacked in by NPCs/monsters. ..

I'm not sure if there are attacks that will change your threat rating, but it seems likely, considering how monsters will go after Fire Golems and Holy Freeze mercs after even if there's a higher threat rating something around.

Also, once a monster/npc is locked onto a target, it'll stay on that target until it attacks or something interrupts it... then it'll go to the closest target with the highest threat rating.
Well, this is fascinating subject and you've made an excellent start, however, even without code readers enlightening us it is still possible to empirically convince myself that some of what you say here does not sufficiently model actual monster behavior...

Convert (& Mind Blast), Confuse, Attract, minions with threat factors (e.g. Decoy) *and* proximity are all very interesting to see interact.

Here are some suggestions (not definite "facts") based upon my observation of the above as to where some "holes" might be in your model...

Monsters don't really "lock onto a target" per se, afaik, but instead "commit to a current action". This distinction is important for prediction. If I click on a monster (to attack it with a melee type skill) the game will helpfully path me toward the target and once I'm "in range" will execute my attack. If I hold the mouse button down the attacks will helpfully repeat. This feels like "locking onto a target" but isn't really--and is more so than what a monster does!

That "pathing" part can fail (in large number of ways). If it fails, or after the attack is executed, the monster AI again "decides" what to do (another "current action"... monsters also have an idle state, so their action commonly can be "huh? I'm supposed to do something?" but this AI choice seems rare when close to potential targets for *most* monster AI).

So we can think the monster is then "locked onto a target", but afaik this is really an illusion fostered by the likelihood that the monster is now very proximate to the target, and will thus decide to re-target it.

You can see the power of proximity in AI choice by simply moving in and out of the space between a monster and its "locked on" target (if you don't have multiple copies running or a friend to help you experiment you can still position your minions or make use of the act 5 barb horde in Bloody Foothills).

In my experience, despite the threat level factor, a Decoy won't pull a monster off of you without proximity working in your favor. However "Attract" can (there is a limited radius for this effect, but it is amazing to see monsters just pull off their targets and walk yards away to the attractive target). Attract also lets you see, since the victim's AI is then biased, that being hit can cause a change in (adjacent) target selection...

When something like Holy Fire touches a monster (high range Static Field, etc. etc.) it may very well be "waking them up" from the "idle" state. In this case it appears that you automatically are given top billing in their hate list for deciding their post-idle current action (i.e. to attack). One of the reason AoE knockback effects are so studly is that a knocked back monster is reset, and must choose what to do again. I believe this means a bowazon using knockback is magnifying the power of her Valk/Decoy/Hireling/mates to tank (because the monster will not, in fact, beeline for the zon as a non-knockbacked target would). (I should note that 100% monster flee, combined with slow/chill/knockback is pretty effective... akin to EQ's snare and reverse kiting tricks).

Watching this kind of behavior leads me, ala Occam, to believe there isn't a hate "list" in D2 at all (perhaps one psuedo entry slot for last person to damage me?... poison and open wounds though, which *do* remember their source, don't really seem to keep such an entry live/current).

Depending on whether this implementation exists at all, it is interesting to wonder if the "slot" can be overwritten (e.g. perhaps by a higher net damage attack?)

D1, fyi, had a bias here, iirc, based on game character slot (0..3, based on entry into the game order, or reuse), which some players learned to make use of for tanks.

Converted monsters are interesting as well (no time to delve into that now... did you know that even though you can't target them they will still die from having been previously poisoned by now "friendly" sources).

EQ-like games have a powerful "feign death" method of blowing off monster's attention (aka "lock" aka "hate")... D2 has that also: the town portal spell (has side effects, of course). (Also stun/knockback/pathing blockage etc. etc. but I thought I'd put in another plug for TP, "the most powerful spell in the game"™)
"He's got demons? Cool!" -- Gonzo, Muppet Treasure Island

"Proto-matter... an unstable substance which every ethical scientist in the galaxy has denounced as dangerously unpredictable." -- Saavik, Star Trek III

"Mom! Dad! It's evil! Don't touch it!" -- Kevin, Time Bandits
Reply
#5
Quote:Monsters don't really "lock onto a target" per se, afaik, but instead "commit to a current action".
That's more or less what I was trying to say, I didn't really make the distinction at the time. I was thinking of lock on more or less the same way a missile locks on a target. I did try to imply though that once a monster executes it's current action or is interrupted somehow, it's no longer "locked on".

Quote:despite the threat level factor, a Decoy won't pull a monster off of you without proximity working in your favor.
I guess I need to go into more detail when I explain things... Oh well. What I meant was that in my experience, monsters check the range of targets first, then, if there are several targets within the same general range, they'll go for the most threatening one first.

Quote:However "Attract" can
Well now, that's interesting. I always wondered what the radius effect on Attract was for, I always just assumed that if you didn't target a specific monster, then it chose a random enemy within the attract range.

Quote:When something like Holy Fire touches a monster (high range Static Field, etc. etc.) it may very well be "waking them up" from the "idle" state.
That's exactly what I believe, and fits in with how the thing works. Those pulses are attacks and monsters don't like being attacked. When you use a Fire Golem, or even have a really long range aura (Sanctuary, anyone?) you'll be hitting monsters well outside their visual/noticing/whatever range. They then become instantly aware of the attacker and beeline at them. Sometimes this can work to your benefit when a merc/minion is hit by the pulse from an Aura Enchanted (Fire, Freeze, Shock) boss that has a reviving ability (shamans, etc). Although if the aura is Holy Freeze, you're more screwed than saved.

Quote:Depending on whether this implementation exists at all, it is interesting to wonder if the "slot" can be overwritten (e.g. perhaps by a higher net damage attack?)
Interesting concept, but I don't think monsters keep track of how much damage they're dealt, just whether or not it's dealt. The reason I say this is because a high level Valk can have damage all over the scale in Hell, from barely noticable to near one-hit-kill. When both she and my Holy Freeze merc are attacking the same boss enemy, the boss usually won't switch targets once it starts attacking, although for some reason if they start out targetting my merc and I move him away from the boss so the Valk is the only thing to target, then let him get back close again, the boss will retarget the merc. This ties in with what CelticHound pointed out, meaning monsters may actually have a hate/really hate list).

Quote:Converted monsters are interesting as well (no time to delve into that now... did you know that even though you can't target them they will still die from having been previously poisoned by now "friendly" sources).
I don't really bother too much with converting monsters except for the occasional unintended one from Mind Blast, but that would make sense considering you'll still take poison damage in town, and mercs/minions can still die of poisoning in town (and you probably could too if Blizzard didn't have the poison duration 1hp limit for players). I'm a bit surprised no one's ever made a build around high poison damage and conversion, actually...
Alea Jacta Est - Caesar
Guild Wars account: Lurker Wyrm
Reply
#6
I've noticed on Meph runs (sorc with natures peace) using oak sage , Meph will 9 times out of 10 target the Oak , whether the oak is in front/Level with me or behind me , it gets hit by mephs lightning and goes down immediately . Just an observation .

Take care
Take care
Reply
#7
Raven Vale,Aug 12 2004, 06:21 PM Wrote:I've noticed on Meph runs (sorc with natures peace) using oak sage , Meph will 9 times out of 10 target the Oak , whether the oak is in front/Level with me or behind me , it gets hit by mephs lightning and goes down immediately . Just an observation .
Because of Meph's local terrain I tend to think of him as a "pushover" among act bosses. Nonetheless, what you point out here raises an interesting opportunity with Iron Golems and Shadow Warriors, who can both be immune to elemental and positioned to take ranged attacks from Meph ad nauseum. (alas this isn't terribly important trivia, as you can already sleaze Meph at range without him casting a ranged attacks in return).

Of course, perhaps some of Meph's attacks (ranged) have a physical component, in which case the IG would get trashed (but the SW could be trivially recast, as long as you kept Fade up yourself, so the SW would quickly cast it for immunity).
"He's got demons? Cool!" -- Gonzo, Muppet Treasure Island

"Proto-matter... an unstable substance which every ethical scientist in the galaxy has denounced as dangerously unpredictable." -- Saavik, Star Trek III

"Mom! Dad! It's evil! Don't touch it!" -- Kevin, Time Bandits
Reply
#8
Heiho,

I'm with Wyrm when it comes to the basic function of that 'hreat' number buried in the mpqs.

There are, like Crystalion mentioned, some other things which can cause a monster to wake up and make some decisions.

a) monsters have a radius of awareness
all of us should know, that we can walk very much closer to a Zombie in the Blood Marsh than to a Dark Spearwoman later on, before they wake up to make any decision, this is partly covered via the AI routines in monai.txt, but not completely (I think)

B) regardless of that radius, they wake up when you attack them, the AI routines define their aggression here (that is, if you shoot _one_ arrow as an example, will that attacked monster chase you forever afterwards, or will it fall back in a lurking status after somepaces if you don't attack further)

c) also monsters have a tendency to follow nearby monsters, so if one monster of a given group decides to attack you, its neighbours will at least wake up, if not running along with the one which woke up first. The AI routines also interfere here.
Minions of a Bosspack will shield their Boss, and if you go cautiously nearby a Bosspack so that the Boss itself won't see you but some of his Minions will, you can see them chasing at you and running back without actually doing an attack.

d) there is a construct I've come to know as 'walkable flags', which defines the sightlines and pathfinding routines within a map (I don't know about interferences with a) ), but the essay about that is still in working progress and AFAIK not published yet

e) there are things which can wake up monsters a really _long_ distance away, such as Boewalls, Boneprisons, CO'd or AT'd monsters. Because BW/BP have a really low 'threat' number and monsters have the same as players, threat is not an explanation for an appealing effect on monsters at least two screens away from the appeal reason. Both AI routines and radius of awareness seem to interfere heavily with that.

f) the Rogue is the only player/hireling with a low threat number, and you'll notice that she doesn't get hurt much even when she is very close to monsters. Only surrounded and stuck or in range of area spells she gets some serious damage. It is in fact possible to equip a rogue with no LL at all and she will survive in most maps of the game with her natural regeneration (which is not that high)

g) the Decoy has a slightly higher threat than players/hirelings, but it won't appeal monsters from far away like BW/BP/etc. Most monsters will take the Decoy as primary target, and the Valk will run to the Decoy to protect it instead of running to the Amazon (well, maybe 'running' is the wrong term here ... ^^ )

Despite of all that tidbits it is still unclear why some monsters - especially act bosses - sometimes prefer the 'wrong' target. I have several reports from players, where in a party with a melee and a caster char Diablo, Baal or Meph just focus on the caster /even if the caster hasn't attacked while the melee char already fights the boss/, same with ranged and melee, where the ranged party member hasn't shoot a single arrow yet and is targetted and so on.

There are several theories in the mist of uncertainness about 'they target always the one nearest to them' (which is obviously rubbish), 'they target the one with most life', 'they target the one with most damage', 'they target the one with certain manafe, ene/vita or some other combination' and so on, which aren't at all in any way scientific (that is, all of them are negotiable with simple testing).

Most probably it is just a matter of an AI decision made which is caused by several overlaying triggers, and one trigger is the strongest which doesn't have to be the one which would cause a player decision.
so long ...
librarian

Check out some peanuts or the
Diablo II FAQtoids
current status: re-thinking about HoB
Reply
#9
E) I remember a long time ago, skeletons (maybe other minions, I don't remember) would attack your BW/BP if they weren't already attacking an enemy, perhaps this is some lost remnant of that which wasn't removed when that was? The explanation for them attacking was that even though they were soulless and undead, they still didn't like you using their friends as walls (or something to that effect). Of course, BW and BP have had a long history of oddities, including their dropping items when destroyed.
Alea Jacta Est - Caesar
Guild Wars account: Lurker Wyrm
Reply
#10
Heiho,

that was back in 1.09, in 1.10 BW/BP aren't 3rd Party monsters but allied minions. Other minions like Skeletons, Pets and hirelings won't attack allied BW/BPs in 1.10, and friendly ranged attacks will simply pass the Bones. Even a nonpartied but also nonhostile player can't scratch 'em.

The side effect is, you can't get rid of a randomly casted BP by Arm of King Leoric, because you can't destroy it. This is important especially in some places in act1, where fire carpets are around. Due to the continuing damage of stationary fire you can trap yourself wearing Leoric with no chance of waiting till the BP timer wears off. Simply because in the lifetime of one BP you suffer from frame based fire damage so often that there will be one or more additional BPs in this time.

I once spend nearly a whole belt of Juvis in that far corner in Andariel's room where some Rogue corpses are burning till I gave up and rejoined the game ^^

another side note: Spearcats are the only enemies I know whose air missiles will ignore the bones. Their spears simply ignore all minions, pets, decoy and whatnot, IIRC even hirelings, and will only damage players.
Yes, it is a bug, but a strange one I think.
so long ...
librarian

Check out some peanuts or the
Diablo II FAQtoids
current status: re-thinking about HoB
Reply
#11
librarian,Aug 14 2004, 07:54 PM Wrote:in 1.10 BW/BP aren't 3rd Party monsters but allied minions. Other minions like Skeletons, Pets and hirelings won't attack allied BW/BPs in 1.10, and friendly ranged attacks will simply pass the Bones.
Well, my difficulty in being helpful here, is:

1) I'm away from being able to do 2 character testing for a couple weeks
2) my recollections could easily be from v1.10 beta, not v1.10 release

So I apologize for the following, which no doubt contains errors and misimpressions that I would usually try to vet a little before posting...

To the best of my recollection, not all of the quoted theory jibes with my empirical experience.

For example, last time I checked, Iron Maiden on monsters killing themselves on bone prisons still did not give kill/xp credit to the (BP/IM) casting player. If this is indeed still true, it would be improper to categorically class BW/BP as allied minions.

A further recollection, from *after* the BW/BP player targeting/pass-thru change first occurred, was that some player attacks still intercepted them (iirc, e.g., piercing exploding arrows).

I also vaguely recall being able to shift-attack an adjacent BW/BP (again, no idea how recent/what version we're talking here).
"He's got demons? Cool!" -- Gonzo, Muppet Treasure Island

"Proto-matter... an unstable substance which every ethical scientist in the galaxy has denounced as dangerously unpredictable." -- Saavik, Star Trek III

"Mom! Dad! It's evil! Don't touch it!" -- Kevin, Time Bandits
Reply
#12
Heiho,

well, let's say BP/BW are more allied as in 1.09 ;-)

It is true that you gain no exp when an IM'd opponent kills himself on Bones. I'm not sure if you gain quest solving, eg when Duriel kills himself with IM/Bones combination, because quest triggers are seldom the actual killing, but more often getting some items or smalltalk you can't get while the quest opponent is still alive. It is seldom necessary to kill the quest opponent really with your 'own hands' (as you know already).

I'm pretty sure that in both 1.10 beta and final there is no way to scratch your own Bones. The once succesful build of a CB-Bowmancer with Bones and ExAs didn't work in beta and final, partly because CB isn't carried with splashes anymore, partly because multiple splashes via friendly Bones aren't possible anymore. Maybe you had a special constellation, where the splash on a prisoned monster was simply reflected via the Bones, like it is with real walls in the map (I didn't pay attention to reflecting).

I tested with rogue and iron wolf hirelings, and also with my old Necrozon wearing Kuko, and the hirelings simply don't attack Bones anymore (as they did in 1.09), and if there are some foes behind the Bones the hirelings will attack them right through BP/BW without doing damage to the Bones.
In a PvP scenario foeish pets and hirelings will attack the Bones, but only if they're in the way or they are too far away to notice the casting player or his minions (this is much similar to the 1.09 behaviour of pets and hirelings against 'friendly' Bones, when no foe was in sight).

I wouldn't count piercing ExA graphics as only proof anyway, because piercing missiles with splashes are somewhat buggy. If you have bad AR, but high pierce chance, the graphics engine will show you lots of splashes along with FA/ExA, but they don't deal any damage if the CtH check failed with the first target. I simply don't know what else foolish things the 'improved graphics output' mentioned in patchlog110 will or won't show.
so long ...
librarian

Check out some peanuts or the
Diablo II FAQtoids
current status: re-thinking about HoB
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)