Introduction

Welcome to the AoE2 AI Scripting Encylopedia!

This is a resource that will include information on almost everything about AI scripting for Age of Empires 2. It includes information for AI scripting for the Definitive Edition, and most of this information is also applicable to the UserPatch, HD, or older CD versions, since they use the same core AI engine.

What's Available?

You can find an exhaustive list of AI Commands, an exhaustive list of Parameters that go with those commands, and an exhaustive list of all Strategic Numbers. Within each list, you can click on each item to find more details.

There is also a section with several tables, most notably a list of all Objects and Technologies that you could see in a random map game, including for the Return of Rome and Chronicles game modes.

You can also find several Guides, including guides on how to control individual AI units (DUC).

Lastly, there is a Quick Links bar on every page with links to the most commonly used pages, giving you quick access to info you want to look up.

Finding Our AI Scripting Community

Our scripting community is active on Discord, and we have a Forum where AI scripts have been uploaded, going back over twenty years. If you want to help provide info or report an error, make a post in the AI Scripting Encyclopedia thread here.

Credits

Documentation credits go to the Ensemble Studios team for the CPSB guide. Also, thanks to scripter64, II2N (The Max), ER, and others who have gifted the community with their own documentation notes. The bulk of UserPatch parameters have been documented by Leif Ericson based on scripter64's UserPatch guide.

Of course, huge thanks to scripter64 for his monumental work on the UserPatch and the dozens of scripters over the years who have gifted their knowledge to the scripting community. This documentation is a way to show gratitude for all of those scripters.

Happy scripting!