I made my simple custom armor system but recently i found a problem with it. So my trigger starts with unit take damage, next:
actions
Set DamageResistance% = Unit's armor/100 (reducing damage by percentage)
Set IncomingDamage = (IncomingDamage-IncomingDamage) - (IncomingDamage*DamageResistance%)
Unit Set Unit Current HP = Unit current HP - IncomingDamage
So i found a problem only when created custom UI healthbar. My units firstly get a damage, then they became like healed by blocked ammount of damage, which sucks, cuz sometimes i have my dead hero with 5-20 hp.... What else can i do to create such armor system (20 armor = 20% resist)?
Ye, that was my first attempt, and seems like i wil take it... I just tried to find acceptable ways to create it with trigger, when was planning more complex formula.
Hey man, can i modify the damage response field through triggers better than having a 100 buffs to all my units or complex data fields cannot be modified such way?
You can modify many data fields via trigger, but only on a per-player basis and unfortunately almost no values for behaviors can be changed.
You wouldn't use 100 buffs per unit, just 1 buff with many stacks. As long as the stacks do not exceed a too high value, this is not a problem. Everything < 256 is fine.
If you need a more complex formula, thats perfectly possible. I use a 0.5% damage reduction behavior with 200 stacks, and calculate the needed amount of stacks based on any formula I want. I went for the WC3 damage reduction formula:
damage reduction =((armor)*0.06)/(1+0.06*(armor))
For example, lets say, a unit should get 20 armor. This equals a damage reduction of approximately 55%. So I apply 110 stacks of the damage reduction behavior, creating the required 55% reduction.
The amount of stacks equals a degree of precision; armor does only change the actual damage reduction, if it breaks the next 0.5% barrier. The precision can be increased, of course.
Hey man im still trying create this stuff with triggers :D . So my first formula definitely not the option. Now i found that i can define effect that does damage to my hero, so can i extract the damage amount field from my effect variable somehow, make a calculations with this value and then change units hp? I'm quite a noob so need to know how to get a damage amount from effect variable.
Update: i've just figured out how to make it, nvm. How to set unit minimum damage taken to 0?
Hey this stuff usless too. I found that my damage cannot be increased bu buff, using this approach cuz it take ammount from data directly..... SO i still got nothing. Can't figure out how to make damned damage system via triggers, please if someone had experience with it HELP.
Well, I already shared the method I use, which works perfectly.
For your approach, you could try to increase the damage via upgrades or catalog triggers, however this would not work, if you use individual unit buffs and more than 1 unit of the same type per player.
i dont like data stuff man, i want to add to my system piercing damage next and maybe a miss chance, etc. When i recognized that i cant even make unit spinning around another unit with data i moved to triggers and using data only for simple stuff. U cant even make the critical strike animation with data, wtf? this was build in feature in wc3. Also in data i have more then 30 items only for my custom unit weapon. 30 items just for the weapon of one unit... and my eyes just got raped by ammount of text in this data fields. I asked about damage system in corruption rpg map, Jake had pretty detailed damage system there and it done with triggers, i just asked him about it and while waiting his answer i just want to know if anyone else messing with this.
If you want a fully triggered damage system, why bother with damage increasing behaviors? Just handle all the damage calculation via trigger.
Btw, you can make units spin around in data, you can make them play another animation on a critical hit, you can add a miss chance and piercing damage, its just more complicated.
okay man i will send u the map so u can see all shit that doesnt work properly, and i didnt bother anyone with buffs i always said that i want do it with triggers. Maybe i am a total noob but i don't understand how to take the ammount of incoming damage, and make the units take 0 damage. anyways look at my map and how my healthbar updates. i hope u will see the problem.
Btw, how to make my hero play different animation when critical strike start to perform?? No offence man, but i created such thread with this question before nobody answered.
And as for spinning/rotating/circling stuff, i just wonder how many items u will use to recreate a blood swarm ability from my map with data....
SOMEONE PLEASE check my map what im doing wrong with trigger armor!! That guy i asked for help (JakeCake)
seems like ignoring me or he is just working hard on his own map and has no time, so i need someone else for help. Look how my health bar updates thats my problem in this map. I need to create custom armor system WITHOUT buffs. I cant believe noone mess with this before.
Maybe i am a total noob but i don't understand how to take the ammount of incoming damage, and make the units take 0 damage.
You can't. There is no way to reliably reduce damage via trigger, once it is caused.
What you can do is to cause all damage via triggers and calculate it within the trigger.
Quote:
Btw, how to make my hero play different animation when critical strike start to perform?? No offence man, but i created such thread with this question before nobody answered.
Just send an AnimationPlay actor message to the unit, which makes him play the desired animation. Depending on how you realized your critical strike, this could be send via trigger or react to an effect or check for a behavior when attacking.
Quote:
And as for spinning/rotating/circling stuff, i just wonder how many items u will use to recreate a blood swarm ability from my map with data....
No idea, what a blood swarm is, but most complex spells in data need huge amounts of objects.
my problem that with my trigger unit first receives full damage (and healthbar showing it) then it heals by bloked ammount of damage. So my healthbar updates 2 times per hit wich is unwanted. i want somehow to make all calculation first then change unit health just ONCE per hit.
From Kueken's post i understood that i need to cause damage with triggers too in such case. Can u explain how to make it i'm new to this kind of stuff.
Also i want to know can i attach variable to some unit, for exaple i want set piercing damage ammount to all my units, and make other trigger check this ammount when unit does damage?
And blood swarm is my custom spell from map ;d. Could i make it with data?
Can u explain how to make it i'm new to this kind of stuff.
You could specify some dummy impact effect doing nothing but start a trigger, which will then cause the amount of damage you need. You need to provide all relevant values for the damage calculation somehow, this heavily depends on how your damage should be calculated.
Also, what exactly do you have against a system using buffs?
Quote:
Also i want to know can i attach variable to some unit, for exaple i want set piercing damage ammount to all my units, and make other trigger check this ammount when unit does damage?
You could use the unit's custom value for this.
Quote:
And blood swarm is my custom spell from map ;d. Could i make it with data?
Since I have no idea, where this spell is located in your map and I don't want to search for it and guess, what it should do based on your realization, I have no idea.
If you give me a detailed explanation, what the spell should do, I could probably tell you.
blood swarm spell used by my zealot. it creates 4 insects around unit which flying around and stealing blood from enemies, for each unit they passed this insect heals caster for 25 hp so total heal is 25*4=100 hp if all insects passed through enemies...... this is a lot to write man just watch it in my map its much easier to understand, the trigger name is blood lord- blood swarm, u could delete hide player UI action from my initialisation trigger to test this spell, i dont think it will take too much time from you, just 2 mins.
I made my simple custom armor system but recently i found a problem with it. So my trigger starts with unit take damage, next:
actions
Set DamageResistance% = Unit's armor/100 (reducing damage by percentage)
Set IncomingDamage = (IncomingDamage-IncomingDamage) - (IncomingDamage*DamageResistance%)
Unit Set Unit Current HP = Unit current HP - IncomingDamage
So i found a problem only when created custom UI healthbar. My units firstly get a damage, then they became like healed by blocked ammount of damage, which sucks, cuz sometimes i have my dead hero with 5-20 hp.... What else can i do to create such armor system (20 armor = 20% resist)?
What about a stacking damage reduction behavior with 100 stacks and 1% damage reduction per stack?
Ye, that was my first attempt, and seems like i wil take it... I just tried to find acceptable ways to create it with trigger, when was planning more complex formula.
Hey man, can i modify the damage response field through triggers better than having a 100 buffs to all my units or complex data fields cannot be modified such way?
You can modify many data fields via trigger, but only on a per-player basis and unfortunately almost no values for behaviors can be changed.
You wouldn't use 100 buffs per unit, just 1 buff with many stacks. As long as the stacks do not exceed a too high value, this is not a problem. Everything < 256 is fine.
If you need a more complex formula, thats perfectly possible. I use a 0.5% damage reduction behavior with 200 stacks, and calculate the needed amount of stacks based on any formula I want. I went for the WC3 damage reduction formula:
damage reduction =((armor)*0.06)/(1+0.06*(armor))
For example, lets say, a unit should get 20 armor. This equals a damage reduction of approximately 55%. So I apply 110 stacks of the damage reduction behavior, creating the required 55% reduction.
The amount of stacks equals a degree of precision; armor does only change the actual damage reduction, if it breaks the next 0.5% barrier. The precision can be increased, of course.
Hey man im still trying create this stuff with triggers :D . So my first formula definitely not the option. Now i found that i can define effect that does damage to my hero, so can i extract the damage amount field from my effect variable somehow, make a calculations with this value and then change units hp? I'm quite a noob so need to know how to get a damage amount from effect variable.
Update: i've just figured out how to make it, nvm. How to set unit minimum damage taken to 0?
Hey this stuff usless too. I found that my damage cannot be increased bu buff, using this approach cuz it take ammount from data directly..... SO i still got nothing. Can't figure out how to make damned damage system via triggers, please if someone had experience with it HELP.
Well, I already shared the method I use, which works perfectly.
For your approach, you could try to increase the damage via upgrades or catalog triggers, however this would not work, if you use individual unit buffs and more than 1 unit of the same type per player.
i dont like data stuff man, i want to add to my system piercing damage next and maybe a miss chance, etc. When i recognized that i cant even make unit spinning around another unit with data i moved to triggers and using data only for simple stuff. U cant even make the critical strike animation with data, wtf? this was build in feature in wc3. Also in data i have more then 30 items only for my custom unit weapon. 30 items just for the weapon of one unit... and my eyes just got raped by ammount of text in this data fields. I asked about damage system in corruption rpg map, Jake had pretty detailed damage system there and it done with triggers, i just asked him about it and while waiting his answer i just want to know if anyone else messing with this.
If you want a fully triggered damage system, why bother with damage increasing behaviors? Just handle all the damage calculation via trigger.
Btw, you can make units spin around in data, you can make them play another animation on a critical hit, you can add a miss chance and piercing damage, its just more complicated.
okay man i will send u the map so u can see all shit that doesnt work properly, and i didnt bother anyone with buffs i always said that i want do it with triggers. Maybe i am a total noob but i don't understand how to take the ammount of incoming damage, and make the units take 0 damage. anyways look at my map and how my healthbar updates. i hope u will see the problem.
Btw, how to make my hero play different animation when critical strike start to perform?? No offence man, but i created such thread with this question before nobody answered.
And as for spinning/rotating/circling stuff, i just wonder how many items u will use to recreate a blood swarm ability from my map with data....
SOMEONE PLEASE check my map what im doing wrong with trigger armor!! That guy i asked for help (JakeCake) seems like ignoring me or he is just working hard on his own map and has no time, so i need someone else for help. Look how my health bar updates thats my problem in this map. I need to create custom armor system WITHOUT buffs. I cant believe noone mess with this before.
I took a look and I have no idea what your problem is?
And I dont really get what are you trying to do/want to do. Maybe a short explanation what you want and how it should work.
You can't. There is no way to reliably reduce damage via trigger, once it is caused.
What you can do is to cause all damage via triggers and calculate it within the trigger.
Just send an AnimationPlay actor message to the unit, which makes him play the desired animation. Depending on how you realized your critical strike, this could be send via trigger or react to an effect or check for a behavior when attacking.
No idea, what a blood swarm is, but most complex spells in data need huge amounts of objects.
my problem that with my trigger unit first receives full damage (and healthbar showing it) then it heals by bloked ammount of damage. So my healthbar updates 2 times per hit wich is unwanted. i want somehow to make all calculation first then change unit health just ONCE per hit.
From Kueken's post i understood that i need to cause damage with triggers too in such case. Can u explain how to make it i'm new to this kind of stuff. Also i want to know can i attach variable to some unit, for exaple i want set piercing damage ammount to all my units, and make other trigger check this ammount when unit does damage?
And blood swarm is my custom spell from map ;d. Could i make it with data?
You could specify some dummy impact effect doing nothing but start a trigger, which will then cause the amount of damage you need. You need to provide all relevant values for the damage calculation somehow, this heavily depends on how your damage should be calculated.
Also, what exactly do you have against a system using buffs?
You could use the unit's custom value for this.
Since I have no idea, where this spell is located in your map and I don't want to search for it and guess, what it should do based on your realization, I have no idea.
If you give me a detailed explanation, what the spell should do, I could probably tell you.
blood swarm spell used by my zealot. it creates 4 insects around unit which flying around and stealing blood from enemies, for each unit they passed this insect heals caster for 25 hp so total heal is 25*4=100 hp if all insects passed through enemies...... this is a lot to write man just watch it in my map its much easier to understand, the trigger name is blood lord- blood swarm, u could delete hide player UI action from my initialisation trigger to test this spell, i dont think it will take too much time from you, just 2 mins.
Sorry, I looked in the wrong map ;) You are right, it was easy to find.
It should be possible to create something similar in data, however as usual the data solution will probably require way more work than your trigger.