This is a version of the AoM default AI, encapsulated with control variables to allow a simple loader script to guide the AI behavior.
This is a test version, please give it a shot and send me an email to let me know what worked, what didn't, and what you might like to see added. (No promises!)
To use it in your scenarios, follow these steps:
1) Unzip the file into your AoM installation's AI directory. I strongly suggest that you set all the files to read-only.
2) Make a copy of aomMKloader.xs under a different name for each scenario AI player that will be using it. For example, if players 2 and 3 in "myScenario.scn" will be using it, copy aomMKloader.xs to "myScenarioP2.xs" and "myScenarioP3.xs".
3) In the editor, use scenario/player data to make sure each player is under AI control, and that the proper AI file is indicated. DO NOT double-click to select, you must choose the file name and then press OPEN. (Editor bug.) I will refer to these as your loader files, below.
4) Review aomMKcv.xs for a list of the control variables available and info on how to use them. Generally, you use one by putting a single-line initialization in your loader files, in the setParameters() function. For example, to limit an AI player to age 3, you could add a line like this:
cvMaxAge = cAge3;
5) Many of the variables can be reset while the scenario is running, but you MUST use the appropriate functions to change them. DO NOT set them directly while the scenario is running. (Setting cvMaxAge = cAge4 will not allow the AI to age up. Using setMaxAge(cvAge4) will work.) aomMKcvFuncs.xs has the necessary functions. DO NOT modify anything in aomMKcvFuncs.xs or aomMKcv.xs, as these files may be updated (by myself or others) in the future.
6) Add any rules you need to the bottom of your loader file, this becomes the "main" file for your scenario.