• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dominating Armor Value

Status
Not open for further replies.
1 Armor = 1% resistance
-7 Armor = -7% resistance
30 Armor = 30% resistance

Is there a way to controll the ammount gained from armor value in order to
make this?
Also, is there a way to form a cap to armor?
30 Armor = 30% resitance
31 Armor = 30% resistance
32 Armor = 30% resistance

EDIT: In beggining I thought it was impossible but we somehow found a way to do it
Skip to last massage to view a way that works!
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Damage Reduction or Increases for Armor
For positive Armor, damage reduction =((armor)*0.06)/(1+0.06*(armor))
For negative Armor, it is damage increase = 2-0.94^(-armor) since you take more damage for negative armor scores.

source

The 0.06 respectively 0.94=1-0.06 stem from gameplay constants. You cannot have another formula. Of course, you can make your own damage system but that won't change the display when hovering over armor.
 
source

The 0.06 respectively 0.94=1-0.06 stem from gameplay constants. You cannot have another formula. Of course, you can make your own damage system but that won't change the display when hovering over armor.
I don't see how this is possible, you said that the game is hardcoded to give pierce attack that hit unarmored damage:
Damage from attack (say 100) * armor in editor (1.50) = 150
150 * Armor Points (say resistance 30%) 0.3 = 100 total damage
Give green armor points, will ruin this delicate process: it both knows the attack type , the armor type and other stuff that normal function can't find
Even if there was a way to set 100 armor = 0% and I need to ghess the
attack type used, either it will need each model on warcraft to set in special
trigger the unit armor or defense type, or use some imba hardcoded JAZZ
which is hiden from GUI
I don't see any way to make this happen, do you?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can get the damage taken from a damage system. This already includes the armor/weapon type, so you don't need to know those.
You can calculate how much armor a unit has. This isn't very hard to do, but just takes some time.

If the damage system says "163 damage taken", and the armor system says "damaged unit has 20 armor", then you can just do 163*0.80 and get the outcome (which is about 130 damage).
Because there's a difference of 33 damage, you need to heal the target. Don't worry about targets dying: the damage system activates before any damage is actually dealt.

Edit: oh, and you don't 'have' to set all armor to 0% (which is quite easy: just set the constant to 0.00), but it's recommended (otherwise you need to calculate that discrepancy as well).
 
set all armor to 0% (which is quite easy: just set the constant to 0.00), but it's recommended (otherwise you need to calculate that discrepancy as well).

Wait, you mean the "Combat - Armor Damage Multiplier" ?
It set to 0.06
Maybe, if I use 0.01 , all armor = 1 ?

Edit:
(-6)(-12)(-17)(-22)..... (-46) n=-10
(1)(2)(3)(4)... (9) n=10
Na, it wont work

Is there a way to detect how much armor a unit has (for multiplaying correctly)?
 
you can also make an abilitie ther Reduces ammo

What do you mean by that? I just need a JASS command to detect corrent armor

You can get the damage taken from a damage system. This already includes the armor/weapon type, so you don't need to know those.

Funny fact: this will make armor points to reduce damage taken from poisons and spells xD.
 
Because there's a difference of 33 damage, you need to heal the target. Don't worry about targets dying: the damage system activates before any damage is actually dealt.
Note that if the unit has full hp, then you cannot heal it unless you temporarily increase it's max hp first.

You could also just apply the heal after the damage but then you would be screwed in a situation when a full HP unit should be saved from a killing blow by it's armor.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Note that if the unit has full hp, then you cannot heal it unless you temporarily increase it's max hp first.

You could also just apply the heal after the damage but then you would be screwed in a situation when a full HP unit should be saved from a killing blow by it's armor.
Indeed, you're right. I think Bribe's damage detection system comes equipped with such an ability.

Wait, you mean the "Combat - Armor Damage Multiplier" ?
It set to 0.06
Maybe, if I use 0.01 , all armor = 1 ?
Yes, but I said "0,00". That makes all armor reduction 0%. It's easier to calculate with that.

Is there a way to detect how much armor a unit has (for multiplaying correctly)?
Yes, there is.
A cheap way is this: Cheap Armor Detection] (the negative one is wrong though :D).
The best way is to store the armor value of all abilities, buffs and items somewhere and then add them up. If you use BonusMod, you can easily get the bonus armor from that system.
 
Indeed, you're right. I think Bribe's damage detection system comes equipped with such an ability.


Yes, but I said "0,00". That makes all armor reduction 0%. It's easier to calculate with that.


