Compile AI Info here

Started by MiCrOMaN1, February 21, 2010, 08:10:11 PM

Previous topic - Next topic

Twinfun

#15
Quote from: goosie on March 01, 2010, 04:31:00 PMWhen AI goes through functions during a particular phase (there's Open, GroundA, GroundB, LateGround and similar ones for Air tactics), it executes stock commmands in the order they're written. It won't move on to the next Stock command without making sure the previous Stock values are all satisfied. So if you do something like

AISetStock( player, 8, C_ZU_Drone );
AISetStock( player, 1, C_ZB_Gateway );

it won't build gateway until you have 8 drones. If you lose a drone to a rush or w/e and the AI is still on that phase, it will go back and make sure you're back up to 8 drones before moving on to the rest of the script.

Makes sense accept for:

If I were to, say, tell the AI to build 10 zealots first without explicitly specifying it must build a Gateway, will it figure out on it's own the buildings it will need to complete the next task?

EDIT: How about it knowing to build Pylons?

ANOTHER EDIT: Thanks to the 1v1 Observer map posted up by Blackcode, I was easily able to test this. The AI will build the Gateway when it finds it requires one without being explicitly told.

goosie

Quote from: Twinfun on March 01, 2010, 05:07:30 PM
Quote from: goosie on March 01, 2010, 04:31:00 PMWhen AI goes through functions during a particular phase (there's Open, GroundA, GroundB, LateGround and similar ones for Air tactics), it executes stock commmands in the order they're written. It won't move on to the next Stock command without making sure the previous Stock values are all satisfied. So if you do something like

AISetStock( player, 8, C_ZU_Drone );
AISetStock( player, 1, C_ZB_Gateway );

it won't build gateway until you have 8 drones. If you lose a drone to a rush or w/e and the AI is still on that phase, it will go back and make sure you're back up to 8 drones before moving on to the rest of the script.

Makes sense accept for:

If I were to, say, tell the AI to build 10 zealots first without explicitly specifying it must build a Gateway, will it figure out on it's own the buildings it will need to complete the next task?

EDIT: How about it knowing to build Pylons?

ANOTHER EDIT: Thanks to the 1v1 Observer map posted up by Blackcode, I was easily able to test this. The AI will build the Gateway when it finds it requires one without being explicitly told.

It will also build pylons as long as you have an AIDefaultEconomy() (sp?) function in there somewhere for each phase.

tdevil

dkslayer, do you know if replays are stored in a similar fashion? as a bunch of  hardcoded AI calls?
[/size][/color]
[/size][/color]Maybe you could play against someones replay.

kblood

AISetStock( player, 10, C_ZU_Zealot );
AISetStock( player, 8, C_ZU_Stalker );

I agree on the meaning of these. First 10 zealots, then 8 stalkers. If the zealots are killed the AI will most likely try to build them again. Perhaps not if the "gametime" changes into late game, since it seems most buildAI strategies are somewhat based upon how far into the game it is.
One thing I want to find is the AIs retreat scripts. I am guessing they must be under the tacts for each race? I have been thinking about trying to make some mean rush tactics, and they would work best imo if the AI did not pull back. I just watched a map as observer with 4 AI against each other, and one of the Zerg attacked a Terran with Zerglings, 1/3 or something got killed on their way to the marines, but once there they ran back, only hurting one of the marines. Seems like those zerglings got wasted for no reason.
The retreating part of the AI often seems a reason for the AI to be outmaneuvered. If it made some strong forces and attacked without pulling back most the time, it seems they would end up loosing less troops. Its not like the AI actually repairs its troops as Terran anyway.
Also why does the AI never tech up its armor? I have seen Terran tech up vehicle armor to 1. That was all it did in a long fight, massing up 30k minerals and 17k gas I think it was. I am guessing that is because the AI is based on the easiest AI scripts, but I guess it could also be those upgrades just are not worth it, compared to the extra troops in the army instead.

Darkov

My WinMPQ doesn't recognise the SC2DATA files. And after i opened a SC2DATA, many files are opened, but they all have unknown names. I'm using version 1.64 and windows 7(i did fix the dll error and ocx error).

kblood

Quote from: Darkov on March 03, 2010, 03:25:21 AM
My WinMPQ doesn't recognise the SC2DATA files. And after i opened a SC2DATA, many files are opened, but they all have unknown names. I'm using version 1.64 and windows 7(i did fix the dll error and ocx error).

I had the same problem, seems that version 1.64 is too old. Which is why I am now using the Total Commander addon, which works great.
http://www.totalcmd.net/plugring/mpq.html

But if you are not using Total Commander, then try:
http://www.zezula.net/en/mpq/download.html

They are the newest. You need to 2.0 something one. The 1.64 gave me the same problem. It could be solved if I made my own listfile, but only worked on the files I knew was in the map or AI file.

Darkov

Thank you, i downloaded the totalcomander version and it works great!