| 04-27-2007, 11:50 PM | #1 |
I want to make an ability that add a bonus to the hero attack egal to his armor. Thanks to earlier help :) I've found how to get the hero's armor rating. But now, the only way I've found to add bonus damage to my hero is to make an ability based on claws of attack bonus with about 1000 level of one damage each and set it egal to the hero's armor then add it to my hero. Before I do something like that, I want to be sure that there is no other option, because it make one hell of an ability that I suppose would add loading time to my map. So my question is, is there a way to give a dynamic amount of damage bonus to a unit without using an ability with a max level egal to the max bonus ? ![]() |
| 04-28-2007, 02:10 AM | #2 |
I was just trying to do this for my own map, actually. Theres no trigger function to add and subtract damage, only attributes (strength, agility, intelligence). If you ever need to check for trigger, just open the drop-down menu (when making an action) which normally says '- All' and change it to 'Search for Text' Then, it will find any actions which have whatever you type in them. I would suggest making the spell go up by twos, which cuts the size of it in half and isnt too noticable. Then, when you change the level of the ability, divide whatever level it would be set to in half. |
| 04-28-2007, 03:20 AM | #3 |
Yeah I thought the same thing about making it step by 2 and now that you talk about it, I've realize that I could do that and add a +1 damage bonus if the armor is an odd number. I could probably push this even furter and make an ability that goes by +10 and add the remainder for +1 to +9. I wonder what kind of performance hit I would get by doing that versus making a 1000 level ability. |
| 04-28-2007, 06:40 AM | #4 |
Thats a good idea; make an ability which is +100,+200,+300,+400 etc. then +10,+20,+30 etc, and +1,+2,+3 etc. You can add them to get any number from 1 to 999 with 30 levels. |
| 04-28-2007, 06:52 AM | #5 |
Use Powers of 2 to add. +1 +2 +4 +8 +16 +32 +64 +128 .... and so on. Ex you want to get +47 : 32+8+4+2+1=47 Damage Bonus ability is not levelable. (means : effects for damage bonus won't happen and stills level 1) |
| 04-28-2007, 06:54 AM | #6 |
Item Damage Bonus +1 works perfectly fine when I level it. |
| 04-28-2007, 05:32 PM | #7 |
Yeah, I made a custom ability based on Item Damage Bonus +1, changed it to unit ability and it does leveling quite well. I've decided to do only 2 ability one with 10 level and a x10 with 100 level. I don't seem to get any noticable lag right now and it save me "complicated" computing to get the bonus I want. Thanks again |
| 04-28-2007, 06:14 PM | #8 |
10 abilities of 1 level each can get you the same potential damage bonus. 10 <<<< 109. And binary-ising a number really isn't difficult :/ |
| 04-28-2007, 06:26 PM | #9 |
Yeah, it would reduce the number of level required but it would increase the number of ability I need to add to my hero. I guess it's a matter of choice, but I doubt one way is lagless than the other. At least for me, since the ability can be used at most once per minute. |
| 04-28-2007, 09:49 PM | #10 | |
Quote:
The difference is in loading time. 100 level abilities are not loading time friendly. |
| 04-29-2007, 01:20 PM | #11 |
You're probably right. But to be honest, I have'nt seen any difference. I guess if I had multiple ability with hundreds of levels it would be bad, but right now, the difference is negligible |
| 04-30-2007, 09:51 PM | #12 |
So, question: Dynamic damage bonus. Permanent I believe. Answer? Well, if this damage bonus is equal to the armour, then you could set the armour value to a real variable and use it as damage. If it's armour rating (39%, 89% damage reduction kinda thing), then you could do the same with the variable thing. Except you might wanna use integers. Then use a trigger so that whenever your unit attacks, he does damage equal to the variable number. You could have a passive tooltip type ability saying this unit does this damage and also trigger it so only the unit with "Armour Bonus Damage" ability has this bonus ("Ability" level equal to "1," meaning you have to set the level to 1 for your ability). If it's not that, then I need to know what the question in a more clear state. IMO I think I've done a great job answering your problem. |
| 04-30-2007, 10:44 PM | #13 |
Yes it would work. It would probably be better than the solution we have if the numbers change often or with high numbers. But in my case, the bonus is set at the ability casting and removed at the end of the duration. I guess it's a choice between loading time and run time lag, but in my case, I'd rather not add a trigger on every one of his attack. Thanks though |
| 04-30-2007, 11:00 PM | #14 |
Base your ability off of some sort of self-buffing ability like "Berserk" or such and such. For one of the conditions, you use "Unit has YOUR-BUFF." This way is probably the best. A lot less laggier than the other solutions so far. (IMO) |
| 04-30-2007, 11:16 PM | #15 |
Yes that's exactly how it is made :) Off Roar in fact. I did a trigger that happen when the effect of the roar starts where I do those calculation and where I add my damage ability and set it's level acordingly. I guess since I got my answer, I did'nt bother with describing my problem anymore. Thanks for trying though. |
