| 09-27-2009, 05:51 AM | #1 |
Hi, I'm wondering how to increase a units max HP, damage, and defense via trigger? in either GUI or Jass. Kind Regards |
| 09-27-2009, 12:44 PM | #2 |
Earth-Fury's BonusMod/SetUnitMaxState (somewhere on hiveworkshop.com) |
| 09-27-2009, 03:21 PM | #3 |
There was a script here that used to do that, but the author ragequit the site. If you want to add/remove those things you talk about in the first post, you'll need to do so by adding abilities to the unit in question that either add or remove armor/whatever. |
| 09-27-2009, 05:02 PM | #4 |
If you only want a prespecified amount, and don't mind magic immunity as well, you could try Avatar. |
| 09-27-2009, 05:54 PM | #5 | |
Quote:
http://www.wc3c.net/showthread.php?t=107451 BonusMod isn't submitted here. it's at THW. http://www.hiveworkshop.com/forums/j...axstate-65622/ (Please use the UnitMaxState library here. The one at THW is outdated.) Both are vJass, but use simple JASS APIs. (No structs or anything.) |
| 09-28-2009, 06:26 AM | #6 |
@Earth-Fury: Can you please submit BonusMod and SetUnitMaxState here? Cause many systemes would benefit from them, but only submissions without any system that isn't submitted here will be approved. |
| 09-28-2009, 07:11 AM | #7 |
If you don't mind using abilities, you can just use the item abilities which add HP, damage, and armor and just add them to the unit using triggers. Also make the abilities have multiple levels so you can define the amount of stats you want to add. For example, you can have HP boost have 10 levels with +100HP at level 1, +200 HP at level 2, etc. If you wanted to add +200 HP to a unit, add the HP boost ability then set it to the level 2. Those abilities do not have icons so you don't have to hide them in spell books or anything. |
| 09-28-2009, 09:41 PM | #8 |
i don't know if they ever fixed it, but last time i checked, leveling health bonus abilities doesn't work, it only gives anything more than that you started with when you remove the ability, which is when it removes the correct amount of hp. You can work around this by making abilities with 0 bonus hp at level 1 and -X bonus hp at level X. Then set the level and remove, and it'll give the unit bonus hp. |
| 09-28-2009, 09:47 PM | #9 | |
Quote:
|
| 09-29-2009, 01:42 AM | #10 |
Modifying Attack Damage Create 8 abilities based off of Item Damage Bonus, each with 2 levels. Each ability should have a level for adding, and a level for removing (positive/negative damage bonuses).
Since damage ability bonuses don't stack with each other, you need to use a binary counting system. For instance, if you wanted to have 38 damage; you would add the ability with +32, then add the ability with +4, then add the ability with +2. This will give you a spectrum of +255 to -255 damage. Having more abilities increases this amount, but with 8 abilities using binary counting you can get to 255 (probably the best way). Armor Modifying Armor is modified the exact same way damage is, but with an array of abilities based on Item Defense Bonus (or whatever its called). Follow the method I stated for modifying attack damage. Unit Max Life Modifying Items that modify a unit's maximum life amount stack with each other, so if you added one ability that added +100 twice, it would yield +200 maximum life. Create an ability based off of a life-modifying ability and give it a few levels, each level incrementing by a multiple of 10:
If you wanted a result of +6 life, you would simply add the ability and set it to level 1; do this 6 times. If you wanted a result of -230 life, you would add the ability twice at level 7 (-100 life) and then add it again 3 times at level 6 (-10 life). Here is what we have: (-100) + (-100) + (-10) + (-10) + (-10) = -230 Hope this helps. |
| 09-29-2009, 11:12 AM | #11 | |
Quote:
More efficient object editor wise to have one big negative and the rest positive. |
| 09-29-2009, 02:34 PM | #12 | |
Quote:
|
| 09-29-2009, 06:11 PM | #13 | |
Quote:
BonusMod, isn#t --> force EF to submit BonusMod here ![]() PEDANT |
| 09-29-2009, 06:30 PM | #14 |
I like Bonus Mod more,... Its nearly the same, but as I said, its not the same. |
| 09-29-2009, 07:13 PM | #15 |
yea...bonus-mod rulez grr...american keyboard :emote_berserkergang: |
