Supporting document for the AI-script programming of Age of Mythology
AI Script Help File Document
The AoM AI scripting system is a very powerful system that allows the user to craft the AI using the same language as the folks at Ensemble Studios. While this is a useful enduser feature, it is officially unsupported.
The high level overview for creating your own random map AI scripts is as follows:
- Write your random map script.
- Add an XML file into your AI directory following the format of default.xml, defaultboom.xml, or defaultrush.xml.
- See your AI appear in the list of dropdown choices when you run the game.
- Debug it using the ingame debugging facilities:
- Add “aiDebug” to your user.cfg file in the startup directory.
- When the game is running, hit ALT+SHIFT+D to bring up the debugger.
For a scenario, the steps are largely the same, except that you need to associate the AI script filename with the right player via the scenario editor (Player Data dialog).
A list of the type enumerations and function calls that can be made from the AI scripts is included at the end of this document.