Hello! :)
This is basically a repost of one I posted on the beta forums.
I'm having two different issues. The first is related to items, the second to making a critical strike ability.
First the item issue. I can't use any items with a "Left Click to Use" effect, the LMB just picks it up wile I hold it down.. I've tried restarting both my PC and the editor countless times to no avail. Anyone know what the cause might be?
Second, the Critical Strike ability.
I'm using a dummy ability and a trigger that applies a dummy buff to my Hero when he learns the crit ability.
I then have a trigger that, when a unit takes damage, checks if the hero dealt it, and what level of the buff he has on him. Then, after generating a random 1-100 int variable and checking if the attack was a crit or not, sets the triggering unit's health to ((Current Health) - (Triggering Damage Amount)). This works quite well, but noone is credited for the kill, so no experience or bounty is awarded to anyone. This is a problem.
Anyone know a workaround/fix for this? Is there no way to deliver a variable amount of damage from one unit to another, using triggers?
Let me know if you need any screenshots of the relevant data/triggers, or anything else.
Any help is much appreciated. :D
Make a Buff Behavior, in the Damage Response field set the Chance to whatever you want the critical strike % to be. (You can make multiple behaviors for multiple levels of Critical Strike if you want) and then set the Modify Fraction to whatever you want (2 for double damage.) Set this behavior to have a duration of 0.1.
Now make two new effects, an Apply Behavior effect that applies the behavior you just created to the effect target, and a Set that adds both the Apply Behavior and the Damage effect from your hero's attack. Make sure that the Apply Behavior comes first in the list. Now wherever the Damage effect is referenced, change it to reference the Set instead.
What happens is that when your hero attacks, the behavior will be applied to the target of the attack, and there's a chance the damage response will be triggered and increase the damage taken, and then the behavior immediately expires.
If there's a simpler way of doing it I haven't found it.
That seems to be the best way to do it so far, indeed.
Would it be possible to use validators to ensure no other heroes could exploit the 0.1 second behavior?
Edit: I implemented it, and it works great, but there are a couple of things that would be nice.
I don't know if its even possible, but to check if a unit was killed by this extra damage and then display a text tag on the hero, showing that he made a critical strike?
Another thing, the map is based on the heroes being able to buy new weapons. Since this set effect has to be added to the weapon, something sneaky has to be done to ensure that the hero equipping the weapon has the correct level of the critical ability learned, and then to apply the corresponding level of the behavior to the target.
I am really drawing blanks on this one...
That seems to be the best way to do it so far, indeed. Would it be possible to use validators to ensure no other heroes could exploit the 0.1 second behavior?
Edit: I implemented it, and it works great, but there are a couple of things that would be nice.
I don't know if its even possible, but to check if a unit was killed by this extra damage and then display a text tag on the hero, showing that he made a critical strike?
Another thing, the map is based on the heroes being able to buy new weapons. Since this set effect has to be added to the weapon, something sneaky has to be done to ensure that the hero equipping the weapon has the correct level of the critical ability learned, and then to apply the corresponding level of the behavior to the target. I am really drawing blanks on this one...
Ideas?
If you're worried about another hero exploiting the critical strike behavior, add a third Remove Behavior effect to the set after the Damage one and have it remove the behavior.
As for the rest I'd look into using upgrades. An upgrade can modify fields of an effect, so you could modify the effects of all the possible weapons a hero could equip to apply the critical strike behavior. It's possible to use upgrades completely transparency via Issue Order effects that order a unit to research the upgrade (with a research time of 0.) There are some potential limitations here: if you want multiple heroes per player, or if you want them to be able to unlearn the critical strike skill, this probably wouldn't work.
Make a Buff Behavior, in the Damage Response field set the Chance to whatever you want the critical strike % to be. (You can make multiple behaviors for multiple levels of Critical Strike if you want) and then set the Modify Fraction to whatever you want (2 for double damage.) Set this behavior to have a duration of 0.1.
Now make two new effects, an Apply Behavior effect that applies the behavior you just created to the effect target, and a Set that adds both the Apply Behavior and the Damage effect from your hero's attack. Make sure that the Apply Behavior comes first in the list. Now wherever the Damage effect is referenced, change it to reference the Set instead.
What happens is that when your hero attacks, the behavior will be applied to the target of the attack, and there's a chance the damage response will be triggered and increase the damage taken, and then the behavior immediately expires.
If there's a simpler way of doing it I haven't found it.
That's not a good way of doing it, what if you get 2 damage source from that within 0.1 seconds, example a quick multi-attack ability?
However, your solution is very very very close.
Using Data Editor
Combat - Damage Response Chance to 0.2 or whatever
Under buff {Combat - Damage Response - Location} set it to Attacker (oppose to Defender), second add a damage effect under Damage Response - Handled. Add a damage effect (your hero's damage if it's 2x). If you want different multiplier, duplicate your hero damage and change the damage manually.
the Critical Strike ability. I'm using a dummy ability and a
trigger that applies a dummy buff to my Hero when he learns the crit
ability. I then have a trigger that, when a unit takes damage, checks if
the hero dealt it, and what level of the buff he has on him. Then, after
generating a random 1-100 int variable and checking if the attack was a
crit or not, sets the triggering unit's health to ((Current Health) -
(Triggering Damage Amount)). This works quite well, but noone is
credited for the kill, so no experience or bounty is awarded to anyone.
This is a problem.
Pretty much do that except instead of minus the hp, using a damage effect.
1. Simply create a dummy damage effect
2. Change the dummy damage effect - damage value using Catalog
Trigger <Action> CatalogFieldValueSet, it's GUI in triggers,
parameters:
(Effect, raw id of dummy damage effect, Amount)
3. Create the damage effect on the targeted unit (this one is in environment if I'm not mistaken)
Hm nice, but wouldn't it be possible to set "fraction" to 2 instead of putting the damage effect into the handle field ?
also, when exactly does damage response trigger? I thought it would only trigger when the unit with the behavior TAKES damage ?! If the location changes this, wouldn't fraction work then ?
also, zifoon, you seem to be pretty experienced with the editor, any idea how to catch a critical / evasion event with a trigger ?
@pixartist: Go
Well depends "when" you want to catch the damage response. Handling usually works.
Ideally, since the damage taken trigger activates after the damage is actually taken, using damage handling effect with dummy evasion/critical buff then checking when the unit is damaged for that dummy buff, it will catch when the damage response happens. Of course that also means you can remove the dummy behavior when that trigger is triggered without any repercussion (resulting in a perfect MUI trigger).
Quote from zifoon:
@pixartist: Go Well depends "when" you want to catch the damage response. Handling usually works. Ideally, since the damage taken trigger activates after the damage is actually taken, using damage handling effect with dummy evasion/critical buff then checking when the unit is damaged for that dummy buff, it will catch when the damage response happens. Of course that also means you can remove the dummy behavior when that trigger is triggered without any repercussion (resulting in a perfect MUI trigger).
Make a Buff Behavior, in the Damage Response field set the Chance to whatever you want the critical strike % to be. (You can make multiple behaviors for multiple levels of Critical Strike if you want) and then set the Modify Fraction to whatever you want (2 for double damage.) Set this behavior to have a duration of 0.1.
Now make two new effects, an Apply Behavior effect that applies the behavior you just created to the effect target, and a Set that adds both the Apply Behavior and the Damage effect from your hero's attack. Make sure that the Apply Behavior comes first in the list. Now wherever the Damage effect is referenced, change it to reference the Set instead.
What happens is that when your hero attacks, the behavior will be applied to the target of the attack, and there's a chance the damage response will be triggered and increase the damage taken, and then the behavior immediately expires.
If there's a simpler way of doing it I haven't found it.
This seems a good way to go at it with some minor modifications:
The Damage Response Behavior can remove itself by adding only 1 charge on it (no need for duration 0.01 seconds, leave duration to 0). That also means you don't need to add a remove behavior on the effect. I don't think any _other_ damage effect will consume the buff before your damage effect (seems reasonable)
Doubling the damage by dealing another identical Damage Effect to the target might have some undesired side effects like:
- one of the damage effect being dodged (won't be much of a crit in this case)
- if the defender has a damage response that retaliates with some damage against an attack it will retaliate twice on a critical strike
Quote from GruzumKalim:
Quote from RileyStarcraft: Go
Make a Buff Behavior, in the Damage Response field set the Chance to whatever you want the critical strike % to be. (You can make multiple behaviors for multiple levels of Critical Strike if you want) and then set the Modify Fraction to whatever you want (2 for double damage.) Set this behavior to have a duration of 0.1.
Now make two new effects, an Apply Behavior effect that applies the behavior you just created to the effect target, and a Set that adds both the Apply Behavior and the Damage effect from your hero's attack. Make sure that the Apply Behavior comes first in the list. Now wherever the Damage effect is referenced, change it to reference the Set instead.
What happens is that when your hero attacks, the behavior will be applied to the target of the attack, and there's a chance the damage response will be triggered and increase the damage taken, and then the behavior immediately expires.
If there's a simpler way of doing it I haven't found it.
This seems a good way to go at it with some minor modifications: The Damage Response Behavior can remove itself by adding only 1 charge on it (no need for duration 0.01 seconds, leave duration to 0). That also means you don't need to add a remove behavior on the effect. I don't think any _other_ damage effect will consume the buff before your damage effect (seems reasonable)
Doubling the damage by dealing another identical Damage Effect to the target might have some undesired side effects like: - one of the damage effect being dodged (won't be much of a crit in this case) - if the defender has a damage response that retaliates with some damage against an attack it will retaliate twice on a critical strike
----
Actually... I was thinking about this... Also when unit has high armor, instead of doing 1 damage it will do 2 damage.
However, you are only pondering about the problem and not the solution. The solution is simple, when critical strike occurs you can make the damage multiply by 0 (yes 0). Then add the 2x damage effect. That way evasion or armor won't be a problem.
This works except for 1 problem, which could be a really cool effect, or bad, and its bad in my case :(. This critical strike ability goes off ANY attack, my marine has psionic storm, so when I do storm, I have a chance to shoot for extra damage(because I did my gun effect). If there's not a way to fix this I guess I could set the damage x2 and just have my spells critical but Id rather just have my basic attack crit
This works except for 1 problem, which could be a really cool effect, or bad, and its bad in my case :(. This critical strike ability goes off ANY attack, my marine has psionic storm, so when I do storm, I have a chance to shoot for extra damage(because I did my gun effect). If there's not a way to fix this I guess I could set the damage x2 and just have my spells critical but Id rather just have my basic attack crit
YE... I would agree except Blizzard aren't stupid and they put a field called "Exclude Effect Array" in damage response.
Come on people... Don't just think of a problem that may occur but think about a possible solution for that problem.
ouch sorry thought this forum was for help,thanks though it worked. I tried other stuff to be fair, but ya Ill be sure to only ask for help on official forum lol
ouch sorry thought this forum was for help,thanks though it worked. I tried other stuff to be fair, but ya Ill be sure to only ask for help on official forum lol
Well that's not what I meant. People always just theorise about the problem and not the solution.
It's good to get into a habit of pondering what problem may occur from a method, however if you don't ponder of a way to solve that problem, it's just another bad habit to have. That habit will just create hotfixes, workarounds and incomplete solutions. There might be a simple solutions like 2 problems that occurred from this thread.
This is a solution. However, what if the unit with the critical strike ability always changes weapons? Not to mention that each weapons deal different damage to different unit types (armored, massive, light). So essentially the damage dealt will be 2x of the weapon damage versus each of the unit types.
Isn't there some value to just modify the fraction of the damage output?
Hello! :) This is basically a repost of one I posted on the beta forums. I'm having two different issues. The first is related to items, the second to making a critical strike ability.
First the item issue. I can't use any items with a "Left Click to Use" effect, the LMB just picks it up wile I hold it down.. I've tried restarting both my PC and the editor countless times to no avail. Anyone know what the cause might be?
Second, the Critical Strike ability. I'm using a dummy ability and a trigger that applies a dummy buff to my Hero when he learns the crit ability. I then have a trigger that, when a unit takes damage, checks if the hero dealt it, and what level of the buff he has on him. Then, after generating a random 1-100 int variable and checking if the attack was a crit or not, sets the triggering unit's health to ((Current Health) - (Triggering Damage Amount)). This works quite well, but noone is credited for the kill, so no experience or bounty is awarded to anyone. This is a problem.
Anyone know a workaround/fix for this? Is there no way to deliver a variable amount of damage from one unit to another, using triggers?
Let me know if you need any screenshots of the relevant data/triggers, or anything else. Any help is much appreciated. :D
@LuxusElg: Go
I'm sure there is a way to do it strictly using the Data editor.. I'm interested too in knowing how to do this.
Make a Buff Behavior, in the Damage Response field set the Chance to whatever you want the critical strike % to be. (You can make multiple behaviors for multiple levels of Critical Strike if you want) and then set the Modify Fraction to whatever you want (2 for double damage.) Set this behavior to have a duration of 0.1.
Now make two new effects, an Apply Behavior effect that applies the behavior you just created to the effect target, and a Set that adds both the Apply Behavior and the Damage effect from your hero's attack. Make sure that the Apply Behavior comes first in the list. Now wherever the Damage effect is referenced, change it to reference the Set instead.
What happens is that when your hero attacks, the behavior will be applied to the target of the attack, and there's a chance the damage response will be triggered and increase the damage taken, and then the behavior immediately expires.
If there's a simpler way of doing it I haven't found it.
That seems to be the best way to do it so far, indeed. Would it be possible to use validators to ensure no other heroes could exploit the 0.1 second behavior?
Edit: I implemented it, and it works great, but there are a couple of things that would be nice.
I don't know if its even possible, but to check if a unit was killed by this extra damage and then display a text tag on the hero, showing that he made a critical strike?
Another thing, the map is based on the heroes being able to buy new weapons. Since this set effect has to be added to the weapon, something sneaky has to be done to ensure that the hero equipping the weapon has the correct level of the critical ability learned, and then to apply the corresponding level of the behavior to the target. I am really drawing blanks on this one...
Ideas?
If you're worried about another hero exploiting the critical strike behavior, add a third Remove Behavior effect to the set after the Damage one and have it remove the behavior.
As for the rest I'd look into using upgrades. An upgrade can modify fields of an effect, so you could modify the effects of all the possible weapons a hero could equip to apply the critical strike behavior. It's possible to use upgrades completely transparency via Issue Order effects that order a unit to research the upgrade (with a research time of 0.) There are some potential limitations here: if you want multiple heroes per player, or if you want them to be able to unlearn the critical strike skill, this probably wouldn't work.
That's not a good way of doing it, what if you get 2 damage source from that within 0.1 seconds, example a quick multi-attack ability?
However, your solution is very very very close.
Using Data Editor Combat - Damage Response Chance to 0.2 or whatever Under buff {Combat - Damage Response - Location} set it to Attacker (oppose to Defender), second add a damage effect under Damage Response - Handled. Add a damage effect (your hero's damage if it's 2x). If you want different multiplier, duplicate your hero damage and change the damage manually.
Using Triggers
Pretty much do that except instead of minus the hp, using a damage effect. 1. Simply create a dummy damage effect
2. Change the dummy damage effect - damage value using Catalog Trigger <Action> CatalogFieldValueSet, it's GUI in triggers, parameters: (Effect, raw id of dummy damage effect, Amount)
3. Create the damage effect on the targeted unit (this one is in environment if I'm not mistaken)
@pixartist: Go Well depends "when" you want to catch the damage response. Handling usually works. Ideally, since the damage taken trigger activates after the damage is actually taken, using damage handling effect with dummy evasion/critical buff then checking when the unit is damaged for that dummy buff, it will catch when the damage response happens. Of course that also means you can remove the dummy behavior when that trigger is triggered without any repercussion (resulting in a perfect MUI trigger).
Works like a charm, great stuff! Thanks!
This seems a good way to go at it with some minor modifications: The Damage Response Behavior can remove itself by adding only 1 charge on it (no need for duration 0.01 seconds, leave duration to 0). That also means you don't need to add a remove behavior on the effect. I don't think any _other_ damage effect will consume the buff before your damage effect (seems reasonable)
Doubling the damage by dealing another identical Damage Effect to the target might have some undesired side effects like: - one of the damage effect being dodged (won't be much of a crit in this case) - if the defender has a damage response that retaliates with some damage against an attack it will retaliate twice on a critical strike
Quote from GruzumKalim:
Quote from RileyStarcraft: Go
Make a Buff Behavior, in the Damage Response field set the Chance to whatever you want the critical strike % to be. (You can make multiple behaviors for multiple levels of Critical Strike if you want) and then set the Modify Fraction to whatever you want (2 for double damage.) Set this behavior to have a duration of 0.1.
Now make two new effects, an Apply Behavior effect that applies the behavior you just created to the effect target, and a Set that adds both the Apply Behavior and the Damage effect from your hero's attack. Make sure that the Apply Behavior comes first in the list. Now wherever the Damage effect is referenced, change it to reference the Set instead.
What happens is that when your hero attacks, the behavior will be applied to the target of the attack, and there's a chance the damage response will be triggered and increase the damage taken, and then the behavior immediately expires.
If there's a simpler way of doing it I haven't found it.
This seems a good way to go at it with some minor modifications: The Damage Response Behavior can remove itself by adding only 1 charge on it (no need for duration 0.01 seconds, leave duration to 0). That also means you don't need to add a remove behavior on the effect. I don't think any _other_ damage effect will consume the buff before your damage effect (seems reasonable)
Doubling the damage by dealing another identical Damage Effect to the target might have some undesired side effects like: - one of the damage effect being dodged (won't be much of a crit in this case) - if the defender has a damage response that retaliates with some damage against an attack it will retaliate twice on a critical strike
----
Actually... I was thinking about this... Also when unit has high armor, instead of doing 1 damage it will do 2 damage.
However, you are only pondering about the problem and not the solution. The solution is simple, when critical strike occurs you can make the damage multiply by 0 (yes 0). Then add the 2x damage effect. That way evasion or armor won't be a problem.
@zifoon: Go
This works except for 1 problem, which could be a really cool effect, or bad, and its bad in my case :(. This critical strike ability goes off ANY attack, my marine has psionic storm, so when I do storm, I have a chance to shoot for extra damage(because I did my gun effect). If there's not a way to fix this I guess I could set the damage x2 and just have my spells critical but Id rather just have my basic attack crit
YE... I would agree except Blizzard aren't stupid and they put a field called "Exclude Effect Array" in damage response.
Come on people... Don't just think of a problem that may occur but think about a possible solution for that problem.
@zifoon: Go
ouch sorry thought this forum was for help,thanks though it worked. I tried other stuff to be fair, but ya Ill be sure to only ask for help on official forum lol
Well that's not what I meant. People always just theorise about the problem and not the solution.
It's good to get into a habit of pondering what problem may occur from a method, however if you don't ponder of a way to solve that problem, it's just another bad habit to have. That habit will just create hotfixes, workarounds and incomplete solutions. There might be a simple solutions like 2 problems that occurred from this thread.
@zifoon: Go
This is a solution. However, what if the unit with the critical strike ability always changes weapons? Not to mention that each weapons deal different damage to different unit types (armored, massive, light). So essentially the damage dealt will be 2x of the weapon damage versus each of the unit types.
Isn't there some value to just modify the fraction of the damage output?