1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

How to make AI use imported spells

Discussion in 'World Editor Help Zone' started by Mr.Chamod, Oct 31, 2020.

  1. Mr.Chamod

    Mr.Chamod

    Joined:
    Oct 31, 2020
    Messages:
    1
    Resources:
    0
    Resources:
    0
    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
     

    Attached Files:

    • Map.w3x
      File size:
      6.1 MB
      Views:
      22
  2. A]mun

    A]mun

    Joined:
    Dec 4, 2007
    Messages:
    1,008
    Resources:
    0
    Resources:
    0
    You have to order the boss to cast the spells, since the normal ai will only cast default spells.
     
  3. FranzLiszt

    FranzLiszt

    Joined:
    Jul 23, 2014
    Messages:
    90
    Resources:
    0
    Resources:
    0
    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 .
     
  4. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,189
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    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.
     
  5. FranzLiszt

    FranzLiszt

    Joined:
    Jul 23, 2014
    Messages:
    90
    Resources:
    0
    Resources:
    0
    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
     
  6. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    364
    Resources:
    0
    Resources:
    0
    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.
     
  7. ravellani

    ravellani

    Joined:
    May 24, 2017
    Messages:
    93
    Resources:
    0
    Resources:
    0
    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).
     
  8. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,189
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    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.
     
  9. ravellani

    ravellani

    Joined:
    May 24, 2017
    Messages:
    93
    Resources:
    0
    Resources:
    0
    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: Nov 6, 2020