header general

Hazmat Suit

  • DeVloek
  • DeVloek's Avatar Topic Author
  • Arachnotron
  • Arachnotron
More
6 years 1 month ago - 6 years 1 month ago #1 by DeVloek
Hazmat Suit was created by DeVloek
Information:

Name: Hazmat Suit
Type: Protection
Palette: Custom
Summon: HazmatSuit
Use type: instant
Duration: 60
Brightmaps: no
Actor modification: no
ACS: no

Credits:
Code: DeVloek
GLDefs: DeVloek
Sounds: n/a
Sprites: id Software
Sprite Edit: DeVloek
Idea Base: Rad Suit, Bio-Suit from Doom 3

Description:
The Hazmat Suit is activated on pick-up and lasts for 60 seconds. It grants immunity to Poison, PoisonCloud, Drowning and Slime (floor damage),
and reduces fire, ice and electrical damage by 50%.


Sprite:



Another item from my probably never to be released Map project, the Hazmat Suit is intended to be a much better variant of the Rad Suit. The sprite design was inspired by the Bio-Suit Zombie from Doom 3. Unlike the original suit, this doesn't have the full brightness flag but comes with a dim pulselight, which in my opinion looks much better. Also I changed the effect's screen tint from green to a slight violet.
I made this item because I noticed the original Rad Suit lacks protection from various damage types, especially PoisonCloud. I added a bit of fire/ice/electrical protection to make it more useful in other sitations as well.


Edits:
- Now the Hazmat Suit additionally grants the RadSuit's PowerIronFeet powerup, so you no longer receive extra damage when the effect wears off while underwater.

- Optimized code, changed pickup sound.

- Removed "Pickupflash", fixed dynamic light.
Attachments:
Last edit: 6 years 1 month ago by DeVloek. Reason: re-uploaded file with above edits

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
6 years 1 month ago #2 by Blue Shadow
Replied by Blue Shadow on topic [Submission] Hazmat Suit
For drowning, I suggest giving the player a radsuit, instead. The reason being is that while underwater and having a radsuit, you don't lose air as opposed to simply not taking drowning damage. The nature of drowning damage is that it gets amplified each time damage is inflicted (whether you actually suffered damage from the event or not). So if the suit you're using merely reduces damage from drowning, then as soon as the suit's effect wears off while still underwater, you may receive quite a bit of damage (depending on how long you were underwater since the last time you surfaced).

Going for a radsuit effect is also better for HUD mods which display the player's air supply on screen.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar Topic Author
  • Arachnotron
  • Arachnotron
More
6 years 1 month ago #3 by DeVloek
Replied by DeVloek on topic [Submission] Hazmat Suit
Thanks for pointing that out, I never knew how drowning works, probably because I never really played a map where swimming underwater is a thing. I just had to create a small test map to confirm this ;)

I'm not sure if there's a better way to do this, but I fixed it by making the Hazmat Suit a CustomInventory item which gives you two dummy items. One grants the Hazmat Suit protection like intended, the other grants the RadSuit protection (PowerIronFeet).

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
6 years 1 month ago #4 by Blue Shadow
Replied by Blue Shadow on topic [Submission] Hazmat Suit
A few notes:
  • The item doesn't play a powerup pickup sound upon pickup. Instead, it plays the normal/default item pickup sound.
  • The end of the Pickup state sequence lacks a Stop.
  • To disable a powerup's screen blend, it's better to use "None" as the color. From the wiki :

    Using a color value of None for a PowerupGiver, results in having no screen blend. Setting an arbitrary color with zero alpha, instead, to override the powerup's own does not achieve the same task.

    Note that it says "PowerupGiver", not "Powerup", which means you move the color property from PowerHazmatRespirator (making it effectively unneeded) to HazmatSuitRespirator.

DeVloek wrote: I'm not sure if there's a better way to do this, but I fixed it by making the Hazmat Suit a CustomInventory item which gives you two dummy items. One grants the Hazmat Suit protection like intended, the other grants the RadSuit protection (PowerIronFeet).

That should be fine. If you really want to, you could code this in ZScript instead of DECORATE, as ZScript allows you to create your own custom powerups.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar Topic Author
  • Arachnotron
  • Arachnotron
More
6 years 1 month ago #5 by DeVloek
Replied by DeVloek on topic [Submission] Hazmat Suit
Thanks again! I changed the pickup sound to the correct one and optimized the code according to your suggestions.

According to the wiki the Inventory.PickupFlash flag is deprecated, so I changed it into a property. Also I noticed that GZDoom always displays a pickup flash, no matter if that flag/property is present or not. I'm still keeping that line however, it might be useful for compatibility with other games?

I'm staying with DECORATE for now, I didn't know Zscript is a thing until now... Still trying to get into the groove again, looks like I missed a lot the past 5 years. I might look into this tutorial if I ever feel like "ascending" ;)

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
6 years 1 month ago #6 by Blue Shadow
Replied by Blue Shadow on topic [Submission] Hazmat Suit
Found another thing: the dynamic light is still attached to the "old" actor (HazmatSuit) instead of the new one (HazmatSuitItem).

DeVloek wrote: According to the wiki the Inventory.PickupFlash flag is deprecated, so I changed it into a property. Also I noticed that GZDoom always displays a pickup flash, no matter if that flag/property is present or not.

Do not confuse that with the screen blend flash. That property/flag is for spawning a special effect at the same position as the picked-up item. You can see it in Heretic and Hexen when you pick up artifacts.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar Topic Author
  • Arachnotron
  • Arachnotron
More
6 years 1 month ago #7 by DeVloek
Replied by DeVloek on topic [Submission] Hazmat Suit
I had too look that effect up, couldn't remember what it looks like. When I saw this , I had a little facepalm moment :P
Well, since this is not a Heretic artifact, I removed the "pickupflash". I also fixed the dynamic light, and made it a tiny bit brighter to make it more visible in brighter rooms.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
6 years 1 month ago #8 by Blue Shadow
Replied by Blue Shadow on topic Hazmat Suit

Please Log in or Create an account to join the conversation.