• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Editing WESS Damage Detection (For Spell Damage)

Status
Not open for further replies.
Level 2
Joined
Mar 14, 2009
Messages
9
Hey guys! I recently implemented

Snippet - GUI-Friendly Damage Detection

Into my map however, I quickly realized it doesn't account for any armor reduction whatsoever. I tried to adjust the 'show damage' section into this.


Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(GDD_DamagedUnit has buff Ultravision) Equal to True
Then - Actions
Floating Text - Create floating text that reads (String(GDD_Damage)) at (Position of GDD_DamageSource) with Z offset 30.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Else - Actions
Set UnitArmor[1] = ((Armor of GDD_DamagedUnit) x 0.06)
Set UnitArmor[2] = (1.00 + ((Armor of GDD_DamagedUnit) x 0.06))
Set UnitArmor[3] = (UnitArmor[1] / UnitArmor[2])
Set UnitArmor[3] = (1.00 - UnitArmor[3])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
GDD_Damage Greater than 0.00
Then - Actions
Floating Text - Create floating text that reads (String((GDD_Damage x UnitArmor[3]))) at (Position of GDD_DamageSource) with Z offset 30.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Else - Actions
Do nothing


(In case you're wondering I'm making my spells apply the buff Ultravision so I can detect what type of damage it is in order to change the text color).
Wait I'm confused suddenly it shows spell damage properly when I make my scaling ability do this.


Then - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (1.00 x (Real((Strength of (Casting unit) (Include bonuses))))) damage of attack type Spells and damage type Magic

(Had to make Damage type magic)






I still have a problem with it displaying Siege damage properly when it's hitting Fortified. (It's showing 119 damage on the damage display however, the tower is actually taking 134 damage.)



Edit: Okay well scratch everything I said I'm an idiot however, the damage showing doesn't seem to properly work when a hero does 1 damage. It still shows 1.000 instead of 9.43 like it's supposed to (When attacking a unit with 1 armor and 6 % reduction).
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
How To Post Your Trigger

Armor can't reduce damage below 1.00, only Hardened Skin can; see this post by me for an explanation: Hardened Skin ability and armor not stacking.

Blizzard added a bunch of new damaged event natives to the game in some recent updates and basically all old DDSes are completely obsolete (especially something literally a decade old on a site that was never known for quality code (sorry not sorry, TheHelper)). What you should be using is probably this: Damage Engine 5.4.1.0. It allows you to get damage type, attack type, weapon type, before/after modification values, and to change it all yourself as necessary. If you really want to use something lightweight, Bribe made an edit of PDD by looking_for_help which you can find here: Physical Damage Detection for GUI v1.3.0.0
 
Status
Not open for further replies.
Top