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

strategy analyze of ssg vs archvile

Recommended Posts

given following facts:
it always take 4 ssg shots to kill an archvile.
each ssg shot has 55% chance of breaking an archvile's attack.
ssg shooting interval is around 1.62 seconds.

you have 200 health, 200 blue armor, ssg and shells.
the purpose is to kill 3 archviles, and take least hits as possible.
archviles start out alerted, each teleports in after the previous one is killed.
no place for hiding or covering, thats you have to be facing it for all time.
uv difficulty, how soon does the archvile attack after it sees you is not exactly known.(can anyone give detailed data on this?)

now there are two shooting strategies to choose:
A. open fire as soon as you see the archvile and keep shooting. this will always kill it in shortest time, but may have only one shot to break it when it decide to attack.
B. hold fire until it starts its first attack, so you have 2 shots to break it. after that, keep firing as its not likely to finish its second attack before being killed.

can anyone give detailed probability calculation to confirm which strategy would take less hits?

Share this post


Link to post
noshutdown said:

given following facts:
it always take 4 ssg shots to kill an archvile.


That is, assuming all pellets hit, all the time. However, assuming that they do, it's true: min damage is 205 HP, max is 250 HP (based on the vanilla RNG, at least. With ZDoom or other ports not using the vanilla RNG, the variation can be more extreme).

noshutdown said:

each ssg shot has 55% chance of breaking an archvile's attack. ssg shooting interval is around 1.62 seconds.


Correct.

noshutdown said:

archviles start out alerted, each teleports in after the previous one is killed. No place for hiding or covering, thats you have to be facing it for all time.


I think that's the single factor that makes everything else moot: there's no better strategy than to simply keep firing away as fast as you can, making sure you do maximum damage, since you cannot cover or disrupt the attack in any other way.

noshutdown said:

how soon does the archvile attack after it sees you is not exactly known.(can anyone give detailed data on this?)


All monsters have to wait for a certain number of tics after they see you, and then have a chance to attack you or keep moving. On -fast or nightmare difficulty, this time is severely reduced, and monster "prefer" attacking rather than moving, as long as they have you in sight. But in the scenario you envision (one-on-one with an archvile and no cover), you'll have virtually no quarter.

noshutdown said:

open fire as soon as you see the archvile and keep shooting. this will always kill it in shortest time, but may have only one shot to break it when it decide to attack.

B. hold fire until it starts its first attack, so you have 2 shots to break it. after that, keep firing as its not likely to finish its second attack before being killed.


The archvile's attack lasts three seconds (I need a more precise figure though, as 2/10 or 3/10 of a second might matter in this case), and as you said, it takes about 1.63 secs for a SSG attack to cycle, so even if you manage to start shooting at exactly the same moment the archvile decides to attack, you probably won't be able to deliver two SSG hits unharmed. The only way to do that is to take the initiative and shoot first. If the archvile has already begun its attack, it's better to move away and seek cover (if you can), or keep firing and hope that you break the attack by pain chance.

Now that I think about it, it seems that they timed the SSG fire rate and the archvile's attack so that it seems like you can barely squeeze two shots in there. Maybe you can, maybe you don't, based on the actual frame/state durations.

Share this post


Link to post
Maes said:

The archvile's attack lasts three seconds (I need a more precise figure though, as 2/10 or 3/10 of a second might matter in this case), and as you said, it takes about 1.63 secs for a SSG attack to cycle, so even if you manage to start shooting at exactly the same moment the archvile decides to attack, you probably won't be able to deliver two SSG hits unharmed. The only way to do that is to take the initiative and shoot first. If the archvile has already begun its attack, it's better to move away and seek cover (if you can), or keep firing and hope that you break the attack by pain chance.

Now that I think about it, it seems that they timed the SSG fire rate and the archvile's attack so that it seems like you can barely squeeze two shots in there. Maybe you can, maybe you don't, based on the actual frame/state durations.

note that there is only one interval before the frame of the second ssg shot being fired. so if the archvile's attack lasts as long as nearly 3 seconds(although i feel it shorter than that), it seems that i can always fire two shots if i can time it right, unless the archvile starts its attack right after my first load.

