This topic was created to discuss modifying regular non-cheating Starcraft AI scripts with triggers. This first post lists everything we've come up with so far.
The general idea is to make the AI seem as natural as possible (ie: as if a human player were controlling it). - Mini Moose 2707
General Tricks:
Unit Sharing: Sharing units between two computer players using the give trigger works very well to enhance the AI in certain situations. Ex: If computer A only builds 5 marines, but you want it to build 10, then keep giving marines to computer B so that computer A does not have 5 marines yet, and will keep building more marines.
Resource Sharing: Sharing resources between two computer players that share the same units is not bad, and is used to keep production steady. Ex: If computer A has split to Computer A and computer B, and computer B is lacking resources while Computer A has too many, you can subtract resources from computer A, and add the same amount to computer B. Computer B will then have enough resources to advance at the same pace as Computer A and the computer will become twice as strong.
Building Requirements: You can get a computer to build buildings faster if it reaches a certain requirement of units. These requirements can be shoved in a corner, as long as they can't use them to upgrade or bypass the tech tree. These "requirements" can be removed later.
Changing Scripts: Ever wonder why running another script after you've run one initially causes the AI to malfunction? Try giving its units away, running the script, and giving its units back. It will work.
Split!: When you want to get the computer to expand, the best bet is to give an SCV/Drone/Probe and some resources over to a different computer and run a new script at a vacant mineral lot, sending some military for protection, and giving several units and buildings to it when it is finished its new base, and periodically sharing minerals equally.
Zerg:
Early Overlord: By giving the current overlord to another player to hold for a few seconds, the computer will build another overlord earlier than expected. This is a problem fix for the Zerg AI.
Infinite Hatcheries: You can get the zerg to build a hatchery at any specific location you want, by giving a drone to another computer to hold, giving enough resources, and running a script at the location you want the hatchery to be built, and giving it back.
BEWARE OF CRASH!: NOTE that, when giving zerg units as they are hatching out of their eggs may cause the game to crash for all players.
Terran:
Lift it!: The Terran AI will lift its buildings if it cannot build an addon where it currently is.
Tactics/Micro:
I'll Harass you Instead: A human player will usually send a peon to the enemy's base and harass them. However if you give one computer peon to another lonely computer player, and have several locations and triggers to take control of that peon, you can get the peon to harass the human players. This will make it seem like the computer is "exploring", and not actually using a "map hack". Players will be wow'd by this. This one computer peon can do a lot of damage if you've given it good tasks.
If you want to add anything else, or ask questions about the AI, feel free to post.
I find it a great help somehow, even if i don't make maps aymores
by the way, have you thought of a possible way to make computers lift but not just when it wants to build an add-on, maybe.....an srategy to move a building near enemy's base to attack faster?
Nope. I'm still having a hard time getting a terran AI to wall, and build a geyser building in the other players' base. I have however, got an AI to explore the map with an SCV and micro/harass the player.
Can you elaborate on Unit/Resource Sharing more?
QUOTE(L-inspecteur_Chocolat @ Jul 25 2006, 06:17 PM)
Nope. I'm still having a hard time getting a terran AI to wall, and build a geyser building in the other players' base. I have however, got an AI to explore the map with an SCV and micro/harass the player.
[right][snapback]531343[/snapback][/right]
computer AI needs to 'explore'? I thought they have 'full vision' of map... =/
Question : Is it possible to modify starcraft AI through a mod ?
QUOTE(RedSword @ Jul 25 2006, 10:28 PM)
Question : Is it possible to modify starcraft AI through a mod ?
[right][snapback]531524[/snapback][/right]
yrp, very easily, there is at least one program for that(possibly more)
You can only modify their build order and stuff, not where they build their stuff or anything like that. Yes the AI has complete knowledge of where the other players are, but it looks more legit if you get something to explore and harass. Harassing with one worker does a great job at distracting the player too.
Very interesting, I myself am working on an altered StarCraft map. I wonder how if I can implement some of these methods into my map...
God....i remember now i tested this AI with you.. where the scv rushed me and when i attacked back the scv retreated human-like.. i hated that scv.... remember that i had to trap it with 5 marines to kill it?
looking foward to testing another AI with you
I may not start another AI for a bit. If I did, I'd attempt another Zerg AI, although it would be much better. If I can get it to build an extractor in your base, then hell I'd finish it.
Very interesting and useful...
QUOTE(L-inspecteur_Chocolat @ Jul 26 2006, 11:20 PM)
If I can get it to build an extractor in your base, then hell I'd finish it.
[right][snapback]532417[/snapback][/right]
that would be awesome....
i would bow down to that comp.
Don't know if this count's but if you want the computer to lift, can't you remove and recreate a building with the properties "In Transit" checked. The building starts on the ground and then it lift's off.
The only problem is the health will be set to 100% with/out extra work.
No because you would be creating the actual lifted off building, what we want it's the computer to lift off not to have a lifted off building. different things
I think the general idea is to make it seem as natural as possible (ie as if a human player were doing it).
You'd have to make improvisions with the computer with different triggers. Such as when so and so units appear, computer starts to make a counter unit. Or something like that. And a microing computer would be a lot of fun to play with, though it would be tough to get something like that.
Yeah, a true micro system would use what I call an anonymous grid scanning system, which would take several hundred triggers for just a few micro moves.
I've attempted a micro system in the past, although I am not mentally strong enough to envision every possibility with tens of triggers, and create them to generally work properly with a unit(bugs? My code doesn't have bugs!), although my grid scanning system was extremely fast and efficient
. Usually if I get caught up in a bug, I become frustrated, and abandon whatever project I have, come up with new ideas, and recreate it again.
That computer map that you showed me was very good. The SCV kept annoying me but after a while it became very predictable. The computer didn't build enough units either so I just overpowered it. That could be fixed though. And about that micro map, I think I remember that too. Didn't you abandon it because it worked too slow or something like that?
god that scv WAS annoying...
I just got into a cycle of using a peon that was going to mine or to a geyser attack the damn SCV.
and when you attacked it the gy scv ran away! i had to build 4 marines to trap the damm scv.
An AI problem that I experience alot is that melee units will not attempt to attack turtled bases, such as you're playing protoss and your base entrance is blocked by Nexii, behind the Nexii you have cannons. The melee unit will just wander back and forth outside of the sight range of the Nexii. We need an AI fix for this, which would probably be just slightly random'd attack to here triggers.
I'm getting alot of cool ideas right now...
I totaly agree, that bug is anoying, its anoying to make the units attack that specific building thats in the way, but in some cases its the only thing that might save terran players, but alas its still anoying
I think Dk did something about it.. i can't really remember that AI it was long time ago that i tested it