HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Items that grant abilities?

08-04-2006, 03:21 AM#1
Browser_12
Is it possible to possess an item that grants the holder an ability? I don't mean being able to click an item to activate an ability. I literally want an item that, when equipped, adds an ability to the hero's list of abilities.

Here's the reason: I want heroes to be able to gain and change their abilities as well as leveling them up. When they level up, I was going to have the items switched out for the 'level up' of that item, so that the ability was changed as well.
I would use the trigger for giving units an ability, but abilities given in such a way cannot be leveled up, as they are not classified as 'Hero skills'.

Any answer or solution to my situation is appreciated.

Thank you.
08-04-2006, 03:39 AM#2
Naakaloh
When a unit aquires an item:

Collapse JASS:
call UnitAddAbility( whichUnit, abilityID )

I'm not exactly sure what it is for GUI, but it should be in the Unit category.

Edit: And if you want them to lose it when they drop the item, there's a UnitRemoveAbility funciton also
08-04-2006, 03:42 AM#3
Browser_12
[quote=Naakaloh]When a unit aquires an item:

[jass]call UnitAddAbility( whichUnit, abilityID )[/jass]

I'm not exactly sure what it is for GUI, but it should be in the Unit category.

Edit: And if you want them to lose it when they drop the item, there's a UnitRemoveAbility funciton also[/quote]

So in other words, I have to create a custom item using Jass? D:
08-04-2006, 03:53 AM#4
Alevice
Nope. He posted JASS because he doesn't work much with GUI. And custom units are not created through jass, just the object editor ;)

What you need is Engineering Upgrade. Cehck PitzerMike's ability guide for further info.
08-04-2006, 04:06 AM#5
Browser_12
Yeah, that's what I was using, I guess.

I haven't opened this map for like, 2 years.
I used to be pro at mapping... I was one of those people who posted answers to all the questions on warcraft3.com

D:

So I'm not likin the whole crap-I-suck-now deal.
Anyways it looks like I was making some kind of attempt to use the Engineering Upgrade ability.

Can abilities granted via Engineering Upgrade be leveled up like normal abilities?

Thanks!

P.S. is there a way to make an ability NOT appear on the ability roster (so that it doesn't take up space), since Engineering Upgrade is a passive skill anyways?

P.P.S. I'm gonna check out your deviantart and leave some comments ;D
08-04-2006, 04:30 AM#6
Alevice
http://www.wc3campaigns.net/showthread.php?t=81742

In particular:
Quote:
Originally Posted by PitzerMike Ability Guide
ANeg (Engineering Upgrade): The engineering upgrade finally solves the problem of not levelable trigger added hero skills. It allows to add hero skills with triggers and to still have them in the levelup menu. Therefore the hero needs to have dummy hero skills that can then be replaced by the actual skills. The placeholder skills need to have the same amount of levels and level skip requirements that's why you will probably need one for ultimates and one for normal hero skills. I usually base my placeholder skills off of Arpb (Replenish) but the base skill really shouldn't matter. The placeholder with 3 levels and 2 levels skip can simply be given to the hero several times. Then the placeholder skills must be disabled for all players at map initialization, so they don't show up in the levelup menu at first. Then you will just need an adder ability based off of engineering upgrade for each skill that you might want to have on the hero. The upgrade will replace the skills in the order of their ability upgrade field when it's added, and replace them backwards when it's removed. So if you want to abuse the engineering upgrade but don't want the passive upgrade icon on the unit you can simply have an engineering upgrade with the abilities B, A in the upgrade field and then when you add and remove it on a unit that has A it will then have B. That's because adding it will do nothing as B is not there, but removing it will replace A with B. As soon as a hero ability has been added that way it will be learnable in the levelup menu. Note that replacing skills only works well for unlearned hero skills. Replacing learned skills or normal unit skills will not actually replace them, it will just update the fields like range, area of effect, duration, icon, targets allowed, and so on, but will not change the hardcoded part of the ability. For example changing an aura to the heal ability will only change the icon, tooltips, range and probably some other fields, but it will still be an aura. If the ability that is being replaced is disabled at the time the results become even weirder and you can never know what you will get. Also the engineering upgrade only works for heroes, adding it to normal units will crash the game for some reason. Another weird bug with it is, that you have to specify all four upgraded abilities, otherwise it might not work. If you only want to upgrade one ability, you can simply specify ability ids that the unit will never have for the rest. Also dynamic tooltips like <dataA5> are flawed above level 3. Also the default buff shouldn't be replaced, but it doesn't show up anyway, so that's not really an issue.
08-04-2006, 04:48 AM#7
Browser_12
^^ Thanks, that helps a lot..
I think, way back when, that I dropped this project because I couldn't solve this problem. The engineering upgrade was rather new, and nobody knew these spiffy tricks. :)

You rock. XD
btw, i left you some deviant comments. ;D
08-04-2006, 04:50 AM#8
Wyvernoid
Just Use "Unit - Add ability to unit".
(And - "Unit - Remove Ablily")
08-04-2006, 05:17 AM#9
Alevice
Browser_12 - You're welcome

Quote:
Originally Posted by Wyvernoid
Just Use "Unit - Add ability to unit".
(And - "Unit - Remove Ablily")

Quote:
I would use the trigger for giving units an ability, but abilities given in such a way cannot be leveled up, as they are not classified as 'Hero skills'.
08-04-2006, 08:31 AM#10
Anitarf
Dynamic hero skills are a pain, that's why nobody makes them.