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!
I recently got hold of looking_for_help's damage system, I'm having one (probably simple) issue. I didn't understand how to use his variable for spell damage reduction. I have LOTS of units and items that resist spell damage to different %s, so do I also need more than one variable? Again I'm not even sure how to use the one he starts you with.
I tried to work around having to use that variable by saying essentially ---
IF anything takes damage
OR - it's certain units / they have specific items / specific buffs
THEN - set PDD_Amount to (whatever it needs to be)
I thought that worked and it seems to by itself. So what's the problem you ask? In my map I have damage numbers that pop up over units, if that damage was done by a hero. With this new DDS system in, my problem is that as soon as anything in the map reduces spell damage (via my idea above), from then on, my SCT will many times not display. It also happens to heroes that have no spell damage reduction at all. It doesn't happen 100% of the time so I'm really confused.
---
P.S. is it only possible to have one trigger using this "Game - PDD_damageEventTrigger becomes Equal to 1.00" event? Whenever I make another trigger that uses this event (to better organize stuff) all other ones using it stop working.
No. The event has the same functionality as things like "A unit Starts the effect of an ability." The trigger's actions will run if the condition is met (if you have no condition, it will just run).
No. The event has the same functionality as things like "A unit Starts the effect of an ability." The trigger's actions will run if the condition is met (if you have no condition, it will just run).
I am afraid I can't help much because I do not really follow what problem you're having. Can you try to explain it more clearly?
What is SCT?
As KILLCIDE said, you could have 100 triggers with this event and they will all work fine. If it helps you visualize it better go to the demo map and test it out.
However your idea of how to tackle this problem is the right way, if you look through the system the "built in" spell resistance ability does just that, it takes the unit, checks to see if they're holding the item that provides "resistance" and adjusts the value accordingly.
// 5. As already mentioned you can't use the spell reduction ability when using this
// system (runed bracers and elunes grace). If you want to use them, you can
// trigger them by using the damage modifiers. Runed bracers is already considered
// in this system, so you don't have to code it.
This is an excerpt from the documentation saying that you need to do it this way.
My recommendation for whatever you're trying to get to work in tandem with this system, implement it on the demo map and get it working, then it should be much simpler to get it working on your own map. This removes the possibility of fouling something up on import and you don't have to worry about other happenings in your map causing unwanted interactions. (At least as you get it working)
SCT is a term meaning Scrolling Combat Text. As in showing a '50' above an enemy unit if i damage them that much, etc. etc.
here is a sample trigger that checks for a few different things and then modifies the damage.
Events
Game - PDD_damageEventTrigger becomes Equal to 1.00
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PDD_damageType Equal to PDD_PHYSICAL
Then - Actions
Else - Actions
Set SCT_PierceStackCheck = 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SCT_ResistStackCheck Not equal to 1
Or - Any (Conditions) are true
Conditions
(Unit-type of PDD_target) Equal to Felhunter (level 1)
(PDD_target has an item of type |cff00ff00Elemental Mage Staff|r) Equal to True
(Level of Sinister Presence (Sinister) for PDD_target) Equal to 2
Then - Actions
Set PDD_amount = (0.25 x PDD_amount)
Set SCT_ResistStackCheck = 1
Else - Actions
Set SCT_ResistStackCheck = 0
My actual trigger for this up here ^ is much longer so I cut it down for readability. If you're wondering what "StackCheck" is: say I have 2 rings, one gives 25% reduction and the other gives 30%. The 25 is ignored since 30% is a stronger reduction - they do not stack.
Down below this, I have a second IF statement. It determines whether to run my physical or magic SCT to show the already calculated damage.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PDD_amount Greater than 1.00
(PDD_source is A structure) Equal to False
(Owner of PDD_source) Not equal to Player 1 (Red)
(Owner of PDD_source) Not equal to Player 7 (Green)
(Owner of PDD_source) Not equal to Neutral Hostile
(Owner of PDD_source) Not equal to Neutral Passive
(PDD_target has buff Stealth) Equal to False
(PDD_target has buff Invisibility Cloak ) Equal to False
(PDD_target has buff Charm of Stealth ) Equal to False
(PDD_source is A Hero) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PDD_damageType Equal to PDD_PHYSICAL
Then - Actions
Trigger - Run Display Physical <gen> (ignoring conditions)
Else - Actions
Trigger - Run Display Spell and Coded <gen> (ignoring conditions)
Else - Actions
Which will then run one of these triggers...
Display Physical
Events
Conditions
Actions
-------- These maths make SCT last longer/redder/larger for bigger damage numbers --------
Floating Text - Create floating text that reads ((<Empty String> + (String((Integer(PDD_amount))))) + <Empty String>) above PDD_target with Z offset (PDD_amount / 100.00), using font size (9.00 + ((PDD_amount x 0.02) / 5.00)), color (100.00%, (100.00 - (PDD_amount x 0.07))%, (100.00 - (PDD_amount x 0.07))%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to (1.40 + (PDD_amount / 850.00)) seconds
Floating Text - Change the fading age of (Last created floating text) to (0.10 + (PDD_amount / 10000.00)) seconds
Floating Text - Set the velocity of (Last created floating text) to (125.00 - (PDD_amount x 0.01)) towards 90.00 degrees
or this one:
Display Spell and Coded
Events
Conditions
Actions
-------- These maths make SCT last longer/larger for bigger damage numbers --------
Floating Text - Create floating text that reads ((<Empty String> + (String((Integer(PDD_amount))))) + <Empty String>) above PDD_target with Z offset (PDD_amount / 100.00), using font size (9.50 + ((PDD_amount x 0.02) / 5.00)), color (0.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to (1.40 + (PDD_amount / 850.00)) seconds
Floating Text - Change the fading age of (Last created floating text) to (0.20 + (PDD_amount / 10000.00)) seconds
Floating Text - Set the velocity of (Last created floating text) to (120.00 - (PDD_amount x 0.01)) towards 90.00 degrees
It's not rocket science, really. Nothing I haven't done before.
Anyway there's my basic process. I have no clue why the SCT displays sometimes and other times not. You'd think it would always be one or the other, the system is pretty deliberate in nature. And why would using that event more than once screw up the triggers? I can't think of any reason.
--
Also, I forgot to mention something I have noticed on occasion as well - sometimes magic damage will HEAL THE TARGET... This is very bad and I do not understand why. I know it is a result of using this damage system improperly but I do not know where I went wrong.
You imported the two abilities correctly right, and not using any of the known bugged abilities? You don't do a check for negatives but that shouldn't be a problem... You should add the other condition needed to check magic damage otherwise code damage might be the problem here though I doubt it.
To my knowledge there's Finger of Death, the Runed Bracers ability and Drain Life. I do not use the last two, I have only one hero out of 55 who uses a FoD but the only change I noticed is it no longer explodes corpses. I didn't care about that and actually preferred it, so since I saw no other issues I saw no need to rewrite that ability.
As for damage types, it can decide to not display any type from what I've seen. Attacks, slow poison damage, or a triggered DoT just to name a few. If you try again a minute or two later it'll start showing lol
Also, I just wanna point out again that it doesn't even matter if my target is the one who has magic damage reduction. It could be ME who has it, or neither one of us. /headdesk
Edit: yeah I imported the two skills and changed their raw IDs in the JASS.
Edit 2: I've noticed this happens about 30 minutes into a game. Doing further testing as we speak, this is very very weird...
I have no experience with this particular DDS but usually they just detect damage, not allow you to modify it. It seems to me perhaps you're mucking with the system by doing "Set PDD_amount = (0.25 x PDD_amount)"; try commenting that out and see if it still happens. You said it starts the first time something with magic resist takes damage, and that part of the If tree wouldn't be run until that time.
I have no experience with this particular DDS but usually they just detect damage, not allow you to modify it. It seems to me perhaps you're mucking with the system by doing "Set PDD_amount = (0.25 x PDD_amount)"; try commenting that out and see if it still happens. You said it starts the first time something with magic resist takes damage, and that part of the If tree wouldn't be run until that time.
That's just what the author does in his examples trigger, I will test without it. Hopefully his example isn't wrong cause then Idk what to do, I have a huge list of things that reduce spell dmg.
I've been trying to detect negative damage values, and write text like "WARNING: bug has started" onto the screen. Since 1) nothing shows, and 2) the unit's HP increases, it's pretty obvious now that they're healing and it's never counted as damage. This info could be useful in solving the mystery.
Another piece of info that might be handy is I literally cannot kill the hero while this bug happens. They out-heal every single thing I do to them. Why does that matter? Well, I noticed DDS's often use that Spell Damage Reduction ability and have the reduction amount set to 2.00. I wonder (since I cannot track it to be sure) if they are healing 2x what I deal to them? Idk what all that means, but it's not good.
EDIT: More info
Your suggestion seems to have remedied the healing bug. It's noteworthy that the physical side of my "set pdd_amount blah blah" trigger doesn't cause bugs. If this does not work properly for spells, then does anyone know how to use the variable LFH gives with this system? I have tons of different reduction % amounts for different units/items so idk what to do now.
That sounds like a bad idea. The system has a cleanup for a reason, if it is never called you're likely to run into other problems down the line.
I still have never really understood your issue, it seems more like a conglomerate of issues rather than one directly linkedd to the DDS. However, maybe I am still confused.
I read the suggestion on the system's thread when someone else described this bug very much like I did in that it was unpredictable and sometimes worked fine. It explains the inconsistency (and why it now works, I have tested multiple hour long games and had 0 errors).
Also I asked LFH in a PM because I did not want to try that method at first. I actually didn't link him to that suggestion, he read further and found it himself, and was confident in it enough to have told me I should try it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.