• 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.

How to put armor through stats?

Status
Not open for further replies.
Level 3
Joined
Jul 27, 2016
Messages
33
I would like to increase the armor of my hero through 2 different stats which are variables (integer), already created on my map: 1 stamina gives me 0.35 armor and 1 resistance gives me 0.5 armor.
From these two variables (integer) can we increase the armor of my hero in relation to the ratio?
The defensive damage multiplier of my map is 0.01.

Thanks for help

Łapin Viktus(Fr)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
One can use an armor bonus system to do the appropriate armor modifications. Such systems work by having many bonus armor item abilities (grant bonus armor, no command card button) which are added/removed by triggers to grant the desired armor modification amount. I know such systems work for integer armor amounts, but I am not sure if they could be modified to provide fractional armor as the item ability types might only allow for integer armor bonuses. The result will not modify base armor like agility does, it will appear as a green bonus armor modification amount.

If agility is not used one can use that to support modification of armor as well as fractional armor. For example if it was set to 0.01 armor per agility then 50 agility will add 0.5 armor. This is the only way to modify armor amount reliably without green modification numbers.

One can hackly modify armor amounts using hero to non-hero and non-hero to hero morphs. However this is highly prone to making Warcraft III unstable and causing crashes so is not recommended.

Yes fractional armor does exist even if the UI tries to show armor as a whole number. If one computes armor from the damage dealt to and damage taken by a standard melee balance hero unit then one will get fractional armor values which match the base armor with agility armor values.
 
Level 15
Joined
Aug 14, 2007
Messages
936
Mathematically I assume you require assistance, I will address on that issue. Storing the numbers into Real is important, the method to convert those number into respective Integer is straight forward. You need to compare two of the variables, first you need an Integer variable and a Real variable. By converting the Real value into Integer, you get the correct armor value at this point where you use to upgrade it, however you do not want to waste processing power, therefore on the point where it doesn't upgrade, you don't need to run the armor upgrade. The Old Armor value in Real and the new Armor value in Integer are now compared. If the Integer converted into Real is Bigger than the Old Armor value as Real, then perform the Upgrade functions. This will be checked every second of the game to prevent bugs.
 
Last edited by a moderator:
Level 3
Joined
Jul 27, 2016
Messages
33
The problem is that agility doesn't give armor anymore on my map, I removed it.
But I've seen threads about kind of "armor tome", if it's possible to do, so the problem could be resolved. Otherwise, I saw in an another thread that is talkin' about "rune of fortification", what is it ?

Thanks for help.
 
Status
Not open for further replies.
Top