• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Increase/Decrease Armor

Status
Not open for further replies.
Level 11
Joined
May 26, 2009
Messages
760
Greetings,

I'd like to find a way to be able to both increase and decrease the base armor of a unit using triggers (GUI preferred).

I have tried two methods I know of yet and didn't like them:
  1. Upgrade - "Apply Defense Upgrade Bonus". Can't be decreased.
  2. Ability - "Armor Bonus". Will show as a green +1. Does not stack.

Help would be very appreciated. Thanks.

Yours Sincerely,
Chizume
 
Level 7
Joined
Dec 26, 2006
Messages
303
if what you want is GUI, I don't have any idea...

Ability and Upgrade is all there's for GUI, if there's other option I might tell you to either use Tome but 'there's no tome for armor' and 'you say unit not a hero', any others most likely will show as a green...
might as well use upgrade, but then you can only increase not decrease or decrease not increase...
either use ability or give it up and use JASS

well, you can always wait for other answer
 
Level 14
Joined
Aug 30, 2004
Messages
909
I used Devotion Aura, applied it only to the self, then gave it 10 levels. level 1 gave no armor bonus, level 2 set armor to -1, level 3 set armor to -2, etc.

You could use the regular upgrades to increase armor and devotion aura to decrease armor.

Or you could make level 1: -4, level 2: -3, level 3: -2, level 4: -1, level 5: 0, level 6: +1, etc., use triggers to keep track of where the armor should put and set the ability to the appropriate level.
 
Level 11
Joined
May 26, 2009
Messages
760
Thanks for all replies :)

Or you could make level 1: -4, level 2: -3, level 3: -2, level 4: -1, level 5: 0, level 6: +1, etc., use triggers to keep track of where the armor should put and set the ability to the appropriate level.
Isn't the armor increased/decreased for "Apply Defense Upgrade Bonus" set at the unit object data and can only be one value? Or is there another Armor Bonus Upgrade? Other than that this seems like the best solution.

You could use the regular upgrades to increase armor and devotion aura to decrease armor.
Would this show -1?
 
Level 14
Joined
Aug 30, 2004
Messages
909
Thanks for all replies :)

Isn't the armor increased/decreased for "Apply Defense Upgrade Bonus" set at the unit object data and can only be one value? Or is there another Armor Bonus Upgrade? Other than that this seems like the best solution.

Would this show -1?

If you use the devotion aura idea, your armor will always look like this: 5 -2, or something like that. So there will be your "default" armor and then the modifier.

Perhaps you could give more detail about what you want to do and we could be more helpful with the cosmetics. But if you just want to be able to move armor up and down, having a devotion aura ability set to the self with both positive and negative values will do it. If you're worried about the color; I'm not sure if it works or not... You can fix it though. For positive levels of devotion aura use the regular buff; for negative use a different buff and manually put the color change into the text name of the ability.
 
Level 15
Joined
Dec 6, 2008
Messages
345
I used Devotion Aura, applied it only to the self, then gave it 10 levels. level 1 gave no armor bonus, level 2 set armor to -1, level 3 set armor to -2, etc.

You could use the regular upgrades to increase armor and devotion aura to decrease armor.

Or you could make level 1: -4, level 2: -3, level 3: -2, level 4: -1, level 5: 0, level 6: +1, etc., use triggers to keep track of where the armor should put and set the ability to the appropriate level.

I have problem with decreasing armor too..
I don't know why, but i can't set value less than 0.00 in Devotion aura, when I write -X and press ok, the value is changed to 0.00.
 
Last edited:
I have problem with decreasing armor too..
I don't know why, but i can't set value less than 0.00 in Devotion aura, when I write -X and press ok, the value is changed to 0.00.
Wrong!
Use "Shift" button!

Press Shift and Enter at selected field, now you can enter neg number for anything!

You can create:
Neg hp/mana regeneration (phoenix for example)
Spell mana cost above 1000
Hero attribute gain per level (above 20)
And so on!
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can only change the defense of a unit by it's "Defense upgrade bonus", thus you cannot have an upgrade that can both decrease and increase the armor.
Another downside is that you cannot undo a research (once researched, it can never be unresearched).

Either way, I would use 2 armor abilities (one which decreases the armor, the other increases armor).
Both have... let's say 100 levels and always add +1/-1.
YES: it shows as [armor] + [value] instead of adding it to the base armor.
Another stupid thing: you cannot auto-fill negative values, thus it can take a while (depending on how much you need)...

I have attached a test-map for you to see.
 

Attachments

  • Armor Change.w3x
    18.1 KB · Views: 92
Level 11
Joined
May 26, 2009
Messages
760
Yes, for my map I used what Ap0calypse just said, and upgrades. Upgrades for permanent positive enhancements, such as for example a unit leveling up. And ability armor to decrease/increase bonus armor.

Thanks all.

Yours,
Chizume
 
Status
Not open for further replies.
Top