Gibbing For The Arachnotron and large monsters?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
ARScplrd420
Posts: 5
Joined: Mon May 31, 2021 9:42 pm
Graphics Processor: Intel (Modern GZDoom)

Gibbing For The Arachnotron and large monsters?

Post by ARScplrd420 »

Hi im a beginner on doom modding, i would like you ask you a question about is is possible to gib bigger demons other than zombies and imps?

I was experimenting some monsters from realm667 that i wanted to try about new ai states and looked some of the pages of the the Zdoom wiki for a huge reference, Meanwhile i was modify a custom arachnotron and i wanted to make it to have a XDeath State (the state where they became gibbed)
however i added the xdeath state and gib sprites copied from the zombieman but it did'nt have no effect:

Code: Select all

actor test1 : Arachnotron
{
  Obituary "%o was toasted by an augmented arachnotron."
  Health 1000
  Radius 64
  Height 64
  Mass 600
  Speed 14
  Scale 1.2
  PainChance 128
  MeleeRange 256
  BloodColor "bf af 20"
  SeeSound "baby/sight"
  PainSound "baby/pain"
  DeathSound "baby/death"
  ActiveSound "baby/active"
  Dropitem "Chaingun"
  
  States
  {
//shortened for clearer explanation//
  Death:
    BSP2 J 20 A_Scream
    BSP2 K 7 A_NoBlocking
    BSP2 LMNO 7
    BSP2 P -1
    Stop
  XDeath:
	BSP2 QQ 5
    BSP2 RR 5 A_XScream
    BSP2 SS 5 A_NoBlocking
    BSP2 TT 5
    BSP2 UU -1
    Stop
  Raise:
    BSP2 PONMLKJ 5
    Goto See+1
There was the bolognese mod by SGTMarkiv which improves the gore and can gib huge monsters but as a beginner, it's to complicated to compile huge amount of code and file functions just to fit for one function for a single monster

So help me out on modding for gibbing on huge monsters!
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: Gibbing For The Arachnotron and large monsters?

Post by Gez »

The thing is that by default, Doom monsters get gibbed when their health is reduced to less than the negative amount of their starting health.

So, in your case, the test arachnotron has a health of 1000. You need to get its health down to -1000. Since monsters stop taking damage once they're dead, that means that the killing blow must deal more than 1000 points of damage. Note that weapons like the BFG-9000, that can do enough damage to one-hit a spider mastermind, actually do several separate attacks at once -- that's why they can kill a whole crowd of monsters. So there's no weapon that can deal that many damage in one single go.

The console command mdk kills whatever is in your crosshair by inflicting absolutely ludicrous damage. So you can use that to test that your custom monster does get to the XDeath state when it's dealt enough damage.

Something you can do is give your monster the [wiki=Actor_properties#GibHealth]GibHealth[/wiki] property to make it easier to gib. For example, if you give it GibHealth -100, then the killing blow only needs to do 100 damage + however many hit points the monster still had. If you give it GibHealth -1, then nearly every death will be an XDeath.
User avatar
Enjay
 
 
Posts: 26945
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Gibbing For The Arachnotron and large monsters?

Post by Enjay »

And just to add to what Gez said, you can also modify weapons to force them to cause XDeaths (or other damage-specific deaths). So you could, for example, modify the arachnotron to give it an XDeath and modify the BFG projectiles to make them do extreme damage. As a result, the BFG would gib arachnotrons (and any other monster with an XDeath state sequence) but other weapons would not.
ARScplrd420
Posts: 5
Joined: Mon May 31, 2021 9:42 pm
Graphics Processor: Intel (Modern GZDoom)

Re: Gibbing For The Arachnotron and large monsters?

Post by ARScplrd420 »

Gez wrote:The thing is that by default, Doom monsters get gibbed when their health is reduced to less than the negative amount of their starting health.

So, in your case, the test arachnotron has a health of 1000. You need to get its health down to -1000. Since monsters stop taking damage once they're dead, that means that the killing blow must deal more than 1000 points of damage. Note that weapons like the BFG-9000, that can do enough damage to one-hit a spider mastermind, actually do several separate attacks at once -- that's why they can kill a whole crowd of monsters. So there's no weapon that can deal that many damage in one single go.

The console command mdk kills whatever is in your crosshair by inflicting absolutely ludicrous damage. So you can use that to test that your custom monster does get to the XDeath state when it's dealt enough damage.

Something you can do is give your monster the [wiki=Actor_properties#GibHealth]GibHealth[/wiki] property to make it easier to gib. For example, if you give it GibHealth -100, then the killing blow only needs to do 100 damage + however many hit points the monster still had. If you give it GibHealth -1, then nearly every death will be an XDeath.
Thanks for that!, i've set up gibhealth and it works, but here's a problem, it cannot complete it's gib animation, the arachnotron gets gibbed but it shown some the frames which couldn't do its final animation
shown here:

Code: Select all

Xdeath:
    BSP2 N 5
	BSP2 O 5 A_XScream
	BSP2 P 5 A_NoBlocking
	BSP2 ST 5 // What is this????//
	Stop
I still don't get it about the multiples ABCDEFG frames in one line of code, can you explain how it works?
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: Gibbing For The Arachnotron and large monsters?

Post by Gez »

ARScplrd420 wrote:I still don't get it about the multiples ABCDEFG frames in one line of code, can you explain how it works?
Basically, they're a way to shorten similar code.

Suppose you have this code:

Code: Select all

	STUF A 5 A_Stuff
	STUF B 5 A_Stuff
	STUF C 5 A_Stuff
	STUF D 5 A_Stuff
	STUF E 5 A_Stuff
	STUF F 5 A_Stuff
	STUF G 5 A_Stuff
	STUF H 5 A_Stuff
	STUF I 5 A_Stuff
	STUF J 5 A_Stuff
	STUF K 5 A_Stuff
	STUF L 5 A_Stuff
	STUF M 5 A_Stuff
	STUF N 5 A_Stuff
	STUF O 5 A_Stuff
	STUF P 5 A_Stuff
	STUF Q 5 A_Stuff
	STUF R 5 A_Stuff
	STUF S 5 A_Stuff
	STUF T 5 A_Stuff
	STUF U 5 A_Stuff
	STUF V 5 A_Stuff
	STUF W 5 A_Stuff
	STUF X 5 A_Stuff
	STUF Y 5 A_Stuff
	STUF Z 5 A_Stuff	
All of these states are identical, except for the frame. Same sprite name (STUF), same duration (5), same instruction (A_Stuf -- this function doesn't actually exist by the way, it's just for example). It takes a lot of room for not much. Well, how about making it smaller and simpler?

Code: Select all

	STUF ABCDEFGHIJKLMNOPQRSTUVWXYZ 5 A_Stuff
This is exactly the same code, but much more compact.

In other words, when you have:

Code: Select all

   BSP2 ST 5
It works exactly the same as if you had:

Code: Select all

   BSP2 S 5
   BSP2 T 5
ARScplrd420
Posts: 5
Joined: Mon May 31, 2021 9:42 pm
Graphics Processor: Intel (Modern GZDoom)

Re: Gibbing For The Arachnotron and large monsters?

Post by ARScplrd420 »

Gez wrote:
ARScplrd420 wrote:I still don't get it about the multiples ABCDEFG frames in one line of code, can you explain how it works?
Basically, they're a way to shorten similar code.

Suppose you have this code:

Code: Select all

	STUF A 5 A_Stuff
	STUF B 5 A_Stuff
	STUF C 5 A_Stuff
	STUF D 5 A_Stuff
	STUF E 5 A_Stuff
	STUF F 5 A_Stuff
	STUF G 5 A_Stuff
	STUF H 5 A_Stuff
	STUF I 5 A_Stuff
	STUF J 5 A_Stuff
	STUF K 5 A_Stuff
	STUF L 5 A_Stuff
	STUF M 5 A_Stuff
	STUF N 5 A_Stuff
	STUF O 5 A_Stuff
	STUF P 5 A_Stuff
	STUF Q 5 A_Stuff
	STUF R 5 A_Stuff
	STUF S 5 A_Stuff
	STUF T 5 A_Stuff
	STUF U 5 A_Stuff
	STUF V 5 A_Stuff
	STUF W 5 A_Stuff
	STUF X 5 A_Stuff
	STUF Y 5 A_Stuff
	STUF Z 5 A_Stuff	
All of these states are identical, except for the frame. Same sprite name (STUF), same duration (5), same instruction (A_Stuf -- this function doesn't actually exist by the way, it's just for example). It takes a lot of room for not much. Well, how about making it smaller and simpler?

Code: Select all

	STUF ABCDEFGHIJKLMNOPQRSTUVWXYZ 5 A_Stuff
This is exactly the same code, but much more compact.

In other words, when you have:

Code: Select all

   BSP2 ST 5
It works exactly the same as if you had:

Code: Select all

   BSP2 S 5
   BSP2 T 5
Thanks for the explanation, but there is something off my chest about there a problem regarding the spritings of the gib animations
I've replace the zombieman gibs into my customized gibs for the arachnotron as shown here:
Spoiler:
and replaced with special sprite code called BSPX for gibbing due to lack of enough space of the sprite animaion sequence
and then it happened, i've typed mdk on the console and the arachnotron vanished instead of gibbing
Spoiler:
I've tried renaming back to BSP2 and switch the ABCD format into the contining TUVWX sequence but still doesn't work, here is the code:
Spoiler:
Could you help me for fixing this?
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: Gibbing For The Arachnotron and large monsters?

Post by Gez »

Without knowing precisely how the sprites are named (you said you replaced the zombieman gib sprites, so are they named POSS ?) and seeing the full code to check if they match, I can't help you further. Usually when an actor is invisible and it's not deliberate, that means the sprites are not found. Another possibility is if the sprite offsets aren't set, then the monster's sprite is "below the ground and to the right" and it's clipped by the floor geometry so you can't see it.
ARScplrd420
Posts: 5
Joined: Mon May 31, 2021 9:42 pm
Graphics Processor: Intel (Modern GZDoom)

Re: Gibbing For The Arachnotron and large monsters?

Post by ARScplrd420 »

Sorry to hear about that but i've fixed with the sprite's offset position in SLADE's Sprite Editor by centering it in sprite mode from the middle of the cross-axis, i have thank you for your good advice
User avatar
Logan MTM
Posts: 678
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: Gibbing For The Arachnotron and large monsters?

Post by Logan MTM »

If i'd get this right...
You can Gib any kind of monster with his Crush State. Just A_SpawnItemEx and remove the dead actor:

Code: Select all

 Crush:
 TNT1 A 0 A_SpawnItemEx("RealGibs",0,0,0,0,0,0,0,0)
 Stop
If you have some custom Gib sprites, just make a new actor and Spawn it intead "RealGibs".
Post Reply

Return to “Scripting”