Yes, there is.
A cheap way is this: Cheap Armor Detection] (the negative one is wrong though :D).
The best way is to store the armor value of all abilities, buffs and items somewhere and then add them up. If you use BonusMod, you can easily get the bonus armor from that system.

This is my damage detection system, sorry for unrelevant stuff.
(the first conditions for special spells who deal damage, and
dont make the previous damage to interfear)

  • Damage Detection
    • Events
    • Conditions
      • (Damage source) Not equal to UndetectableDummy[1]
      • (Damage source) Not equal to UndetectableDummy[2]
      • (Damage source) Not equal to UndetectableDummy[3]
      • (Damage source) Not equal to UndetectableDummy[4]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Damage taken) Not equal to 0.00
        • Then - Actions
          • -------- ARMOR SET --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is A Hero) Equal to True
            • Then - Actions
              • Set damagetakenreal = (Damage taken)
              • Set int = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Faerie Fire) Equal to True
                • Then - Actions
                  • Set int = (int - 6)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Evasion (Melee) ) Equal to True
                • Then - Actions
                  • Set int = (int - 10)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Evasion (Range) ) Equal to True
                • Then - Actions
                  • Set int = (int - 10)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Inner Fire) Equal to True
                • Then - Actions
                  • Set int = (int + 5)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Metamorphosis) Equal to True
                • Then - Actions
                  • Set int = (int + 5)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Avatar) Equal to True
                • Then - Actions
                  • Set int = (int + 5)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Frost Armor) Equal to True
                • Then - Actions
                  • Set int = (int + 5)
                • Else - Actions
              • Set int = (Min(30, int))
              • Set int = (Max(-30, int))
              • -------- ARMOR SET --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • int Not equal to 0
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • int Greater than 0
                    • Then - Actions
                      • Set int = (100 - int)
                      • Set damagetakenreal_2 = (damagetakenreal x ((Real(int)) x 0.01))
                      • Set damagetakenreal_2 = (damagetakenreal - damagetakenreal_2)
                      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + damagetakenreal_2)
                    • Else - Actions
                      • Set int = (100 - int)
                      • Set damagetakenreal_2 = (damagetakenreal x ((Real(int)) x 0.01))
                      • Set damagetakenreal_2 = (damagetakenreal_2 - damagetakenreal)
                      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - damagetakenreal)
                • Else - Actions
            • Else - Actions
          • Set p = (Position of (Triggering unit))
          • Set R1 = (X of p)
          • Set R2 = (Y of p)
          • Custom script: call RemoveLocation(udg_p)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Damage source) is A Hero) Equal to True
            • Then - Actions
              • Set A = (Player number of (Owner of (Damage source)))
              • Set ug = (Units within 300.00 of (Point(R1, R2)) matching (((Matching unit) Not equal to (Triggering unit)) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Player(A))) Equal to True)) and ((Level of Proof of being dummy (
              • Unit Group - Pick every unit in ug and do (Actions)
                • Loop - Actions
                  • Unit - Cause UndetectableDummy[A] to damage (Picked unit), dealing (Real((Max(1, (Integer(((Damage taken) x ((Real((Level of Cleaving Attack (100 levels) for (Damage source)))) x 0.01)))))))) damage of attack type Spells and damage type Force
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Cleave\CleaveDamageTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
              • Custom script: call DestroyGroup(udg_ug)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is in unitgroupUntext) Equal to False
            • Then - Actions
              • Unit Group - Add (Triggering unit) to unitgroupUntext
              • Floating Text - Create floating text that reads ((String((Integer((Percentage life of (Triggering unit)))))) + %) at (Point(R1, R2)) with Z offset 50.00, using font size 12.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Percentage life of (Triggering unit)) Less than 70.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Percentage life of (Triggering unit)) Less than 40.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Percentage life of (Triggering unit)) Less than 30.00
                        • Then - Actions
                          • Floating Text - Change the color of (Last created floating text) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
                        • Else - Actions
                          • Floating Text - Change the color of (Last created floating text) to (100.00%, 27.00%, 0.00%) with 0.00% transparency
                    • Else - Actions
                      • Floating Text - Change the color of (Last created floating text) to (100.00%, 90.00%, 0.00%) with 0.00% transparency
                • Else - Actions
            • Else - Actions
        • Else - Actions
I had to write in the text "armor won't effect units" in order to not set each unit armor bonus to zero (my map intended for making heroes attacks unresistable).
The bugs are:
1) Spell damage is resistable via "armor"
2) if the damage is 100 and I reduce the 1% life afterwards, I fear that the reduced health will kill the unit without a killer, am I wrong?
 
Indeed, you're right. I think Bribe's damage detection system comes equipped with such an ability.

