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

[General] AI to deprioritize heroes

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi all,

In my map I use 3 Computer Players. I want their AI to deprioritize all enemy heroes. So I unchecked the "Target Heroes" and ex- imported the AI File with these settings:

AI-settings.png


  • AI - Start campaign AI script for Player 13 (Maroon): war3mapImported\Computer Generic AI.ai
  • AI - Ignore the guard positions of all Player 13 (Maroon) units
However, the Computer units still target my heroes once I start attacking the enemy 1-2 times. Am I doing something wrong?

Happy to attach my map if that would help.

Edit: To clarify, the enemies who attack my hero already aquired a target. And when my hero attacks them 1-2 times, they switch their target to attack my hero, even though the initial target is still alive.
 
Last edited:
Level 14
Joined
Sep 28, 2011
Messages
968
What is the "priority" of the hero?
If it is superior to the one of the other unit maybe it can cause a switch so lower that field within the hero unit itself.
Furthermore you used "ignore guard" so the starting player 13 unit are entirely unaffected by the settings you gave to the ai.

By default heroes starts at priority 9 (which is superior to the priority of all the non hero non building units) but you can change that field in the unit stats.
Regardless of indicated priority a mobile unit is usually targeted first over a static building so if your player 13 had acquired a building target the switch makes even more sense.

I hope it helps you.
 
Last edited:
Level 12
Joined
May 16, 2020
Messages
660
That did help a lot, thanks. I literally read all pages I found on Google and wouldn't have known about the connection between "ignore guard" and the "AI settings".

Regarding priority: My map is similar to Dota in the sense that Computer units walk down a designated path to the other base. The Player units have priority 5, whereas all Computer units use the following priority:
  • 20 (for Player 13 units, which is the "Burning Legion")
  • 19 (for melee units of Player 1 and 7)
  • 18 (for range units of Player 1 and 7))
  • 17 (for siege units of Player 1 and 7))
This is the reason why I use "ignore guard" in the first place. Without it PC units constantly try to run to their initial spawn point.

Is there any way to have the AI settings (so that e.g. low HP units don't get priority), AND prevent PC units to run back?
 
Last edited:
Status
Not open for further replies.
Top