Share this post


Link to post

SSG shooting interval is 1.457 seconds or 51 tics. The "CloseShotgun2" action includes the "Refire" action.

edit: oops.. meant "CloseShotgun2".

Share this post


Link to post
Jimi said:

SSG shooting interval is 1.457 seconds or 51 tics. The "LoadShotgun2" action includes the "Refire" action.

thanks for the info,
and do you know the exact length of an archvile attack?(from the first frame of action to when damage was dealt)

Share this post


Link to post
noshutdown said:

do you know the exact length of an archvile attack?(from the first frame of action to when damage was dealt)

66 tics (~1.88 seconds).

Share this post


Link to post
Blue Shadow said:

66 tics (~1.88 seconds).


Heh, then the wiki's info is grossly wrong (3 seconds...). That also means that it's barely possible to get two SSG hits start-to-end, even if you deal the first one right when the attack starts.

Share this post


Link to post

Well, that 66 tics isn't the whole attack length. There's 28 tics cooldown after the attack hits. So, total length is 94 tics or 2.685 seconds.

Share this post


Link to post

Still, from the moment it decides to attack, it's barely possible to deliver no more than two SSG attacks if you don't take your finger off the fire key. It doesn't matter even if you had begun your attack earlier, or even if you manage to disrupt one attack successfully: you still have exactly two chances to disrupt the next one, once it begins. If the archvile goofs off/tries to run away in the meantime and you get an extra hit in there, then it's mathematically toast.

Share this post


Link to post
Maes said:

min damage is 205 HP, max is 250 HP (based on the vanilla RNG, at least. With ZDoom or other ports not using the vanilla RNG, the variation can be more extreme).

Hm, you don't seem to remember your own calculations? In my thread I put 170-245 quoting you (indirectly). In fact, minimum damage seems harder to establish, you have to check meticulously if all pellets hit. Maximum damage: I experienced 245 hp several times, and never ever 250 hp. so I can bet money on that.

Share this post


Link to post
vdgg said:

Hm, you don't seem to remember your own calculations?


I just searched for "shotgun analysis" posts by me and quoted the first I found, probably not the most correct of the bunch. Heh. Anyway, I stand corrected. So that does breach the core assumption that 4 SSG blasts are always enough to down an archvile (though getting less than 700 HP of damage in 4 SSG blasts is a quite low-probability event).

Share this post


Link to post

When I have to go against an archvile, I usually use the SSG like a melee weapon. As far as I know, the archvile has nothing like the imp's scratch, so I run straight to the archvile's face and shoot him at point blank range. This first attack seems to always put him in pain state.
But after this, the archvile quickly circles round me and blow a big portion of my health away if I can't find cover. It's probably because I'm too slow or my reflexes are not sharp enough that I lose track of him and have to halt fire.

An expert player may be able to turn with the archvile and keep firing at him untill he's dead. After all, the fastest thing in Doom is the player himself.

Share this post


Link to post

Well, to answer the OP: I think that only strategy "a" is viable, because even in the best-case scenario you can only get two shots during the archvile's attack anyway, and that's true regardless of whether you start firing first ("as soon as you see it") or after it attacks you first.

Strategy "b", if anything, will make you lose some time and you are more likely not to be able to fit a second shot before the attack completes.

In either case, if the archvile flinches at the second shot, you're lucky, because you will be able to get other two shots and finish it off without retaliation.

If it flinches at the first shot however, it's almost as bad as not flinching at all: you'll need a second flinching within the next two shots to avoid getting blasted, and that has a lower chance of happening.

P=10/256
P(flinching exactly one time in 4 shots)= 4*(P(1-P)^3) = 13,86%

The probability of it flinching at a very specific shot within the 4 ones, however, is 1/4th of that: 3.47%

However, getting two flinches in 3 shots is much harder, with only a 0.29% chance of happening.

Share this post


Link to post
Maes said:

If it flinches at the first shot however, it's almost as bad as not flinching at all: you'll need a second flinching within the next two shots to avoid getting blasted, and that has a lower chance of happening.

