[Solved] How do I change the Armor system? Haha! I did it!!

Status
Not open for further replies.
So, I've been playing quite a bit of Starcraft lately and I noticed that armor in SC is a direct form of damage reduction. (1 armor = 1 less damage take from attacks).

I want to implement the same system in Warcraft 3, I think its better as the 6/11/15% damage reduction armor does now, in some instances at least. It keeps each individual armor point keep the same value, instead of making additional armor almost useless when it exeeds over 10.

There are two small catches, though:

- No matter how much armor a unit has, I still want it to take a minimum of 1 damage per attack.
- The regular 6/11/15% armor system needs to be disabled somehow, I dont want both systems to be active at once.

I'm not asking for anyone to program it for me, I just need help programming it myself. I'm only using the standart world edittor and I'd prefer to use abillities somehow over triggers.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Why not use the... Stone skin (0) skill the one that reduces damage by X with minimum of Y.
Give all units that skill with lvl corresponding to the current armor and damage amount you want to reduce and 1 as minimum damage taken.

If you have huge damage amounts this would be bad though, e.g. 10000 damage and 5000 armor. This would work ok until like 20-30 armor.

No DDS required.
I am not 100% sure how this would interact with armor types, e.g. if siege does 200% damage to building and we have unit with 100 atk attacking building with 10 armor is it going to calculate as: ((100 - 10) * 2.00) or as (100 * 2.00 - 10).

Also,
It keeps each individual armor point keep the same value, instead of making additional armor almost useless when it exeeds over 10.
You are wrong on this. Each point of armor is as effective as the previous one.

regards
-Ned
 
Level 14
Joined
Jan 16, 2009
Messages
716
It keeps each individual armor point keep the same value, instead of making additional armor almost useless when it exeeds over 10.


In Warcraft 3 each point of armor has the same value even if you have already a large amount of armor - Armor does not have diminishing returns. There is a linear increase of the effective HP of a unit.
EHP = HP * (1 + armor * gameplay_constant).
 
Last edited:
Level 8
Joined
Mar 19, 2017
Messages
248
I made a map that features exactly this.
1. Set the armor multiplier constant to 0 (already said).
2. If spell damage will also follow the rule, then you will need a damage detection system that detects damage types, because each must be modified differently in the damage event trigger. See point 4.
3. You need a mechanism to get a unit's armor; for version 1.29 and above the new function is enough (note that the BlzGetUnitArmor returns total armor -base plus green-). Otherwise you will need a system that constantly track armor of units, accounts for base armor (a constant amount based on unit type id), and refreshes the data whenever armor is modified. Very tiresome if you ask me, but doable.
4. You need a mechanism that takes account for negative armor value, as negative armor damage increment will not be denied by the first point, so units with negative armor will take additional damage right of the bat. For spell damage this is bypassed by setting all custom damage you dealt as ATTACK_TYPE_NORMAL AND DAMAGE_TYPE_MAGIC (will not take into account vanilla WC3 armor, including negative values, at all). Vanilla spells, ie. Storm Bolt, follow the previous rule by default.
For attack damage this is more tricky, but for version 1.29 and above the new "get damage (base/dice/etc)" are enough (basically you set the damage amount as the unit's attack minus armor directly). For other versions you can do the previous thing via constant track of unit attack damage (again, tiresome but doable) or you can modify the damage event trigger so it fixes itself when damaging units with negative armor taking into account the negative armor value and using the negative armor percentage formula (you reverse the perecentage basically). The formula is (1 - 0.94^armorValue ( 1- (Pow(0.94,arm)) in JASS).
 
I nerfed it a bit, so 4 agility = 1 armor
upload_2018-7-10_19-40-44.png


For heroes it now works up to 15 armor, and traditional armor is disabled.
Only the initial armor abillity needs to be added manually to the hero.

I'm almost done with the creeps im using in my map, im adding their armor abillity manually.

For player controlled units I will bind it to the armor upgrades to upgrade.


But still, everyone thanks for their help: @Chaosy @nedio95 @Wareditor @IcemanBo @disruptive_
upload_2018-7-10_19-58-30.png

Sounds like a nice game, might check it out!! ;)
 