Yes, but I said "0,00". That makes all armor reduction 0%. It's easier to calculate with that.

This is wrong!
0.00 will force (1)(2)(3)(4) = (0%)(0%)(0%)(0%)
(-1)... (-10) = (-7%)...(-46%)
Conclutions:
1) It's impossible to controll armor bonus, since negetive
bonus will apply allways.
2) Using damage detection will force spell damage to
be reduced by armor and increased damage will kill the unit without killer, if the damage was not enough but the reducion was enough
3) Setting the global units armor to 0.00 is the only way to ensure somthing is working. -_-
4) The armor system of warcraft is the only thing a map
maker can use , ARMOR IS NOT DOMINATED ABLE and this is marked as huge failure
Thanks for all those who try and gave their knowledge
This is marked as "closed, unsolved"

EDIT: In beggining I thought it was impossible but we somehow found a way to do it
Skip to last massage to view a way that works!
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
The negative should theoretically be 0% when the constant is 0,00 (because math).
After testing, it seems the formula for negative armor doesn't care about any constants and is always the same.
Because it's always the same, it can be calculated.

1) Spell damage is resistable via "armor"
Trigger your spells. If you're going to care about creating an entirely custom armor system, then you might as well trigger all the rest.

2) if the damage is 100 and I reduce the 1% life afterwards, I fear that the reduced health will kill the unit without a killer, am I wrong?
I don't know what you're trying to say. If you trigger the damage, then it has a killer.

Edit: to all map makers: PLEASE MAKE SURE TO NOT FOLLOW THE ATTEMP NOTED HERE, THEY ALL FAILED AND THERE IS
ABSOLUTLY NO WAY TO CONTROLL THE ARMOR SYSTEM IN THE ORIGINAL PLACE
DON'T WASTE YOUR TIME LIKE WE DID!
As said before: it's still possible to create your own armor system.
We already knew at the start that the armor value shown in-game wouldn't be correct as it is hard-coded. That's pretty much the first thing that was said in this thread.


So yeah, it seems possible to me. Just a little difficult, but possible nonetheless.
 
The negative should theoretically be 0% when the constant is 0,00 (because math).
After testing, it seems the formula for negative armor doesn't care about any constants and is always the same.
Because it's always the same, it can be calculated.

Calculated but not dominated, I need -10 Armor Points to apply -10% resistance, this is probably THE most important thing that my map need, A DOMINATED RESISTANCE, if this can't be done, there is no point in any other tries.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You used "dominated" before, but I don't know what you mean with that.
If it can be calculated, it can be modified.

What you need to do is calculate how much armor a unit has (with some system), then counteract all bonus damage done due to the armor.
Once all damage has been counteracted (so you know that the only damage modifier is now attack/armor type), you need to start modifying that a bit more according to the armor.

Here's an extended example:

Attacker: attack type "Normal" (x1.5 against medium), 10-10 base damage.
Defender: armor type "Medium", -2 armor.

Damage event: 10 (base) * 1.5 (attack/armor types) * 1.12 (12% bonus damage against a unit with -2 armor) = 16.8 damage detected.
Detect armor: defender has -2 armor (calculated).

Modify damage: damage = damage (event) / 1.12 (calculated) = 15 (this only includes attack/armor types).
Modify damage: damage = damage * 1.02 (this is "1 - (armor/100)") = 15,3 damage

-> Deal damage.


With such a system, the armor amount indicates the resistance. So 50 armor = 50% damage reduction; -8 armor = 8% damage increment.
That's what you wanted, no?
 
You used "dominated" before, but I don't know what you mean with that.
If it can be calculated, it can be modified.

What you need to do is calculate how much armor a unit has (with some system), then counteract all bonus damage done due to the armor.
Once all damage has been counteracted (so you know that the only damage modifier is now attack/armor type), you need to start modifying that a bit more according to the armor.

Here's an extended example:

Attacker: attack type "Normal" (x1.5 against medium), 10-10 base damage.
Defender: armor type "Medium", -2 armor.

Damage event: 10 (base) * 1.5 (attack/armor types) * 1.12 (12% bonus damage against a unit with -2 armor) = 16.8 damage detected.
Detect armor: defender has -2 armor (calculated).

Modify damage: damage = damage (event) / 1.12 (calculated) = 15 (this only includes attack/armor types).
Modify damage: damage = damage * 1.02 (this is "1 - (armor/100)") = 15,3 damage

-> Deal damage.


With such a system, the armor amount indicates the resistance. So 50 armor = 50% damage reduction; -8 armor = 8% damage increment.
That's what you wanted, no?

