InsaneAI/Tutorial
InsaneAI Tutorial
In this simple tutorial, I will cover the basics of map setup to correctly run and implement InsaneAI.
We will also implement a simple InsaneAI for a Terran opponent.
First of all, install InsaneAI, then open Galaxy Editor. Under file, choose New Arcade Map. Then, choose custom dependencies, and add InsaneAI.
Then, when the terrain is ready, place some resources and two starting points. Once this is done, open the players settings and set your players. The first one, color blue, will be the human. The second one, color red, will be InsaneAI. Remember to set control to computer and AI to computer for this player.
Once this is done, place some structures for both players. Then create a region around the computer player base and call it InsaneAI Town. Once this is done, create a point called InsaneAI Barracks, wherever you want. I choose to put it inside the InsaneAI Town. Also, place a region called InsaneAI Supply anywhere you want.
After that, open the AI Module. Create a new AI personality and set its parameter correctly for player 2. You don't need to create AI waves.
Once the personality is done, open up trigger editor. Rename "Melee Initialization" to "Initialization", and remove all actions except for the one relative to resources.
Then add new actions:
- Define InsaneAI to actually define a player to use InsaneAI. No other action can be used on a player if this is not called first.
- Start AI player personality. This is needed to run the default campaign AI relative to the personality you have setted up. This way you define attacks wave for InsaneAI.
- Add Resource, with relative extractor. Doing this will make InsaneAI know which resources to extract and the number of workers required. It will allow InsaneAI to build the required number of workers without any input.
- Set Supply, to define supply units. InsaneAI will build them automatically. Since this is a terran player, use the default supply depot.
- Set supply region, to define where to build supply. If no space is found in the region, InsaneAI will build at random in the player town. You can define more than one region of this kind.
- Set worker, to define worker units. InsaneAI will use workers to extract resources.
- Add Build Order Step, to add Barracks at the Barracks point you made.
- Add Unit, to add 10 marine to the list of units the InsaneAI will build. Each build will be done in parallel.
- Run InsaneAI, to start everything.
Note: in the image above you should add Barracks and not Barracks (Flying) as a build order step unit. This is a misclick on my end, but I already took the screenshot by then. Sorry for that.
After that, you can test the map and add thing and modify what you want to suit your needs or just to experiment a bit.
The full documentation is provided inside the game, by hints associated to functions and actions.
Looks pretty good from here. i didn't check it out in the editor. My question is: When you use the AI Editor as part of the process of how the computer works. does that improve the performance of the computer player as opposed to using a triggering Action to "Issue Order" directly the the computer? Reason i ask is because i know the game processes the DATA editor WAY better than the triggers to do the same actions. EG: autocast stim works better than order marine to use ability on a trigger. Another reason i ask is because i'm also developing a Vs AI as a training tool for players. where it uses comparison values against the Player. so the AI is reactive and doesn't simply steam roll bad or ~not so good~ players. Have a nice day and good job on this Tutorial it looks good.
I barely use Issue Order actions if not for moving units to do complex tasks (e.g. harassing using a specific ability) and always, after a very short while, I return control to the default AI script for the AI to handle (so data editor).
I hope my answer actually is an answer to your question, if I understood it correctly ;)
thanks a lot! will try on my custom mode map ;)