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.
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.
Sure. I'm talking about a boss that has for example 10000 (ten thousand) hp with 95% damage reduction (assume armor of about 100). Your hero deal 5000 (5 thousand) damage per hit. It work fine for the most part, dealing 250 damage per hit. Except when the boss has 4900 health left (basically half the health bar), he die instantly after 1 hit.
(basic math here, I can pump the hero damage even more so it sound ridiculous)
Also these number are pretty normal for a typical wc3 map.
Anyway, since we cant negate a damaging effect with event detect damage (as it has already occur) this bug cannot be fixed simply atm
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.
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?
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.
I made something similar for my stay alive map.
however, it would have been nice if blizz yust simply make a option to choose between "armor type"...
It not reasonable to do that since wc3 armor calculation formula is not anything global to be able to choose from. If you want your own armor system, using buff is the good alternative
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?
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.
Maps like Nexus wars really need this, to lessen unit use and more on tactical use of units.
But having a armor change will really skew things around compared to the normal armor system...
Zerglings comes in a pair of 2 and does 5 damage each at a rapid pace... If armor was in % wise, it may or may not be so effective against a marine in some ways:
Marine (5 armor) <<< Zergling (5 damage)
Each hit deals 1 damage.
Marine (5% armor) <<< Zergling (5 damage)
Each hit deals 4.75 damage. Which doesn't really work with such a small damage.
So in that case, why not implement both?
Non-percentage armor is for "Defense"
Percentage armor is for "Protection"
The MMORPG mabinogi uses this, allowing players to choose whether to go for defense or protection.
I have been working on this very thing for my map, what I can't figure out is what the field is for ModifyFraction, I've tried:
DamageResponse.ModifyFraction
ModifyFraction
DamageResponse_ModifyFraction
DamageResponseModifyFraction
They all return an error of field not written.
This is my test trigger for it, in case I farged something else up.
Armor Test
Game - Player Any Player types a chat message containing "", matching Partially
Actions
Catalog - Set value of Behaviors "HeroArmor" "DamageResponseModifyFraction" for player (Triggering player) to (Entered chat string)
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.
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).
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.
I'm currently trying to do a similar system, except I'm doing it in a different fashion.
My way is by using the Armor Reduction field of every damaging effect. Armor Reduction sets how much damage reduction 1 point of armor gives - obviously for weapon effects this is by default 1, and spells default 0 - but if you go through and set them all to be, say, 1% of the effect damage, it will equate to the same as %DR using Damage Response. I will then modify/add triggers so that whenever a effect's damage is changed (hero +weapon damage from leveling/items or ups) the armor reduction value will be changed to match.
I'm currently trying to do a similar system, except I'm doing it in a different fashion.
My way is by using the Armor Reduction field of every damaging effect. Armor Reduction sets how much damage reduction 1 point of armor gives - obviously for weapon effects this is by default 1, and spells default 0 - but if you go through and set them all to be, say, 1% of the effect damage, it will equate to the same as %DR using Damage Response. I will then modify/add triggers so that whenever a effect's damage is changed (hero +weapon damage from leveling/items or ups) the armor reduction value will be changed to match.
Thoughts?
First thought? Good luck on making this stack dimishingly.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
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
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.
http://www.youtube.com/user/RussianMapster
@KorvinGump: Go
Sure. I'm talking about a boss that has for example 10000 (ten thousand) hp with 95% damage reduction (assume armor of about 100). Your hero deal 5000 (5 thousand) damage per hit. It work fine for the most part, dealing 250 damage per hit. Except when the boss has 4900 health left (basically half the health bar), he die instantly after 1 hit.
(basic math here, I can pump the hero damage even more so it sound ridiculous)
Also these number are pretty normal for a typical wc3 map.
Anyway, since we cant negate a damaging effect with event detect damage (as it has already occur) this bug cannot be fixed simply atm
@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
@KorvinGump: Go
No problem. Good luck. Just want to point out a problem I think you considered minuscule since I've tackled with these before
@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
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
I made something similar for my stay alive map.
however, it would have been nice if blizz yust simply make a option to choose between "armor type"...
It not reasonable to do that since wc3 armor calculation formula is not anything global to be able to choose from. If you want your own armor system, using buff is the good alternative
@KorvinGump: Go
what about scaling armor values?
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.
http://www.youtube.com/user/RussianMapster
this system is extremely messy. has anyone figured it out with the data editor?
Maps like Nexus wars really need this, to lessen unit use and more on tactical use of units. But having a armor change will really skew things around compared to the normal armor system...
Zerglings comes in a pair of 2 and does 5 damage each at a rapid pace... If armor was in % wise, it may or may not be so effective against a marine in some ways:
Marine (5 armor) <<< Zergling (5 damage)
Each hit deals 1 damage.
Marine (5% armor) <<< Zergling (5 damage)
Each hit deals 4.75 damage. Which doesn't really work with such a small damage.
So in that case, why not implement both?
Non-percentage armor is for "Defense"
Percentage armor is for "Protection"
The MMORPG mabinogi uses this, allowing players to choose whether to go for defense or protection.
In SC2's case, if you combine them:
Marine (1 defence / 20% protection) <<< Zergling (5 damage)
You calculate the protection first, then calculate the defence point.
5 - (20%) = 4 points of damage
4 - 1 = 3 points of damage
I have been working on this very thing for my map, what I can't figure out is what the field is for ModifyFraction, I've tried: DamageResponse.ModifyFraction ModifyFraction DamageResponse_ModifyFraction DamageResponseModifyFraction
They all return an error of field not written. This is my test trigger for it, in case I farged something else up.
Armor Test
Game - Player Any Player types a chat message containing "", matching Partially
Actions
Catalog - Set value of Behaviors "HeroArmor" "DamageResponseModifyFraction" for player (Triggering player) to (Entered chat string)
@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
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
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
I'm currently trying to do a similar system, except I'm doing it in a different fashion.
My way is by using the Armor Reduction field of every damaging effect. Armor Reduction sets how much damage reduction 1 point of armor gives - obviously for weapon effects this is by default 1, and spells default 0 - but if you go through and set them all to be, say, 1% of the effect damage, it will equate to the same as %DR using Damage Response. I will then modify/add triggers so that whenever a effect's damage is changed (hero +weapon damage from leveling/items or ups) the armor reduction value will be changed to match.
Thoughts?
First thought? Good luck on making this stack dimishingly.