AI scripts direct how computer players attack human players.
AI scripts in StarCraft come in three varieties:
Melee, which assumes the computer will start with a town center and four workers. This script has a few preset strategies it will try to use, based on whether he's connected to his opponent by ground, the opponent's race, and just random chance.
Insane, which makes no assumptions about what the computer will start with. This script is aggressive. It will always use its scripted rushes, regardless of what the player does.
Campaign, which assumes the computer will start with a base and is relatively passive. It will generally not expand or build new structures, preferring only to rebuild. It will attack with periodic scripted forces within minutes, regardless of what the player does. The campaign AI is designed to lose while giving the player some fun.
The campaign comes with three levels of difficulty.
Some custom campaign scripts will follow different rules, such as expanding.
StarEdit gives access to more AI scripts, such as Send All Units on Random Suicide Missions, Send All Units on Strategic Suicide Missions, and Set Player to Rescue Passive, as well as giving units specific orders (e.g. enter the nearest bunker).
During development of StarCraft II, there were five levels of AI script difficulty for custom games: Beginner, Easy, Moderate, Hard, and Insane, with Insane gaining additional resources from mining and extra map awareness.
The release of Wings of Liberty had six difficulty levels: Very Easy, Easy, Medium, Hard, Very Hard and Insane. Heart of the Swarm added Harder and Elite options on either side of Very Hard, while Insane was replaced with three different Cheater options: Vision (can see your units), Resources (can see your units and mine additional resources later on), and Insane (can see your units and mine additional resources). These settings let the AI mine 2 additional minerals and vespene gas per trip without depleting their resource nodes any quicker. The StarCraft II custom games achievements for Medium, Hard, Very Hard, and Insane were also realligned to Very Easy, Medium, Harder, and Elite.
- Blizzard Entertainment. Frequently Asked Questions: AI Scripts. Battle.net StarCraft Compendium. Accessed 2009-11-04.
- Blizzard Entertainment. StarCraft: Brood War. Vivendi Games. Mission: Fury of the Swarm (in English). 1998.
- Deep.Thought. 2009-08-18. StarCraft II Single Player Fact Sheet. StarCraft Wire. Accessed 2009-09-07.