• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Damage Reduction

Status
Not open for further replies.
Level 20
Joined
Jul 12, 2010
Messages
1,717
Ok so first thing first, I DO NOT want to make this using triggers IF possible that's why I'm posting in "World Editor Help Zone" forum.

My goal is to change the way Armor Reduction is calculated in my RPG to be as simple as possible.

I want the armor system to be like this:
  • Unit 1 has 50 Damage
  • Unit 2 has 20 Armor
  • Unit 1 Attacks Unit 2
  • Unit 2 Takes 30 Damage (50-20=30)

The current armor system is simply annoying with the current formula. I have also taken a look at this without any hope. I'm simply bad a math LOL!

So I was wondering if there is a way to do this without involving Triggers and using only Gameplay Constants:
World_Editor_yBTwh9n4hp.jpg

I have tried a lot of different values but nothing works. You can also check the test map I attached to see what I mean.

Player Blue uses WC3 Default Armor system but doesn't work.

Player Purple uses Armor system made with GUI and it's exactly what I want to recreate.
 

Attachments

  • Damage Calculator.w3m
    14.2 KB · Views: 6
I want the armor system to be like this:
  • Unit 1 has 50 Damage
  • Unit 2 has 20 Armor
  • Unit 1 Attacks Unit 2
  • Unit 2 Takes 30 Damage (50-20=30)
No, warcraft 3 default system is "1 point of armor reduces damage so it results in 6% percent increased effective hp".
This is then modified by certain percentages depending on types (Siege deals bonus to fortified etc.).
It is all percent.

You must trigger it one way or another.
Either make ability to reduce damage flat amount using the mountain giant ability or just trigger the damage reduction.
 
Level 13
Joined
Oct 16, 2010
Messages
731
You would have to change the armor reduction multiplier to 0.000 and use a DDS to detect the damage and reduce it equal to the targets armor. I've only tried using these a couple of times so wouldn't know all the details but that should work in theory

Alternatively, maybe a bit awkward but Hardened Skin kind of gives the same result? - You could have 1 ability with 100 levels for example representing when a unit has 1-100 armor points. Then use triggers to match the level of the ability to the armor value of the unit? Like I say, could be a bit awkward
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
What everyone else said, but here's the trigger:
  • Example
    • Events
      • Unit - A unit Takes damage
    • Conditions
    • Actions
      • Event Response - Set Damage of Unit Damaged Event to ((Damage taken) - (Armor of (Damage Target)))
You may need to prevent negative values, if so a simple If Then Else or a Clamp (Min/Max) that checks and fixes the (Damage taken) would work.

Then set all of the Damage Bonus Table multipliers in the Gameplay Constants to 1.00 and the Armor Damage Reduction Multiplier to 0.00.
 
Last edited:
Status
Not open for further replies.
Top