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

How to make AI use imported spells

Status
Not open for further replies.
Level 1
Joined
Oct 31, 2020
Messages
2
Hey guys this is my first time posting here,im making a boss fight map using some imported spells,But my AI is using only 1 of the 3 spells in combat and doesnt use the rest,is there anyway to fix dis using GUI since my knowledge on Jass is almost equal to zero.I tried searching for tutorials but none of them really answered my question

The AI is the boss (blue) called Kallisto
 

Attachments

  • Map.w3x
    6.1 MB · Views: 44
Level 21
Joined
Dec 4, 2007
Messages
1,478
You have to order the boss to cast the spells, since the normal ai will only cast default spells.
 
Level 4
Joined
Jul 23, 2014
Messages
73
one of the things I'd like to know too, especially because I find ridiculous that normal units use everything you customize but heroes don't
it's a clear lack from programmers
but the same is about new units to create. you can add whatever, but AI doesn't create anything .
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
AIs will cast custom spells in the same way they cast the base spell. As such often you can trick the AI into using an ability reasonably by making it based on an ability that is reasonably used rather than channel. For example for a targeted damage ability base it on Finger of Death rather than Channel and the AI will cast it on enemies and deal damage.

The other way is to write your own tactical AI system that orders the AI units to cast the abilities in reasonable conditions. This is something that SC2 made much easier than WC3.
 
Level 4
Joined
Jul 23, 2014
Messages
73
we need a good detailed guide to this. no doubt there's a way, but wtf is so complex, especially, I repeat, when for normal units they use new spells by default
 
Level 12
Joined
Feb 5, 2018
Messages
521
we need a good detailed guide to this. no doubt there's a way, but wtf is so complex, especially, I repeat, when for normal units they use new spells by default

For single target casting, there are lots of good options: frost nova, chain lightning with one target, finger of death, stormbolt
AoE casting: Thunderclap, warstomp are first that come to mind
Autocast spells: Curse, Heal, Abolish Magic

If you then want, you can trigger additional damage/effects when the unit's/ cast the spells.
 
Level 4
Joined
May 24, 2017
Messages
93
I have been experimenting with AI casting as well. Can somebody answer explain this situation to me please?

I am creating a zombie map and I want the zombies to use war stomp without triggering it and checking conditions. I have seen in Base abilities for custom spells cast by melee-game AI units That the AI will cast this spell on its own. When I gave the zombies the neutral hostile ability war stomp 1 and put them in a map and attacked them, they did not use the ability. Do I need to trigger the start campaign or normal AI? How do I get the zombie to just use the ability on its own?

Thanks for any answers and +rep to anyone

EDIT: This is from the link and I attacked the zombies with 8 footmen so these conditions should be met.
~Thunderclap/Warstomp - Will cast if there are 2 to 3 units around the caster. May not be used if air units are present (despite being allowed to hit them to).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
If the zombies are owned by neutral hostile it should just work. If the zombies are owned by a player then they will likely need to exist (be declared as a computer slot, not unused or empty) and may require AI to be started for them. If the zombies are owned by other neutral players they might be unable to AI cast. If the warstomp order string is corrupted to the wrong target type due to incorrect use of channel involving it, then that will need to be fixed before the AI can cast it.
 
Level 4
Joined
May 24, 2017
Messages
93
Can you tell me what you mean about the order string. I have not changed anything about the warstomp ability and its the original spell, I did not use channel. What would I need to fix if that happened?

EDIT: I tried to set the owner of the zombies to nuetral hostile and they still did not cast. I can do it manually with ones under my control but they wont do it under hostile or player computer.

EDIT 2: I screwed up and put regular campaign zombies instead of the custom ones wih the ability. everything worked after I fugured that out. Thank you anyway
 
Last edited:
Status
Not open for further replies.
Top