P=10/256
P(flinching exactly one time in 4 shots)= 4*(P(1-P)^3) = 13,86%

The probability of it flinching at a very specific shot within the 4 ones, however, is 1/4th of that: 3.47%

However, getting two flinches in 3 shots is much harder, with only a 0.29% chance of happening.


10/256 chance of breaking? did you forget that a ssg shot has 20 pellets or something?

well i can confirm that even in worst scenerio of strategy A i won't be hit more than once: it takes me around 157 frames to fire 4 loads of ssg, but 160 frames for the archvile to launch two consecutive attacks. however, chance of taking one hit seems pretty high if it starts its first attack right after my first ssg shot.

Share this post


Link to post

for detailed calculation, i believe that some more info is needed:

how soon/often does it decide to attack since it has me in sight?(already alerted, so no wake up time needed)
how soon/often does it decide to attack since it entered pain status?
and i mean playing on uv skill, not nm since its in turbo mode.

Share this post


Link to post
noshutdown said:

for detailed calculation, i believe that some more info is needed:

how soon/often does it decide to attack since it has me in sight?(already alerted, so no wake up time needed)
how soon/often does it decide to attack since it entered pain status?
and i mean playing on uv skill, not nm since its in turbo mode.

This is non-trivial to explain, and even harder to calculate, so that I will only try the former (explain) and somebody else can try the latter (calculate).

Detailed technical explanations:

Spoiler

Here is the first part of ranged attack logic inside Chase function, which is a standard monster walking function and the only place from which a ranged attack can be called. Even though the Archvile uses VileChase, VileChase actually handles just the resurrection logic and then simply calls Chase too.

    // check for missile attack
    if (actor->info->missilestate)
    {
	if (gameskill < sk_nightmare
	    && !fastparm && actor->movecount)
	{
	    goto nomissile;
	}
	
	if (!P_CheckMissileRange (actor))
	    goto nomissile;
	
	P_SetMobjState (actor, actor->info->missilestate);
	actor->flags |= MF_JUSTATTACKED;
	return;
    }
"movecount" is a property that is being decreased by 1 in the abovementioned "nomissile" block, except under certain circumstances in a netgame.
  nomissile:
    
    [...] // (netgame only)
    
    // chase towards player
    if (--actor->movecount<0
	|| !P_Move (actor))
    {
	P_NewChaseDir (actor);
    }
"movecount" is set inside P_TryWalk when P_Move is successful. "P_Random()&15" means that a random number between 0 and 15 will be generated.
boolean P_TryWalk (mobj_t* actor)
{	
    if (!P_Move (actor))
    {
	return false;
    }

    actor->movecount = P_Random()&15;
    return true;
}
P_TryWalk is called from within P_NewChaseDir. P_NewChaseDir is called either from the abovementioned "nomissile" block in Chase function (but only if movecount is <0 or the monster cannot move in its current direction), or before it (also in Chase function) in a block of code that prevents the monster from attacking right after it already attacked (thanks to MF_JUSTATTACKED which is set in the missile attack block of code, the first code I posted here).
// do not attack twice in a row
    if (actor->flags & MF_JUSTATTACKED)
    {
	actor->flags &= ~MF_JUSTATTACKED;
	if (gameskill != sk_nightmare && !fastparm)
	    P_NewChaseDir (actor);
	return;
    }
Okay, let's say that "movecount" is 0 now. Will the monster attack? No, first it will call P_CheckMissileRange (in the ranged attack code I posted at the top of this post), which can abort the attack under many different conditions:
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 (dist > 200)
	dist = 200;
		
    [...]
		
    if (P_Random () < dist)
	return false;
		
    return true;
}
As you can see, it depends on line-of sight check, distance from target, presence of MF_JUSTHIT flag (which is set every time when the monster enters pain state), and of course random numbers. That's rather many factors to take into an equation. And this is why I'm not even attempting to do so.

Summary of the important facts:
Spoiler

