HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TFT AI Editor - can't get custom AIs to work

07-18-2003, 01:44 PM#1
Sorbitol
Ok i've been messing around in the new AI Editor that comes with TFT and I still cant make a basic melee AI. I have tried looking at the two examples in the War3/AI Scripts folder and those dont seem to be helping me.

My main problem is that no matter what commands I issue in the building priorities tab, the computer always just makes a bunch of workers to mine and thats it. I've tried adjusting the harvesting settings as well, but to no avail.

I know that people have got this to work, but I just cant seem to get it right. I also that that many have requested a basic AI Editor tutorial, which is something I feel would be greatly appreciated.

Regards,

Sorb

P.S. - I have also imported the AI files into my maps and included the initialization trigger for them.
07-18-2003, 10:47 PM#2
cattlekiller
make sure the trigger matches the player,i had this problem player 1 is user or the obs.. The ai starts player 2 and make sure the race matches.

i hope this helps
07-18-2003, 10:49 PM#3
Sorbitol
well thanks for your advice, but that is definitely not the problem

:(
07-19-2003, 11:13 AM#4
Vidstige
Could you post your .wai file or at least describe the order in your
building queue? It would be easier to locate the problem then.
07-19-2003, 12:11 PM#5
Vidstige
I found a basic tutorial on the AI Editor, might be helpful.

http://www.wc3campaigns.com/forums/s...threadid=22091
07-19-2003, 01:14 PM#6
Sorbitol
thanks vid...here is the .wai file

also, i have looked at that tutorial, but didnt find it very useful.

i'm going to attempt some more specific questions here...

what is the relationship between the starting units you assign to a computer player and the custom AI you create for it? For example, if you pre-place a Great hall and a peon, how should you start off the building priorities for the AI? In this case I both pre-placed a Great hall and listed one first in the building priorities of the AI...

Also, how does whole harvesting part work. theoretically, if you set 4 to mine gold and 3 to harvest lumber would the computer keep a constant 7 workers to cover both? what about workers to construct buildings? it seems i could put 0 for gold mining quantity and they will still only mine gold.

I guess thats all for now, i really hope i get some kind of response...its soo dead here

ps. i just discovered i have to zip the .wai file...
07-19-2003, 06:05 PM#7
Vidstige
Have you tried starting your ai from the "Test Configuration" tab in the AI Editor?

When I started your AI that way (to play Plunder Island the melee way , he happily build a burrow and a barrack and started to produce grunts... Does this work for you?

You have to make sure that the AI has peons to to send mining and chopping trees, he wont produce them just becouse you tell him to harvest gold and lumber.

The only bad thing about your ai that I can see is that he builds grunts which he sends off one by one the die at creep camps.
07-20-2003, 01:15 PM#8
Sorbitol
ok, somehow im beginning to get this to work. i imported one of the sample scripts into my map and it worked ok, so then i took that script as a starting point and now the computer does seem to build up the way i command it to.

however, this is my new problem. when the computer player sends over an attack wave, they never stay and fight. as soon as i hit one of their group, they run away back to their base, then turn around and come back and it starts all over again. i made sure all the 'flee' options were disabled and i attempted to put a delay in the attack wave area, but that doesnt seem to work. i really want them to come attack me to the death, then build up more of the same and do it again...

anyway, thanks again vid, i really appreciate your input
07-20-2003, 02:16 PM#9
Vidstige
If you attach the .wai file I could try to find out why your units are so afraid.
07-20-2003, 03:01 PM#10
AIAndy
Are you sure you have disabled groups flee?
The staying/fleeing behaviour of the computer can be very strange. For example he flees when he only has units that he considers support (casters but also bears, heroes). He also seems to flee when he meets a superior force since 1.10 . Sometimes he seems to flee out of very strange reasons.
07-20-2003, 03:22 PM#11
Sorbitol
ok i've attached the current .wai file im working on, the one where the computer makes units to fight me, but flees as soon as it gets to my camp.

here is an example of exactly what i want to happen. i want the behaviour of the computer players to be like the Naga on the 2nd Night Elf map from TFT, where they send waves periodically to your base. The waves are always the same size and they never run away, no matter how many units you have waiting for them. If thats how it works in the campaign, then shouldn't there be a way to recreate that behaviour in a custom map?

thanks again,
07-20-2003, 05:30 PM#12
Vidstige
It seems like the ai is told to fight until it dies.... Does it actually attack or does it turn home before he's even struck a blow?

I know that sometimes does my ai just forget to attack and heads back home when he's just next to a very tiny enemy. emote_confused

By the way, all messages looks totally freaked out below when writing this. 0_o Has the message text been known to freak out before?

Sorbitol's first message looks like:
Quote:
*k i've been *essin* a**un* in the new AI E*it** that ***es with T*T an* I still *ant *ake a basi* *elee AI. I have t*ie* l**kin* at the tw* exa*ples in the Wa**/AI S**ipts **l*e* an* th*se **nt see* t* be helpin* *e. *y *ain p**ble* is that n* *atte* what ****an*s I issue in the buil*in* p*i**ities tab, the ***pute* always just *akes a bun*h ** w**ke*s t* *ine an* thats it. I've t*ie* a*justin* the ha*vestin* settin*s as well, but t* n* avail. I kn*w that pe*ple have **t this t* w**k, but I just *ant see* t* *et it *i*ht. I als* that that *any have *equeste* a basi* AI E*it** tut**ial, whi*h is s**ethin* I *eel w*ul* be **eatly app*e*iate*. *e*a**s, S**b P.S. - I have als* i*p**te* the AI *iles int* *y *aps an* in*lu*e* the initializati*n t*i**e* *** the*.


Could someone please explain?
07-20-2003, 06:00 PM#13
Sorbitol
haha thats crazy...i've never had posts look like that before. is it just the first one, or all of my posts?

anyway, this is what happens with my AI:

1) the computer player starts off making slaves and sending them to mine. (like i set it to)
2) then he makes a reaver
3) in the attack wave area i have it set so the first wave consists of a siren, a snap dragon and 4 reavers
4) all of these units are placed at initialization, except for one of the reavers
5) so when the computer makes a reaver, the attack group is ready and heads to my base.
6) the group begins attacking the first unit it encounters of mine, but as soon as any unit of mine gets a single hit on any unit in the naga attack group, the entire group turns tail and flees back to their base
7) when the naga group arrives back at their base, they immediately turn around and come back to attack my base, and the cycle repeats

so my question is this : if i have been very careful to disable all flee options in the AI, and if this never happens in the campaigns, then how do i get it to work for me?
07-20-2003, 06:36 PM#14
Vidstige
Actually all posts looked weird, looks better know though. :gsmile:

The usual way I guess:

* Change something so it does the same thing in another way.
* Create a new file and hope the poltergeist leaves this file alone.
* Restart computer
* Reinstall WC
* Reinstall Windows
* Learn Black Magic
* Convince Blizzard that there is a bug which immediatly should be fixed.... (good luck :-)

Just to make sure that you are running the right version of the script, try changing something, like player name.
07-20-2003, 06:39 PM#15
Sorbitol
:////


....well, when i have time i will try to mess around some more, maybe make a new map with a new ai file and see what happens. silly computers.

once again vid, your input is greatly appreciated