• 🏆 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!

Permanent stat gain at a gold cost

Status
Not open for further replies.
Level 4
Joined
Jan 17, 2018
Messages
112
Hi all,

I've read around, and if I want an ability to cost gold I need to base it off of "Charge gold and lumber" that part is done.
Now I want that unit and that unit only to gain said stat. I've read that you add Art - Special ...permanent gain... from tomes, but now how do I add the value of the stat to gain? I want one ability to gain attack, one to gain defence and one to gain attack speed.

Any help please :S
 
Level 5
Joined
Jan 19, 2018
Messages
126
You want this ability on a shop to purchase from there or you want the hero to have this "Gain Stat at Cost" ability?
 
Level 4
Joined
Jan 17, 2018
Messages
112
My bad for not being clear enough. I want it to be an unit specific ability and not from a shop.
 
Level 3
Joined
May 12, 2015
Messages
32
There is a tome ability to increase attack damage:"Item Permanent Damage Gain", add that to an item and whenever you need to increase attack damage just create that item and give it to the unit(and remove the item instantly to prevent leaks). the unit must have an inventory so if it doesn't have inventory give inventory ability(make sure its hero inventory) then give attack damage item/tome then remove the inventory ability.

As for armor/defence and attack speed it will be a little bit complicated as they don't have tome abilities, and will be limited, also Armor will be added as (green) bonus after the "+":-

Use "Item Armor Bonus" ability for armor and "Item Attack Speed Bonus" ability for attack speed, make each have lots of levels (depends on armor/attack speed increment per ability cast) then whenever you need to increase armor/attack speed just add ability and increase the ability level by 1. However this is inefficent due to it being limited by ability levels and more ability levels = increased map file size so i recommend using BonusMod system(also provides ability to increase/decrease other stats).

Edit: BonusMod requires JNGP. Also forgot to mention that if u use Item Bonus ability u properly should need to use the following custom script for both abilities when u add them:
  • Custom script: call UnitMakeAbilityPermanent('WhichUnit', true,'Abilityid')
This prevents the unit from losing the bonuses if it transforms to another unit.
 
Last edited:
Level 5
Joined
Jan 19, 2018
Messages
126
Not sure how to combine the two. I change the values on charge gold and lumber to what I see in a video, but I don't see the "customize damage" or whatever option.
Can you perhaps upload your map here to make it easier to see exactly what you are doing?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Not sure how to combine the two. I change the values on charge gold and lumber to what I see in a video, but I don't see the "customize damage" or whatever option.
Use a trigger that in response to casting the ability gives the casting unit a tome that raises its maximum damage. One could also use a bonus mod system to raise maximum damage.

If using tomes, remember to remove the item after use to prevent leaks.
 
Status
Not open for further replies.
Top