SC2Mapster Forums

Resources > Tutorials

[Triggers, Data] Warcraft 3 Armor System

    #1 Aug 31, 2010 at 05:27 UTC - 0 likes

    Hello everyone.

    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.

    • Enjoy :P
    Last edited Sep 07, 2010 by KorvinGump
    Name Description Size MD5
    Warcraft_3_Armor_System.SC2Map Warcarft 3 Armor System 136.2 KiB 9ddf0bdc6ce9...

    Galaxy Vampirism

    #2 Aug 31, 2010 at 05:48 UTC - 0 likes
    Quote from KorvinGump: Go

    Only one problem, when damage > life of unit. So, he will die and last shot will be in Starcraft 2 system :D

    This isnt fun if the unit has about 95% damage reduction

    #3 Aug 31, 2010 at 06:51 UTC - 0 likes
    Quote from progammer: Go

    @KorvinGump: Go

    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.

    #4 Aug 31, 2010 at 08:42 UTC - 0 likes

    @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

    Last edited Aug 31, 2010 by progammer
    #5 Aug 31, 2010 at 09:12 UTC - 0 likes

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

    Last edited Aug 31, 2010 by KorvinGump
    #6 Aug 31, 2010 at 09:21 UTC - 0 likes

    @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

    #7 Aug 31, 2010 at 09:47 UTC - 0 likes

    @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?

    Name Size MD5
    Warcraft_3_Armor_System.SC2Map 86.7 KiB 41bf1e42410f...
    #8 Aug 31, 2010 at 12:22 UTC - 0 likes

    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.

    #9 Aug 31, 2010 at 13:58 UTC - 0 likes

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

    Homepage: www.sc2goa.com

    #10 Aug 31, 2010 at 14:29 UTC - 0 likes
    Quote from Hookah604: Go

    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

    #11 Aug 31, 2010 at 14:57 UTC - 0 likes

    @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?

    #12 Aug 31, 2010 at 17:24 UTC - 0 likes
    Quote from Ginsupup: Go

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

    Last edited Aug 31, 2010 by KorvinGump
    #13 Aug 31, 2010 at 19:37 UTC - 0 likes

    this system is extremely messy. has anyone figured it out with the data editor?

    #14 Aug 31, 2010 at 19:49 UTC - 0 likes

    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

    Last edited Aug 31, 2010 by dra6o0n
    #15 Aug 31, 2010 at 21:43 UTC - 0 likes

    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)

    Last edited Aug 31, 2010 by Sneakervek

    Avatar of Destiny

    Avatar of Destiny ORPG featuring 22 classes and extensive custom UI and features.

    #16 Sep 01, 2010 at 03:04 UTC - 0 likes

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

    Last edited Sep 01, 2010 by KorvinGump
    #17 Sep 01, 2010 at 07:05 UTC - 0 likes

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

    Last edited Sep 01, 2010 by KorvinGump
    #18 Sep 07, 2010 at 08:18 UTC - 0 likes

    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.

    Name Size MD5
    Warcraft_3_Armor_System.SC2Map 136.2 KiB 9ddf0bdc6ce9...
    #19 Dec 09, 2010 at 00:52 UTC - 0 likes

    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?

    Last edited Dec 09, 2010 by AgoutiByte
    #20 Dec 09, 2010 at 03:12 UTC - 0 likes
    Quote from AgoutiByte: Go

    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.

    http://img577.imageshack.us/img577/4226/blaj.jpg

You must login to post a comment. Don't have an account? Register to get one!