HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can anyone tell me why my ai script isn't working properly?

07-22-2004, 06:28 AM#1
Sardius
I designed this ai script using the ai editor to create a script for my Burning Legion race. For the most part it works fine, but there are two main problems...

1.) The Burning Legion towers which look like the red power crystals, the ai builds them all extremely clustered in one area rather then randomly in the base and usually not in the smartest places.

2.) The start building an expansion town inside the existing town, even though there is no second mine.
They construct a second and sometimes even a third "Burning Nexus" which is the Burning Legion's Town Hall equivilent...
But even when I remove everything to do with the expansion town priorties and make sure there is no second Burning Nexus priotirized to be built in the ai, they still build the firggin thing!
07-22-2004, 11:51 AM#2
AIAndy
Do you upgrade the town hall to a second level ?
07-22-2004, 06:20 PM#3
Sardius
Argh, ok this is gonna make me flip out very soon..

Yes Im upgrading it and that is when it occurs..

I just went and adding the Burning Nexus, Hellfire and Abyss Nexus to the tier 1,2 and 3 in game constants, but they still build another Burning Nexus as soon as they are done upgrading it to a Hellfire Nexus..
I even threw the Hellfire and Abyss Nexus in the Tier 1 town hall dependancy equvilent as well and added this condition to the Burning Nexus Priority... "If town #1 has a town hall equivilent = to false"
But nope, none of that works, they still build another god damn Burning Nexus as soon as they finish upgrading the initial one to a Hellfire Nexus... And then when they Upgrade to an Abyss Nexus, they upgrade the second Burning Nexus to a Hell Fire Nexus, then construct a 3rd friggin Burning Nexus.

And a further problem, they only ever summon the Pit Lord hero, everytime I do a test, they summon the PitLord hero, despite having an equal chance to Summon a Demon Lord or Mistress of Hell hero, which have also been added as Hero dependancy equvilents in game constants. The only time they don't summon a Pit Lord is if I reduce the chance of summoning a Pitlord first, to 0, in which case they summoned a Mistress of Hell...
All of them are balanced at 17-16% of which hero to summon first, followed by the second and third hero they will summon.
But 10 out of 10 times with these settings they always summoned a PitlLord.

This problems are very aggravating and to me, make no sense what so ever.
07-22-2004, 11:47 PM#4
AIAndy
The AI editor does not look for town hall settings or similar. If you want to prevent multiplied building you have to do it the hard way which means adding a condition there that counts the other town halls too.
07-23-2004, 12:44 AM#5
Sardius
I have added conditions and still they keep doing it.

I turned off the "Fixed Random seed" In test map preferences, it did NOTHING, they still build all their buildings in the same spot and only summon the Pit Lord. And they still do the EXACT same thing in a normal game, I went and ran the map normally, not using "Test map" and again, built in the EXACT same places and Trained the PitLord

I added this condition to the Burning Nexus Priority.

"Total Number of Hellfire Nexus = 0" or "Total Number of Abyss Nexus = 0"

I am not using the "Completed Only" condition. Im simply using "Total Unit's of Type"
Yet as soon as my Burning Nexus starts upgrading to a Hellfire Nexus, my Imp goes and starts building a new f*cking Burning Nexus.

It's like this map or editor is not listening to anything I do. I've got the basics down, but it's like AI is over-riding my triggers and the settings.
07-23-2004, 01:05 AM#6
AIAndy
It needs to be and, not or.
07-23-2004, 04:16 AM#7
Sardius
Ok. I got it fixed by changing to OR to an AND

The hero problem is fixed as well, some-how!...
But now new problems.

1.) The computer heroes don't seem to be using their skills very often... The Demon Lord Hero who has Rain of Fire, Spirit Beast and Ray of Disruption, uses Rain of Fire a lot, but never the other two...
Also the Pitlord hero has howl of terror but NEVER uses it.

2.) AI Andy, can you suggest another AI editor aside from the official one, in my opinion it is crap, complete and utter crap... I am constantly getting unknown side effects that are making no sense at all. I would like to try another one or if I could perhaps send you my ai script and map and you could take a look over it and perhaps tell me whats wrong? Here are some of the unusual side effects that happen...

a.) A constant wave of attack on my base where they just keep sending units as soon as they are finished building them. Despite the fact I have two seperate attack waves, that both have 60 seconds delay time... The first wave is conditioned to focus on creeps, the second wave is suppose to be focused on the player. With no initial delay time and repeat is set to "2"

b.) If they have less then two mines after setting up there expansion base, all of the remaining imps come and try to mine from one, which crowds like 10 of them around the mine..

c.) sometimes they just simply don't build what they are prioritized to build. For example, they don't build all of the towers I ask them to build and they wont construct units sometimes...

d.) one time all 12 imps they built at the beginning all tried to get into the gold mine and just crowded around it, trying to harvest gold, while 7 of them were suppose to go to lumber... I re-started and all of a sudden it worked fine. WTF?

All of this has been incredibly frustrating, I've gone over the script time and time again and I also really don't like the fact that at the beginning generally you would want more low level units, but as you progress, you would kill them off and produce more higher level units, I cannot seem to do that with this ai editor, at the beginning I may want them to construct 6 felbeasts, but then they will always construct 6 felbeasts which uses to much food in the long run. And if they don't get killed off at some point, I can just see it screwing up the script further down when they try and build a unit but don't have the ammount of food available or the max unit count has been reached... In which case, all the other priorities beyond that will be haulted, because thats the way this ai editor seems to work.
07-25-2004, 03:08 AM#8
Sardius
Ok, I seem to have identified the causes of most of my problems.

1.)Tell me, would this throw off the ai script?
There was a Rune of Restoration which they would always get when they killed these crabs, and in doing so it restored one of the crabs which costs 2 food units. So they probably got to a point where they simply could not build anymore units because they didn't have enough farms to do so?
So how come if the computer is unable to meet a priority, why don't they just simply skip it and move on to the next one?
In which case they would know, to build another farm.
How do you control certain things like that?
Obviously if the humans use ressurection, it's possible to throw off the ai's unit and food count.

2.) How can I make conditions so that a certain attack wave wont start until all the units that are suppose to attack in the wave are present? Like for a base assault near the beginning, how to I make it so they will wait until 4 Felbeasts and 4 Bloodfiends are accounted for before launching there assault... Since you cannot add conditions to the attack waves themselves, and minimal force is generic for all waves.

3.) My main problem with them seems to mainly be this, after a certain time they simply stop building structures at there many base. Towers and farms for example, they simply stop building, roughly after they build their expansion base.

I have them build 4 towers at their expansion base which they build fine "Town is set to Mine #2"
But after that, they are suppose to build 3 more towers at "Town is set to Main" but they only build 1 and stop, they don't construct the other 2 and the same starts happpening with farms when they are told to build farms in the main town.

Yet if I send someone in to destroy a tower, they are very quick to replace it by putting up another in the same place.
Further more, when I watched them with warpten, they build something like 18 towers at their main base before they even set up an expansion town, and they were only told to build 6.
07-25-2004, 12:38 PM#9
AIAndy
There are several bugs in building stuff at expansions. If the town they are supposed to build at is not yet finished they build the expansion towers in main town. Also they sometimes do not count correctly and build infinite of a certain building.

I think you will not really get happy with the AI editor since most of the stuff you are trying to do it pretty hard to do with it.
Better learn to work on the AI scripts directly.