Ai, learn the custom abilities!

Dymetreus

New Member
Reaction score
1
So I've been making a lot of custom races, which custom AI controls as of late. I've found it to probably be one of the most entertaining parts of WCIII for me I've found. However in my map I've found an issue. When I import the custom hero, do all the good stuff, I go to Hero tab where the AI learns the abilites you set them to. However they aren't very capable, it seems. I've added one more ability, making for a grand total of four.

The maximum level is 13, so this wouldn't be an issue, but this tab thinks it's only 10, I'm guessing just out of default. So I set the abilities to be all maxed out at 10. Yet this didn't solve the issue, it won't even show the Summon Water Elemental ability, and Arcane Brilliance can only be grown one level, but this tab wants to level it three times!

What can I do to solve this issue?
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
Hi Dymetreus :D What I've done in the past for a similar situation is to just ditch the built-in ability system, and trigger the ability learning procedure completely. The trigger below is how this is done:
Trigger:
  • Learn Abilities Archmage
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Archmage
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to (==) 1
        • Then - Actions
          • Hero - Learn skill for (Triggering unit): Human Archmage - Mass Teleport
          • Hero - Learn skill for (Triggering unit): Human Archmage - Summon Water Elemental
          • Hero - Learn skill for (Triggering unit): Human Archmage - Brilliance Aura
          • Hero - Learn skill for (Triggering unit): Human Archmage - Blizzard
        • Else - Actions
          • Hero - Learn skill for (Triggering unit): Human Archmage - Mass Teleport
          • Hero - Learn skill for (Triggering unit): Human Archmage - Brilliance Aura
          • Hero - Learn skill for (Triggering unit): Human Archmage - Blizzard
          • Hero - Learn skill for (Triggering unit): Human Archmage - Summon Water Elemental
This way, the hero will learn his abilities in a random order. If an ability is maxed out, it will run through the list until an ability is properly learned. I'm sure you're familiar with the archmage, but if you're not, always make sure that the hero's ultimate skill is first on both lists, as I'm sure that's what he wants to learn whenever he is able to.

Hope this helps :D
 

Dymetreus

New Member
Reaction score
1
I gave you +1 rep, you were very helpful. Thank you so much for this, I figured there may be a way to do this through triggers, but I didn't even know how to begin. I'm very appreciative, now I won't be discouraged from making unique heroes!

---

It also seems I have to have the hero already created in order to do the first condition, which she isn't created yet. D: (By created, I mean on the map already, I have the hero made just not placed on the map. I want her to be trained, like on a melee map.)
 

jnZ

I
Reaction score
64
It also seems I have to have the hero already created in order to do the first condition, which she isn't created yet. D: (By created, I mean on the map already, I have the hero made just not placed on the map. I want her to be trained, like on a melee map.)

you are wrong. the condition checks for a hero type not a certain hero (unit). so it doesn't matter if the hero is created from the beginning or trained.
but you might want to add another condition that checks for a computer player as controller status otherwise the trigger will run when your own hero levels up
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
It also seems I have to have the hero already created in order to do the first condition, which she isn't created yet.

Just to double-check, are you using Unit - Specific Unit Event or Unit - Generic Unit Event? Specific would cause the indicated problem, while Generic is what you should use.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top