• 🏆 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!

Controlling Spell Damage

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
http://www.playdota.com/heroes/grand-magus
or
http://www.playdota.com/heroes/ancient-apparition

In both cases the spell damage type (and only it) was reduced or increased.
HOW?! :vw_wtf:

ok acctually i dont watched the source of dota but i am pretty sure they use a bit more complex spell system then default warcraft 3 ability, also i am sure they use something damage detection system and for each ability they store to a variable the damage type (or they use something similiar) and with damage detection system+damage system+trigger abilities this is possible.

1. detect if damagetype (in bribe gui damage system if u use custom triggers then u can do this DamageEventType=2 if magic damage is 2)
2. boost/reduce damage out depend on target magic defence/physical defence (easily its stored to integer/real variable like Pdef[custom value of unit])
3. boost depend from ur total magic damage (lets say this also a variable like: Total_Mattack=Equipment mattack[custom value of unit] + Stat mattack[custom value of unit] + Buff mattack[custom value of unit])

when u get buff then increase every friendly unit buff variable value with x
when u pick up a item or drop then increase or decrease item mattack
when u level up or stat again increase ur stat mattack

this just a example
 
Level 9
Joined
Nov 19, 2011
Messages
516
I saw that way:

-Make your buff.
-Make spell reduction (item based) skill.
-Make trigger which every second pick every unit in some AoE and adds to them this skill and after 1 second removes.

It works preaty nice. If you want better precision use lesser wait time, but 1 second is ok. In grand magus it works directly this way. If you will play DotA check the square where aura icon apears before you learned it. You will see thin rectangle like whith ability. Thats becouse he uses item spell resistance which icon not apears, so there must be empty skill that uses that slot with icon.
 
Level 15
Joined
Dec 19, 2007
Messages
1,233
I saw that way:

-Make your buff.
-Make spell reduction (item based) skill.
-Make trigger which every second pick every unit in some AoE and adds to them this skill and after 1 second removes.

It works preaty nice. If you want better precision use lesser wait time, but 1 second is ok. In grand magus it works directly this way. If you will play DotA check the square where aura icon apears before you learned it. You will see thin rectangle like whith ability. Thats becouse he uses item spell resistance which icon not apears, so there must be empty skill that uses that slot with icon.

Dota's spell damage controll is stackable with items, meaning that if you have damage reduce item, and aura , u obtain both benefits resolting in extra damage controlled.
 
Level 15
Joined
Dec 19, 2007
Messages
1,233
ok acctually i dont watched the source of dota but i am pretty sure they use a bit more complex spell system then default warcraft 3 ability, also i am sure they use something damage detection system and for each ability they store to a variable the damage type (or they use something similiar) and with damage detection system+damage system+trigger abilities this is possible.

1. detect if damagetype (in bribe gui damage system if u use custom triggers then u can do this DamageEventType=2 if magic damage is 2)
2. boost/reduce damage out depend on target magic defence/physical defence (easily its stored to integer/real variable like Pdef[custom value of unit])
3. boost depend from ur total magic damage (lets say this also a variable like: Total_Mattack=Equipment mattack[custom value of unit] + Stat mattack[custom value of unit] + Buff mattack[custom value of unit])

when u get buff then increase every friendly unit buff variable value with x
when u pick up a item or drop then increase or decrease item mattack
when u level up or stat again increase ur stat mattack

this just a example

"If attack type equall to spells" does not exist in the condition area.
 
Level 15
Joined
Dec 19, 2007
Messages
1,233
and oh, spell damage reduction abilities made from the same base ability are stackable as long as they are different abilities...
1) you cant go minus with spell reducion spell (item)
2) that ability havent got buff, even if u try add it buff it ignores it, meanning that no matter what you do you will end up having "the biggest dominant" with your colculation:
1) item have 55% spell reducion
2) hero have 55% spell reducion.

The end result: 55% spell reducion, not 110%.

Attached: map that proves it.
 

Attachments

  • test.w3x
    16.3 KB · Views: 118
Last edited:
Level 15
Joined
Dec 19, 2007
Messages
1,233
then use a Damage detection system and customize EVERY damage you have...
This is a crazy idea.
"player go blizzard: set "attack type = spells" "
"player ordered to attack: set "attack type = hero" "
Player used his unit to attack dont go change the damage type
Player went spell that go each and every 0.1 second, cycle between the damage type...

This is a crazy idea!!!! this will never work.
:goblin_jawdrop:
Instead we need an attack type condition which doesn't exist in World Editor, or a briliant idea to counter for that lack.

Note: I attached map that proves it in my last massage, check it.
 
Are you sure you know what DAMAGE DETECTION SYSTEM means?

becoz based on ur reply, you don't know what it is or at least doesn't know how to use one...