It is! but when you are hovering over the armor value, you get to see "-46%", even if I used the armor detect system, it will not look well and will cause quite a lag ( each unit get damaged each second then healed, each player get milion notes about his unit being damaged and pings all over the map, and the lag just increases as I add and remove health, while 1 hit can kill unit without saving it from killing blow) overall , I prefere not being able to dominate armor points if this lag and bugs are the cost. It could be usefull for maps who have nothing exept for that, since it make lags/bugs and should be used on small map who has nothing else to increase the lag. I just decided it wouldn't worth it, though your way of doing was really creative and extreamly usefull, damage detection + armor detection and then heal and create your own damage, could be neat if it would actually work :)

Attacker: attack type "Normal" (x1.5 against medium), 10-10 base damage.
Defender: armor type "Medium", -2 armor.
Damage event: 10 (base) * 1.5 (attack/armor types) * 1.12 (12% bonus damage against a unit with -2 armor) = 16.8 damage detected.
Trigger: heal the unit for 16.8 damage!
Comment: Unit is now as it was before taking the damage.
Detect armor: Dummy damaged the unit for 10 damage and detected 12 life missing, then healed it back
Cooment: detecter spotted that the defender has -2 armor (calculated).
Modify damage: damage = damage (event) - (12%*(damage (event)) = 10 (the original damage before the reisstance).
Modify HEALTH POINTS: lower unit health by (found armor) 2*(damage event) = 2 extra damage
Total damage done: 12 damage which are 10-10 +2% for armor resistance

Pros:
1) All resistance is now possible to be dominated
2) Spell damage will be reisisted
3) No need to form armor detector each second to global, unrelevant units, but only to the ones who take damage

Cons:
1) Maybe cause lags, need to check
2) Spell damage will be resisted
3) Damage that was enought to kill unit, will not be resisted to save it from killing blows

Note: Spell damage resisted via armor, its both a con and a pro, since it depends on what the map maker want.

Solved!!!!

EDIT: In beggining I thought it was impossible but we somehow found a way to do it
Skip to this massage to view a way that works!

***Attached a try map, tell me what you think?
 

Attachments

  • Armor Dominator 0.01.w3x
    18.5 KB · Views: 59
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
It is! but when you are hovering over the armor value, you get to see "-46%", even if I used the armor detect system, it will not look well
I cannot deny this, nor have I ever. You can change the text that says "Damage Reduction:" to something like "Redundant:" though.
Still doesn't look good, but it will avoid any confusion.

will cause quite a lag ( each unit get damaged each second then healed, each player get milion notes about his unit being damaged and pings all over the map, and the lag just increases as I add and remove health, while 1 hit can kill unit without saving it from killing blow)
This is completely untrue.

