Armor Tiers?

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
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Armor Tiers?

Post by Dan_The_Noob »

Hey guys,

so i had an idea for my mod to sort armor's into Tiers...
so that if you get armor shards while equipped with a higher tier armor it will refill said armor instead of replace...
I was just going to use a custom inventory or something...
but thought i'd check if there was a better way to go about this?

--NOTE--
Needs to work in Zandronum
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Armor Tiers?

Post by Void Weaver »

Dan_The_Noob wrote:so i had an idea for my mod to sort armor's into Tiers...
so that if you get armor shards while equipped with a higher tier armor it will refill said armor instead of replace...
But... but that what you describes are Doom default armor system. o_0
Tier1 - GreenArmor
Tier2 - BlueArmor
Shards - ArmorBonus
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Armor Tiers?

Post by Dan_The_Noob »

Void Weaver wrote:
Dan_The_Noob wrote:so i had an idea for my mod to sort armor's into Tiers...
so that if you get armor shards while equipped with a higher tier armor it will refill said armor instead of replace...
But... but that what you describes are Doom default armor system. o_0
Tier1 - GreenArmor
Tier2 - BlueArmor
Shards - ArmorBonus
it seems like it replaces if say, you're below 100 on a blue armor and get a shard it goes to green which is weaker %-wise in the mod.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Armor Tiers?

Post by Void Weaver »

No, seems that you a bit misunderstand:
Armor bonuses add 1% of additional armor to the player, up to 200%. If the player already had armor left, the protection percent is unchanged. Otherwise, the player is granted 33% protection (same as the Green Armor).
So, getting armor bonus while you still have a some portion of Blue, then its Armor.SavePercent (50%) doesn't decreases down to 33% as have the Green one and default of ArmorBonus itself.

Or maybe I've still confused about your goal and you want that Green armor will add its points (instead of replacing) to existed Blue one while Blue armor have less than 100 points?
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Armor Tiers?

Post by Dan_The_Noob »

oh maybe just the picture is changing, i have no indicator for % in-game
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Armor Tiers?

Post by Void Weaver »

What? 0_o

There is no Armor.SavePercent indicator in game at all. Regular statusbar shows only armor amount, not damage reduction percentage (Armor.SavePercent).

So the Geen gives 100 points and 33.3% dmg reduction;
Blue one gives 200 points and 50% dmg reduction;
and ABonus gives 1 point (up to 200) and 33.3% dmg reduction, UNLESS it refill a some amount of any already equiped armor, then ABonus DOESN'T replaces equiped armor's dmg reduction value.

Sorry, bro, but I still don't understand what are you want. :(
User avatar
Boondorl
Posts: 138
Joined: Wed Jul 11, 2018 10:57 pm

Re: Armor Tiers?

Post by Boondorl »

As Void Weaver already stated, Bonus Armor gives whatever tier the player currently has, regardless of how much armor is left (if they have 0 then it gives the equivalent of Green Armor). Green Armor, however, will demote your tier if you pick it up when you have less than 100 armor.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Armor Tiers?

Post by StroggVorbis »

But what if the bonus armor has a higher SavePercent than the currently worn armor?

As in, you have blue armor with 50% protection and pick up a custom armor bonus that has 75% protection.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Armor Tiers?

Post by Void Weaver »

@DabbingSquidward, this a good question and even seems that never was asked here before. :)

Test shows that ABonus with Armor.SavePercent higher than current wear armor have, still will be negated.
For ex. this ABonus will not provide protection if any armor already equipped:

Code: Select all

Actor myArmorBonus : ArmorBonus replaces ArmorBonus
{
Armor.SaveAmount 50
Armor.SavePercent 100
}
In opposite it gives 100% dam. reduct.
Post Reply

Return to “Scripting”