Damage Filter

Necrolytie

Member
Reaction score
0
I'm trying to create a kind of "Extra Power" for the damage caused by the heroes, works in the following way, a trigger calculates the "Attack Power" that will be the extra physical damage caused by the hero, and another trigger calculates the "Spell Power" that will be the extra magic damage caused by the hero, however, I can not separate by the trigger when damage taken by the unit, if it is physical or magical, how can I "distinguish" from one another?

However, I accept any other idea to do.
 

Juggernaut

I don't know what to change it to
Reaction score
33
I think it's not possible to distinguish between magic or physical damage (at least not in GUI).

Maybe you could do a very complicated system where each time a unit casts a spell his custom value will change to 1, and when a unit attacks then change his custom value to 0.

Then using a damage detection system you check the units' custom value when the target took damage, if it was 1 deal magical damage and if it was 0 deal physical damage.
 

vypur85

Hibernate
Reaction score
803
As mentioned, they are indistinguishable.

Another alternative is using an buff placer orb attack ability (like slow poison) on all of your heroes. So whenever the hero deals damage via physical attack, it can be detected via the buff placed on the damaged unit. Other damages would be considered as magic. This, in my opinion, is not so game friendly though.
 

udg_local

New Member
Reaction score
4
Then using a damage detection system you check the units' custom value when the target took damage, if it was 1 deal magical damage and if it was 0 deal physical damage.

That won't work (due to spells with damage over time or attacks like bash that deal both physical and spell damage).

How so? I'm using it fine.

This kind of detection is very bugged.The main problems are:

  • If you add the orb ability to units with bouncing missles (like griffons), they can't attack anymore.
  • If you add it to an artillery and order it to attack ground, the game crashes completly.
  • Sometimes the attacked unit gets permanently slowed if it is attacked by many units, even if the buff is removed instantly.
Luckily you don't need such a system.

As mentioned, they are indistinguishable.

Yes they are, you are not up to date ;)
There has been a very recent developing of a system, which allows to distinguish between physical, spell or code damage.

[System] Detection of Physical Damage
[Extension] Damage Source Type
[System] DamageType (StructuredDD Extension)

These three systems are all based on the same idea to detect the damage type.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
If you add the orb ability to units with bouncing missles (like griffons), they can't attack anymore.
I trigger all my bounces and splashes.
If you add it to an artillery and order it to attack ground, the game crashes completly.
It doesn't help with attack ground, but so far I haven't had any crashes.
Sometimes the attacked unit gets permanently slowed if it is attacked by many units, even if the buff is removed instantly.
Never experienced this bug before. Are more than 10 units required?
 

udg_local

New Member
Reaction score
4
Never experienced this bug before. Are more than 10 units required?

You can read this for further information.
You can use the orb stuff in a very limited scenario, thats true. But with the new system its possible to detect the damage type in all cases and without re-triggering all bounces and splashes.
 

Necrolytie

Member
Reaction score
0
Yes they are, you are not up to date ;)
There has been a very recent developing of a system, which allows to distinguish between physical, spell or code damage.

[System] Detection of Physical Damage
[Extension] Damage Source Type
[System] DamageType (StructuredDD Extension)

These three systems are all based on the same idea to detect the damage type.

Well, I saw the 3 systems that passed to me, and apparently none of them really works....
I think i will have to think of another type of system to create extra damage ...
And also, they are all in JASS, and apart i'm HORRIBLE in JASS, i made unimaginable triggers with GUI, now in JASS if i write my name i will think i'm a genius of JASS :p
 

udg_local

New Member
Reaction score
4
Well, I saw the 3 systems that passed to me, and apparently none of them really works....

Then you implemented them wrong ;)
The systems work very well without any real limitations.

You can also also use those systems very easy in GUI: Just set a global variable to the damage type in the code and then check by an additional event for value of real variable -> There you go. This would be very easy to implement (about 3 lines of code). If you want I could help you with this.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I guess this can only be used in a limited set of maps ^)^, but in the cases where it can be used it's highly useful =).
I guess in my scenario it just might be plausible to rework this method in. Thanks for the info, we could really use it around here ^^

@Necrolytie: Would you like me to send you the GUI system I'm using? It's not as leak-free as the JASS version, but for me it works as needed.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Make sure to change the ability added in the triggers to your modified Spell Damage Reduction ability.
 

Attachments

  • Damage Detection - GUI.w3x
    22.5 KB · Views: 167

udg_local

New Member
Reaction score
4
Carefull: You can't just deal twice damage as the unit may die of that amount before getting healed. Check the linked systems for solutions to this problem.
 

Necrolytie

Member
Reaction score
0
Make sure to change the ability added in the triggers to your modified Spell Damage Reduction ability.

Thats NICE! wonderfull system, but i have one question... correct me if i'm wrog. The trigger set the damage take from the unit to 0, and after that will check if is pysichal or magic, and them deal the damage on the unit, right?

Soo, if i'm right, how can i add extra damages if has pysichal, and how can i add extra damages if has magic? I'm really confuse about that .-.
 

udg_local

New Member
Reaction score
4
No, it doesn't set the damage to zero.

As explained in the links above, every unit gets a modified version of the spell-damage reduction ability with 200% reduction vs spell damage. As a result, all spell damage is negativ and by now simply checking the sign of the damage, it is possible to distinguish between physical or spell damage.

I changed the version in the first link which now supports als GUI. Just go to the trigger DamageEvent GUI, there you can add all your code in GUI.
 

Attachments

  • DamageType GUI.w3x
    46.1 KB · Views: 163

Necrolytie

Member
Reaction score
0
No, it doesn't set the damage to zero.

As explained in the links above, every unit gets a modified version of the spell-damage reduction ability with 200% reduction vs spell damage. As a result, all spell damage is negativ and by now simply checking the sign of the damage, it is possible to distinguish between physical or spell damage.

I changed the version in the first link which now supports als GUI. Just go to the trigger DamageEvent GUI, there you can add all your code in GUI.


OMG! It's amazing!!! Thx you very much!

Soo i just need to add a new event between the "commenst" and vuala, it will work, right?

And this custom script thats call a "Message" for the players of the damage done i can remove?

"c) Then copy the custom ability dmgDetector to the object editor of your
map. Make sure it has the ability ID 'A000'." How can i choose the ID for the spell? o_O

[Edited] Never mind :p i maybe don't know how to do JASS but i know how to "Edit", not all scrip, but the Spell ID yeah, i did that, and i'm felling like a JASS Master LOL.

Thx you very much again for this amazing system... did you want some credits about this on my map?
 

udg_local

New Member
Reaction score
4
Soo i just need to add a new event between the "commenst" and vuala, it will work, right?

Right.

And this custom script thats call a "Message" for the players of the damage done i can remove?

Correct.

Thx you very much again for this amazing system... did you want some credits about this on my map?

Well, thats your decision, I don't ask for credits in general ;)

But nice that it helps you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top