Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Doom Marine

Questionable paragraph in DoomWiki's Cyberdemon Article

Recommended Posts

I was browsing through monsters articles on DoomWiki, and while in the Cyberdemon section, stumbled upon this gem:

http://doom.wikia.com/wiki/Cyberdemon

It is advisable to avoid close range fighting if possible, although it is possible to kill a cyberdemon in close range. When attacked at the feet with a chainsaw they have a higher pain chance and cannot aim at a player because of the close range. The cyberdemon AI is designed to retreat in such cases so this technique can only be attempted in a confined space or to draw hits from imps or revenants to provoke monster infighting. This technique does not work on other cyberdemons or arch-viles as cyberdemons are immune to their own rocket shots and do not take splash. Arch-viles will attack cyberdemons after being attacked, but the cyberdemon (as all other monsters) will not fight back.


Bolded = "At the feet"? Bullshit.
Italicized = Poorly written, borderline nonsense.

The bolded sentence imply that there's a difference between the head and feet when it comes to hit registration. The italicized section confused the hell out of me, even after multiple reads it still made no fucking sense.

A month ago when I first saw the quoted passage, I deleted the bolded sentence and fixed up the italicized section. Now coming back to it, the article is somehow restored to its original shit state prior to my edit.

Opinions?

Share this post


Link to post

Don't they have logs of who changed what by adding/deleting certain text? Yes it'd probably add 3x as much data tracking per page vs the actual page, but keeping 6 months of records would make sense. It's one of the things I'd push if organizing an online encyclopedia. Or am I not getting how wiki editing works ...

And the second sentence of the italics refers to cyber-demon infighting. Whoever edited it wanted to save some letter-space saying "This technique ..." , but failed by using the word 'technique'. I agree on the bolded text too. A better use for that paragraph would be it's monster-infighting properties and tysoning, since I didn't see close range covered elsewhere.

Share this post


Link to post

It's just a poorly written paragraph, no need to instarage :)

"At the feet" in this instance obviously means "at close range of <64 units" which is the only way the Chainsaw can hit. Doom doesn't have area damage though someone who doesn't know about the engine that well may indeed misinterpret.

Pain Chance doesn't really work that way, the correct way to say it would be that the Chainsaw's high rate of fire is more likely to invoke the Cyberdemon's low pain chance simply because it does damage more often. The Plasma Rifle fires more rapidly than the Chainsaw anyway, so it's arguably a better choice for fighting a Cyberdemon.

The AI sentence is a definite [citation needed] preferably with source code proof. That bit definitely sounds like porkies to me and should be removed if it's not true or verifiable.

Go ahead and re-write it so it's factually correct and makes sense, that's a constructive contribution and the whole idea of Wikis and collaborative software. Just deleting a poorly written sentence is not so constructive, which is likely why your deletion was reverted.

Share this post


Link to post

It's not the poorly written stuff itself that got me instaraging, it's the fact that I have corrected it only to come back to see that someone has reinserted the original poor edit back in the place of mine.

In any case, I have registered my public name on that Wiki (to lend credibility to my future edits) and will fix that paragraph in question sometimes after, unless you feel like doing the honor yourself tonight.

Share this post


Link to post

The MediaWiki software features talk pages for articles. Now you know, and knowledge is half of the battle. (The other half being shooting at the enemy until it dies.)

Share this post


Link to post
ArmouredBlood said:

Don't they have logs of who changed what by adding/deleting certain text? Yes it'd probably add 3x as much data tracking per page vs the actual page, but keeping 6 months of records would make sense. It's one of the things I'd push if organizing an online encyclopedia. Or am I not getting how wiki editing works ...

There is a history link at the left bottom area of the page that takes you Revision History. If you're editing anonymously, your edit will show up as an IP address. Since I've registered for the Wiki, my future edits will be under Doom Marine.

Share this post


Link to post

Now that I thought about it, there needs to be more in-depth evidence than just he-says she-says when it comes to describing this cyberdemon close combat... in other words I might need help tracking down the code that describe the effects of close range combat against the cyberdemon, I don't want to state it without evidence otherwise. Need to know these things first:

