Im trying to write a simple AI but I cant get it to do anything. I added an action to call my own trigger which just prints a message to the screen (so i know its being called directly), set the computers harvesters to mine nearby minerals and then it instructs the computer to train a probe using AITrain (ive set the player properties so the computer will always be protoss) but it doesnt train probes.
So is there a recent guide that explains how to get started in AI development in sc2?
everything ive found skips over the "setup" phase which is where Im stuck. in particular, ive downloaded an mpq editor and have poked around inside of the AI galaxy script files, but how do i create my own AI in the same way? for example, if i removed all of the internal code from all of the Zerg0...Zerg5 files and replaced it with some code to just create 2 extractors when the game starts, how would I then run that on a map without replacing the Zerg0...Zerg5 files that already exist, so that my AI would exist alongside the default one?
Most of the things you can find in triggers functions AI and Andvanced AI, it has necessery things to make it work after starting for the computer player melee or campaign AI script. The campaign one most likely will build only what you will order like build buildings and train units. Some examples of triggers:
AI Advanced - Clear all research upgrades currently planned (but not yet started) for AI player (Picked player)
AI Advanced - Clear all build requests currently planned (but not yet started) for AI player (Picked player)
AI Advanced - Train 3 units of type 1 - Militia in player (Picked player)'s town Town[(Picked player)] with priority 5
AI Advanced - Build 1 units of type 1 - Stables in player CPU Player's town Town[CPU Player] with priority 5 using build flags -1
Have you used the "Start Campaign AI for player x"? I think it states that this have to be used before anything else.
You must login to post a comment. Don't have an account? Register to get one!