best player 88 said:
or a briliant idea to counter for that lack.
DDSs were made exactly to counter that lack...

and yeah, it might be a lot of work, but that's how we modders do customized damages [lots of maps out there, especially RPGs use fully customized damage systems and not wc3's system]... if you don't want to put a little effort, you can forget trying to make a map or whatsoever...

and oh, I think Nestharus' DDS allows you to filter out normal damage from spell damage without the need to set damage types or whatsoever...
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
This is a crazy idea.
"player go blizzard: set "attack type = spells" "
"player ordered to attack: set "attack type = hero" "
Player used his unit to attack dont go change the damage type
Player went spell that go each and every 0.1 second, cycle between the damage type...

This is a crazy idea!!!! this will never work.
:goblin_jawdrop:
Instead we need an attack type condition which doesn't exist in World Editor, or a briliant idea to counter for that lack.

Note: I attached map that proves it in my last massage, check it.

dont need periodic event for check simple u make ur spells urself with triggers then easily iu can store to a integer variable what damage do ur spell if u do a spell casting event

example:
if unit cast ur ability then then u put to ur variable 1 if physical 2 if magic etc

DDS system fireing out when u do damnage but still before target reicive the damage so u can modify ur damage as u want before the damage reach the target

u can see my signature map, there have physical defence and magical defence and both work with a damage reduction formula so the reduction raising exponentional
 
Level 9
Joined
Nov 19, 2011
Messages
516
1) you cant go minus with spell reducion spell (item)
2) that ability havent got buff, even if u try add it buff it ignores it, meanning that no matter what you do you will end up having "the biggest dominant" with your colculation:
1) item have 55% spell reducion
2) hero have 55% spell reducion.

The end result: 55% spell reducion, not 110%.

Attached: map that proves it.

If you wont to go under 0 hold shift. You can do it with everything. And onece again. Spell damage reduction works this way:

1) Base damage is 100.
2) Armor type reduction (hero usualy got 10) is 10%
3) Damage dealt is (100 - 10% * 100 = 100 - 10 = 90) 90.
4) Item spell reduction is 55%.
5) Damage took by hero is (90 - 90*55% = 40,5) 40,5.
6) Hero skill spell reduction is 55%.
7) Damage taken is (40,5 - 40,5*55% = 18,255) 18,255.
8) Total damage reduction = 81,745%
So spell damage reduction will never be 100%. Same goes to phisical reduction, but there WC3 says 100% reduction from 99,51%
 
Level 15
Joined
Dec 19, 2007
Messages
1,233
If you wont to go under 0 hold shift. You can do it with everything. And onece again. Spell damage reduction works this way:

1) Base damage is 100.
2) Armor type reduction (hero usualy got 10) is 10%
3) Damage dealt is (100 - 10% * 100 = 100 - 10 = 90) 90.
4) Item spell reduction is 55%.
5) Damage took by hero is (90 - 90*55% = 40,5) 40,5.
6) Hero skill spell reduction is 55%.
7) Damage taken is (40,5 - 40,5*55% = 18,255) 18,255.
8) Total damage reduction = 81,745%
So spell damage reduction will never be 100%. Same goes to phisical reduction, but there WC3 says 100% reduction from 99,51%

Its all nice and cute, but in the map the player took 1000-967=about 33 damage (the hero has hit point regain of 0.25 and 1 str so it can't be totaly accurate)
so lets check my theory:
1) base damage is 100
2) Gameplay Constants -> Combat: damage bonus table: spells -> hero -> 0.75.
3) there is 55% reducion meanning the damage is 45% of the normal.
4) when 2 types of reducion done, they wont stack.

100*0.75 = 75
75 * 0.45 = 33.75

judging by the total damage done (33 damage), 33.75 is closer than 18.255.
meanning this one is more accurate, and therefor I choose this version to be the real.

Check the new map without regenraion: I made archmage no regeneration at all and 100 total HP, if he stays with 100-33.75= 66.25 than i am the one with the correct answer. he stays with 67 (66.25 ^ int so it one above) I think I am right

NOTE: RUN THE MAP 2 TIMES : EACH TIME WITH OR WITHOUT THE SPELL ABILITY AND THE DAMAGE TAKEN STAYS THE SAME
---- POINT PROVEN ----
 

Attachments

  • test2.w3x
    16.6 KB · Views: 97
Last edited:
Level 15
Joined
Dec 19, 2007
Messages
1,233
which leads us to the conclusion that ur best bet would be to use a DDS...

Only if you attend to check each and every order if it was an attack order or a spell casting. Which is gonna be totaly buggy , laggy, confusing, and hard to make.
I don't want this methode, its totaly hard.
I think about new method:

Each second:
set ug = global map heroes, includes illusions.

pick every unit in ug:
set int =0; // counter set for each unit is reset
if (unit has "better item") {set int = int + 20}
else if(unit has "item") {set int = int + 15}

