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

AI: Abominable Intelligence?

Status
Not open for further replies.
Level 3
Joined
Nov 9, 2018
Messages
19
I'm beginning to think that the Adeptus Mechanicus might have been right and that AI is truly evil. I tried to make an AI for my campaign, and here's what it does:
First, it sends all of its workers from its extension base to its main base, and its main base to its extension base. Then it gathers every single damn unit I gave it and throws it at the player. This is only after I break the map by moving a doodad gate that bars its main base. Now, granted, maybe I shouldn't be trying such a complex AI since I want it to stay inside and defend that little walled/gated base I gave it, but thinking about the future here... What would be a way to make a nice basic AI that just gathers resources, gradually trains a small force, opens the gates when the force is assembled, moves outside the gates, closes the gates, and then attacks the players without brutally murdering the player in the first 3 minutes of the map?
 
Level 12
Joined
Jun 15, 2016
Messages
472
It sounds like you hit quite a few snags of AI behavior. Just to break it down:

First, it sends all of its workers from its extension base to its main base, and its main base to its extension base.

"Towns" in AI are given a serial number to work with (towns are, afaik, town halls or mines owned by the player, not necessarily with buildings around them, not tested). You might consider your main base as the main base, but the AI might think differently and assign base numbers in whatever way it wants, causing the worker switch. If you're really intent on fixing this, try setting a town hall with it's workers in one batch at the editor, but honestly I'm not sure if there's a fix to that yet.

Then it gathers every single damn unit I gave it and throws it at the player. This is only after I break the map by moving a doodad gate that bars its main base.

The first part is something you might have done unintentionally. the AI might be bad, but it usually attacks only when told to explicitly. The second problem is a known issue: if there is no path between the captain location and the target (captain=general AI unit control object thingy, scientifically speaking), the AI will glitch and do some weird stuff.

Now, granted, maybe I shouldn't be trying such a complex AI since I want it to stay inside and defend that little walled/gated base I gave it, but thinking about the future here... What would be a way to make a nice basic AI that just gathers resources, gradually trains a small force, opens the gates when the force is assembled, moves outside the gates, closes the gates, and then attacks the players without brutally murdering the player in the first 3 minutes of the map?

The only problematic part here is with the gate. You can try to tell your units to go near the gate, open it, order the units through, then close it. The rest should be simple enough.
 
  • Like
Reactions: San
Level 39
Joined
Feb 27, 2007
Messages
5,016
If you can't get around the AI sending units to the wrong 'main' base, you can try this sort of a workaround:
  • Make each base owned by a different computer player
  • Ally all of these computer players with each other
  • Give them all the same name in player slot setup
  • Manually change the color of all units trained by these enemies to be one particular color so they appear to be one force to the player
 
Status
Not open for further replies.
Top