Attachments

  • upload_2018-7-10_19-40-3.png
    upload_2018-7-10_19-40-3.png
    24.7 KB · Views: 110
Last edited:
I used stoneskin abillities called 1 armor, 2 armor, 3 armor... up to 15

They reduce damage taken.

All abilities have a minimum damage taken of 1.

Heroes' armor abillity gets updated every time they level up, and reach a certain milestone of agility.

For creeps, I manually added the corrosponding armor abillity.

For player controlled units, it changes/upgrades with the reseach of armor upgrades.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
I used stoneskin abillities called 1 armor, 2 armor, 3 armor... up to 15

They reduce damage taken.

All abilities have a minimum damage taken of 1.

Heroes' armor abillity gets updated every time they level up, and reach a certain milestone of agility.

For creeps, I manually added the corrosponding armor abillity.

For player controlled units, it changes/upgrades with the reseach of armor upgrades.
Ah, so you basically did what I suggested... From your screenshot it looks like you are just giving them regular armor. Do tell how it works out.

-Ned
 
Well, I created 15 different abillities
upload_2018-7-10_22-21-7.png


Each of them gives as much damage reduction as their name says.

Traditional armor gives 0% reduction.

All damage reduction the unit has is from these abillities and is just as high as the actual armor of the unit.
 

Attachments

  • upload_2018-7-10_22-20-24.png
    upload_2018-7-10_22-20-24.png
    120.3 KB · Views: 100
Level 9
Joined
Apr 23, 2011
Messages
527
Sounds tedious to do. Especially if there are a lot of high armor units on the map.

DDS-triggered damage reduction would be easier and more efficient like the others suggested. But that works, too, I suppose.
 
Level 8
Joined
Mar 19, 2017
Messages
248
Not sure if Hardened Skin works for spell damage. I bet that it actually works tho.
If your method suits your particular needs, and you're ok with it's limitations and future implications, then it's alright.

In fact the method might work and be less trigger heavy, but your execution is strange.
Just make 1 ability and use multiple levels. With this approach you will just need 1 trigger and 1 comparisson for heroes also (when the hero levels you just set the level of the ability as Level of the hero/8, converted to integer of course). For regular units, i would just enum all units in the map and set the level of the ability accordingly. For new units, i would just make a trigger based in the "unit enters region" and set the level of the ability there.
Or just use an unit indexer already...

I don't know your trigger/wc3 programming knowldge, but all i already said is doable in GUI, and to be fair is kind of easy.
The tradeoff for executing the level approach is too huge, as you are no longer restricted to create 1 ability per armor value.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
I want to implement the same system in Warcraft 3, I think its better as the 6/11/15% damage reduction armor does now, in some instances at least. It keeps each individual armor point keep the same value, instead of making additional armor almost useless when it exeeds over 10.
Sounds like someone does not understand Warcraft III armor...

Each point of positive armor in Warcraft III is worth exactly the same as the previous and next point. This is because each point of armor represents a percentage increase in unit toughness when taking attack damage. By default a value of 6% per point of armor is used. This means that a unit with 100 hitpoints and 10 armor will be able to take 100*(1+0.06*10) damage or 160 damage from attacks, each point of armor granting an extra 6 damage worth it can sustain. A unit with 20 armor will be able to take 220 damage, again with each point of armor allowing it to take 6 more damage. As such more armor is always better in Warcraft III and armor will linearly increase your toughness to attack damage.

Sure adding 1 more armor at 10 armor will give you a lower relative toughness increase than at 0 armor, but the same can be said about health where adding 1 extra health at 1 health doubles your toughness but at 100 health is barely noticeable.

It is worth noting that this only applies to positive armor. Negative armor has its own mechanics which cap out at -20 armor and with even a few negative armor points raise damage towards 50%.

As for your problem...

In gameplay constants set the armor toughness bonus to 0.00 from 0.06. Then use an attack damage detection system and the brand new armor functions to trigger it all.
 
Status
Not open for further replies.
Top