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

Custom spells sfx don't show properly for AI casters, why is that?

Status
Not open for further replies.
Level 14
Joined
Dec 12, 2009
Messages
1,027
Does anyone have an idea as to why custom spell sfx don't appear properly when used by the AI? Whenever I use the spells everything works perfectly, so I doubt something was imported wrong.

For example, whenever Paladon's Lightning Strike is used by an AI hero, the lightning effects never appear. Whenever MortAr's Lightning Nova is used by an AI hero, the sfx ring doesn't work proprerly and instead sends all of the lightning missiles in the same direction.

I've noticed that sometimes it appears the AI is multicasting the same spell rapidly, as if it's ignoring the cooldown. This is most notable on MortAr's Lightning Nova (based on Divine Shield).

Also, what are all AoE spells the AI is capable of using? I know it can use Blizzard. Does it matter if the custom spells are imported, and not overriding the base spell?

//\\oo//\\
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Are you refering to spells the AI will cast by default?

Yes. From what I understand, it can cast spells with no targets such as War Stomp, Divine Shield, and Wind Walk. It can also cast Blizzard or Silence, AoE spells. I've been led to believe that the AI can't use most AoE spells. I was wondering which ones it could so that I can use it as the base spell for a few custom abilities.

Also, why is it the melee AI can cast all spells normally and custom AI can't? What's different between the two? I say all because in melee games vs the computer I've seen it use spells like Death Pact (not sure about Dark Ritual though).

If it's just a difference in coding (the Jass script), then can the melee AI coding be applied to the custom coding?

My question on the custom spells sfx not showing properly when used by computer players still stands - has anyone else noticed this?

//\\0o//\\

Edit:
What general trend of 'logic' does the AI use for casting spells? I know that it can't use reverse spells. For example; does the AI only cast Silence on casters/heroes?
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
maybe the spell has dummies behind that custom spell?, maybe the dummy did not cast the spell which has the sfx?...this causes problems since AI's (dummies) are stupid and cant cast sometimes certain custom spells...Ive encountered like this before even from my own spells...

I fixed the problem by putting the 'actions' of the tigger in order...

example:

create 1 dummy
add expiration to dummy
add ability to dummy
cast the ability

take note that the cast is 'always' last
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
Also, why is it the melee AI can cast all spells normally and custom AI can't? What's different between the two? I say all because in melee games vs the computer I've seen it use spells like Death Pact (not sure about Dark Ritual though).

Dont quote this as fact but from personal experience its based on the unit and not the ability. AI only seems to work as it should using default units, custom units seem to be ignored by it.
But really I cant help much in this part.

Yes. From what I understand, it can cast spells with no targets such as War Stomp, Divine Shield, and Wind Walk. It can also cast Blizzard or Silence, AoE spells. I've been led to believe that the AI can't use most AoE spells. I was wondering which ones it could so that I can use it as the base spell for a few custom abilities.

Again this is from personal experience...

Blizzard/Rain of Fire - Will cast if there are at lest 2 to 3 units in a group. Monsoon however never seems to cast.

Fire Breath/Shockwave/Carrion Swarm/Impale - Will cast if there are at lest 2 to 3 units in a cone.

Thunderclap/Warstomp - Will cast if there are 2 to 3 units around the caster.

Silence - Appears to spam on anything that has mana.

Fan of Knives - Spams randomly if 2 to 3 enemies around, occasionaly also uses on single targets if attacked.

Sorry for the late reply, timezones...
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
maybe the spell has dummies behind that custom spell?, maybe the dummy did not cast the spell which has the sfx?...this causes problems since AI's (dummies) are stupid and cant cast sometimes certain custom spells...Ive encountered like this before even from my own spells...

I fixed the problem by putting the 'actions' of the tigger in order...

example:

create 1 dummy
add expiration to dummy
add ability to dummy
cast the ability

take note that the cast is 'always' last

Both spells are using dummies. I'm not entirely sure I understand your solution. Once I get the map updated (should be in a day, max) would you be kind enough to look through the triggers and see if they're in the order you're suggesting?

Dont quote this as fact but from personal experience its based on the unit and not the ability. AI only seems to work as it should using default units, custom units seem to be ignored by it.
But really I cant help much in this part.



Again this is from personal experience...

Blizzard/Rain of Fire - Will cast if there are at lest 2 to 3 units in a group. Monsoon however never seems to cast.

Fire Breath/Shockwave/Carrion Swarm/Impale - Will cast if there are at lest 2 to 3 units in a cone.

Thunderclap/Warstomp - Will cast if there are 2 to 3 units around the caster.

Silence - Appears to spam on anything that has mana.

Fan of Knives - Spams randomly if 2 to 3 enemies around, occasionaly also uses on single targets if attacked.

Sorry for the late reply, timezones...

So custom the AI units (dummies) aren't ordered about properly, based on your experiences, and the custom spells typically work as expected? Thanks for your list of abilities and the AI's general uses!

As far as Carrion Swarm and Shockwave go, I tried using those as base abilities but they never seemed to be casted at all. Then again, the AI seems to prefer using certain abilities over others. Interesting.

Something else I noticed during testing for a usable base ability for the AI to cast, was that the damage spells had to deal damage. I had an actual Forked Lightning dealing damage, and a custom spell with Forked Lightning as the base, which didn't deal damage. In my map the AI loves to spam this ability, but the base for the custom spell wasn't cast until I changed the damage dealt to 0.01, which makes sense.

It could be that the AI won't cast damage spells (Forked Lightning, Chain Lightning, Shockwave, Carrion Swarm, and Impale) with 0 damage as the base. I haven't tested this yet, but I plan to.

A little off-topic, would it be wise for me to try to assemble a list of base spells suitable for melee-based AIs? I realize many users recommend using Channel as the base, but the AI never uses it (based on everything I've come across). While it's true that for Boss Fights and other similar AI in rpgs it would make more sense to trigger the casting, it doesn't make as much sense for use in melee-like games, especially when the AI already has code for casting/not-casting. I looked for something like this and couldn't find it anywhere.

//\\oo//\\
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
So custom the AI units (dummies) aren't ordered about properly, based on your experiences, and the custom spells typically work as expected? Thanks for your list of abilities and the AI's general uses!

Well custom spells to the AI are treated as how the AI would treat the base spell it was made from. So a spell based on Fan of Knives will be casted as though its Fan of Knives etc.

As far as Carrion Swarm and Shockwave go, I tried using those as base abilities but they never seemed to be casted at all. Then again, the AI seems to prefer using certain abilities over others. Interesting.

Ive gotten Shockwave/Carrion swarm to work in some very rare cases. Breath of Fire seems a better base in any case.

A little off-topic, would it be wise for me to try to assemble a list of base spells suitable for melee-based AIs? I realize many users recommend using Channel as the base, but the AI never uses it (based on everything I've come across). While it's true that for Boss Fights and other similar AI in rpgs it would make more sense to trigger the casting, it doesn't make as much sense for use in melee-like games, especially when the AI already has code for casting/not-casting. I looked for something like this and couldn't find it anywhere.

I really think making such a list would be a great idea. I have done loads of (unintentional) testing in that area so Id be happy to help.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Alright, I'll try switching the current dummies (imported custom units) with real units and see if they behave any better during casting.

Will post back after I test, so other users who stumble across this will find it helpful if this is the problem. I'll also look into assembling a list of useable base spells for melee AI casters.

//\\oo//\\
 
Status
Not open for further replies.
Top