• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Detect Damage

Status
Not open for further replies.
create a dummy and order it to cast the waves and flames that the hero think he is the one who casts them, only take 0.01 longer and allows you to know that it was your hero attack or instead spells coming from the player (you could create hashtable if you want to know which of the player's specific hero did the spell if you need)
 
Level 10
Joined
May 21, 2006
Messages
323
USE BRIBES SYSTEM I FOUND A WAY TO DO IT!

For example take a spell like stormbolt then set the damage in the object editor to 0.01 points then you can say
If DamageDone = 0.01 modify the damage to random number between 30-50 points. The same works with Dots like Unholy Frenzy so you can detect dots the same way. It is pretty easy and in my opinion the properest way to do it. I would also suggest to do the same with Healing Spells. Don´t use the native healing spells. Just modify damage spells that they will heal friendly units in the end. Have Fun!
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
he asks how to, not linking a system.

However you use a ability that increases the ability damage taken. After that I dont know, I never got it when they explained it to me.

edit: oh I found the explanation.
The ability makes all spells deal negative damage. No damage can deal negative damage but spells. This means that if the damage is negative, the damage came from a spell.

The damage can only come from code if some sort of flag is set from the code. If the code sets that flag and deals damage, the damage must have come from code.

If the damage was not negative and the flag from code was not set, the damage must have come from some sort of physical attack.
 
Last edited:
Thats why it does not support Damage Type Detection.

Detecting triggered damage is trivial and can be done always and without this system.

Actually I understood his explenimation:
go editor -> abilities -> storm bolt damage
hit shift
set damage = -100
done.

go trigger -> create a new trigger
unit takes damage (this requires a sepcial method, ask if u dont know)
Condition (flag is active, ask if u dont understand)

set real = damage taken
if(real greater or equalls to 0){
//this means that the damage is attack, or an attack that hit harderen skin and was reduced to zero
}
else{
set flag = not working right now (this trigger, ask if you dont know)
cause damage sorce to deal [Real * -1] damage to trigger unit
//this will mean that the unit got healed instead of taking the damage and because of that you can detect the spell damage
}

This can work with many other ways but to make sure you understand me: this explain lacks some bug (what if the unit died and got removed and the damage over time still takes place? not having a damage sorce will crash the game)

Risks: There is no way to tell if a negetive damage deals 0 damage or heals, or how it works on 100% hp enemy or 1% which might crack this trigger.

Conclusion: this idea need more work for it and it will make the map editor to place negetive damage on each ability like orb of vemon and all other damaging abilities which will take a huge ammount of time, I try to point out that the idea is NOT EFFECTIVE - EVEN IF IT IS WORKING.
* Needs to prove that the system works.
* The system is too comlecated and there is no telling how the different spells work with it.
* The system force the map maker to work too hard in order to make each and any ability on Warcraft to fit it.

NOT RECOMMANDED (1/5)

Still recommanding having a dummy to cast spells for the Hero, this does not resolve how poison works, as poison will caunt as an attack and poison with manual cast would count as a spell.
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
go trigger -> create a new trigger
unit takes damage (this requires a sepcial method, ask if u dont know)
Condition (flag is active, ask if u dont understand)

Thats not possible for every spell. You can't set up the damage for Spirit Link for example, so no way to detect whether the damage was reflected or not. Spells like Death Coil won't work as they do no longer heal their targets. There are more examples but I think you see that this is not a good idea.

Still recommanding having a dummy to cast spells for the Hero, this does not resolve how poison works, as poison will caunt as an attack and poison with manual cast would count as a spell.

Thats why you should just use a DDS with DamageType Detection Support -.-

It works under all circumstances, is much more efficient and doesn't have such problems. Also you won't have to edit hundreds of abilities in the Object Editor and you can code the whole spell in a few lines of Jass or even GUI.

//this means that the damage is attack, or an attack that hit harderen skin and was reduced to zero

There are much more things to consider. Please take a look how current DDS work.
 
Too much for system, i think two trigger with 5-7 simple line in GUI will be enough and work perfectly fine.

Hehe, and how your going to determent which damage was done by an attack, by a slash attack, by poison orb or by manual cast ? the person asked for a way to determent spell damage from attack damage, and there is no way to do it in GUI, atlist, for the 8 people arguaing so far there is no way in GUI, everyone pointed out that there is a Version to do it in Jazz - which do it without any problam, with 2 guys creating the sistem Looking_for_help and another guy, I don't need such a system but if you do, go into "search" in this very page, go and write down "VJAZZ LOOKING_FOR_HELP DDS" and other words that the readers pointed to and get the system by downloading it from the posted page, I , as a GUI user, have never used jazz and never will use, I find it complecated to use words that if even one letter is misspelled the entire game won't start, so, I find it very disapointing that GUI couldn't handle the task.
 
Really ?, try this: This is not MUI, just a map example. If you want it can detect damage poison to enemies or damage orb, ect..., i can do that even detect healing hit points to allies, ATTACK_TYPE and DAMAGE_TYPE (It's need a little help from vjass) too..

other than that, all i need is doing some simple line in GUI version !!..

untitl62.jpg


You can download this map from attachment.
 

Attachments

  • DDT.w3x
    17.3 KB · Views: 48
Level 14
Joined
Dec 12, 2012
Messages
1,007
Really ?, try this: This is not MUI, just a map example. If you want it can detect damage poison to enemies or damage orb, ect..., i can do that even detect healing hit points to allies, ATTACK_TYPE and DAMAGE_TYPE (It's need a little help from vjass) too..

other than that, all i need is doing some simple line in GUI version !!..

You can download this map from attachment.

You didn't test it properly. You cant make a reliable system like that.

And thats not because your system isn't MUI and is leaking, the biggest problem is that it doesn't work properly.

Damage over time will be detected wrong, reflected damage will be detected wrong and damage coming from the same instance will be detected wrong. Good that you placed a Mountain King in the map. Try out his bash skill (25 Spell damage). Not detectable this way.

If a projectile flys long enough and you cast a spell in the meantime it will also be detected wrong. There are dozends of cases that break this method.

There is a reason why there are systems for this stuff ;)
 
You didn't test it properly. You cant make a reliable system like that.

And thats not because your system isn't MUI and is leaking, the biggest problem is that it doesn't work properly.

Damage over time will be detected wrong, reflected damage will be detected wrong and damage coming from the same instance will be detected wrong. Good that you placed a Mountain King in the map. Try out his bash skill (25 Spell damage). Not detectable this way.

If a projectile flys long enough and you cast a spell in the meantime it will also be detected wrong. There are dozends of cases that break this method.

There is a reason why there are systems for this stuff ;)

Yeah, sorry, i'm wrong -.-!!.., i've learned some thing new ^^...
 
Yeah, sorry, i'm wrong -.-!!.., i've learned some thing new ^^...

Hehe I just watched the map, creative way but it would fail.
Since its only shows last used animation and with enough units, that would not manage the speed of how fast the animation swap.
Edit: Physical damage detection looks awesome, I add it to my map (if I manage to understand how)
2nd edit: Physical damage detection cause all the triggers in my map to be X - unable to save or use, I dont know how to fix?
 
When you import vJASS (extension of JASS language which works only in JNGP) in normal WE there is bug that disable all the triggers.
Delete the vJASS triggers and re enable all the triggers.

I tried to, I even deleted all the variable that use it, there is no way to stop that bug, I can't see the file because of some Windows 7 error that thinks that the map should not be seen by a third party program - everything over than warcraft 3 editor will not see the file and even warcraft 3 editor shows the file with a weird simbol of locking key, to show its a private file, do you know how I can fix that error? I allready downloaded JNGP but I cant see the file (next time you post an hack for my project atlist give a warning?)
 
Ok, here you go. Map is fixed and works with the normal Editor.

I also implemented the DDS to the map, so you can use it straight away.

I have downloaded the map and about to test it

Edit: Its not longer buggy! THANK YOU!!! I WAS SURE I LOST MY WORK! on another subject, I dont understand how to use it, I need it to show a text above the damaged unit, but when the damage is from Spells, the string will be colored in black - can you do it? given its your system and that I allready created a trigger reffering to damage taken, just so I wont virus my map again, can you do it?

2nd Edit: I managed to do it by myself! you outta test it, It might not show bashes correctly (*** it actually do,but not for ranged attacks who bash, dunno why ****) but shockwave and the like are shown, walk in white path to summon enemies

+Rep, best system ever made!
 

Attachments

  • FF3 V2.2_Fixed.w3x
    106.5 KB · Views: 31
Last edited:
Level 14
Joined
Dec 12, 2012
Messages
1,007
Glad you got it to work :)

