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

Making Pain Elementals resurrectable

Recommended Posts

I'm currently making a WAD called "Elemental Pain" for ZDoom so I was just how do you make PEs resurrectable by Archviles? Thanks in advance.

Share this post


Link to post

I guess PEs can't be resurrected because they don't leave a corpse.
If this is true all you need to do is change the duration of the last state in the death sequence to "-1".

so the death sequence will look like:

Death:
PAIN H 8 bright
PAIN I 8 bright A_Scream
PAIN JK 8 bright
PAIN L 8 bright A_PainDie
PAIN M -1 bright
stop

Again I don't know if this'll really work, but I guess it will; I didn't test it.

Share this post


Link to post

Yes, that should work (in DEHACKED or DECORATE - different syntax, but same principle). The PE already has respawn frames defined for it, so if it was revived by an archvile it would use them.

The only problem I can see is the PE's death animation looks like an explosion - the last frame of which would look crap just sitting there not moving. I'd suggest creating new graphics for it or making the corpse use an invisible sprite. That way, the bodies would still be lying around but only the archvile would know where they were. :D

Share this post


Link to post

AFAIK enemies have various "states" such as idle, walk, attack, hurt, death, etc. and one of those states is the resurrection. I don't know for sure, but it seems like a resurrection state would need to be added. Not sure about ports.

I'm only familiar with this because Millennium had a problem related to this years ago. We had an alternate/beefed-up demon which, when resurrected, would turn into a regular demon and walk around as a regular demon until it entered a different state (attacked or got attacked), at which point it would turn back into the new demon. Turns out the resurrection state just used the wrong sprites.

[edit]Of course, Grazza and Enjay could post better answers while I was writing this.

Share this post


Link to post

Yes, that should work (in DEHACKED or DECORATE - different syntax, but same principle). The PE already has respawn frames defined for it, so if it was revived by an archvile it would use them.

Got an alternate question about that.

Can I turn dehacked files (either for Doom, Heretic or Hexen) into DECORATE stuff for ZDoom based ports into WAD themselves so I no longer need to run dehacked things ? Will it be easy, or will I get some headaches matching dehacked syntax with DECORATE ones ?

Share this post


Link to post

In case you were wondering, I'm not aware of any automatic conversion programs. The idea has been mentioned a few times but I'm pretty sure it hasn't been done.

As for actually doing it, well I've certainly done it. After a bit of learning, I find the syntax of DECORATE much easier to work with than DEHACKED - either the program itself or editing the DEH file directly. For a start, all the definitions for a single actor: its properties, frames, code pointers, whatever, are all together rather than spread through different sections. For me, the hardest part of converting a DEHACKED monster to a DECORATE one was picking back through the DEH file to figure out what I had done in the first place.

As for Heretic and Hexen - well Zdoom doesn't support HHE or HEX patches, so the only way to do it is via DECORATE anyway (unless you've been messing with a DEHSUPP lump with imported actors in Doom).

There are a handful of things that cannot be done with DECORATE that you may still need to use DEHACKED for and there are a few special cases of code that cannot be duplicated in DECORATE. However, these problems are becoming fewer and fewer all the time.

Share this post


Link to post

swap the frames in dehacked. you can switch with say the hellknight.
you could play around enough for it to look respectable.

Share this post


Link to post

on a similar note, what about the lost soul? it seems pretty determined to explode and i cant get it to just drop a corpse.

Share this post


Link to post

Lost souls can be made to leave a corpse (with a suitable crusher), but I think the lack of respawn frames is the problem. You might also need to make it (via dehacked) so lost souls count towards the kill % (not sure - haven't tested, and might apply just to respawning, if anything), but that's not enough on its own.

Share this post


Link to post

If he's using Zdoom, lost souls will already count as kills.

Also, I know this is in Zdoom - not sure about other ports - Lost Souls have a specific piece of code to stop them falling when they are killed. To nullify this in dehacked, you have to use a port that has support for a pointer that sets gravity and use it in the death sequence after the special code has been executed.

You could I.D. swap the Lost Soul with something else, but that would probably mess up the PE too.

Share this post


Link to post

Enjay said:
If he's using Zdoom, lost souls will already count as kills.

Really? How does that work? Does it not apply to ones spawned by pain elementals, adjust the total monster count, not care and let kills go over 100%, or some other way that hasn't occurred to me?

Also, I know this is in Zdoom - not sure about other ports - Lost Souls have a specific piece of code to stop them falling when they are killed.

That's true of all ports and the original game as far as I recall. In fact I always felt it was a bit of an inconsistency that pain elementals fall out of the air when they die, as they have a similar gaseous death to their children...

Share this post


Link to post
RjY said:

Really? How does that work? Does it not apply to ones spawned by pain elementals, adjust the total monster count, not care and let kills go over 100%, or some other way that hasn't occurred to me?


It applies to all Lost Souls, including ones spawned by pain elementals. They are added to the kill total - each new LS increases the possible kill total by one. This is also the case for other monsters spawned by scripts, brought back by archviles or spawned by the Icon of Sin. So, the kill count should never go above 100%.

A similar situation exists for items. Any items that count towards the item total that get spawned during a game get dynamically added to the item count total during play.

RjY said:

That's true of all ports and the original game as far as I recall. In fact I always felt it was a bit of an inconsistency that pain elementals fall out of the air when they die, as they have a similar gaseous death to their children...


But I'm not sure if the coding of it is the same in all ports. In Zdoom, a monsters death automatically removes any nogravity flag that may be present. However, the lost soul has a special little bit of code to stop this happeneing. I'm not sure if all ports do it that way.

Share this post


Link to post
Enjay said:

But I'm not sure if the coding of it is the same in all ports. In Zdoom, a monsters death automatically removes any nogravity flag that may be present. However, the lost soul has a special little bit of code to stop this happeneing. I'm not sure if all ports do it that way.



The code comes from the original Doom source. ZDoom has changed the check for Lost Souls into a check for a flag to avoid a type specific behavior that can't be changed. But this flag is not accessible through Dehacked - only DECORATE.

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
×