if (unit has buff "better buff" ){ set int = int +10 }
else if (unit has buff " buff "){ set int = int + 5 }
...
set level of "spell damage reducion" for picked unit to int
} //end picked
call remove group //end trigger

Problams:
1) in order to detect "better buff" the buff will be detected by ability with each level giving different buff; in order to 2 auras to stack correctly it must be "if better buff was found dont give normal buff increase"; cause normal aura can give 2 buffs at the same second, once it is leveled.

2) Each hero should have normal unit ability called "damage reducion" and the items or abilities cant give also, since they stack, and if i give some player MINUS reducion, it gonna be totaly problam if the item dominant over the trigger.

3) Mirror images get the same damage reducion as the hero -> fixedable by adding the check "also illusions", but im not sure if passive ability is changedable for illusions.

4) if a player hero cast a spell, it will only be colculated the following second, so it wont be done after 0.01 seconds unless the trigger will go wild

5) if a player hero has an aura, or it effect units, it will be harder to immidiatly update everything, plus u gonna give each and any unittype you are using on the map an ability "spell item reducion" which can be done by "trigger: unit enter map" so its not THAT hard: damage reducion is inviable anyways so u dont need to make spellbook

6) dont forget that units that has spell resistance dont need this ability, but having it anyways wont do any harm; towers , however, do need to be out of this trigger since they need to take blizzard damge and the such.

Concluding:
making 2 triggers: 1) bring damage reducion to global units, and entered units, but not towers.
2) trigger that works any 1 second, updating everything.
3) dunno if illusions can be changed.
4) create spell damage reducion have 41 levels: level 1 is the one given to all entering units and must be equall to zero, then u have to make some colculation that can give both + defense and MINUS defense; - use each level for 5% extra defense and never make abilities that go away from that count of x5 (overwize u pass the 100 levels of world editor defults) , use some formula that gives - spell defense if needed (PLEASE HELP ME WITH THAT).
5) the update done to living units every 1 second: it will not have immidiate update: can be imba bug for spells that give 99% spell reducion for 3 seconds.
6) most important : YOU CAN MAKE MINUS SPELL REDUCION!!! (attached map proves it).

Please tell me your opinion about how to make that formula.

Damage reducion level 1 = 0%.
Damage reducion level 2 = 5%.
...
Damage reducion level 22 = -5%
Damage reducion level 41 = -100%

so i think about this: "if integer less than 0"{
and then some colculate that make it fit that damage reducion level. so if he need to do -100% i will send him to int =41 and if its -5% i will send him to level 22.
}
 

Attachments

  • test3.w3x
    16.5 KB · Views: 92
Last edited:
Its not really hard if you put ur heart into it... anyway, I believe that is the best solution [supports almost any amount of %reduction/%bonus, highly modifiable etc]... if you don't want it, then I'm outta here...

btw, on ur suggestion, might want to make it run in less than 1 second to make it better... .3 would be the best for GUI...
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Problams:
1) in order to detect "better buff" the buff will be detected by ability with each level giving different buff; in order to 2 auras to stack correctly it must be "if better buff was found dont give normal buff increase"; cause normal aura can give 2 buffs at the same second, once it is leveled.

2) Each hero should have normal unit ability called "damage reducion" and the items or abilities cant give also, since they stack, and if i give some player MINUS reducion, it gonna be totaly problam if the item dominant over the trigger.

3) Mirror images get the same damage reducion as the hero -> fixedable by adding the check "also illusions", but im not sure if passive ability is changedable for illusions.

4) if a player hero cast a spell, it will only be colculated the following second, so it wont be done after 0.01 seconds unless the trigger will go wild

5) if a player hero has an aura, or it effect units, it will be harder to immidiatly update everything, plus u gonna give each and any unittype you are using on the map an ability "spell item reducion" which can be done by "trigger: unit enter map" so its not THAT hard: damage reducion is inviable anyways so u dont need to make spellbook

6) dont forget that units that has spell resistance dont need this ability, but having it anyways wont do any harm; towers , however, do need to be out of this trigger since they need to take blizzard damge and the such.

belive totally useless at all later....


in my example map u can do critical buff, hp buff (not the best scripted but easy to make) and easily can do critical/evansion/reflect (even damage is magical or ranged)/life steal/mana steal/critical damage, i also used attack level what again a different calculation also defence from defence level never reach the 100% reduction also near that could u make physical defence, lets say elemental defence...

maybe seems great effect but later u will see worth if u want a good system (gui damage system by Bribe damn easy to setup and easy to modify)