-"movecount" is set to a random number between 0 and 15 each time the monster tries to change direction or right after it attacks.
-ranged attack can be attempted only when "movecount == 0", otherwise "movecount" is decremented
-the first time Chase is called after the monster attacks, the monster cannot immediately perform another missile attack (and also randomizes "movecount").
-when ranged attack is finally attempted, it can still be aborted from P_CheckMissileRange due to many complex factors, which is why it's difficult to calculate precise probabilities and why I'm not going to do it

Share this post


Link to post
noshutdown said:

10/256 chance of breaking? did you forget that a ssg shot has 20 pellets or something?


Damn, I knew I forgot something ΧD

Well, even in this case (using that 55% figure you quoted at the beginning) the probability of it flinching exactly once in 4 shots in a row is merely 20% (4*0.55*(0.45^3)), and the chance of that one flinching being at a specific position is merely 5%. This apparent "paradox" of a much greater pain chance due to 20 pellets leading to only marginally better chances, is because we calculated for it to happen exactly once. What we're really interested in however, is that pain occurs in such a position that archie doesn't get a chance to complete its attack. We mustn't get two "painless" SSG attacks in a row before archie dies, or we get blasted in the face.

So, the possible outcomes are (X marks pain, O marks non-pain):

OOOO -> BAD
OOOX -> BAD
OOXO -> BAD
OOXX -> BAD
OXOO -> GOOD
OXOX -> GOOD
OXXO -> GOOD
OXXX -> GOOD
XOOO -> BAD
XOOX -> BAD
XOXO -> GOOD 
XOXX -> GOOD
XXOO -> GOOD (only because archie dies by the 4th shot, by now)
XXOX -> GOOD
XXXO -> GOOD
XXXX -> GOOD
If there are two "O"s in a row (OO) we get blasted in the face by archie, UNLESS the OOs are the last two attacks (archie dies before delivering the attack)

So...that's actually 10 positive outcomes out of 16, but not all of them have an equal chance of happening. I'll focus only on the 6 "bad" ones
OOOO = 4.1%
OOOX = 5.01%
OOXO = 5.01%
OOXX = 6.12%
XOOO = 5.01%
XOOX = 6.12%
So, "bad" outcomes are 31.38%. This means, if as soon as you see archie you start blasting in its face, you have a 68.62% chance of killing it unscathed, if your timing is perfect and you don't miss a shot.

Hmm....incidentally, that 68.62% figure was also cited in the wiki, somewhere, related to breaking archviles attacks ;-)

Share this post


Link to post

Regardless of statistics, I think it is telling that the best players don't go for this strat. They'll usually take 2 SSG shots at most and then head for cover; sometimes only one.

Share this post


Link to post

If you're trying to justify a situation in a map you're making with this math, you could also try including a chain gunner in the map. They have a pretty valuable side effect of softening an archvile encounter with a short moment of infighting.

Share this post


Link to post

I think that these sort of analyses are marginally useful for what is considered "normal" Doom gameplay anyway -how often a player is really expected to directly fight a tough monster one-on-one in close quarters?

The archvile is really an anomalous situation because of the delayed attack, making a head-on, forced, direct confrontation a barely possible, luck-based affair. It might be OK if it happens maybe once in a map -and the player is given the means to recover from the damage he will almost certainly suffer, or to survive at least one attack, e.g. supply armor + soulsphere before the encounter-, but an entire map where this is a normal occurence? Meh.

In fact, I wonder how much the ability for a player to master the controls to the point of "dueling" efficiently with almost every monster is considered essential, outside of special categories like Tyson-style, or how well a "good" player is supposed to hold his own in a fight without cover + running opportunities.

Share this post


Link to post

I regularly kill arch-viles with the super shotgun, I just need the right timing (and a few luck).

Share this post


Link to post

