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

help with removing skills in the hero skill learning menu

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
Greetings all >:D I need some help with a trigger;

I have two abilities; ability_A and ability_B in the hero's skill learning menu, now I need a trigger that when the hero learns Ability_A, Ability_B is removed from their learnable skills in their learnable skills menu therefore the hero has to decide which of the two abilities he/she wants to learn because he/she cannot have both.

So far I've done this:

  • Savagery or Strengthened Resolve
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • Set tempGroup1 = (Units of type Spiderlord)
      • Unit Group - Pick every unit in tempGroup1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Learned Hero Skill) Equal to Savagery
            • Then - Actions
              • Unit - Remove Strengthened Resolve from (Picked unit)
              • Unit Group - Remove (Picked unit) from tempGroup1
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Learned Hero Skill) Equal to Strengthened Resolve
                • Then - Actions
                  • Unit - Remove Savagery from (Picked unit)
                  • Unit Group - Remove (Picked unit) from tempGroup1
                • Else - Actions
      • Custom script: call DestroyGroup (udg_tempGroup1)
which is really ineffective because you can still learn both abilities however only one will appear in your usable abilities slots. I'm not sure but I believe I have to do something as suggested here :

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.

Unfortunately I really don't understand any of it :( as always in help of any kind will be appreciated :)
 
Status
Not open for further replies.
Top