According to the ranged bash: You are right about that, but thats not cause the system has a bug but because Blizzard made Bash work quite weird.

If a melee unit has bash, the bonus damage will be dealt as extra spell damage to the target, just as everyone knows it from the Mountain King. But if a ranged Unit has Bash (like Archimonde), the extra damage will be added as physical damage to the units standard damage.

You can easily prove this by the following test setup. Take one Mountain King with 1 Strength Point and 100% Bash with 100 Damage and let him attack a Spellbreaker. The MK will only deal very little damage, because the 100 Spell Damage don't affect the Magic Immune Spellbreaker.

If you now take an Archmage with the same Setup (1 Intelligence Point) and the same Bash, he will deal about 100 Damage to the Spellbreaker! Why? Because the damage coming from the Bash is physical for ranged attacks.

Blizzard is sometimes crazy ;)
 
^ Whoa, +rep for that. I didn't really know about those stuff. So does that mean in your DDS that if it's a melee bash, it'll detect it as magic damage too? and if it's a ranged bash, it'll detect it as physical?

That is correct. Try my map to see how it was used and now that i know how I could explain to you if you need my help, also, its allmost 100% that if you copied the first trigger "initualizationize" and the trigger called "on attack" then it will work with zero bug for any map you copy it into.
About the bash: awesome knowledge, do you know more things that might be wierd for blizzard's abilities?
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
^ Whoa, +rep for that. I didn't really know about those stuff. So does that mean in your DDS that if it's a melee bash, it'll detect it as magic damage too? and if it's a ranged bash, it'll detect it as physical?

Yes, it detects everything correct. So a melee Bash is detected as Spell and Physical damage while a ranged Bash is detected as Physical damage only.

About the bash: awesome knowledge, do you know more things that might be wierd for blizzard's abilities?

There are many :D

One Example: Imagine a Blademaster that carries an Orb of Venom. If he is in Windwalk and attacks out of Windwalk a Ground Unit, the unit gets venomed. But if he attacks an Air Unit out of Windwalk, it does not get envenomed.
 
Status
Not open for further replies.
Top