I uploaded new version of wc3 armor system. You can see in map dynamic armor reduction for hero and damage reduction for units. If his armor changes his damade reduction changes too. You can download map here or in first post.
Just one moment. Maximum number of behaviors which unit can have = 63. So you can't do many behaviors that corresponds even with precision 1. But in principle it depends on what kind of armor can be in your map.
If in your map max armor 40 and your units or hero don't have many behaviors you can create 40 behaviors with step 1 armor reduction. But if your maximum armor is big, for example 100, you must create armor reduction with step 5 or may be more. So, you should consider what the maximum armor can be at your map and how accurately you want to was armor reduction.
Updated. If you look this table, you can see, that after 50 armor damage reduction changes on very small percent, so main thing that you must do damage reduction with small step, such as 1 when armor is small(between 1 and 10 or 20) after this you can increase step to 5, 10 or may be even 100 if your map have units with 1000 armor, but the difference between damage reduction will be so small, that you will not see this in battle. I will upload sample map soon, when i did it.
Updated. You must change damage effect of each weapon, put field armor reduction of damage effect to 0, it's mean that damage effect ignores armor, if you not do this, unit with armor > damage of damaging unit, he will not get any damage(0.5 damage in sc2 only).
Of course you can't modify this field, only several of them we can, i will be happy if could change all fields but we can only small part. You can change LifeArmor of unit, but not modify fraction of behavior. May be blizzard will fix it. It will be awesome if we can change any field of behavior, effect and so on :) . As i already said, you must create many behaviors that corresponds to 1, 2, 3, 4 and so on armor reduction and trhourgh triggers change armor of unit, look my previous post.
this would work fine for a unit with 2 armor. but what if he suddenly gets a boost in armor to 10? will it adjust based on the unit's current armor value or would i have to modify the buff on the fly?
I found solution if armor of unit changes. But you must change armor of unit through catalog value. Better if you do attribute with value armor. So if item gives you 5 armor you must give 5 attributes points of armor. When, you must write next trigger, you change armor of unit through catalog value set. And you must create many behaviours and validators as on picture.
Look this pictures.
I found best solution here. Just create Behavior type Buff and change damage response, put chanse to 1. Then you must change field modify fraction in accordance with the armor of unit which will have this Behavior.
Example: if armor of unit 2, so you must put modify fraction to 0.8929.
Updated. Now it's work fine. I did marine with 10000Hp and 5000 damage and 100 armor. You can check this. But only one problem. Damage of unit always show with minus :D . Any ideas?
If you look on formula, 100 armor, so (100*0.06)/(1+0.06*100)=0.85. 85% damage reduction, so boss will get 5000*0.15=750 damage. And yes he will die when he have 4900 HP. But we can check weapon of unit when he starts attacking and we know damage of each weapon. So, if damage weapon - armor of target unit> hp or target unit. We must decrease his damage and he will not die, and when open my trigger. But problem with bonus damage, we don't know bonuses of damage of unit. But i think, it's can be done if some think more. I will improve it.
This isnt fun if the unit has about 95% damage reduction
lol, you did not understand, i mean if unit have 10 hp and 5 armor, and damaging unit have 20 damage target will get 15 damage and die and dont' have any damage reduction of warcraft 3.
I implemented warcraft 3 armor system in starcraft 2.
Firstly look on formula of warcraft 3 armor system here.
Map is not best. I found best solution here. Just create Behavior type Buff and change damage response, put chanse to 1. Then you must change field modify fraction in accordance with the armor of unit which will have this Behavior.
Example: if armor of unit 2, so you must put modify fraction to 0.8929.
If you want to create armor system for hero, so his armor changes in game. You must change armor of unit through catalog value. Better if you do attribute with value armor. So if item gives you 5 armor you must give 5 attributes points of armor. When, you must write next trigger, you change armor of unit through catalog value set. And you must create many behaviours and validators as on picture.
Look this pictures.
Just one moment. Maximum number of behaviors which unit can have = 63. So you can't do many behaviors that corresponds even with precision 1. But in principle it depends on what kind of armor can be in your map.
If in your map max armor 40 and your units or hero don't have many behaviors you can create 40 behaviors with step 1 armor reduction. But if your maximum armor is big, for example 100, you must create armor reduction with step 5 or may be more. So, you should consider what the maximum armor can be at your map and how accurately you want to was armor reduction.
You must change damage effect of each weapon, put field armor reduction of damage effect to 0, it's mean that damage effect ignores armor, if you not do this, unit with armor > damage of damaging unit, he will not get any damage(0.5 damage in sc2 only).
Look my simple map, when i implemented wc3 armor system for hero and some units. If armor for hero changes his damage reduction changes too.
Hello.
I uploaded new version of wc3 armor system. You can see in map dynamic armor reduction for hero and damage reduction for units. If his armor changes his damade reduction changes too. You can download map here or in first post.
http://www.youtube.com/user/RussianMapster
Just one moment. Maximum number of behaviors which unit can have = 63. So you can't do many behaviors that corresponds even with precision 1. But in principle it depends on what kind of armor can be in your map. If in your map max armor 40 and your units or hero don't have many behaviors you can create 40 behaviors with step 1 armor reduction. But if your maximum armor is big, for example 100, you must create armor reduction with step 5 or may be more. So, you should consider what the maximum armor can be at your map and how accurately you want to was armor reduction.
Updated. If you look this table, you can see, that after 50 armor damage reduction changes on very small percent, so main thing that you must do damage reduction with small step, such as 1 when armor is small(between 1 and 10 or 20) after this you can increase step to 5, 10 or may be even 100 if your map have units with 1000 armor, but the difference between damage reduction will be so small, that you will not see this in battle. I will upload sample map soon, when i did it.
Updated. You must change damage effect of each weapon, put field armor reduction of damage effect to 0, it's mean that damage effect ignores armor, if you not do this, unit with armor > damage of damaging unit, he will not get any damage(0.5 damage in sc2 only).
http://www.youtube.com/user/RussianMapster
@Sneakervek: Go
Of course you can't modify this field, only several of them we can, i will be happy if could change all fields but we can only small part. You can change LifeArmor of unit, but not modify fraction of behavior. May be blizzard will fix it. It will be awesome if we can change any field of behavior, effect and so on :) . As i already said, you must create many behaviors that corresponds to 1, 2, 3, 4 and so on armor reduction and trhourgh triggers change armor of unit, look my previous post.
http://www.youtube.com/user/RussianMapster
I found solution if armor of unit changes. But you must change armor of unit through catalog value. Better if you do attribute with value armor. So if item gives you 5 armor you must give 5 attributes points of armor. When, you must write next trigger, you change armor of unit through catalog value set. And you must create many behaviours and validators as on picture. Look this pictures.
http://www.youtube.com/user/RussianMapster
I found best solution here. Just create Behavior type Buff and change damage response, put chanse to 1. Then you must change field modify fraction in accordance with the armor of unit which will have this Behavior. Example: if armor of unit 2, so you must put modify fraction to 0.8929.
http://www.youtube.com/user/RussianMapster
@progammer: Go
Updated. Now it's work fine. I did marine with 10000Hp and 5000 damage and 100 armor. You can check this. But only one problem. Damage of unit always show with minus :D . Any ideas?
http://www.youtube.com/user/RussianMapster
@progammer: Go
If you look on formula, 100 armor, so (100*0.06)/(1+0.06*100)=0.85. 85% damage reduction, so boss will get 5000*0.15=750 damage. And yes he will die when he have 4900 HP. But we can check weapon of unit when he starts attacking and we know damage of each weapon. So, if damage weapon - armor of target unit> hp or target unit. We must decrease his damage and he will not die, and when open my trigger. But problem with bonus damage, we don't know bonuses of damage of unit. But i think, it's can be done if some think more. I will improve it.
http://www.youtube.com/user/RussianMapster
lol, you did not understand, i mean if unit have 10 hp and 5 armor, and damaging unit have 20 damage target will get 15 damage and die and dont' have any damage reduction of warcraft 3.
http://www.youtube.com/user/RussianMapster
Hello everyone.
I implemented warcraft 3 armor system in starcraft 2.
Just one moment. Maximum number of behaviors which unit can have = 63. So you can't do many behaviors that corresponds even with precision 1. But in principle it depends on what kind of armor can be in your map. If in your map max armor 40 and your units or hero don't have many behaviors you can create 40 behaviors with step 1 armor reduction. But if your maximum armor is big, for example 100, you must create armor reduction with step 5 or may be more. So, you should consider what the maximum armor can be at your map and how accurately you want to was armor reduction.
You must change damage effect of each weapon, put field armor reduction of damage effect to 0, it's mean that damage effect ignores armor, if you not do this, unit with armor > damage of damaging unit, he will not get any damage(0.5 damage in sc2 only).
Look my simple map, when i implemented wc3 armor system for hero and some units. If armor for hero changes his damage reduction changes too.
http://www.youtube.com/user/RussianMapster