i also started in begning with item ability reduction with item damage increase, critical evansion reflect etc but it was damn much time waste coz u cant do a system without bug (best example the critical stacking and activateing with also buggy red damage text)
Another thing for making a good system i tryed make lv100 abilities from passives (ex: item mressist at lv10 reduced 10% magic dmg etc) but after was 10+ ability with lv100 was noticeable in loading time and finnally when i noticed its crap too then i tryed too the dds and i must tell its worth to try it, coz a good damage system with abilities its only time waste.............belive me, i tryed too ....
 
Level 9
Joined
Nov 19, 2011
Messages
516
You failed something. He stayed at 67 hp. I will check it.

woot. Sorry. That shoult be 67 not 33. ^^'

Now he stays at 82 HP which means that 18 was done. So I was right. You just used doubled base skill. If you will do 2x chain lighting skill it will not stack as well, but if 1 will be based on chiain lighting, and second on healing wave it will. Here you go your map fixed.
 

Attachments

  • test2.w3x
    16.8 KB · Views: 183
Last edited:
Level 15
Joined
Dec 19, 2007
Messages
1,233
You failed something. He stayed at 67 hp. I will check it.

woot. Sorry. That shoult be 67 not 33. ^^'

Now he stays at 82 HP which means that 18 was done. So I was right. You just used doubled base skill. If you will do 2x chain lighting skill it will not stack as well, but if 1 will be based on chiain lighting, and second on healing wave it will. Here you go your map fixed.
No dude, the culculation shows u were wrong, now about the -spell reducion:
it not effect healings which is good, but it will have some ishue with BANISH.
keep in mind.
 
Level 9
Joined
Nov 19, 2011
Messages
516
No dude, the culculation shows u were wrong, now about the -spell reducion:
it not effect healings which is good, but it will have some ishue with BANISH.
keep in mind.

Thats not what I was thinking about. When you use. Same types of skills just not stack with itself even if with other buffs. If I remember well Inner Fire not stack with itself even with diffrent name and buff.

By the way. Check attachment once again. I alredy reconized that I uploaded before saveing.:pshock: Sorry. There should be Elunes buff instead of item spell reduction.
 
Level 9
Joined
Nov 19, 2011
Messages
516
It stacks. I mean atribute bonus stacks for sure.
====================================
Take a note that atribute bonus was originali item skill, but I am useing it on heros. Maybe there is a point of our problem.
====================================
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
It stacks. I mean atribute bonus stacks for sure.
====================================
Take a note that atribute bonus was originali item skill, but I am useing it on heros. Maybe there is a point of our problem.
====================================

most (but not every, and have few where that already was noticed too in tooltip) of non aura item ability stacking, like damage from claws, speed from glove of haste etc

in my orpg map i use:

DDS(mostly calculation there but setting variable is in my triggers):
-critical strike
-critical strike damage
-life steal
-reflect
-mana steal
-evansion
-damage block chance
-attack level
-defence level
-physical defence
-magical defence
-physical damage percentage
-magical damage percentage

Settings via trigger:
-hp regen (periodic trigger)
-mp regen (periodic trigger)
-damage type (at ability cast trigger)
-vigor (at attack/cast)
-movement speed (at changeing the mov. speed)
-add/decrease stat (at changeing the agi/str/int)


Settings via abilities:
-attack speed
-damage
-change max hp
-change max mp

Conclusion the only 2 item ability worth to use for customize the damage and attack speed without getting buff icon and 2 ability for modify the hp and mp rest i think useless for a stronger system coz triggers resolve it
 
using the Unit - Damage target actions... and make sure that you don't modify the damage tables, because I believe that reduction due to armor type vs attack type still affects this... so I'll be using Chaos attack type which if you don't modify the damage tables, deal 100% damage to all armor types [compared to for example spell type which deals only 70% to hero type armor]... then you will use Divine damage type so that it won't take into consideration armor values etc...

  • Unit - Make Unit do Damage to unit of attacktype chaos damagetype divine
that's not the exact action, but you get the idea... just look for the similar looking action...
 
Level 15
Joined
Dec 19, 2007
Messages
1,233
using the Unit - Damage target actions... and make sure that you don't modify the damage tables, because I believe that reduction due to armor type vs attack type still affects this... so I'll be using Chaos attack type which if you don't modify the damage tables, deal 100% damage to all armor types [compared to for example spell type which deals only 70% to hero type armor]... then you will use Divine damage type so that it won't take into consideration armor values etc...

  • Unit - Make Unit do Damage to unit of attacktype chaos damagetype divine
that's not the exact action, but you get the idea... just look for the similar looking action...

Dunno, spells deal 75% exact damage to heroes regardless on armor value, Pure damage is the same, so it must be something else...

  • Unit - Make Unit do Damage to unit of attacktype chaos damagetype unknown
http://www.wc3c.net/showthread.php?p=1030046 =>Unknown=> Applies Armour Value => no.
 
Status
Not open for further replies.
Top