"Damaged every second" is relative. If nobody's attacking, then nothing gets damaged/healed.
Every time a unit is damaged by a physical attack (because spells won't trigger the system, since spells are triggered themselves :D), you just deal damage once more and maybe increase the HP. This won't generate much stress on the system.
There are no additional pings whatsoever, no sounds that a unit gets damaged, none of that.

It also doesn't bug if you do it correctly and can be used on very large maps without any problems.
 
I cannot deny this, nor have I ever. You can change the text that says "Damage Reduction:" to something like "Redundant:" though.
Still doesn't look good, but it will avoid any confusion.


This is completely untrue.

"Damaged every second" is relative. If nobody's attacking, then nothing gets damaged/healed.
Every time a unit is damaged by a physical attack (because spells won't trigger the system, since spells are triggered themselves :D), you just deal damage once more and maybe increase the HP. This won't generate much stress on the system.
There are no additional pings whatsoever, no sounds that a unit gets damaged, none of that.

It also doesn't bug if you do it correctly and can be used on very large maps without any problems.

Check the test map, am I doing it wrong?

*** attached 2nd try
 

Attachments

  • Armor Dominator 0.02.w3x
    19.4 KB · Views: 58
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Yes. There's no need for the "notdetectedunit", just let the damage source deal all damage (and make sure you don't end up with an infinite loop).
The negative armor also seems to be incorrect.

I've attached a modified version.
It shows the armor and damage reduction of the targeted unit and the damage of the damage source without any resistance (it says "base damage" for simplicity, but it does include attack/armor types as they don't really matter here).

From there on, you can start modifying the damage (you've got all the variables you need). Only at the end do you deal the modified damage to the unit.
There are still some bugs to fix, but it's a demo-version for a reason.
 

Attachments

  • Get Armor and Damage.w3x
    18.5 KB · Views: 55
Yes. There's no need for the "notdetectedunit", just let the damage source deal all damage (and make sure you don't end up with an infinite loop).
The negative armor also seems to be incorrect.

I've attached a modified version.
It shows the armor and damage reduction of the targeted unit and the damage of the damage source without any resistance (it says "base damage" for simplicity, but it does include attack/armor types as they don't really matter here).

From there on, you can start modifying the damage (you've got all the variables you need). Only at the end do you deal the modified damage to the unit.
There are still some bugs to fix, but it's a demo-version for a reason.

Ok this is my final version, I worked all day and still it looks like this: it suck!!! you can't controll armor resistance since you have to heal the unit asap as the damage is done, then deal your own damage that you want the unit to take!!! BUT THEN THE UNIT AGAIN RESIST THE NEW DAMAGE, THAT NEW DAMAGE IS OUT OF CULCULATION HENCE CREATING NONE-RELAYABLE SYSTEM IN WHICH YOU HEAL THE ORIGINAL DAMAGE AND DEAL KNOWN AMMOUNT OF DAMAGE THAT CANT MATCH BOTH SYSTEMS (WARCRAFT AND YOUR OWN)
damage = 50
armor = 32%
GOAL DAMAGE: 50-9% = 45.5 (since 9 armor =9% in this system)

1)damage taken was healed and instead you deal 50+9% = 54.5
unit take the new damage and resist it. 54-32% = 36.72
^ fail
2) Deal 50+9%+32%
The total damage, 71.94, was reduced by armor
71.94*(only 68% was taken due to 32% armor) = 48.9192
^ fail
3) what was the goal? 45.5, in terms of unit armor its
Damage*0.68=45.5
damge= 45.5/0.68 = 66.911764705588235
Yea. Good luck making that ^

Seryesly, I think tring to modify warcraft engeen is way harder than accepting it.

***Attached 3rd fail
 

Attachments

  • Armor Dominator 0.03.w3x
    20.6 KB · Views: 51
Level 28
Joined
Jan 26, 2007
Messages
4,789
Here ya go. 100 damage versus a unit with 32 armor will result in 68 damage; versus a unit with -10 armor it becomes 110 damage.

If the armor becomes too high/low, it becomes less accurate (because of Warcraft) at the moment.
However, this can be overcome by a simple system. The problem is that this simple system takes a while to set up (not in my test-map, but in actual maps).
You just store everything that can increase armor (abilities, buffs, items, triggers) and then see if the unit has those things. It's 100% accurate.
 

Attachments

  • Get Armor and Damage2.w3x
    34.8 KB · Views: 42
Last edited:
Here ya go. 100 damage versus a unit with 32 armor will result in 68 damage; versus a unit with -10 armor it becomes 110 damage.

If the armor becomes too high/low, it becomes less accurate (because of Warcraft) at the moment.
However, this can be overcome by a simple system. The problem is that this simple system takes a while to set up (not in my test-map, but in actual maps).
You just store everything that can increase armor (abilities, buffs, items, triggers) and then see if the unit has those things. It's 100% accurate.

Turn each and any model in warcraft world editor's armor into 0
turn each and any ability that effect armor in warcraft world editor into 0
give information on buffs that they give things, but don't touch armor value
give information on item that they give things, but dont give the abilities or give abilities with 0 ammount
^ this will take forever, but if its done this way, one can 100% for sure controll the warcraft 3 system damage reducer or increaser system, ofc, you will not see anything in user interface, just buffs with 0 set armor that is untouched
edit: its better than nothing, but Im not going to waste 3 hours on setting all models armor
2nd Edit: I don't understand what is your map doing, there is one trigger that looks with missing actions. I just think that this can actaully work:
unit with no armor but in ability its writen " lowered unit armor by 10%" and the unit take damage with this buff on it will have its damage x0.1 done to her from that sorce
and unit with ability that reduce damage will heal the unit, and then deal 100 - 0.1 x damage dealt after the healing, totaly nice. though I need 3 hours from now to set this
*sadly, poisons and spell are manipulated by armor due to this
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
2nd Edit: I don't understand what is your map doing, there is one trigger that looks with missing actions.
Oh, I didn't set the ability that dodges death, but that doesn't matter. The map works just fine.
You can type "-set 50" and the armor of the selected unit will be set to 50 (which means a 50% resistance).

Turn each and any model in warcraft world editor's armor into 0
1) Only those you use, it won't take that long (certainly not 3 hours).
2) You can also store the base armor in variables.
(Also, it's "units". Models are something different).


Your solution only works for melee attacks, not ranged.
I'm also heavily against using a lot of levels for abilities (increases loading time, causes FPS drop on first use).
 
Oh, I didn't set the ability that dodges death, but that doesn't matter. The map works just fine.
You can type "-set 50" and the armor of the selected unit will be set to 50 (which means a 50% resistance).


1) Only those you use, it won't take that long (certainly not 3 hours).
2) You can also store the base armor in variables.
(Also, it's "units". Models are something different).


Your solution only works for melee attacks, not ranged.
I'm also heavily against using a lot of levels for abilities (increases loading time, causes FPS drop on first use).

Its correct but I still don't understand how you managed to do it, if a unit has armor, then the total damage you will be giving it will need to bypass the unit corrent armor, means damage + ammount of damage that will negedate the unit natural armor + your own damage settings = (very hard to tell)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I kinda explained that before, but here we go again:

To negate armor you detect the resistance first (this is done by dealing a controlled amount of damage).
Then you reverse-engineer the formulas to get the armor.

From here on, it's very simple: multiply resistance and damage together to get the base damage.
E.g.: Resistance = 16%; Damage dealt = 55 ==> base damage (without resistance) = 63.8 (55 * 1.16).
And then you just multiply that number by the resistance you want.
If the unit has, say, 20 armor, you can multiply it by 0.80 (which gives a 20% resistance), or if it has -15 you multiply by 1.15 (giving a 15% damage boost).

Not too hard, just requires some thinking.
It would be easier to detect armor first and then calculate resistance from that (you wouldn't need the natural logarithm), but then you need the method discussed previously (check all abilities/buffs/items/...).
 
Your solution only works for melee attacks, not ranged.

I wanted to give you rep but it says I can only give once xD
Edit: will it work for spells? (since if it do, its still gonna mess our system)

I kinda explained that before, but here we go again:

To negate armor you detect the resistance first (this is done by dealing a controlled amount of damage).
Then you reverse-engineer the formulas to get the armor.

From here on, it's very simple: multiply resistance and damage together to get the base damage.
E.g.: Resistance = 16%; Damage dealt = 55 ==> base damage (without resistance) = 63.8 (55 * 1.16).
And then you just multiply that number by the resistance you want.
If the unit has, say, 20 armor, you can multiply it by 0.80 (which gives a 20% resistance), or if it has -15 you multiply by 1.15 (giving a 15% damage boost).

Not too hard, just requires some thinking.
It would be easier to detect armor first and then calculate resistance from that (you wouldn't need the natural logarithm), but then you need the method discussed previously (check all abilities/buffs/items/...).
Resistance = 16%; Damage dealt = 55 ==> base damage (without resistance) = 63.8 (55 * 1.16).

Resistance = 16%; Non-Resisted-Damage = 100%-16%= 84%
Damage dealt = 55 >>> Damage without reducion: without*0.84=55
without = 55/0.84
without = 65.47619047619048
Considering that damage is INT but armor is REAL, you should say
that the damage without reducion is ceiling toward 66.00
(and the real armor is just 0.012105415 so you shouldn't bother finding)


Conclusion: 66.00 (not) = (not) 63.8
system won't work.
Even if you found the 66.00 , you still need to think how to deal your own
damage that will go throught the unit defense without losing your own
uniqe system, I found that 3 days ago and given up -> for that reason
This is why making it in another way is more important:
set all units armor to 0, set all items abilities and auras to zero in armor.
set special abilities detectors (gonna be hard if you done it for buffs)
(since devotion aura on level 4 has undetectable level)
so to sum it up: zero armor.
Damage detect system that for increased damage do more damage
for reduced damage first heal and then do the reduced damage.
^ solved if done like this.

Edit: my culculator failed showing the correct number, I fixed.
 
Last edited by a moderator:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Edit: will it work for spells? (since if it do, its still gonna mess our system)
I believe I've covered this question a few times before.
Trigger your spells.

Non-Resisted-Damage = 100%-16%= 84%
Oh right, I actually did this in my system (got confused with the part after that :D).
So yes, 55/0.84
Considering that damage is INT but armor is REAL, you should say
that the damage without reducion is ceiling toward 66.00
And since when is damage an integer?
Damage is a real. It will be 65.48, not 66.00

Armor, on the other hand, should be an integer (not a real).

Even if you found the 66.00 , you still need to think how to deal your own
damage that will go throught the unit defense without losing your own
uniqe system, I found that 3 days ago and given up -> for that reason
Damn it, did you even check my system?
Doesn't it do exactly that? Why would you give up if you have proof that it works?

My system:
1) Finds the actual damage (65.48)
2) Change that damage according to the armor (if 20 armor, new damage will be 52.38)
3) Deals the changed damage back to the unit and this bypasses armor.

Do you understand that what you're trying to do has been done?
Edit: unless I'm missing something? Does my system not work correctly for you?
set all units armor to 0, set all items abilities and auras to zero in armor.
set special abilities detectors (gonna be hard if you done it for buffs)
(since devotion aura on level 4 has undetectable level)
so to sum it up: zero armor.
Damage detect system that for increased damage do more damage
for reduced damage first heal and then do the reduced damage.
^ solved if done like this.
This is absurd. It works perfectly fine as-is. The unit can have as much armor as he wants, the gameplay constant can be whatever you want.
 
this bypasses armor.
Wait! did you use chaos/unknown? if you did then WOW, this system will actually work!
damage taken = real, you are right, since spells deal real damage (via custom map editor choosing it) but damage is integer in unit attacks
Armor = real, sorry to break it up for you but when an hero armor says
"3 armor" it could mean 3.11505 (I checked it in trys 1 2 and 3)
So basicly your system take the damage, culculate the armor involved
and says the original damage, then, healing and deal damage that
bypass armor? if it does, then this version is APPROVED since
it's 100% dominate unit's armor and the only "bug" is that armor reduce
spell damge, which is for my map, a good thing. Thank you so much, I know
from my own tries that this wasn't an easy job. :D
I believe I've covered this question a few times before.
That question was pointed to spiked capuera , which you said only block melee attacks damage, does it reducde from spells?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Wait! did you use chaos/unknown? if you did then WOW, this system will actually work!
Bribe's damage detection has a "DamageModifierEvent", which allows you to modify the damage before it is dealt.
I believe it works with setting the HP of the unit, but it can still have a killing unit.
Edit: for clarity: the unit's HP is set (without dealing damage, because that might screw with armor type), but if the HP is set so that the unit dies, damage is dealt instead (this ensures that there is a killing unit).endedit

Armor = real, sorry to break it up for you but when an hero armor says
"3 armor" it could mean 3.11505 (I checked it in trys 1 2 and 3)
Right, I did this in the map (armor being a real). Don't know why I said otherwise.

"capoeira" (pronounced the same a "capuera") is a fighting style. You probably meant Carapace.
It doesn't detect this, but this is an extremely easy thing to create once you've got a damage detection system.
 
Last edited:
Bribe's damage detection has a "DamageModifierEvent", which allows you to modify the damage before it is dealt. I believe it works with setting the HP of the unit, but it can still have a killing unit. Edit: for clarity: the unit's HP is set (without dealing damage, because that might screw with armor type), but if the HP is set so that the unit dies, damage is dealt instead (this ensures that there is a killing unit).endedit
I don't see any reason to add "ifs" to a damage detection system which
is a spam system to begin with, the least actions, the best.
just "deal chaos / unknown" will be the non-condition-using hence the best.
And well, setting hit points (100/1000 remove 99 hit points) and the unit had desease cload on it (-1.00) well, stuff like that can form a crush
such as : boss dies, give item to killing unit and open a gate
killing unit = no unit
CRUSHED
I don't like using those at all!!! the only case when I use hp edit is healing.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I don't see any reason to add "ifs" to a damage detection system which
is a spam system to begin with, the least actions, the best.
Dealing damage has more negative sides. It's only 1 condition and, if done well, doesn't add any (noticeable) stress on the game.
In a system, you're looking for something that always works. This method always works and is pretty efficient. You don't have a better solution I presume?

just "deal chaos / unknown" will be the non-condition-using hence the best.
Not a good method for a system. If you make such a system for a specific map, sure, but for 'maps' in general you can't rely on that.
Setting HP is way better than using chaos for this.

And well, setting hit points (100/1000 remove 99 hit points) and the unit had desease cload on it (-1.00) well, stuff like that can form a crush
such as : boss dies, give item to killing unit and open a gate
The unit will just die because of disease cloud (which has an origin, thus also a killer) - no problems there.
Besides, in your example, even if you use "deal damage", there wouldn't be any difference? You deal damage, disease cloud takes the finishing blow.


You're not looking at it correctly. Setting HP is in no way harmful the way it is used.
Just trust me on this.
 
Just trust me on this.
I do trust you, just that disease claud won't give finishing blows, if the system fail to culculate 0.1 and form last hit - for whatever the reason is (phoenix negetive regeneration, who has no owner, and it was hit by disease cloud?) that kinda things are totaly critical and should be avoided.
(health points are real, 0.1 not in place and the game crushed)
But you probably more experienced at it and probably right.
All Hail Experienced :thumbs_up:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
disease claud won't give finishing blows, if the system fail to culculate 0.1 and form last hit - for whatever the reason is (phoenix negetive regeneration, who has no owner, and it was hit by disease cloud?) that kinda things are totaly critical and should be avoided.
Sorry, but that's bullshit. Negative regen/disease cloud/anything else doesn't even have the chance to activate between the time damage is dealt and HP is set (it's instantly). And there's no way the trigger can ever calculate that incorrectly. 0,1 HP isn't a problem, these reals are calculated way more accurately than that. The chance that there is ever a unit with 0.406 HP is so small that it's just not worth it to bother.
Did you know, that if you check for "Is Unit Dead", there's actually a 0.405 HP error? Did you ever have any problems with that? Then you certainly won't with a 0.001 HP error (if it's even that high).

Besides. If you deal damage (your option), you'll have the exact same problem. In fact, you'll have even more problems: what if there is no 'pure' (100% damage all the time) damage type? Then you're in trouble.

Also, the game won't be "crushed" by it (in the infinitesimal chance that something like that might happen).
There really is no problem with this method, not as far as I can see at least :p.
 
Sorry, but that's bullshit. Negative regen/disease cloud/anything else doesn't even have the chance to activate between the time damage is dealt and HP is set (it's instantly). And there's no way the trigger can ever calculate that incorrectly. 0,1 HP isn't a problem, these reals are calculated way more accurately than that. The chance that there is ever a unit with 0.406 HP is so small that it's just not worth it to bother.
Did you know, that if you check for "Is Unit Dead", there's actually a 0.405 HP error? Did you ever have any problems with that? Then you certainly won't with a 0.001 HP error (if it's even that high).

Besides. If you deal damage (your option), you'll have the exact same problem. In fact, you'll have even more problems: what if there is no 'pure' (100% damage all the time) damage type? Then you're in trouble.

Also, the game won't be "crushed" by it (in the infinitesimal chance that something like that might happen).
There really is no problem with this method, not as far as I can see at least :p.

the concept of instant damage is good, just that whenever we map editors
spy a critical error, we avoid it.
Event - unit dies
give 100 gold to killing unit (was not found)
^ error that crushes a game
Event - unit dies
if (killing unit [not] = [not] no unit ) give gold to owner of killing unit
//end if
open a gate and make it not invulnerable

^
zero game crush chance if you add this to each and any gate opened
and each and any reward given

or instead, you could make pure damage to make sure there was a killer

but I belive you when you say that instant damage + lag wont treat
hit point in a wrong way.
So maybe its not needed.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
the concept of instant damage is good, just that whenever we map editors
spy a critical error, we avoid it.
I have no idea what you're talking about. I don't see any critical errors :p.

Event - unit dies
give 100 gold to killing unit (was not found)
^ error that crushes a game
Won't cause a crash. No money will be given, that's all.

or instead, you could make pure damage to make sure there was a killer
Pure damage, how?
This system does make a unit deal damage, though it's not pure (just a very large amount to make sure the unit is dead).

But, as I said before, there will always be a killing unit with that system.
The examples you've given don't make much sense to be honest.
 
I have no idea what you're talking about. I don't see any critical errors :p.


Won't cause a crash. No money will be given, that's all.


Pure damage, how?
This system does make a unit deal damage, though it's not pure (just a very large amount to make sure the unit is dead).

But, as I said before, there will always be a killing unit with that system.
The examples you've given don't make much sense to be honest.

"When i use Death bomb from Deidara, my warcraft crash, fatal error."
http://www.hiveworkshop.com/forums/maps-564/4th-ninja-world-war-v1-12-a-226277/#post2253467
That is my map and error that caused the map to crush, it was
fixed due to making special treatment to "no unit"
^ proof that NoUnit will cause indeed a game crush, hence critical error
may occure without special treatment.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I didn't say "it can't make the game crash". I said it won't crash the game in your specific example.
Anyways, no need to worry about a null value for "Killing Unit". That system's got it covered.

I also think I'm done with this thread, I believe you've got what you were looking for?
(Also, you're from the USA? O__O)
 
I didn't say "it can't make the game crash". I said it won't crash the game in your specific example.
Anyways, no need to worry about a null value for "Killing Unit". That system's got it covered.

I also think I'm done with this thread, I believe you've got what you were looking for?
(Also, you're from the USA? O__O)

If I were from the USA my English wouldn't have so many damn miss spellings, I am from Israel.
Yea well, Null might indeed cause crush, weather you encountered it or not.
Marked Solved! :D
 
Status
Not open for further replies.
Top