• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Why won't AI units use base game abilities?

Status
Not open for further replies.
Level 5
Joined
Mar 10, 2021
Messages
28
I've seen the AI use abilities before but I've fiddled with this unit for awhile now, what are the rules on how AI uses its abilities? How can I get the AI to do its job without forcing it with a bunch of triggers?

EDIT: Upon further testing my question is: why won't units use Curse? It was on the list of abilities the AI will use, does anyone know how when or why?
 
Last edited:
 
Have you assigned a Computer player as the owner of the unit(s)?
Like going to the Player Properties thingy.

The AI should cast spells such as Curse if you have done that.

Also, just in case, make multiple forces. For example:
Force 1 contains Player Red (you for example)
Force 2 contains Player Blue (computer player)

And make each player in each force Allied (even if there is 1 player per Force)
 
Last edited:
Yes I read that thank you very much for linking it, knowing its there is helpful. It was the first thing that came up when I looked up the question. It did not have the answer.

Now what about an ability like Cripple? Curse started to work but Cripple refuses too.
 
The hard-coded tactical AI used by the AI to cast the standard abilities has very specific cast conditions. I think the cast condition for curse was that the unit auto attacks. It is also possible that it relied fully on the auto cast mechanics of curse.

You might need to experiment around a bit to find the exact cast conditions for the abilities. Some might require more than 1 possible victim unit to be cast, or a victim unit that meets specific requirements.
 
Yes I read that thank you very much for linking it, knowing its there is helpful. It was the first thing that came up when I looked up the question. It did not have the answer.

Now what about an ability like Cripple? Curse started to work but Cripple refuses too.
From my testing, the AI only uses Curse when they're getting physically attacked. For Cripple, they don't seem to use at all. I had to trigger them to use it. The only time I can get the AI to cast abilities that they normally can't cast is when I used the Unit get Attacked event. Otherwise, if I did something like Create a Spell Dummy Unit for the AI and then immediately order that unit to cast Volcano (they don't know how to use Volcano) under a different event such as a Periodic event, it doesn't work.

Also, know that some of the info from the "Base abilities for custom spells cast by melee-game AI units" thread seems outdated. I've tested the Rain of Fire and Blizzard condition before for around an hour and never got it to work either.
 
1. Pick an ability whose cast-logic replicates how you want your other ability to work. Give the AI units this ability.
2. When a unit casts that ability, dummy-cast whatever the actual real ability is.
3. Hope that the real ability's source being a locusted dummy unit doesn't affect AI behavior in some way.
 
Yes I read that thank you very much for linking it, knowing its there is helpful. It was the first thing that came up when I looked up the question. It did not have the answer.

Now what about an ability like Cripple? Curse started to work but Cripple refuses too.
AI casts Cripple on units such as Abominations, Crypt Fiends, Doom Guards, Knights, Riflemen, Tauren etc...
Basically big units with a lot of hp. I don't know if the unit's level is taken into account but generally make the units be at least level 3.
 
Status
Not open for further replies.
Back
Top