HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jass AI, how do I prevent them from building stupidly?

07-06-2006, 05:32 PM#1
Sardius
When it comes to building structures is there like a "common sense" flag I can call so they build replacement structures in a somewhat intelligent manner? I am using JASS ai scripts, not the AI editor... And after I swept through and took out all the enemies farms for a test... I noticed them rebuilding them in a completely idiotic method...
They built an entire row between their Fortress and Gold Mine nearly blocking it off and also built them along ramps, completely blocking the exit of their town, trapping all their attackers inside their base so they could no longer send out their own ground assaults to attack the player.
07-06-2006, 06:14 PM#2
Anitarf
A "common sense" flag is like the holy grail of AI programming. Good luck finding it in war3.
07-06-2006, 07:03 PM#3
nevir
though, I haven't gotten into any of the AI stuff yet, perhaps it would help to define different regions of each base for the AI to give precedence to for certain buildings.
07-08-2006, 06:12 PM#4
dvdgstwrt
I believe that this is why some textures are unbuildable - (pathing blue) to easily prevent the building of structures in certain areas by an AI that is lazy or insane. The "Logic" of the way the computer builds its "town" is beyond my understanding - having tested several methods to control independent building I have come to the conclusion that the computer is drunk.

Other than assigning variables to regions to specific building units (Farm, Tower, Lumber Mill blah) the easiest method is to use terrain textures to prevent buildings from being built on ramps, in "corridors", blah.

If you have buildings already placed, like those farms, you could assign a variable point to the building and have the new structures built where the old ones were (once they die of course). I assume that you may desire to keep the layout of the teams town the same this would work.

IF you like your terrain texture, let's say its all grass - you can make a custom Circle of Power unit which has no art to it (making it invisible) and use the pathing of that to layout "streets". Its pathing is walkable but not buildable. I do not have editor open but I believe that the unbuildable size of the circle of power is the same size as the large pathing blocker.
07-08-2006, 06:32 PM#5
Sardius
"If you have buildings already placed, like those farms, you could assign a variable point to the building and have the new structures built where the old ones were (once they die of course). I assume that you may desire to keep the layout of the teams town the same this would work."

So would this order be done in the Jass AI script or would it have to be a trigger, just not sure how I'd trigger this or Jass it to tell them to build the same structure type at its previous location.