• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Warcraft 3's Minimum Damage

Status
Not open for further replies.
Level 8
Joined
Jul 8, 2013
Messages
249
So while testing one of my RPG maps I came across an interesting (and mildly problematic) phenomenon I hadn't noticed before: the minimum damage from an attack (with a positive damage value at least) seems to be 1, regardless of armor penalties and the like.

To explain (with some made up numbers for convenience):
Archer deals has 1-1 damage. She has Arrow attack type which does 20% damage against Plate armor type.
Soldier has Plate armor type and enough armor to give him a 30% reduction.
The numbers seem to tell us that she does .56 damage per attack, but this is not the case. Instead she does 1 damage per attack.

I did some other testing and the problem isn't that the damage is a fraction; warcraft 3 handles fractional damage above 1 just as one would expect. Notably, Warcraft 3 seems to round down all fractions for display purposes. For example, if the archer had 3-3 damage then she would deal 1.56 damage per attack (the displayed result of which would be -1 life, then -2 life, then -1 life, and so on).

Another test revealed that units that deal 0-0 damage do indeed do 0 damage, rather than 1 though.

Thus there seems to be a minimum damage threshold in Warcraft 3 that applies to any attack which would deal positive damage less than 1 and makes it deal 1 damage instead.

Does anyone know how to change this? Conceivably someone might want a minimum damage of, say, 10 for their game. I would like minimum damage 0 for my own purposes. I've looked through Advanced: Gameplay Constants but haven't found any number that looks like it relates to this.
 
Well, at least for showing HP, the game uses integers and rounds down values

so like if I have 20 HP, you reduce it by 0.2 => 19.8 right? wc3 will round this down, so my HP will actually show 19... while the actual HP is still 19.8

which is why if you get damage again, 19.6 would now be your HP, but it will still show 19

As for modifying the minimum damage, AFAIK the only way is to use a DDS that allows you to customize damage
 
Level 8
Joined
Jul 8, 2013
Messages
249
Well, at least for showing HP, the game uses integers and rounds down values so like if I have 20 HP, you reduce it by 0.2 => 19.8 right? wc3 will round this down, so my HP will actually show 19... while the actual HP is still 19.8

What I was saying is that this isn't actually always true with regard to attacks. It is true for attacks that deal more than 1 damage, but not for attacks that the armor types and values and such should cause to do less than 1 damage. My tests seem to show that the attacker will always inflict at least 1 damage on the enemy even if it SHOULD inflict only .2 or something. For example, I have an archer hero who by the numbers would deal about .2 damage per hit to a hero who has 10 HP and thus should kill him in 50 hits. Instead she kills him in 10.

A work-around.

You can set the (in this case) archer's damage stats to something like this:

Base: -1
Die: 1
Sides: 2

Then the Archer would do 0-1 damage no?

Thanks for the suggestion; but if I'm understanding what you mean correctly, then it wouldn't actually help much with this issue. Certainly if I wanted the Archer to deal on average .5 damage to opponents with a neutral armor type and 0 armor value, then I'd set the archer's stats to 0-1 damage in the unit editor. However, the issue I have is essentially that armor and armor types don't actually do what they say at low damage values. I want my archer to deal 1 damage to unarmored foes and less than 1 damage to armored foes- in other words, I want armor to function.


Currently I'm still thinking about whether this is a bug or a feature for my purposes- maybe it will actually benefit my map if anything can kill anyone in a relatively small number of hits.

I know of one work-intensive but guaranteed fix: multiply all HP and damage for all units, spells, triggers, etc. by 10 or 100 or some other such value. If the archer's attack is only being reduced to, say, 5.6 rather than 0.56 then armor will function as advertised.

Another possible solution I'm investigating is giving every unit an invisible Hardened Skin ability with damage reduction 0 and damage minimum 0. I'll test whether that actually works as hoped for later.
 
Level 8
Joined
Jul 8, 2013
Messages
249
Sounds worth looking into. One thing I'm aiming for with this current map though is very simple, understandable mechanics that will make sense to players. Part of that is not changing too many normal mechanics of warcraft 3. Does a DDS change anything about how attacks and damaging spells and whatnot operate in game?
 
Status
Not open for further replies.
Top