Staredit Network

Staredit Network -> Concepts -> Starcraft AI altering
Report, edit, etc...Posted by L-inspecteur_Chocolat on 2006-07-25 at 14:51:32
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.
Report, edit, etc...Posted by Corbo(MM) on 2006-07-25 at 17:06:02
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?
Report, edit, etc...Posted by L-inspecteur_Chocolat on 2006-07-25 at 20:17:57
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.
Report, edit, etc...Posted by PCFredZ on 2006-07-25 at 21:16:45
Can you elaborate on Unit/Resource Sharing more?
Report, edit, etc...Posted by yoni45 on 2006-07-25 at 23:41:43
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... =/
Report, edit, etc...Posted by RedSword on 2006-07-26 at 00:28:43
Question : Is it possible to modify starcraft AI through a mod ?
Report, edit, etc...Posted by Zeratul_101 on 2006-07-26 at 00:44:33
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)
Report, edit, etc...Posted by L-inspecteur_Chocolat on 2006-07-26 at 12:15:36
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.
Report, edit, etc...Posted by dumbducky on 2006-07-26 at 23:05:42
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...
Report, edit, etc...Posted by Corbo(MM) on 2006-07-26 at 23:33:21
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 tongue.gif
Report, edit, etc...Posted by L-inspecteur_Chocolat on 2006-07-27 at 01:20:50
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. tongue.gif
Report, edit, etc...Posted by mayonnaise on 2006-07-27 at 11:09:31
Very interesting and useful...
Report, edit, etc...Posted by Corbo(MM) on 2006-07-27 at 13:35:50
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. tongue.gif
[right][snapback]532417[/snapback][/right]

that would be awesome....
i would bow down to that comp.
Report, edit, etc...Posted by dark_templar_99 on 2006-07-28 at 22:31:44
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.
Report, edit, etc...Posted by Corbo(MM) on 2006-07-29 at 14:02:46
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 tongue.gif
Report, edit, etc...Posted by Mini Moose 2707 on 2006-07-30 at 01:42:38
I think the general idea is to make it seem as natural as possible (ie as if a human player were doing it).
Report, edit, etc...Posted by mayonnaise on 2006-07-30 at 16:40:27
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.
Report, edit, etc...Posted by L-inspecteur_Chocolat on 2006-07-30 at 18:01:40
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 smile.gif. 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.
Report, edit, etc...Posted by Urmom(U) on 2006-07-30 at 18:19:34
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?
Report, edit, etc...Posted by Corbo(MM) on 2006-07-30 at 19:58:02
god that scv WAS annoying...
Report, edit, etc...Posted by Urmom(U) on 2006-07-31 at 02:21:08
I just got into a cycle of using a peon that was going to mine or to a geyser attack the damn SCV.
Report, edit, etc...Posted by Corbo(MM) on 2006-07-31 at 13:07:15
and when you attacked it the gy scv ran away! i had to build 4 marines to trap the damm scv.
Report, edit, etc...Posted by Syphon on 2006-07-31 at 13:45:55
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...
Report, edit, etc...Posted by Kookster on 2006-07-31 at 14:45:50
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
Report, edit, etc...Posted by Corbo(MM) on 2006-07-31 at 14:50:21
I think Dk did something about it.. i can't really remember that AI it was long time ago that i tested it tongue.gif
Next Page (1)