- Reaction score
- 874
Ok, I added a more in-depth explanation on how to create conditions.
I've noticed that there is next to nothing about the AI Editor in all of this forum. So, I've created an introductory course on the workings of the AI Editor.
AI Editor
1. What is the AI Editor?
2. Why Would I Want to Use the AI Editor?
3. How Does the AI Editor Work?
1. What is the AI Editor?
Simply put, the AI Editor is a tool that allows the mapper to create a custom AI script that can be implemented with any combination of structures and units. You can import any number of structures and units for use in the AI Editor.
2. Why Would I Want to Use the AI Editor?
The primary use of the AI Editor is to create a custom race that a computer player will be able to control. The AI Editor eliminates the need for a huge collection of triggers that would be needed to drive a custom race that the computer knows nothing about.
3. How Does the AI Editor Work?
Or, in other words, how do I create a custom AI? Well, first, we'll take a look at the different tabs in the AI Editor and their different functions, then you should be able to create your own AI.
A. The General Tab
The General Tab contains things that are, well, general. This is where you will declare what race your AI will be, Human, Orc, Undead, Night Elf, or Custom. There are also several options for general operations of the AI that come with their own tooltip and are fairly self-explanatory, so I won't go into detail there. There is also a large window for conditions to be used with construction and attack. These conditions can be used with many different operations of the AI Editor, including building and attacking. To create a new condition, click the Add Condtion button at the bottom. You can then give your condition a name. Click on the Configure Condition button to specify what the condition will do. You can then set up a number of comparisons that the AI will check wherever you wish to use that condition. I will give an example of how to do that later on. Lastly, there is an option for importing custom units. Because the AI Editor is not tied in any way with the current map open in the editor, it is necessary to import any custom units you will need to create your AI. To accomplish this, create the unit in your map, then export it using the Import Manager. Save it in a folder, then reopen the AI Editor to your AI. Click the Import button, then find the data you just saved and import it. It will now be stored in the AI so that you can use it in the coming menus.
![]()
I have a custom building classified as a town hall, and I have a custom peasant classified as a worker, but neither show up in the list. What can be the reason for it?C. The Building Tab
This is where it gets confusing. The Building Tab is where you control all of the units that will be built by the computer. First, you should tell it what building will be the main hall-type building the computer will use. If you import a building with the classification of town hall, it will appear in this list.