I am trying to make an ability that damages in an area of effect.
The damage is based on the amount of energy that is consumed by the caster (1 on 1).
So basicly, the unit casts the ability while having 200 energy. The ability causes 200 damage and 200 energy is consumed.
Another example: If unit casts ability while having 133 energy, the ability Damages 133 in AOE and consumes 133.
I am trying to get this working in the Data module, but no succes so far.
The consuming part works: using the 'Effect - Modify Unit' and change the Vital Fraction of energy by -1.
The only thing I can find so far is damage based on the energy the target has (like feedback of the Templar), but not energy based on the caster.
Can someone help me out here? It is probely not so hard, but at the moment I'm stuck here.
U simply cant do that, seems stupid but the editor doesn't support it. I'm 90% sure u can in lotv editor when it will come out. U can do some trigger workaround if u rlly want it but prob it will create lag.
Use a trigger enhanced effect to do the damage. For AoE damage this targets a point.
The trigger is in response to the effect and resolve the target point and caster unit. You then use a local real/fixed variable to hold the caster's current energy. You then set the caster's current energy to 0, or get the caster to use an effect on himself that sets energy to 0 (might be needed to proc some events/effects). You then search around the target point for the units to damage with appropriate filters. Finally you deal damage to each of the picked units with a certain "dummy" effect (important for some events/effects) with a bonus of the amount of energy the caster had.
The trigger is very efficient (only runs when needed) so is of no performance concern.
You can create a dummy unit in a center of AOE and start increasing it's damage by 1 with a buff, and removing 1 point of eneregy from a caster while it's mana pool > 0. At the end of persistent effect you can copy all buffs from caster to this dummy unit (to do so you need to use "transfer behavior" effect with "behavior" field set to "none", and "copy" set to "enabled"), so it will have same damage modificators (simple use of "damage modification source" field in damage effect won't work for this workaround) and finaly execute a damage effect in area. This is totaly doable via data.
Is there any chance you can show me how?
I am trying, but I'm not quit sure how all those bahaviours, effects and more should connect with each other to result in what I want.
It's complicated and me is uberfailing .
It works but inflicting damage partialy (200 damage = 200 instances of 1 dmg). Which may be problematic in some situations (for example if you have some units with a chance to block 100% dmg, or something like the immortal shields) So its not so obvious solution as it looks like. However if you satisfied with result its okay i guess.
I agree that this is not the same. But still, the result is sort of equal. The good thing about beiing the creator is that you can define abilities however you want, i could say its part of the ability that the damage can't be blocked ;). Little details. There for, spell damage can't be blocked in my game. So I dont worry about this matter.
the bigger problem i see is armor dmg reduction. A fully upgraded battlecruiser would shave minimal damage as a simple 200 dmg attack (iirc it has 6 armor, which meant it would suffer like 200-6=194 dmg), whereas a 200 attack of 1 dmg would cut it down to half (minimal damage taken is 0.5, so 200*0.5 = 100).
i would perosnally follow abvdzh's apporahc, only maybe optimizing a bit by adding buff stackers on exponentials of 2 (if caster has energy larger 1024 add that as dmg and remove that amount of enery, if 512, if 256, etc)
Hi,
I am trying to make an ability that damages in an area of effect. The damage is based on the amount of energy that is consumed by the caster (1 on 1).
So basicly, the unit casts the ability while having 200 energy. The ability causes 200 damage and 200 energy is consumed. Another example: If unit casts ability while having 133 energy, the ability Damages 133 in AOE and consumes 133.
I am trying to get this working in the Data module, but no succes so far.
The consuming part works: using the 'Effect - Modify Unit' and change the Vital Fraction of energy by -1. The only thing I can find so far is damage based on the energy the target has (like feedback of the Templar), but not energy based on the caster.
Can someone help me out here? It is probely not so hard, but at the moment I'm stuck here.
Thanks in advance.
U simply cant do that, seems stupid but the editor doesn't support it. I'm 90% sure u can in lotv editor when it will come out. U can do some trigger workaround if u rlly want it but prob it will create lag.
Oh really? Bummer! Well thanks for telling me. Otherwise I would have wasted many hours on this.
Use a trigger enhanced effect to do the damage. For AoE damage this targets a point.
The trigger is in response to the effect and resolve the target point and caster unit. You then use a local real/fixed variable to hold the caster's current energy. You then set the caster's current energy to 0, or get the caster to use an effect on himself that sets energy to 0 (might be needed to proc some events/effects). You then search around the target point for the units to damage with appropriate filters. Finally you deal damage to each of the picked units with a certain "dummy" effect (important for some events/effects) with a bonus of the amount of energy the caster had.
The trigger is very efficient (only runs when needed) so is of no performance concern.
You can create a dummy unit in a center of AOE and start increasing it's damage by 1 with a buff, and removing 1 point of eneregy from a caster while it's mana pool > 0. At the end of persistent effect you can copy all buffs from caster to this dummy unit (to do so you need to use "transfer behavior" effect with "behavior" field set to "none", and "copy" set to "enabled"), so it will have same damage modificators (simple use of "damage modification source" field in damage effect won't work for this workaround) and finaly execute a damage effect in area. This is totaly doable via data.
@abvdzh: Go
Is there any chance you can show me how? I am trying, but I'm not quit sure how all those bahaviours, effects and more should connect with each other to result in what I want. It's complicated and me is uberfailing .
Thanks for the reply all :D.
I found an easy way to do it lol. Stupid I didnt think of this earlier, so simple.
Ability target -> Create Persistent put on infinite -> Effect Set (effect 1: Modifiy casters enegry -1 + Effect 2: deal 1 damage in area) .
Create persistent contains Validator: Caster has Energy
Works great lol. This one is solved.
It works but inflicting damage partialy (200 damage = 200 instances of 1 dmg). Which may be problematic in some situations (for example if you have some units with a chance to block 100% dmg, or something like the immortal shields) So its not so obvious solution as it looks like. However if you satisfied with result its okay i guess.
@abvdzh: Go
Pretty sure immortal shield doesn't activate on spell damage.
@MaskedImposter: Go
i'm pretty sure you understood what i mean. dealing 200 dmg with 1 or 200 instances is not the same thing.
I agree that this is not the same. But still, the result is sort of equal. The good thing about beiing the creator is that you can define abilities however you want, i could say its part of the ability that the damage can't be blocked ;). Little details. There for, spell damage can't be blocked in my game. So I dont worry about this matter.
the bigger problem i see is armor dmg reduction. A fully upgraded battlecruiser would shave minimal damage as a simple 200 dmg attack (iirc it has 6 armor, which meant it would suffer like 200-6=194 dmg), whereas a 200 attack of 1 dmg would cut it down to half (minimal damage taken is 0.5, so 200*0.5 = 100).
i would perosnally follow abvdzh's apporahc, only maybe optimizing a bit by adding buff stackers on exponentials of 2 (if caster has energy larger 1024 add that as dmg and remove that amount of enery, if 512, if 256, etc)
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
Does armor reduce spell damage? I thought armor only reduces melee. That stacking part is a good idea btw. I might consider that.
It reduce damage if you set it to reduce the damage, otherwise, it'll ignore the armor (damage armor to 0).
I have found with abilities with variable effect amounts are best done with triggers.