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

Variable Armor protection

Recommended Posts

Can I make the protection from armor change as the amount increases or decreases instead of by picking up a better armor item?

Share this post


Link to post

Are you talking about armor absorption? Vanilla green armor gives 100 armor with an absorption rate of 33%, while blue armor gives 200 armor with an absorption rate of 50%. This means, in vanilla Doom, having 90 armor from a previous blue armor pickup is still far superior to picking up a new green armor that brings you back to 100 armor. This due to the reduction of armor absorption, since the green armor pickup overwrites the blue armor pickup.

 

You can change this, but this depends on your choice of source port.

 

In GZDoom or Eternity, you can define your own armor pickups, including armor absorption rates and whether or not it overwrites previous armor absorption rates from a previous pickup.

Share this post


Link to post
3 hours ago, Mengo said:

Can I make the protection from armor change as the amount increases or decreases instead of by picking up a better armor item?

That's basically the Hexen system. In GZDoom, you can use it in Doom or other games.

Share this post


Link to post
On 6/22/2019 at 10:27 AM, Mordeth said:

Are you talking about armor absorption? Vanilla green armor gives 100 armor with an absorption rate of 33%, while blue armor gives 200 armor with an absorption rate of 50%. This means, in vanilla Doom, having 90 armor from a previous blue armor pickup is still far superior to picking up a new green armor that brings you back to 100 armor. This due to the reduction of armor absorption, since the green armor pickup overwrites the blue armor pickup.

I mean the opposite of that. I meant the absorption is proportional to the amount of armor you have. So for example, 80 armor gives 40% absorption

Share this post


Link to post
On 6/22/2019 at 11:11 AM, Gez said:

That's basically the Hexen system. In GZDoom, you can use it in Doom or other games.

Oh, nice! How can I implement it in my doom wad?

Share this post


Link to post

https://zdoom.org/wiki/Classes:HexenArmor

 

Look here for a starting point. You'll need to have five different armor pieces (e.g. helmet, vest, pants, boots, and shield) to provide sprites for the Hexen items, a LANGUAGE lump to change the pickup descriptions, and a ZMAPINFO lump to give them editor numbers.

 

Alternatively, you can make a "full armor" item like this:

Actor FullHexenArmor : CustomInventory 31337
{
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Inventory.PickupMessage "Picked up an armor"
	Inventory.PickupSound "misc/p_pkup"
	States
	{
	Spawn:
		ARM2 AB 6 Bright
		Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("MeshArmor", 1)
		TNT1 A 0 A_GiveInventory("FalconShield", 1)
		TNT1 A 0 A_GiveInventory("PlatinumHelm", 1)
		TNT1 A 0 A_GiveInventory("AmuletOfWarding", 1)
		Stop	
	}
}

You will probably need to replace the player class to give it a line like:

	Player.HexenArmor 0, 25, 25, 25, 25

which will make it so that you have 0 armor normally and get 100 armor upon picking up a FullHexenArmor.

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
×