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

Abilities to different heroes/units

Status
Not open for further replies.
Level 3
Joined
Aug 9, 2018
Messages
24
Hey Hive,

First off, I apologize if this is a dumb question or has already been answered.

I'm creating a campaign and just want to switch some abilities around on the heroes and units that I use for the AI team. (I want a raider to have the roar ability and my archmage to have the chain lightning ability).

Does the computer/AI know know how to use every ability in the game on every unit/hero?

For example, if I want the Far Seer to have storm bolt instead of chain lightning and have the AI control this hero, will the AI know how to use storm bolt correctly (if it learned the ability) will it use it in battle?

Same scenario except if I gave a footman the stormbolt ability with mana and all that, will it actually use it in battle from a computer standpoint, not controlled by myself.

Thanks in advance!
 
Level 9
Joined
Jul 30, 2018
Messages
445
Yes any unit will cast most abilities whenever they can:

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

Really? In my experience the AI only knows to cast the spells the unit normally has. I just tested I just couldn't get the Raider cast Roar... Witch Doctor and his Healing Ward, however, worked just fine.

Edit: Okay, did some further testing: Healing Ward worked on all four tested unit types, and roar worked on all other three, except Raider, which seems rather odd. As for the OP: there seems to be some inconsistencies, so I'd test each unit ability combo individually.
 
Last edited:
Level 3
Joined
Aug 9, 2018
Messages
24
I'm wondering if there is a similar ability to the concept of roar that I can use instead and then give the buffs and stats of what roar gives? Like an aura that's an activate and deactive ability?
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
I didn't test anything, Sabe, just remembered that thread and linked it. In instances where auto-casting behavior is insufficient it's best simply to program your own AI behavior with triggers anyway.
I'm wondering if there is a similar ability to the concept of roar that I can use instead and then give the buffs and stats of what roar gives? Like an aura that's an activate and deactive ability?
Buffs are only visual, they do not actually give any stats. While the buff persists, the effects of the spell that applied it will be present... but just giving the buff to another ability won't work like you want it to. Howl of Terror with negative damage bonus may work for you. War Drums is an aura that increases attack damage, Trueshot Aura is the same but only for ranged attacks. Neither of them are toggleable, but you can make your own toggle ability with some triggers if you really need it to work that way. It's better if you can be more specific about the functionality you want to have.
 
Level 6
Joined
Mar 1, 2013
Messages
52
Remember that there are several abilities the AI won't cast, depends on situation. For example: If you have Hero with Rain of Fire or Shock wave, he won't use it on a single unit, but only on more than 2 units....

In cases like those I'm using triggers in my maps to force them cast those spells when they're attacked and use them on cooldown.
 
Level 3
Joined
Aug 9, 2018
Messages
24
Thanks for the info guys, appreciate it! I'm not looking for anything specifically just want to switch the abilities up to be unique and something different in my campaign. I don't want to just uses the same stats and abilities of each unit, seems like I'll just play around with what abilities make sense for each unit and test to see if they use it.
 
Status
Not open for further replies.
Top