Talk:Monster infighting

Cyberdemon infighting?
As I read this it would be possible to get two Cyberdemons to infight with each other if they caused each other damage with barrels.

Has anyone ever done that? 210.86.119.59 03:21, 26 Dec 2005 (UTC)
 * That would be interesting, because Cyberdemon rockets don't hurt other Cyberdemons. Fraggle 14:49, 26 Dec 2005 (UTC)
 * It's not possible since Cyberdemons are immune to all blast damage, including barrel explosions. Janizdreg 16:11, 2 Jan 2006 (UTC)

Wikipedia article on monster infighting
Assistance would be appreciated concerning the accuracy of this edit to the Wikipedia version of this article. Fredrik 10:31, 15 Jan 2006 (UTC)


 * The Lost Soul vs. Lost Soul part is correct (this phenomenon is extremely annoying to the marine, because if you're trying to conserve ammo through monster infighting, and Lost Souls are involved, you usually have to re-start the fight over and over and over and over again).


 * I am not sure that a Lost Soul fighting another monster remembers its target better &mdash; rather, the other monster will keep attacking the Lost Soul until it eventually turns away from the player again.


 * I don't believe the AI part for a minute. To use an obvious example, doesn't the Cyberdemon on MAP08: Tricks and Traps fire straight into the crowd without waiting for you to be exposed?


 * IANASCM (I am not a source code maven).   Ryan W 10:07, 16 Jan 2006 (UTC)


 * Yeah, I used the map08 example as well to motivate partially reverting the edit. Fredrik 15:46, 16 Jan 2006 (UTC)


 * I don't think it would be difficult to test my second assertion above. You'd just need to make a PWAD consisting of a single room (not too large, because you don't want the Lost Soul to wander too far away) with you, a Demon, and a Lost Soul in it.  Don't fire at anybody, and see whether or not the following sequence of events takes place:
 * Lost Soul accidentally damages the Demon.
 * Demon attacks the Lost Soul and manages to hurt it.
 * Lost Soul attacks the Demon on purpose.
 * Lost Soul then attacks the player again without having taken any additional damage from the Demon.
 * If this all happens, then what I said was correct.   Ryan W 23:04, 18 January 2006 (UTC)


 * You're not imagining this, and it's not unique to the Lost Soul either. Any monster that gets set back to its spawn state in the course of its other frame transitions will have an edge for attacking the player instead of infighting. This is because a call to A_Look will cause it to look for a new target even though it already has one, and monsters only look for players in Doom. Some Heretic monsters "suffer" the same phenomenon.--Quasar 09:08, 25 June 2006 (UTC)

Pain chance check?
The top part of this article glosses over a certain aspect of monster infighting very important in speedrunning:


 * An undamaged monster who gets hit by another monster will immediately start infighting, but a monster who has already been damaged by the player probably will not.
 * If monster A and monster B are infighting, and the player damages monster A, monster A will not necessarily stop attacking monster B right away.
 * If monster A and monster B are infighting, and monster C damages monster A, monster A will not necessarily stop attacking monster B right away.

In other words, it's not as simple as "monster targets the guy who hit him last". Now, what is necessary to get the monster to change targets? I'm not sure. I want to say it's the pain chance check, but that's just a guess, since I don't know the source code.

For example, this phenomenon is crucial to Andy Kempling's Tyson demo of MAP32: Grosse (bashing away at the Cyberdemon while he's got his back turned to blow up Nazis), and plays a lesser role in Yonatan Donner's UV -fast demo of MAP13: The Crypt (he sprays the first arachnotron with the chaingun by mistake, then has to wait for the mancubi behind it to land several blows before the arachnotron turns away).

I'm not sure how to modify the article at this point, but I thought I'd point the problem out. Ryan W 04:35, 27 January 2006 (UTC)


 * Monsters in Doom have a "threshold" that ticks down as long as they are chasing a target. When that threshold has expired, the monster may, at random, look for a new target. If the threshold is too high, monsters will tend less often to change targets even when something else hurts them. This first behavior was presumably primarily added to make cooperative more balanced; otherwise, monsters would insist on chasing the first player they see and would never change targets. Note that the reason Arch-viles switch targets instantly is precisely because they ignore and do not use the threshold value (Eternity makes this behavior into a flag so it can be given to any monster).--Quasar 09:12, 25 June 2006 (UTC)

Monsters will infight if they are caused pain, thus flinching. Monsters with low pain chance ( Cyberdemon, Spider Mastermind ) will need a very powerful attack to make them flinch. It is possable, however hard, too get certain monsters to infight themselves, though it won't nessicarily damage them, e.g. a Cyberdemon can be tricked into "Sucicide" attempts, but it is impossable to make certain creaturs kill themselves. --drake raider

Blur artifact effect / targets for inanimate monsters
My recent revision raises two more questions not yet addressed in this article: Ryan W 09:12, 30 January 2006 (UTC)
 * The statement about the blur artifact (which was already there) contradicts the Blur artifact article, which says that invisibility only affects the appearance of melee attacks, not their actual direction. I think this one is correct, but that's just a guess, since I don't know the source code.
 * Does Romero's head even have a target? What about Commander Keen?

Monster melee attacks cannot miss
The blur article is correct, not this one, so I have removed all information indicating that "misdirected" monster melee attacks can cause infighting. This idea is not supported by the source code.

void A_SargAttack(mobj_t *actor) {   if(!actor->target) return; A_FaceTarget(actor); if(P_CheckMeleeRange(actor)) {      int damage = ((P_Random(pr_sargattack)%10)+1)*4; P_DamageMobj(actor->target, actor, actor, damage, MOD_HIT); } }

Here is the complete source code for a demon's bite attack. The call to A_FaceTarget is where the perceived inaccuracy comes in -- when a thing's target is blurry, it will get a random amount added to its angle to make it appear confused. This would only affect a tracer attack, however. As you can see, there are no calls in this function or any of the other monster melee attack functions to P_LineAttack. Instead, a direct call is made to P_DamageMobj on the actor's target -- if called, this function cannot "miss" under any circumstance, nor can it mistakenly injure a thing nearby (there is no implicit radius of damage or anything similar -- it just subtracts a determined amount from the target's health and possibly makes the target angry).--Quasar 00:01, 16 May 2006 (UTC)


 * Marvelous. This is exactly what I was asking above.  Thank you.  (I do know a little C, but I can never find this stuff when I look at the sources.)


 * Now what about revenants, barons, knights, imps, and cacos? Also, by this definition, are charging lost souls "melee attacks"?    Ryan W 18:42, 16 May 2006 (UTC)   (EDIT: Uh, that would be where he says "or any of the other monster melee attack functions", Ry-Ry.  Try to cut down on the sugar intake before editing.)

