Talk:Monster infighting


Cyberdemon infighting?[edit]

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? 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[edit]

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 — 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:
  1. Lost Soul accidentally damages the Demon.
  2. Demon attacks the Lost Soul and manages to hurt it.
  3. Lost Soul attacks the Demon on purpose.
  4. 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?[edit]

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[edit]

My recent revision raises two more questions not yet addressed in this article:

  • 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?

Ryan W 09:12, 30 January 2006 (UTC)

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[edit]

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)
      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: [1].    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'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. -- 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

-- 15:25, 24 September 2008 (UTC)

I've got a question about how the Arch-Vile is able to switch its targets in the same attack sequence. What exactly ist he code that allows the to do that? And can other monsters be given the same ability? 20:35, July 20, 2010 (UTC)

The answer to the second question is yes (see "pain chance check" section above).    Ryan W 21:22, July 20, 2010 (UTC)

Same Creature Infighting[edit]

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 — 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)
I actually have seen imps in "Spawning Vats" and cocodemons in "House of Pain" get into fights with each other by exploding barrels, and the cacodemons could damage each other with their projectiles. Anyone else? 05:05, May 28, 2010 (UTC)
With their own projectiles?  For the eleventh time, demo please.    Ryan W 05:17, May 28, 2010 (UTC)
How easy is it to get two Lost Souls to infight to the death? From what I read on here, their tendency to forget their targets after one attack would seem to make it exceedingly difficult and rare, but just tonight my roommate managed to get this to happen not once but twice in the same game. So, what are the chances of this thing actually happening? 04:10, July 30, 2010 (UTC)
There's a good chance of that happening. As long as the Lost Souls keep doing a tit-for-tat against each other, one will eventually kill the other. They can also do that if they're in groups (such as E3M2), and also if you knock one into the other using a quirk in their attack. If a lost soul misses the target, then it forgets what it was aiming at. --Sigma 7 01:47, August 6, 2010 (UTC)

Infighting in Doom 3[edit]

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[edit]

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)


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

Yes, that's in Leukart's FAQ (section 10.9).  As you can see from the rest of this talk page, a more careful examination of the code seems to show that it's not actually permitted.    Ryan W 00:10, 26 November 2008 (UTC)

Hell Knight vs Baron of Hell[edit]

I know that they both can't hurt each other; however, in one opportunity I saw a Baron of Hell that was accidentally attacked by a Hell Knight so they started to infight. I thought the Baron wouldn't turn back to strike back against his cousin. Obviously, at the end, the Baron won and killed that Knight; but that was weird, it should've been a glitch. Just happened to me one time.

† JuanPa †

The knight might have hurt the baron by exploding a barrel. They can still hurt each other through scratching attacks, so there's a possibility of the baron catching up with the knight and scratching it to death. --Shadow Wizard 08:43, March 26, 2010 (UTC)

Heretic mass infighting[edit]

There is *not* any exception to projectile damage during the "mad melee" when the player dies in Heretic or Hexen, as can be seen by the lack of any exception in this code from Heretic's p_map.c, which handles clipping of projectiles against solid objects:

if(tmthing->target && tmthing->target->type == thing->type)
{ // Don't hit same species as originator
   if(thing == tmthing->target)
   { // Don't missile self
   if(thing->type != MT_PLAYER)
   { // Hit same species as originator, explode, no damage

Please do not contest such well-known behaviors unless you intend to verify what you are claiming against the source code, as you are ultimately only wasting the time of people who have line-to-line knowledge of this stuff. Quasar 01:13, May 1, 2010 (UTC) 07:52, October 28, 2010 (UTC) humans fighting[edit]

hey guys i still play doom to this day and ive noticed a rather strange fact

they say an enemy cant hurt another of its type. however all versions of doom i play (and i play on the risen 3d doomsday and doom legacy engines) ive noticed that human soldiers will attack anything including their own variations (eg shotgun guy will attack another shotgun guy if attacked) apart from that yeh ive never seen any other monster attack their same kind (gotta love how the baron of hell and hell knights cant hurt each other... makes them seem like brothers :D)