As you may know, the armor system in SC2 is static, not percentage. An armor of 10 means you take -10 damage from every attack. This has implications for scaling attacks, and attack speed becomes a major factor. I investigated this when I started my tower defense project, because a static armor system just doesn't work when level 1 towers deal 10 damage and level 5 towers deal 5000 damage.
Now, you can do something with behaviors, but it won't be as comprehensive as you would like. Armor becomes irrelevant, and you'd have to use behaviors with a Combat: Damage Response where the unit with the behavior takes less damage. It may even be possible to control whether or not the behavior is used based on validators to check the attacking unit type (so you can have different units with different attack types), but that's going to require a lot of proof of concept testing. Either way, using a behavior system won't give the player as much feedback or satisfaction.
As you may know, the armor system in SC2 is static, not percentage. An armor of 10 means you take -10 damage from every attack. This has implications for scaling attacks, and attack speed becomes a major factor. I investigated this when I started my tower defense project, because a static armor system just doesn't work when level 1 towers deal 10 damage and level 5 towers deal 5000 damage.
Now, you can do something with behaviors, but it won't be as comprehensive as you would like. Armor becomes irrelevant, and you'd have to use behaviors with a Combat: Damage Response where the unit with the behavior takes less damage. It may even be possible to control whether or not the behavior is used based on validators to check the attacking unit type (so you can have different units with different attack types), but that's going to require a lot of proof of concept testing. Either way, using a behavior system won't give the player as much feedback or satisfaction.
Exactly, if your map goes out of bounds of original health damage attack speed of SC2 then you need to tweak and think of fancy ways to make it work.
Warcraft 3's armor system was clean and nice.
You could make it so every damage effect is reduced by a certain "percentage" for each armor point the target has, so as an example you can make the 10 damage attack be reduced by 1 for each armor point, and the 5000 damage attack be reduced by 50 or whatever you want.
This way you could say each armor point reduces damage by some amount (fixed percentage if you want), instead of reducing the standard amount (1 damage for each armor ponit).
You could make it so every damage effect is reduced by a certain "percentage" for each armor point the target has, so as an example you can make the 10 damage attack be reduced by 1 for each armor point, and the 5000 damage attack be reduced by 50 or whatever you want.
This way you could say each armor point reduces damage by some amount (fixed percentage if you want), instead of reducing the standard amount (1 damage for each armor ponit).
Ya but its not exactly the same because as armor goes damage reduce slowly goes down each armor as seen here
I had a nice working WC3 armor system using just a single, stackable buff and some triggers, but patch 1.4 broke it :/
Didn't find a solution yet, which does not involve creating and applying tons and tons of behaviors.
Okay, this is a proof of concept for another WC3 armor system, involving a combination of data and triggers. It uses the same principle like my pre-1.4 system, however the involved calculations are a little more complicated now.
I will use a damage reduction buff and reduce the effect of the actual armor to zero. I will use a hidden attribute to keep track of the armor changes of a unit accurately. I will calculate the amount of armor reduction desired for the current amount of armor, and apply the according amount of stacks of the damage reduction behaviors.
This means, that, depending on the amount of behaviors and stacks I use, there will be discrepancies in the desired and the actual damage reduction.
Since all damage reduction buffs stack multiplicatively now, I decided to go for 2 different buffs with individual stack counts, to get a decent precision without ridiculous amounts of stacks required.
The values for these are educated guesses or result of experimenting, the optimal values might be different:
I picked one behavior with a reduction of 0.5% and 45 stacks and another one with 20% reduction and also 45 stacks. This results in a precision of about 0.5% and a maximum armor reduction of 1-(.8^45*.995^45)=99,9965%.
The testmap includes a damage test, one unit fires on another unit with modifiable armor. Select the target and enter a number in the chat to set the armor for that unit (255 max armor). The map displays the desired damage reduction, following the exact WC3 formula.
It also displays the damage dealt to the unit, calculates the actual reduction as well as the error compared to the formula.
Keep in mind, that triggers are only required, if the armor of a unit changes; however, because of the post-1.4 stacking mechanics, calculating the amount of needed behavior stacks involves costly functions like Log() and Pow(), so you might want to watch out for too frequent armor changes for many units. Also, negative armor is not supported for now. Also, the code is not really readable, as stated, it is only a proof of concept for people to decide, if this is actually worth bothering.
Okay, this is a proof of concept for another WC3 armor system, involving a combination of data and triggers. It uses the same principle like my pre-1.4 system, however the involved calculations are a little more complicated now.
I will use a damage reduction buff and reduce the effect of the actual armor to zero. I will use a hidden attribute to keep track of the armor changes of a unit accurately. I will calculate the amount of armor reduction desired for the current amount of armor, and apply the according amount of stacks of the damage reduction behaviors.
This means, that, depending on the amount of behaviors and stacks I use, there will be discrepancies in the desired and the actual damage reduction.
Since all damage reduction buffs stack multiplicatively now, I decided to go for 2 different buffs with individual stack counts, to get a decent precision without ridiculous amounts of stacks required.
The values for these are educated guesses or result of experimenting, the optimal values might be different:
I picked one behavior with a reduction of 0.5% and 45 stacks and another one with 20% reduction and also 45 stacks. This results in a precision of about 0.5% and a maximum armor reduction of 1-(.8^45*.995^45)=99,9965%.
The testmap includes a damage test, one unit fires on another unit with modifiable armor. Select the target and enter a number in the chat to set the armor for that unit (255 max armor). The map displays the desired damage reduction, following the exact WC3 formula.
It also displays the damage dealt to the unit, calculates the actual reduction as well as the error compared to the formula.
Keep in mind, that triggers are only required, if the armor of a unit changes; however, because of the post-1.4 stacking mechanics, calculating the amount of needed behavior stacks involves costly functions like Log() and Pow(), so you might want to watch out for too frequent armor changes for many units. Also, negative armor is not supported for now. Also, the code is not really readable, as stated, it is only a proof of concept for people to decide, if this is actually worth bothering.
So having a hero with a Devotion Aura walking around changing armor of 30 to 70 units, and an inner fire buff being placed randomly on a small army wouldn't be good :D?
Is their anyway to place the Damage Reduction on the armor tab of the unit, when you hover over it?
Very nice, do you think with the introduction of Blizzard DOTA with the upcoming expansion they will have their own implication of a scaling %?
@Vaaz86: Go
Either way, using a behavior system won't give the player as much feedback or satisfaction.
I am using this system for my mod and it works very well. I'm also using validators to create different attack types and it works without any problems. For my map, this system is essential so I cannot agree with you on your statement. It's much easier to balance units like this.
So having a hero with a Devotion Aura walking around changing armor of 30 to 70 units, and an inner fire buff being placed randomly on a small army wouldn't be good :D?
Not sure, how costly Log() and Pow() actually are, might need a test. I increase the attributes in the test map with an additional behavior, and it triggers the trigger for every single point of armor, even if you increase 255 points at once, causing the trigger to run 255 times at once needlessly as well.
Before disabling that, it produced a small, noticeable lag spike when doing 255 armor calculations in one time interval.
Quote:
Is their anyway to place the Damage Reduction on the armor tab of the unit, when you hover over it?
You could make the attribute visible and take it as your actual armor stat and rename the armor to damage reduction in the text editor and modify it to represent the damage reduction ;) (or add a new damage reduction attribute and adjust that accordingly)
Quote:
Very nice, do you think with the introduction of Blizzard DOTA with the upcoming expansion they will have their own implication of a scaling %?
Well, implementing a scaling % system is as easy as using one single stacking behavior. Since it stacks multiplicatively, you can stack it as high as you want, a 5% damage reduction behavior would never give you a 100% reduction, it would always reduce the remaining damage by another 5% for each new stack.
Recreating the WC3 system accurately is a little more complicated, because the calculation formula is different.
Well, implementing a scaling % system is as easy as using one single stacking behavior. Since it stacks multiplicatively, you can stack it as high as you want, a 5% damage reduction behavior would never give you a 100% reduction, it would always reduce the remaining damage by another 5% for each new stack.
Recreating the WC3 system accurately is a little more complicated, because the calculation formula is different.
Like this?
0 Armor - 0% DR
1 Armor - 5% DR
2 Armor - 9.75% DR
3 Armor - 14.26% DR
4 Armor - 18.55% DR
5 Armor - 22.62% DR
Compared to WC3's
1 Armor - 5.66% DR
2 Armor - 10.71% DR
3 Armor - 15.25% DR
4 Armor - 19.35% DR
5 Armor - 23.08% DR
Hmm interesting, what does WC3's armor do that this couldn't. other than be the exact thing?
If it does work like this, then ill defiantly use the simpler version
I made a comparison a while ago, these are comparisons between a WC3 armor system and the simplified stacking damage reduction behavior. As you can see, the progressions differ a little:
f(x) (blue) represents the simplified system, using a stacking 4% damage reduction behavior
g(x) (red) represents the WC3 armor system.
The simplified system has a more steep progression, making the armor weaker by trend at low values and stronger at high ones, compared to WC3 armor.
Also WC3 armor was designed to add an additional 6% ehp based on the base hp, while the simplified system would always add a percentage of current ehp. So the ehp progression for WC3 armor is linear, for simplified it is exponential.
@Vaaz86: Go Well I didnt take the taime to actually understand the table in your link, but I guess its based on the standard reduction armor gives. I'll try to explain my idea a little better and then you can decide if it fits your needs:
1- Armor itself stays unchanged, you just have to decide % of damage reduced by each armor point.
2- Each damage effect has an Armor Reduction field. Its usually 1 for all attacks and 0 for spells, but you can use this field to achive something different.
As an example, if your attack effect deals 15 damage, you can set armor reduction to 1.5 so armor actually reduces 10% per level. For another effect that deals 5000 damage, you just need to set it to 500 and it will also reduce 10% per level.
While it may have many minor complications based on how data works, it is extremely easy to create compared to the other options.
This has some issues, if you have any way to boost damage. If you, for example, can buff your physical damage by 100%, you effectively reduce the impact of armor by 50%
If we take your 5000 damage effect and say, the enemy has 5 armor, so reduces the damage by 2500 this means a 50% armor reduction.
Now the attacker gets 100% damage buff, deals 10.000 damage. But still, the armor reduces only 2500, so 5 armor does only reduce damage by 25%.
So having the max armor a unit would have at like 15-25 the difference is minor
You can definitely pick values to make both progressions quite similar for a set interval. For games with a controlable, low-ish amount of maximum armor, this is a valid method. However, for games with huge or even potentially unlimited amounts of armor, this might raise some armor-related imbalances, and you might end up not finding values to represent your desired behavior.
@Kueken531: Go Yes, I know there are complications. At least by upgrades its possible to adjust reduction as well, so upgraded damage won't be a problem. I don't know if its possible to adjust the reduction field through behaviors or some other way, but maybe in this case there's a data-only workaround.
I didn't put much time on thinking about this system so I actually don't know all the issues or how to fix them. As I said before it could fit his needs. For maps that doesnt have damage buffs like that it wouldn't be a problem.
At least by upgrades its possible to adjust reduction as well, so upgraded damage won't be a problem
No way, this will work. Think about it: You need to modify every single damage effect every time the armor changes. Also, this only works, if you only have one single unit using armor, or you would need to adjust the effects dynamically for every shot.
Quote:
I didn't put much time on thinking about this system so I actually don't know all the issues or how to fix them. As I said before it could fit his needs. For maps that doesnt have damage buffs like that it wouldn't be a problem.
No way, this will work. Think about it: You need to modify every single damage effect every time the armor changes. Also, this only works, if you only have one single unit using armor, or you would need to adjust the effects dynamically for every shot.
Not true. That damage reduction applies for all armor levels in all units. All you have to do is when you upgrade that damage effect is to "upgrade" its damage reduction as well to adjust it to the new upgraded value.
This tutorial is somewhat outdated and seems messy but its a start.
http://www.sc2mapster.com/forums/resources/tutorials/9853-triggers-data-warcraft-3-armor-system/
Any one else have any suggestions?
@Vaaz86: Go
Nightmare.
As you may know, the armor system in SC2 is static, not percentage. An armor of 10 means you take -10 damage from every attack. This has implications for scaling attacks, and attack speed becomes a major factor. I investigated this when I started my tower defense project, because a static armor system just doesn't work when level 1 towers deal 10 damage and level 5 towers deal 5000 damage.
Now, you can do something with behaviors, but it won't be as comprehensive as you would like. Armor becomes irrelevant, and you'd have to use behaviors with a Combat: Damage Response where the unit with the behavior takes less damage. It may even be possible to control whether or not the behavior is used based on validators to check the attacking unit type (so you can have different units with different attack types), but that's going to require a lot of proof of concept testing. Either way, using a behavior system won't give the player as much feedback or satisfaction.
Exactly, if your map goes out of bounds of original health damage attack speed of SC2 then you need to tweak and think of fancy ways to make it work. Warcraft 3's armor system was clean and nice.
http://classic.battle.net/war3/pdf/armorattackdefense.pdf
You could make it so every damage effect is reduced by a certain "percentage" for each armor point the target has, so as an example you can make the 10 damage attack be reduced by 1 for each armor point, and the 5000 damage attack be reduced by 50 or whatever you want.
This way you could say each armor point reduces damage by some amount (fixed percentage if you want), instead of reducing the standard amount (1 damage for each armor ponit).
Ya but its not exactly the same because as armor goes damage reduce slowly goes down each armor as seen here
http://classic.battle.net/war3/pdf/armorattackdefense.pdf
I had a nice working WC3 armor system using just a single, stackable buff and some triggers, but patch 1.4 broke it :/ Didn't find a solution yet, which does not involve creating and applying tons and tons of behaviors.
€ Just had an idea, though...
Okay, this is a proof of concept for another WC3 armor system, involving a combination of data and triggers. It uses the same principle like my pre-1.4 system, however the involved calculations are a little more complicated now.
I will use a damage reduction buff and reduce the effect of the actual armor to zero. I will use a hidden attribute to keep track of the armor changes of a unit accurately. I will calculate the amount of armor reduction desired for the current amount of armor, and apply the according amount of stacks of the damage reduction behaviors.
This means, that, depending on the amount of behaviors and stacks I use, there will be discrepancies in the desired and the actual damage reduction.
Since all damage reduction buffs stack multiplicatively now, I decided to go for 2 different buffs with individual stack counts, to get a decent precision without ridiculous amounts of stacks required.
The values for these are educated guesses or result of experimenting, the optimal values might be different:
I picked one behavior with a reduction of 0.5% and 45 stacks and another one with 20% reduction and also 45 stacks. This results in a precision of about 0.5% and a maximum armor reduction of 1-(.8^45*.995^45)=99,9965%.
The testmap includes a damage test, one unit fires on another unit with modifiable armor. Select the target and enter a number in the chat to set the armor for that unit (255 max armor). The map displays the desired damage reduction, following the exact WC3 formula.
It also displays the damage dealt to the unit, calculates the actual reduction as well as the error compared to the formula.
Keep in mind, that triggers are only required, if the armor of a unit changes; however, because of the post-1.4 stacking mechanics, calculating the amount of needed behavior stacks involves costly functions like Log() and Pow(), so you might want to watch out for too frequent armor changes for many units. Also, negative armor is not supported for now. Also, the code is not really readable, as stated, it is only a proof of concept for people to decide, if this is actually worth bothering.
So having a hero with a Devotion Aura walking around changing armor of 30 to 70 units, and an inner fire buff being placed randomly on a small army wouldn't be good :D?
Is their anyway to place the Damage Reduction on the armor tab of the unit, when you hover over it?
Very nice, do you think with the introduction of Blizzard DOTA with the upcoming expansion they will have their own implication of a scaling %?
I am using this system for my mod and it works very well. I'm also using validators to create different attack types and it works without any problems. For my map, this system is essential so I cannot agree with you on your statement. It's much easier to balance units like this.
Not sure, how costly Log() and Pow() actually are, might need a test. I increase the attributes in the test map with an additional behavior, and it triggers the trigger for every single point of armor, even if you increase 255 points at once, causing the trigger to run 255 times at once needlessly as well.
Before disabling that, it produced a small, noticeable lag spike when doing 255 armor calculations in one time interval.
You could make the attribute visible and take it as your actual armor stat and rename the armor to damage reduction in the text editor and modify it to represent the damage reduction ;) (or add a new damage reduction attribute and adjust that accordingly)
Well, implementing a scaling % system is as easy as using one single stacking behavior. Since it stacks multiplicatively, you can stack it as high as you want, a 5% damage reduction behavior would never give you a 100% reduction, it would always reduce the remaining damage by another 5% for each new stack.
Recreating the WC3 system accurately is a little more complicated, because the calculation formula is different.
Like this? 0 Armor - 0% DR 1 Armor - 5% DR 2 Armor - 9.75% DR 3 Armor - 14.26% DR 4 Armor - 18.55% DR 5 Armor - 22.62% DR
Compared to WC3's
1 Armor - 5.66% DR 2 Armor - 10.71% DR 3 Armor - 15.25% DR 4 Armor - 19.35% DR 5 Armor - 23.08% DR
Hmm interesting, what does WC3's armor do that this couldn't. other than be the exact thing? If it does work like this, then ill defiantly use the simpler version
I made a comparison a while ago, these are comparisons between a WC3 armor system and the simplified stacking damage reduction behavior. As you can see, the progressions differ a little:
f(x) (blue) represents the simplified system, using a stacking 4% damage reduction behavior
g(x) (red) represents the WC3 armor system.
The simplified system has a more steep progression, making the armor weaker by trend at low values and stronger at high ones, compared to WC3 armor.
Also WC3 armor was designed to add an additional 6% ehp based on the base hp, while the simplified system would always add a percentage of current ehp. So the ehp progression for WC3 armor is linear, for simplified it is exponential.
@Kueken531: Go
So having the max armor a unit would have at like 15-25 the difference is minor
@Vaaz86: Go Well I didnt take the taime to actually understand the table in your link, but I guess its based on the standard reduction armor gives. I'll try to explain my idea a little better and then you can decide if it fits your needs:
1- Armor itself stays unchanged, you just have to decide % of damage reduced by each armor point.
2- Each damage effect has an Armor Reduction field. Its usually 1 for all attacks and 0 for spells, but you can use this field to achive something different. As an example, if your attack effect deals 15 damage, you can set armor reduction to 1.5 so armor actually reduces 10% per level. For another effect that deals 5000 damage, you just need to set it to 500 and it will also reduce 10% per level.
While it may have many minor complications based on how data works, it is extremely easy to create compared to the other options.
@SoulFilcher: Go
This has some issues, if you have any way to boost damage. If you, for example, can buff your physical damage by 100%, you effectively reduce the impact of armor by 50%
If we take your 5000 damage effect and say, the enemy has 5 armor, so reduces the damage by 2500 this means a 50% armor reduction.
Now the attacker gets 100% damage buff, deals 10.000 damage. But still, the armor reduces only 2500, so 5 armor does only reduce damage by 25%.
You can definitely pick values to make both progressions quite similar for a set interval. For games with a controlable, low-ish amount of maximum armor, this is a valid method. However, for games with huge or even potentially unlimited amounts of armor, this might raise some armor-related imbalances, and you might end up not finding values to represent your desired behavior.
@Kueken531: Go Yes, I know there are complications. At least by upgrades its possible to adjust reduction as well, so upgraded damage won't be a problem. I don't know if its possible to adjust the reduction field through behaviors or some other way, but maybe in this case there's a data-only workaround.
I didn't put much time on thinking about this system so I actually don't know all the issues or how to fix them. As I said before it could fit his needs. For maps that doesnt have damage buffs like that it wouldn't be a problem.
No way, this will work. Think about it: You need to modify every single damage effect every time the armor changes. Also, this only works, if you only have one single unit using armor, or you would need to adjust the effects dynamically for every shot.
Thats correct.
Not true. That damage reduction applies for all armor levels in all units. All you have to do is when you upgrade that damage effect is to "upgrade" its damage reduction as well to adjust it to the new upgraded value.
Yes, seems I thought about it the wrong way ;)
Lets say a use a simple 4% DR per armor like discussed earlier, how would you implement negative armor