1. The dimensions of the bounding box of the cyberdemon (I'm sure dehacked will show this, but needs further verification from source code).

2. The boundary that the player have to pass to render the cyberdemon's aim ineffective.

3. The code that dictates the cyberdemon's retreating behavior.

Share this post


Link to post
Doom Marine said:

There is a history link at the left bottom area of the page that takes you Revision History. If you're editing anonymously, your edit will show up as an IP address. Since I've registered for the Wiki, my future edits will be under Doom Marine.


Ah thanks for that, you too gez. So I bet you're probably already aware that sumnub@76.28.182.164 made only that revision in history ... meh I'm letting myself get too deep into wiki territory. No thanks :P

On an unrelated note, I absolutely LOVE the info that tor check link under the small ip info section when I checked the history on him shows. Told me which ip to open the port to for my torrenting ^^

EDIT:

Doom Marine said2. The boundary that the player have to pass to render the cyberdemon's aim ineffective.

3. The code that dictates the cyberdemon's retreating behavior.

Does 2. exist for every monster? Not so far as I've seen ... which probably isn't useful. And for 3. I thought it was random ... although that could mean psuedo-random tic equations, but I'd still bet it's rng.

Share this post


Link to post

I wonder if someone is able to make a lot of money from a wiki like that with google ads or something since wikis tend to top google page results (didn't notice any ads though). Good old user generated content. Or maybe since its created by a group nobody 'owns' it.. I guess someone owns the domain..

Share this post


Link to post

"Cannot aim at the player because of close range": bullshit.

void A_CyberAttack (mobj_t* actor)
{	
    if (!actor->target)
	return;
		
    A_FaceTarget (actor);
    P_SpawnMissile (actor, actor->target, MT_ROCKET);
}
See any code here that aborts the attack because of range? And before you say it might be in P_SpawnMissile, let me add that if a missile cannot be spawn because it's blocked by something, it explodes directly, dealing its impact damage to the object that blocked it.

"Different pain chance in such and such condition": bullshit, there's nothing like this anywhere in the code. The MT_CYBORG's special cases in the code are as follow:
1. For distance checks (no matter how far away you are, the cyberdemon considers you are no farther than 160 map units for purpose of missile range checks). This is after a check (shared with MT_SPIDER and MT_SKULL) that divides the effective distance by two.
2. Sound. Along with MT_SPIDER, they play their sound at full volume, without attenuating for distance.
3. For boss death checks. You know, E2M8, E4M6, that kind of things.
4. For area attack (aka radius damage), to exclude them from being harmed.

Now can you tell me where in that full, exhaustive, and complete list there is anything related to pain chance? Nowhere, that's right. Absolutely nowhere. The code for taking damage and going in pain? Doom is coded in C, not in C++, it uses the exact same functions for all monsters, that's why special exception checks are handled with flags or through the MT_ type.



So, to answer your questions:
1. Dimensions of the bounding box? Its radius is 40 units, its height is 110. So a square column, with sides 80 units long. (The name "radius" is bullshit too since bounding boxes aren't circular columns.)

2. Boundary that the player has to pass: N/A. This is complete bullshit.

3. Code that dictates the cyborg's retreating behavior: N/A. This is complete bullshit. Monsters do not retreat, and the cyberdemon is no exception. They just wander more or less randomly, zigzagging towards their target and moving away in a random direction when they're blocked.

Share this post


Link to post

Your answer to #3 further confirms what I originally suspected, that the AI has never exhibited retreating behavior in the 15 years I have played Doom; anything that shows otherwise is the coincidental result of the pseudorandom zig-zagging movements of the monsters.

I'll have to spend some time later to digest these findings and put them into laymen terms for the Wiki. Unless you, with a better understanding of the source code, want to edit it yourself, be my guest.

Share this post


Link to post

The only monster that exhibits behavior even remotely similar to this is the revenant, which might be a source of confusion. The revenant will only fire a missle at close range if it is provoked first. Otherwise it will just run around the player trying to punch it.

Share this post


Link to post

Being attacked at the feet has no relevance. It was posted there merely because the player reaches the feet with his chainsaw (or the butt with his fist).

Is the Cyberdemon A_Chase AI really designed to retreat at close range?

Share this post


Link to post
printz said:

Is the Cyberdemon A_Chase AI really designed to retreat at close range?

This question cannot be answered because there is no such thing as a "Cyberdemon A_Chase AI". The cyb uses the exact same A_Chase that all other monsters use. There is no special code for MT_CYBORG in A_Chase.

The "retreat at close range" effect is nothing else than "move blocked by obstacle (other monster, wall, candelabra, player, whatever) so try a random direction". You should talk about monsters retreating from walls as well.

Share this post


Link to post
EarthQuake said:

The only monster that exhibits behavior even remotely similar to this is the revenant, which might be a source of confusion. The revenant will only fire a missle at close range if it is provoked first. Otherwise it will just run around the player trying to punch it.


I knew that there was a middle distance where revenants would neither attempt to punch you or fire missiles (which I just confirmed for myself with this wondrous creation) but I didn't know they could be provoked into attacking from that distance. What I find interesting is that a revenant shot from that safe distance will fire one and exactly one missile in retaliation, but not necessarily right away. I wonder what's going on in the code there.

Share this post


Link to post
Gez said:

This question cannot be answered because there is no such thing as a "Cyberdemon A_Chase AI". The cyb uses the exact same A_Chase that all other monsters use. There is no special code for MT_CYBORG in A_Chase.

The "retreat at close range" effect is nothing else than "move blocked by obstacle (other monster, wall, candelabra, player, whatever) so try a random direction". You should talk about monsters retreating from walls as well.

Just to be clear, it wasn't I who wrote that in the wiki.

Share this post


Link to post
EarthQuake said:

The revenant will only fire a missle at close range if it is provoked first. Otherwise it will just run around the player trying to punch it.


Is this true? I'm pretty certain I've taken rockets from revenants that I haven't touched.

EDIT: oops, didn't read "at close range" How close is close range anyway?

Share this post


Link to post
Creaphis said:

I knew that there was a middle distance where revenants would neither attempt to punch you or fire missiles (which I just confirmed for myself with this wondrous creation) but I didn't know they could be provoked into attacking from that distance. What I find interesting is that a revenant shot from that safe distance will fire one and exactly one missile in retaliation, but not necessarily right away. I wonder what's going on in the code there.


Learn something new every day it seems.

Share this post


Link to post

EE calls the AI modifications controlling Revenant behavior the LONGMELEE and RANGEHALF flags and allows you to assign them, together or independently, to other monsters as well.

Monsters using both defer from their missile attack while within 196 units of their target. They also consider themselves to be half as far from their target when outside that distance, causing them to fire at a greater than normal rate then (the closer a monster is, the more frequent it will use its missile attack, though the distance is capped at 200 units so that they always have some chance of attacking).

The LONGMELEE behavior was added to P_CheckMissileRange specifically for the Revenant in DOOM II, but the RANGEHALF behavior is also used by other monsters - the Lost Soul, Cyberdemon, and Spiderdemon. On top of RANGEHALF, the Cyberdemon uses another behavioral modification which EE calls HIGHERMPROB. This raises the probability of long-distance attacks even higher by forcing the monster to never consider itself to be further than 160 units away, instead of 200. This is what makes a Cyber such a threat even from most of the way across E2M8.

Share this post


Link to post
Quasar said:

EE calls the AI modifications controlling Revenant behavior the LONGMELEE and RANGEHALF flags and allows you to assign them, together or independently, to other monsters as well.

Monsters using both defer from their missile attack while within 196 units of their target.



Any reason LONGMELEE is just a flag? In ZDoom the value is configurable.

Share this post


Link to post
Creaphis said:

I knew that there was a middle distance where revenants would neither attempt to punch you or fire missiles (which I just confirmed for myself with this wondrous creation) but I didn't know they could be provoked into attacking from that distance. What I find interesting is that a revenant shot from that safe distance will fire one and exactly one missile in retaliation, but not necessarily right away. I wonder what's going on in the code there.


Simple.

Let's post the code for the relevant functions, as excerpted from Doom's p_enemy.c source file.

//
// P_CheckMeleeRange
//
boolean P_CheckMeleeRange (mobj_t*	actor)
{
    mobj_t*	pl;
    fixed_t	dist;
	
    if (!actor->target)
	return false;
		
    pl = actor->target;
    dist = P_AproxDistance (pl->x-actor->x, pl->y-actor->y);

    if (dist >= MELEERANGE-20*FRACUNIT+pl->info->radius)
	return false;
	
    if (! P_CheckSight (actor, actor->target) )
	return false;
							
    return true;		
}

//
// P_CheckMissileRange
//
boolean P_CheckMissileRange (mobj_t* actor)
{
    fixed_t	dist;
	
    if (! P_CheckSight (actor, actor->target) )
	return false;
	
    if ( actor->flags & MF_JUSTHIT )
    {
	// the target just hit the enemy,
	// so fight back!
	actor->flags &= ~MF_JUSTHIT;
	return true;
    }
	
    if (actor->reactiontime)
	return false;	// do not attack yet
		
    // OPTIMIZE: get this from a global checksight
    dist = P_AproxDistance ( actor->x-actor->target->x,
			     actor->y-actor->target->y) - 64*FRACUNIT;
    
    if (!actor->info->meleestate)
	dist -= 128*FRACUNIT;	// no melee attack, so fire more

    dist >>= 16;

    if (actor->type == MT_VILE)
    {
	if (dist > 14*64)	
	    return false;	// too far away
    }
	

    if (actor->type == MT_UNDEAD)
    {
	if (dist < 196)	
	    return false;	// close for fist attack
	dist >>= 1;
    }
	

    if (actor->type == MT_CYBORG
	|| actor->type == MT_SPIDER
	|| actor->type == MT_SKULL)
    {
	dist >>= 1;
    }
    
    if (dist > 200)
	dist = 200;
		
    if (actor->type == MT_CYBORG && dist > 160)
	dist = 160;
		
    if (P_Random () < dist)
	return false;
		
    return true;
}
So, in clearer terms for the non-programmers out there.

The first function checks whether the monster's target is within melee range. The MELEERANGE constant is worth 64 map units by the way. So if the distance is less than 44 units (plus target's radius value), then the function returns "false" to say that, no, the target isn't within melee range. For reference a player mobj has a radius of 16, so the safe zone against a revenant's punches is 60 map units.

Now onto the second function. Let's see what it does.
First, it aborts immediately with a result of "false", meaning "no, you can't attack with a missile" if there is no line of sight to the target. If the target is behind cover, it'd be useless to shoot it.

Then you have another check that aborts immediately, but this time with a result of "true", meaning "yes, absolutely, please do attack right now". The condition for this test is that the monster must have the MF_JUSTHIT flag, which is given to it by P_DamageMobj() when it sends a monster to its Pain state. Then it clears the flag, so that retaliation happens just once per occurrence of having been pained.

Then you have a check for reactiontime, which needs to be zero. This is basically a variable that is used to tell whether a monster is awake or not. For many actors, the default value is 8; and it is decreased by 1 (to a minimum of 0) whenever they call A_Chase. Also, if they take damage, P_DamageMobj() sets it to 0 as well. It's only increased to a higher value when they respawn in nightmare mode, as then it gets set to 18. You can assume that in most case, this check will not be triggered.

Then you have the distance computation (it makes an "aproximation" [sic] because it takes only into account the X and Y position). If the monster has no melee attack state (not the case for the revenant, who has mad kung fu moves), the "distance" is decreased by 128.

Then the shift by 16 (that mysterious >>= 16 instruction) happens because the devs got tired of typing *FRACUNIT I guess. Remember it's fixed-point arithmetic.

Then we have a check for arch-viles. If their victim is 896 or more units away, no toasting. (Although... Remember that "no melee state" check earlier? Yeah. The archies have no melee state. Taking that into account, you have to be 1024 units away from an archvile to be safe.)

Then we have the revenant check. If the distance is less than 196 units, then do not use missile attack, with the idea that you'll get to use A_SkelPunch instead. So, if you remember the melee range check from before, the safe zone for a revenant is when you stay between 60 and 196 units away from it. Less than 60 and it melees you, more than 196 and it missiles you.

If the monster is a revenant, a lost soul, a spiderdemon or a cyberdemon, the distance is considered to be now halved. (This mathematically also halves the reduction for no-melee staters like the cybie, by the way.)

The remaining distance is then capped to 200 (or 160 for cybies). If a random number between 0 and 255 is greater than this remaining value, then the missile attack will be performed.


So, now you know:
- Why the revenant (and, in fact, other monsters) retaliate with missiles after being hurt
- Why there is a safe zone when dealing with revs
- Why some monsters are more trigger-happy than others (it's not the only reason though)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×