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

Question regarding archie behaviour

Recommended Posts

On some levels I notice that occasionally Arch Viles will run around not raising anything even though there are plenty of dead monsters within their vicinity. This is especially noticeable when Archies teleport into an already cleared area, they seem to sometimes raise just a couple of monsters, even when the floor is littered with corpses. Sometimes, it is only when the player returns to that area that the archie begins seriously raising things.

I looked up the archie decorate script on wiki and there doesn't seem to be anything there that would account for this behavior (though I am hardly an expert with scripting/decorate etc)

Is there any vanilla imposed limit on the archvile? (like, say the 20 lost soul limit on a level) For example how many monsters one archvile can raise, or proximity/visibility to the player while raising? Or the total number of monsters that can be raised by any number of archviles on a particular level?


Any thoughts welcome.

Share this post


Link to post

No, no limit. But the Arch-Vile doesn't actively seek corpses. It just resurrects them if it encounters one on its path. It also doesn't raise them if they would be blocked by other things or walls.

Share this post


Link to post

There are two elements to the arch-vile's damage.

The jump up into the air does 20 points of damage to the target.

There is also splash/blast/radius damage. The centre of this blast is on a line between the arch-vile and the intended target (I think the blast is 80 but the epicentre is 17 units away from the target, but I could be wrong). Anyway, this tends to do a further 63 points of damage, for an overall total of 83.

Note that with this being splash damage, it harms not just the intended target, but anything within the blast radius that is susceptible to splash damage.

Sometimes the splash damage has no effect, and so the target only takes 20 damage. (There are some demos where this is deliberately expolited.) This is if the blast occurs in a void, or a sector with a "safe" reject, and it seems in certain other cases - on a vertex I think, but one would want to research that further before making a definite claim.

Share this post


Link to post
Graf Zahl said:

It also doesn't raise them if they would be blocked by other things or walls.


Do dead bodies count as other things? Meaning the Archvile won't resurrect overlaid corpses. If so, this could account for Kyka's scenario.

Share this post


Link to post

Arch-viles do resurrect overlaid corpses, as you put it, because a corpse is non-blocking and an arch-vile can only raise one at a time.

However, it is true that they don't show much zeal for their resurrection work.

Share this post


Link to post

The blast radius damage is 70, but yes only 63 (besides the default 20 damage) happens against the targeted object.

Note: the archvile is not limited to resurrecting corpses. It can resurrect any thing whose sprite reached a -1 tic state and which has a resurrection state available.

Share this post


Link to post

printz said:
Note: the archvile is not limited to resurrecting corpses. It can resurrect any thing whose sprite reached a -1 tic state and which has a resurrection state available.

This seems wrong. Testing, I set the tall red torch to have a fourth frame with a duration of -1 and gave it resurrection frame 203. The arch-vile did nothing to the torches by the door in level 20. Then I made them shootable, gave them death frame 934 and only 10 hit points. I killed them and the arch-vile resurrected them.

Share this post


Link to post

I wonder what steps would need to be taken to make already dead corpses come back to life when an archvile is near. You could have its idle state lead to the death state and it should be ressurrectable as long as all of it's states are set up correctly. Problem is, if you die, so does it (because it will go back to it's idle states). That might be kinda cool now that I think about it, heh.

Share this post


Link to post

EarthQuake said:
I wonder what steps would need to be taken to make already dead corpses come back to life when an archvile is near. You could have its idle state lead to the death state and it should be ressurrectable as long as all of it's states are set up correctly.

If you mean by applying the dead body mode (such as from code pointer 166080), these things are ignored by the arch-vile. Apparently they have to be killed during play by being reduced to 0 hit points, wherein the death state is called.

Share this post


Link to post

No I mean setting it's idle state so that it immediately goes to the death state, instead of looping through the idle state until it is awakened. The monster would die as the level loads (probably a good idea to place it far away from the player start).

Share this post


Link to post

That's impossible through DeHackEd. You can't force a state except by external means, such as an explosion effect to kill the monsters as far as death is concerned.

The state is not the set of frames that includes the dead mode pointer. Those are simply assigned to it so the monster will behave as required when killed.

If you make the second idle frame go to the first dead frame (or simply use the first death frame as the first idle frame). The monster will fall and "die" at the start of the game (except maybe if it is awakened before the third frame is reached, in the first option). This monster is not really dead and cannot be resurrected because the death state was never applied to it, only the dead mode code pointer assigned to the death frames.

