Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Base abilities for custom spells cast by melee-game AI units

Discussion in 'JASS/AI Scripts Tutorials' started by Boris_Spider, Apr 11, 2011.

  1. Rainmaker

    Rainmaker

    Joined:
    Jun 3, 2009
    Messages:
    49
    Resources:
    0
    Resources:
    0
    Fantastic tutorial, amazingly useful. Just one thing: if I understood you correctly, you said that melee AI doesn't use transform abilities (Destroyer Form etc.). How about campaign AI? It sure sucks if every such ability needs to be triggered manually...
     
  2. VeljkoM

    VeljkoM

    Joined:
    Jul 27, 2008
    Messages:
    2,553
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Think it is because transformation creates separate unit type. Perhaps if you order in AI script for AI to "train" he would transform existing unit, just he would also then recreate gone unit.
     
  3. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    I think the AI handled by the AI editor and AI scripts (campaign AI are AI scripts) are no concern of how units use their abilities. It's more about what kind of units/building they will create and the size of the attacking/creeping/defending groups.

    It sounds weird to me, though. AI really never use Bear Form and Destroyer Form?
     
  4. VeljkoM

    VeljkoM

    Joined:
    Jul 27, 2008
    Messages:
    2,553
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    I have seen AI using those abilities. But I think AI doesn't really see them as just regular abilities since morphed units are treated differently then base units. Druid and bear is just not same for AI and won't cast it as it would think he lost a unit unless he has need to train morphed unit. Though I have yet to test this.
     
  5. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    Parasite is always cast on the furthest target inside the range.
    So if 2 units are inside the 700 range, one of them is 300 away, the other one 600. Then the one that's 600 away will be the first choice target from an autocast Parasite.

    (Found this out in my ORPG, since I base all autocast ranged spells on Parasite because it's the only autocast spell (not talking bout arrow enhanced spells) that has a missile effect)
     
  6. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    Silence - Casts on units with at least 75 mana. Seems to prefer player units and non-heroes over heroes.

    EDIT:
    Banish - Prefers casting on summoned units.
     
    Last edited: Sep 19, 2012
  7. HammerFist132

    HammerFist132

    Joined:
    Mar 22, 2012
    Messages:
    1,317
    Resources:
    17
    Models:
    11
    Icons:
    2
    Maps:
    2
    Spells:
    2
    Resources:
    17
    I like this tutorial. It can be useful for maps with AI to do not create boring triggers for the spell casting.(mostly alternative melee)
    Vote for approve and +REP
     
  8. 13lade619

    13lade619

    Joined:
    May 29, 2009
    Messages:
    57
    Resources:
    1
    Maps:
    1
    Resources:
    1
    This is awesome.

    I discovered some of them by myself a long time ago too ^^.

    Thanks for the list.

    You can add these to the list:
    Drunken Haze
    Acid Bomb
    Mana Drain
    Inner Fire
     
  9. Gekigengar

    Gekigengar

    Joined:
    Aug 20, 2009
    Messages:
    1,490
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    This is really useful.

    I don't know how Slow is Used by the AI,

    but sometimes they use it while engaging, or when an enemy is escaping.

    sometimes its never used at all. @_@

    i notice their SPAM too, which sometimes lead to Multiple cast instances weirdly during that split second.
     
    Last edited: Nov 20, 2012
  10. ck5524209

    ck5524209

    Joined:
    Nov 30, 2012
    Messages:
    25
    Resources:
    0
    Resources:
    0
    ~Shadow Strike
    this line has an error word "afflcited "
     
  11. Boris_Spider

    Boris_Spider

    Joined:
    Dec 12, 2009
    Messages:
    728
    Resources:
    6
    Icons:
    3
    Maps:
    2
    Tutorials:
    1
    Resources:
    6
    First update in quite some time (wasn't laid-off and wound up buried in school). Any other observations should be posted here (redundancy increases likelihood we're right).

    //\\oo//\\
     
  12. Karzama

    Karzama

    Joined:
    Oct 16, 2010
    Messages:
    602
    Resources:
    0
    Resources:
    0
    Any idea how Vengeance works?? Otherwise I love this! :D
     
  13. Dark_Axl

    Dark_Axl

    Joined:
    Dec 12, 2007
    Messages:
    472
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    I would like to add some information regarding this topic,
    about custom Immolation, the AI-controlled unit will only activate it if :
    1. custom Immolation deals damage
    2. there are enemies around the AI-controlled unit
    3. the custom Immolation can damage those enemies (OE - Target Allowed)
    4. the AI-controlled unit has lost about 30-50% hitpoints.

    found this after messing with AI in my own map, these conditions are found with trial and errors, perhaps someone else can confirm it.
     
  14. Gekigengar

    Gekigengar

    Joined:
    Aug 20, 2009
    Messages:
    1,490
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    Thanks for contributing! +REP

    I do hope there are more reliable source of datas though,

    Such as in the MPQ anyone?

    Is there such files that define these behaviours?
     
  15. Kino

    Kino

    Joined:
    Oct 12, 2008
    Messages:
    1,714
    Resources:
    19
    Models:
    5
    Maps:
    14
    Resources:
    19
    Im quite sure this applies to all abilities that have a damage component.
     
  16. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    I think the AI part of the spells is raw-coded at the same place there is the effect part (the base effect, I mean, not what you can change in the editor).
    If that's the case, it's in the game.dll or the storm.dll (don't remember which one) and would be hard to decode.

    As this one :
     
  17. ngkn92

    ngkn92

    Joined:
    Oct 28, 2012
    Messages:
    82
    Resources:
    0
    Resources:
    0
    Is this still update ?
    I have one
    Soul Burn : hero-only ( see in my custom map, wonder if it work on melee and campain )
     
  18. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,296
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    owh, epic. you must have put a lot effort for this post!
     
  19. Karzama

    Karzama

    Joined:
    Oct 16, 2010
    Messages:
    602
    Resources:
    0
    Resources:
    0
    Any AI I've seen seems to use Cold Arrows on units with low HP or they spam Heroes. But this is awesome! :D
     
  20. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    8,423
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    This is really useful; keep it up.