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

[Trigger] Adding Spell to Hero Ability

Status
Not open for further replies.
Level 4
Joined
Nov 26, 2011
Messages
34
Do someone know how to adding spell to Hero ability using trigger?
I mean not unit ability, it kinda looks like the hero need a skill point to learn it.
Trigger Example:
  • Shockwave
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Pick Shockwave
    • Actions
      • Unit - Add Shockwave to Hero 0001 <gen>
But when I do so, it not shown in the hero ability but already learned at Level 1 and can't be learned to level 2, help me plz :(
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Oh, you want to make the ability learnable. You're looking under "Unit" actions. Look under "Hero" actions... I'm not sure, but I think it's not possible to make abilities learnable with triggers, unless you give the ability to the unit, and disable on map init. Then you enable the ability for that player when the unit picks the item...

The easiest and less problematic way would be triggering it all.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
This is a fact, read please:
Added abilities (be it Unit Abilities or Hero Abilities) to a unit via triggers (Trigger Editor) will treat that ability as Unit Ability. You cannot level it up via Skill Points by pressing the red cross mark you see on the screen. However, there is a trick which you can play with the system. And that trick is...

Wait, I need to know, the main problem for your case, is that you want to learn added ability via red cross mark or just do you want to increase the level of your added ability ?

Which is the main problem ?

If you only want to add level to added ability, it will be easier.

But if you still want added ability to be learned via red cross mark, it would be a bit difficult to achieve.

Okay, I did this one;
If you only want to add level to added ability, it will be easier.

Check it out.
 

Attachments

  • Simple Ability Leveling System.w3x
    14 KB · Views: 363
Level 5
Joined
Jun 16, 2004
Messages
108
It is possible to change a hero's hero abilities during the game such that you can level them up normally with hero skill points.

http://www.wc3c.net/showthread.php?t=81742 said:
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.

In essence, you have invisible placeholder hero abilities, and while they are not learned, you can replace them with a different skill with the Engineering Upgrade.

Of course, there is no requirement that the abilities you are replacing have to be placeholders. You can replace any hero ability this way, provided that you remove the ability you are trying to replace before replacing it.
 
Level 4
Joined
Nov 26, 2011
Messages
34
Oh, you want to make the ability learnable. You're looking under "Unit" actions. Look under "Hero" actions... I'm not sure, but I think it's not possible to make abilities learnable with triggers, unless you give the ability to the unit, and disable on map init. Then you enable the ability for that player when the unit picks the item...

The easiest and less problematic way would be triggering it all.
Well, I can't do that, I make something like this: A hero Pick his offensive spell and then moved to the defensive spell selection. theres 4 offensive spell to choose, 4 defensive spell to choose, etc. while max hero ability is 5 :(

Which is the main problem ?

If you only want to add level to added ability, it will be easier.
No, the main problem is, i want a spell learnable with trigger, just like in Custom Hero Line or Custom Hero Survival.

In essence, you have invisible placeholder hero abilities, and while they are not learned, you can replace them with a different skill with the Engineering Upgrade.
Hmm, maybe this will work, i going to try it first
EDIT: Wow, it's worked, thx a lot :) +rep
 
Last edited:
Status
Not open for further replies.
Top