Arch-Vile
Arch-Vile's can be targeted by monsters, e.g. play MAP29 of Plutonia Experiment on Ultra-Violance (Perferably with iddqd, your gonna get hurt deliberatly here,) and go straght to the red key room. kill the zombies and get the key. An Arch-Vile will be released. Get behind him and force him to ressurect a zombie. Walk near the zombie and let the Arch-Vile hit you. The zombie will be hurt, and attack the Arch-Vile. --64.235.90.74 14:28, 5 December 2006 (UTC)drake raider


 * I tested this, but it doesn't seem to occur.   Ryan W 00:22, 17 January 2007 (UTC)

Same Creature Infighting
This article is unclear on two of the same kind of monsters infighting (e.g., two barons). Projectile monsters of the same kind can hurt each other, but they can only hurt their targets. e.g., a).a baron shoots at the player. b). another baron is hit by the attack. resault-no infight. however, a target is almost always damaged, exeption being a suiciding cyberdemon, for cyberdemon rockets inflict blast damage only, which they are immune to. e.g. a). baron shoots at player. b). shot hits barrel. c). barrel explodes, damageing another baron. c). hurt baron shoots at first baron. resault- because shots target is first baron, a direct hit will damage hurt baron. ---drake raider


 * That's not the case: Baron's are immune to their own fireballs. Two infighting barons will throw balls at each other infinitely. It's only when they get close enough to scratch they can kill each other. You can try this out for yourself with MBF friendly monsters (easier than triggering a baron infight in vanilla doom). -- Jdowland 21:30, 22 January 2007 (UTC)


 * So can you start infights by causing two imps to scratch each other?
 * -drake raider


 * Yes. Try it on E1M3 by encouraging one of them to shoot a barrel in a crowd &mdash; either at the first red switch or in front of the normal exit.    Ryan W 18:24, 14 February 2007 (UTC)


 * E1M3?.... -drake raider


 * E1M3: Toxin Refinery (Doom). -- Jdowland 17:08, 4 March 2007 (UTC)

Infighting in Doom 3
I was surprised yesterday when I saw an imp and a revenant fight each other in Delta labs 2A. I thought that the monsters did not infight in Doom 3, for example when I send an imp fireball with the RoE gravity gun to another monster (here, I suspect that the fireball is the property of the marine). Ducon 05:25, 28 August 2007 (UTC)