Page 1 of 13

Universal Gibs

PostPosted: Sun Jan 28, 2018 6:39 am
by Accensus
Thread is dead; mod isn't! To report bugs, suggest stuff, or contact me in general, you can either reach me on the Discord listed in the repository's description or open an issue directly on GitLab.

Also feel free to post in the thread. I'll probably reply here as well, but if you're on either of the aforementioned platforms, I suggest you get ahold of me there. Chances are your question would be answered a lot sooner.

---DOWNLOADS---
Repository [Last update: See commit history]
NOTE: Scroll down in the repository and read the readme.

Spoiler: "Old thread contents, quite outdated"

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 6:39 am
by Accensus

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 11:18 am
by SanyaWaffles
Finally you can have ludicrous gibs in any TC. I'll have to check this out.

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 11:50 am
by Accensus
Quick update for two things:
- Fixed a critical issue where gibbing Keens would not activate their special.
- Updated OP with a rundown of sorts and necessary GZDoom version.

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 3:50 pm
by RiboNucleic Asshat
From looking at the code, I'm assuming that this does not respect different blood colors?

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 3:53 pm
by Accensus
Nope. It doesn't. I reckon it could easily be made to respect them, but red gibs/floor decals with green blood trails would look really off. Initially I did experiment with customisable blood/gibs color, but that didn't work out as expected, so it got scrapped. The big problem is in the translations.

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 4:16 pm
by RiboNucleic Asshat
I'll try messing with it later on my own to see if I can get blood colors to apply. I believe using the flags SXF_USEBLOODCOLOR and SXF_TRANSFERTRANSLATION in the right way can make it work. There are no issues with translations on flat sprites, are there?

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 4:19 pm
by Accensus
None that I know of.

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 9:39 pm
by RiboNucleic Asshat
So, I finally got some free time to experiment with this, and I have a 50% working method for differently colored blood.

Spoiler: Picture


  • BLDSA0 needs to be an alpha map, and the bloodsplats should have RenderStyle "Shaded", so they behave like decals.
  • Before any gibs are spawned, set the StencilColor (via SetShade) of the dying monster to its BloodColor.
  • All gibs are spawned with the flags SXF_TRANSFERSTENCILCOL and SXF_USEBLOODCOLOR. This flawlessly recolors the gibs and stores the stencil color, which won't affect the gibs' appearance.
  • When the gibs spawn a blood splat, it again uses the flag SXF_TRANSFERSTENCILCOL to pass on the color. This affects the floor splats and colors them correctly.

Unfortunately, I've run into some problems with this method.

  • When no BloodColor is specified, e.g. every single vanilla actor, gibs are untouched (which is good) but splats are black (obviously less good). I can change black splats to red but this means actors with actually black blood will have red FX.
  • I have absolutely no idea how to properly color the particles! I can't seem to set the particles' color to the StencilColor. I can set it to BloodColor, but since the BloodColor isn't passed down this does nothing for me.
  • Using the color unaltered makes it cartoonishly bright. This can easily be fixed so it's not a huge issue.

Here's a version I quickly modified if you want to poke around in it. I'm very unfamiliar with ZScript so I could be doing something horribly wrong. Summon "test1", "test2", or "test3" for zombiemen with green, blue, and black blood respectively. Removed, no longer necessary.

Re: Universal Gibs

PostPosted: Sun Jan 28, 2018 11:11 pm
by Cryomundus
Well, I've found an annoying bug. If you're playing this with Legendoom, any Legendary monsters (the ones with a red glow) that are killed via gibbing will not drop a Legendary Weapon. You'll need to kill them normally to get a weapon drop.

Re: Universal Gibs

PostPosted: Mon Jan 29, 2018 3:12 am
by Accensus
- If enabled, blood now respects the bloodcolor property of the gibbed actor.

PermaNoob wrote:When no BloodColor is specified, e.g. every single vanilla actor, gibs are untouched (which is good) but splats are black (obviously less good). I can change black splats to red but this means actors with actually black blood will have red FX.

Forced red blood on black-blooded actors. Can't win 'em all.

PermaNoob wrote:I have absolutely no idea how to properly color the particles! I can't seem to set the particles' color to the StencilColor. I can set it to BloodColor, but since the BloodColor isn't passed down this does nothing for me.

StencilColor is actually fillcolor. This has been addressed and fixed.

PermaNoob wrote:Using the color unaltered makes it cartoonishly bright. This can easily be fixed so it's not a huge issue.

Annnnd fixed.

Overall jolly well done! Thank you.

Cryomundus wrote:Well, I've found an annoying bug. If you're playing this with Legendoom, any Legendary monsters (the ones with a red glow) that are killed via gibbing will not drop a Legendary Weapon. You'll need to kill them normally to get a weapon drop.

Damn, I doubt anything would come out of this due to how LegenDoom handles all the item drops. I'll investigate, but the estimated chances of nothing happening are about 99%.

Re: Universal Gibs

PostPosted: Mon Jan 29, 2018 4:11 am
by Lime
Dang! This is satisfying Blood and Smooth Gibbing! i will enjoy this more. thanks.
- If enabled, blood now respects the bloodcolor property of the gibbed actor.

I tested it with Bloodfixer (which is fixing the blood color of the enemies), the experiment worked.

Re: Universal Gibs

PostPosted: Mon Jan 29, 2018 5:09 am
by Accensus
- Fixed issue where ACS scripts would not get called/finish upon destroying an actor, thus breaking mods and maps.

You rolled a 20! Managed to fix the LegenDoom issue. Wasn't as hacky as I expected it to be.

Re: Universal Gibs

PostPosted: Mon Jan 29, 2018 7:52 am
by Accensus
Quick update with a few things.

- Changed gib calculation formula.
- Setting threshold to 0 will always gib enemies with the maximum overkill level.
- Slightly reduced gib size. (Actually corpse. It's a typo.)
- Gibs no longer teleport.

EDIT: Critical issue with the LegenDoom fix. Game will crash if Archvile attempts to resurrect a gibbed enemy. Trying to fix this atm. Fixed.

Re: Universal Gibs

PostPosted: Mon Jan 29, 2018 7:10 pm
by RiboNucleic Asshat
Sweet! This works wonderfully now. Ketchup is essentially 100% obsolete for me at last, thank god.

Lud wrote:StencilColor is actually fillcolor. This has been addressed and fixed.

Huh, I didn't know that. The wiki isn't too clear on how that works and I haven't even touched DECORATE let alone ZScript in a few years, so I got confused.