Share this post


Link to post

Hmm. Interesting...

So there are additional things set when a monster dies, outside the scope of DeHackEd? I'm sure there is a way around that, probably not a vanilla compatible option, but this idea needs to be explored in other ports. Imagine a map with dead monsters, and the only thing unleashed upon you are some archviles. That would be creepy...

Can anyone peek at the code and determine the prerequisites for resurrecting a monster?

Share this post


Link to post

myk's post gives me an idea of how this could be done. You could create a special type of monster that A_Explodes in its first idle frame (multiple times if necessary), killing itself. As long as you don't have them spawn near the player or any other monsters, you should then have what appears to be a resurrectable corpse.

Alternately, you might be able to use explosions (either from crushing barrels or a dehacked object that just loops A_Explode) to simultaneously kill monsters while pushing them through teleport lines, to place their corpses in the desired locations on the map. That way would require more work to set up each corpse in the map, but would allow for different types of corpses to be resurrected while only using one dehacked slot, for the explosion-generating thing.

Share this post


Link to post

Very doable in ZDoom - a scripted Thing_Destroy (0,0); once the maps loaded then spawn some archies.

Share this post


Link to post
EarthQuake said:

Can anyone peek at the code and determine the prerequisites for resurrecting a monster?

With pleasure :) To sum up PIT_VileCheck in p_enemy.c:

  • is it a corpse (does it have the corpse flag set - this is set by P_KillMobj)
  • is it still moving (tics == -1, as printz said)
  • does it have a raise state at all, again as printz said
  • then after that some distance and position checks.
The latter checks are what causes the monster's apparent reluctance to resurrect freely - the distance check means the corpse has to be within a few units of the vile (actually determined by its speed) but it can't actually be standing on it or the position check will fail.

myk, if you've still got your test wad, try setting the corpse flag on the torch. I think dehacked calls it something like 'sliding helpless'. printz wasn't wrong, he just missed that part.

esselfortium said:

Alternately, you might be able to use explosions (either from crushing barrels or a dehacked object that just loops A_Explode) to simultaneously kill monsters while pushing them through teleport lines, to place their corpses in the desired locations on the map.

Indeed, there's a map in Memento Mori which does exactly this.

Share this post


Link to post
printz said:

The blast radius damage is 70, but yes only 63 (besides the default 20 damage) happens against the targeted object.

The damage can be slightly more or less depending on which direction with respect to the flames you are running and how fast, since it's the flames Thing that explodes. The flame resets itself directly in front of you every 4 tics or so, which means that you can change the set distance between yourself and the flame (17 units or so) at most by [running speed x 4 tics] distance. This little distance (at most 3 units or so) is the reason for the small damage deviations while running.

So, if you're at 81 health, you might just survive an Archie's blast by running backwards REAL fast!

Share this post


Link to post
RjY said:

Indeed, there's a map in Memento Mori which does exactly this.


There was a map in Kama Sutra which also did this. Don't remember which one though.

Share this post


Link to post

RjY said:
myk, if you've still got your test wad, try setting the corpse flag on the torch. I think dehacked calls it something like 'sliding helpless'.

I see, though after testing with imps in level 20 it doesn't appear to be very useful (in plain DeHackEd, at least). The corpse is still an obstruction, and if the obstruction flag is removed you get a monster other things can move through. In multiplayer or while infighting away from the player these monsters immediately go to their dead frame when they kill their target (EarthQuake had noted this above). Also, if you shoot the "corpse" it becomes activated because the pain state is called (or it dies, where you see the corpse go through the dying or exploding frames).

Share this post


Link to post

How did Batman Doom and Action Doom do this? Killer Croc/The Box Slug both "picked up and threw" things at you (IE, resurrected a dead "enemy" that flies toward you and dies when it awakes).

Share this post


Link to post
david_a said:

How did Batman Doom and Action Doom do this? Killer Croc/The Box Slug both "picked up and threw" things at you (IE, resurrected a dead "enemy" that flies toward you and dies when it awakes).


I've always wondered this too. Maybe things just start to work right when the team behind them is amazing.

Share this post


Link to post

If I read the thread more carefully I would have probably noted that it appears to have been solved. Batman Doom got around the issues since Killer Croc's rocks (heh) don't have to behave anything like a real enemy so it doesn't matter if you can walk through them.

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
×