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?


 * To the latter question; yes, but they don't use the information for anything. Give them movement or an attack with DeHackEd and they will use it. Who is like God? 15:30, 26 May 2008 (UTC)

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.)


 * I'm guessing the user who added that had played with early versions of Doom at some point, where the demon's attack code was different. Later we can add this difference to the Versions of Doom and Doom II article, as a note to the version that changes the behavior (fixes the bug). It's also a bug that was "fixed in v1.9" that should be in the engine bugs list. Who is like God? 15:30, 26 May 2008 (UTC)

Proposed pathological exception to the above, involving pointer arithmetic:. Ryan W 20:26, 18 September 2008 (UTC)


 * I'm skeptical about that. Without a demo or some more concrete indication it's just speculation, and we know most of the idea comes from the fact that demons did do this in earlier versions. Who is like God? 12:07, 30 September 2008 (UTC)

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)

Archvile may NOT offend ANY another monster, because: if ( (!target->threshold || target->type == MT_VILE)    && source && source != target     && source->type != MT_VILE) {   // if not intent on another player, // chase after this one target->target = source; target->threshold = BASETHRESHOLD;}

thanks to entryway for code inspection

--88.87.80.107 15:25, 24 September 2008 (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)
 * Well, the imp sure as heck doesn't want the fireball and happily gives it to the marine. If you play the imp noises backward, it says "I, sound of mind and body, hereby donate this fireball to you, the Marine." =) But monster infighting is definitely possible in all Quake line games; I don't see why not Doom 3. --wwwwolf (barks/growls) 18:31, 28 August 2007 (UTC)
 * I never saw it before in Doom 3, even if I know that there is a variable for this. An answer is here. Ducon 17:09, 29 August 2007 (UTC)

Commander Keen
What is the relevance of this sentence?

"Hanged Commander Keens do not have an attack mode of any sort, so they can neither provoke other monsters nor retaliate when they are damaged by projectiles."

That is not only ridiculously obvious, but Keen dolls shouldn't even apply since they're not a traditional "monster" in the game. We don't mention barrels infighting here (though I recall DeHackEd leading to such strange entertainment) so why should we mention any other inanimate object? Hey everybody, can soul spheres offend other enemies too? :) Zack 16:18, 26 September 2008 (UTC)


 * The Keens are monsters as far as the game is concerned. Monster is a technical term that defines things affected by monster related parameters (-nomonsters, -fast and -respawn) which count as kills in the intermission. It doesn't necessarily mean the same thing as "monster" in the dictionary, and the fact is clarified with the link to the Monster article, which explains this at the beginning. Who is like God? 12:07, 30 September 2008 (UTC)

Scratching
I remember reading something along the lines of "Scratching and biting attacks are hard to misdirect, but it does happen, and ..." in an authoritative document (Doom doc? FAQ?)