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

Alternate/Gib deaths by Ghastly - how to implement?

Recommended Posts

Hey guys, I just found this thing:
https://realm667.com/index.php/en/sfx-shoppe-mainmenu-139-58855/95-other/1250-alternate-gib-deaths#description

Turns out it's packaged in separate WADs though, and Doom won't load a zip or pk3 package containing all of them. How do I go about implementing them directly and playing the game using them? 

Yes, I do know most currently celebrated graphical mods such as Beautiful Doom or Smooth doom contain most if not all of the data here, but I'm still interested for curiosity's sake.

Share this post


Link to post
Posted (edited)

You have to copy the sprites and DECORATE definition over and write the DECORATE code so the monsters replace their base versions.

I chose to use all the variants for each monster, so I'll rewrite the pinky code for you to use as an example.

Actor Pinky2 : Demon replaces Demon
{
 GibHealth 100 //The monster's health must be reduced to this much below zero to cause the XDeath state
 States
 {
  Death:
  SARG A 0 A_Jump (256, "Death1", "Death2") //This will choose one of these two states at random
  stop
  Death1:
   SARG I 8
   SARG J 8 A_Scream
   SARG K 4
   SARG L 4 A_NoBlocking
   SARG H 4
   SARG N -1
   Stop
  Death2:
   SAAR A 8
   SAAR B 0 A_FaceTarget
   SAAR B 0 A_SpawnItemEx ("DemonArm", 10, 0, 32, 0, 8, 0, 0, 128)
   SAAR B 8 A_Scream
   SAAR C 4
   SAAR D 4 A_NoBlocking
   SAAR E 4
   SAAR F -1
   Stop
  XDeath:
   SARG O 5
   SARG P 5 A_XScream
   SARG Q 5 A_NoBlocking
   SARG RSTUV 5
   SARG W -1
   Stop
 }
}

You'll have to move it over into your own wad to make it actually work, and you may need to do some tweaking and sprite renaming (the baron comes to mind) to make it work properly, but that should explain how to do it. The others are the same way.

If you only want to use the one, you will have to copy the altered death state over to a new actor that replaces itself, like this:

Actor Pinky2 : Demon replaces Demon
{
 States
 {
  Death:
   SAAR A 8
   SAAR B 0 A_FaceTarget
   SAAR B 0 A_SpawnItemEx ("DemonArm", 10, 0, 32, 0, 8, 0, 0, 128)
   SAAR B 8 A_Scream
   SAAR C 4
   SAAR D 4 A_NoBlocking
   SAAR E 4
   SAAR F -1
   Stop
 }
}

 

Edited by Aquila Chrysaetos

Share this post


Link to post
2 hours ago, Aquila Chrysaetos said:

 


  Death:
  SARG A 0 A_Jump (256, "Death1", "Death2") //This will choose one of these two states at random
  stop
  Death1:
   SARG I 8
   SARG J A_Scream
   SARG K 4
   SARG L 4 A_NoBlocking
   SARG H 4
   SARG N -1
   Stop
  Death2:
   SAAR A 8
   SAAR B 0 A_FaceTarget
   SAAR B 0 A_SpawnItemEx ("DemonArm", 10, 0, 32, 0, 8, 0, 0, 128)
   SAAR B 8 A_Scream
   SAAR C 4
   SAAR D 4 A_NoBlocking
   SAAR E 4
   SAAR F -1
   Stop

 

 

A simpler method:

  Death:
   SARG I 8 A_Jump (128, "AltDeath")
   SARG J A_Scream
   SARG K 4
   SARG L 4 A_NoBlocking
   SARG H 4
   SARG N -1
   Stop
  AltDeath:
   SAAR A 8
   SAAR B 0 A_FaceTarget
   SAAR B 0 A_SpawnItemEx ("DemonArm", 10, 0, 32, 0, 8, 0, 0, 128)
   SAAR B 8 A_Scream
   SAAR C 4
   SAAR D 4 A_NoBlocking
   SAAR E 4
   SAAR F -1
   Stop

Instructions are executed when the state is entered, so if it does the jump in SARG I 8 then it will not stay in that state for even one tic, let alone all eight. If it doesn't jump, then the eight tics are run in SARG I, and it continues on to SARG J as normal.

Share this post


Link to post
Posted (edited)

Wow, cool, I didn't know that could be done that way. I'd just been doing it that way because it made sense to me.

That's something I'll have to keep in my pocket, figuratively speaking.

I also just noticed I forgot to type a duration for the SARGJ0 frame.

I fixed it.

Share this post


Link to post

That's quite interesting. Looks hard to do though. Where do I even put this code?

Share this post


Link to post

So I can't really use it with regular IWADs, can I?

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
×