Well, if there's anything to keep as valuable advice from these calcs, is that if the archvile flinches at the second shot, then it's "safe" (assuming you don't screw up the timing or miss) to just keep holding fire and deliver the other two shots necessary to kill to it. This is also the fastest possible way of killing it with the SSG. Anything else requires taking cover or a hit.

Share this post


Link to post
Maes said:

Well, if there's anything to keep as valuable advice from these calcs, is that if the archvile flinches at the second shot, then it's "safe" (assuming you don't screw up the timing or miss) to just keep holding fire and deliver the other two shots necessary to kill to it.

I don't think it's true. Imagine the worst scenario: Right after flinching, the Archvile goes through 10 tics of pain, then 2 tics of Chase (mandatory 1 step before he can attack again), then 66 tics of attack preparation, then finally deal damage to the player. It's 78 tics in total. Now, the super shotgun needs 51 tics to reload, and this time starts counting from the very moment when the Archvile flinched, because it's the SSG's instant hitscan that caused him to flinch. 51 tics can fit into 78 tics only once. Therefore, if the flinch-inducing SSG shot was only the 2nd one, then only one next shot (3rd one) could be safely fired into the Archvile. But if this shot didn't cause him pain, then the Archvile would hurt the player before he would reload his SSG again to fire the 4th shot.

Share this post


Link to post

Then I guess that only attack sequences with a "*XX*" pattern are any good to the daring player, and there's only 4 of them on 16 possible outcomes.

Still...that changes nothing for what regards the final corollary, IMO: if you're really forced into an inescapable "face off" with an archvile and no cover, then just keeping firing away with the ssg is your best chance, and even that gives you just a 25% chance of surviving unscathed.

If you try to do anything else like delaying your shots, trying to catch a specific moment, or worse, miss, you'll only make things worse for yourself.

Share this post


Link to post

Actually, situation "OOX*" gives you a high (even if not 100%) chance of not getting hit, too. It's because since the Archvile doesn't enter pain state after the 1st shot ("O"), he will not be compelled by MF_JUSTHIT flag to retaliate soon, therefore he will likely not start attacking until player's SSG at least almost reloads. Then the player will be able to fire next 2 shots before being hit.

True, it's not absolutely safe. EDIT: In practice, looks like it's not safe at all, after all. :/

Share this post


Link to post
scifista42 said:

I don't think it's true. Imagine the worst scenario: Right after flinching, the Archvile goes through 10 tics of pain, then 2 tics of Chase (mandatory 1 step before he can attack again), then 66 tics of attack preparation, then finally deal damage to the player. It's 78 tics in total. Now, the super shotgun needs 51 tics to reload, and this time starts counting from the very moment when the Archvile flinched, because it's the SSG's instant hitscan that caused him to flinch. 51 tics can fit into 78 tics only once. Therefore, if the flinch-inducing SSG shot was only the 2nd one, then only one next shot (3rd one) could be safely fired into the Archvile. But if this shot didn't cause him pain, then the Archvile would hurt the player before he would reload his SSG again to fire the 4th shot.

relaunch attack 12 tics after entering pain, thats very useful info.

Share this post


Link to post

So, a good strategy for a speedy kill would be (assuming that you have cover), to go for two hits no matter what, and if the second one causes pain, then go for another one, or else GTFO. If that 3rd shot causes pain too, go for a 4th and finish the scumbag in complete safety, otherwise, well....GTFO.

Now, if you are really pitted in a situation where you cannot run for cover, well....let's hope that the archvile doesn't start attacking as soon as it sees you.

Share this post


Link to post
Maes said:

So, a good strategy for a speedy kill would be (assuming that you have cover), to go for two hits no matter what, and if the second one causes pain, then go for another one, or else GTFO. If that 3rd shot causes pain too, go for a 4th and finish the scumbag in complete safety, otherwise, well....GTFO.

Now, if you are really pitted in a situation where you cannot run for cover, well....let's hope that the archvile doesn't start attacking as soon as it sees you.

if the archie starts attacking right after it sees you, it would be too late to run for cover after you have fired 2 load, so keep an eye on when it starts attacking.

Share this post


Link to post

Well, all that can come out of this analysis is maybe an optimal technique for getting UV-MAX on a map such as Plutonia MAP11 (Hunted), or the occasional shaved second in a more varied map (if the player is willing/able to risk some damage to himself). But I'm sure speedrunners were already familiar with it via experience, they didn't wait 2015 for someone to nerd over it :-p

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
×