- Captn_Kidd
Courtesy of
This file contains a sample scenario and AI script, and three chapters of tutorial info to get people started in AI scripting. There's a lot left to cover, so more will likely be added after Thanksgiving.
The tutorial can be downloaded here: Many thanks to Captn_Kidd for this excellent tutorial! The Chapter 1 file contains info about setting up your system config and unzipping and storing the files, so it would likely be wise to copy and paste it here: This chapter walks you through the steps needed to install the tutorial files and configure your system for easiest AI development. It assumes that you have visual studio, but any text editor that displays line numbers can also be used. First, store the ".scn" file in your AoM scenario directory. Store all the others in your AoM AI directory. Next, create a user.cfg file in your AoM startup directory, and include these three lines in it: aiDebug Then, create a user.con file in the AoM setup directory, and add this line: map ("alt-shift-d", "root","gadgetToggle(\"XSDebugger\")") These changes give you access to ai debugging info. If you're using visual studio as your editor, it helps to tell it that "xs" file extensions use C language syntax, so it highlights key words and comments properly. To do that, find the registry setting for HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\TextEditor\Tabs/Language settings\C/C++\FileExtensions and append ";xs" to the end of the list. In general, it will be easiest to configure your desktop this way: Dev studio running with the XS file in the foreground, covering the top 2/3 of the screen. The reference.txt file opened in a background window in dev studio. The current chapter .txt file opened in notepad, in a small window on the bottom 1/3 of the screen, adjusted to a comfortable reading width. (Dev studio doesn't support word wrap, so entire paragraphs show up as one line scrolling off the screen.) Finally, if you want to be able to run AI vs AI battles (no human player) in the normal single player interface, you'll need to take these steps: 1) Create a new profile in the options screen, named AIvsAI. 4) Select the AIvsAI.prf profile when you want to set up AI vs AI battles. Your system is now set up to do some AI development. On to chapter 2! [This message has been edited by Captn_Kidd (edited 01-29-2003 @ 01:55 PM).]
showAIEchoes
developer
2) Using that profile, start a 1v1 RM AI game (you vs. AI.) Quit a few seconds in, exit AoM.
3) Open AIvsAI.prf (in the users directory) and edit the playerid 0 data by setting type=1, inserting "default" as the aiscript value, and 9 as the civilization (random). Save the AIvsAI.prf. Your playerdata section for playerid 0 should look like this:
The Rasher
rasher@accesswave.com
[IMG]http://www.freeyellow.com/members6/therasher/Thomas.jpg[/IMG]
"You must succeed, to bring the Winds of Light into the age of darkness."
-Old Man, Magnus