• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Change hero defense to depend on str

Status
Not open for further replies.
Level 17
Joined
Jul 17, 2011
Messages
1,863
you can change how much damage a unit takes by using a damage engine which modifies the damage based on something you specify for example the wc3 damage reduction formula for armor is ((armor)*0.06)/(1+0.06*(armor)) - this gives an ever decreasing amount of reduction per armor point, what you could do is write

damage = damage - (((sqrt(strength))*0.06)/(1+0.06*(sqrt(strength))) * damage) -- so for example a unit will be hit for 100 damage and he has 100 strength then he will only take 100 - (10*0.06/1+0.06*10 * 100)= 62.5 damage

however this way the amount of reduction will not be displayed anywhere and there is no way to display it unless you use some kind of lame texttag somewhere
 
you can change how much damage a unit takes by using a damage engine which modifies the damage based on something you specify for example the wc3 damage reduction formula for armor is ((armor)*0.06)/(1+0.06*(armor)) - this gives an ever decreasing amount of reduction per armor point, what you could do is write

damage = damage - (((sqrt(strength))*0.06)/(1+0.06*(sqrt(strength))) * damage) -- so for example a unit will be hit for 100 damage and he has 100 strength then he will only take 100 - (10*0.06/1+0.06*10 * 100)= 62.5 damage

however this way the amount of reduction will not be displayed anywhere and there is no way to display it unless you use some kind of lame texttag somewhere

I thought about that, but the idea is to use the default w3 armor display.
 
Attack speed and health can be handled by a bonusmod, health regen and movespeed with simple libraries.
Exactly. The problem with armor is, that there is no way to change base armor with just abilities or scripts (except through abusing the morph bug, but this is not recommended as morphing causes a variety of unwanted bugs), so if he wants armor tied to a base stat, just rename the stats and trigger everything else instead.
 
Status
Not open for further replies.
Top