AOE:AI file

From GenieWiki

(Redirected from AI file (AoE))
Jump to: navigation, search

The AI file is a key component in AI editing and scenario design for Age of Empires, and governs what a given computer player builds, trains and researches, and in what quantities. This is collectively known as the computer players strategy. AI editing involves creating or editing an AI file using either a text editor (e.g. Notepad) or the custom tool AI Edit created specifically for this purpose. AI editing may be used to enhance the computer player in general play, for use in a custom scenario or just as a pure disipline (e.g. to battle another AI).

Contents

CPU player handling of an AI

The AI file is loaded by the computer player, which uses this information as rule for what to build, train and research. Understanding how a computer player processes an AI file is crucial to effective AI design.

Order

Limited retrains

Limited retrains differs from the AI's default behavior of always replacing units and buildings when they are destroyed or converted. Instead, the object in question will only be created up to the number of times specified here. For example the number '1' here will tell the AI only to create the unit or building once, so it will not replace it if destroyed. This is recommended for early units that will later become obsolete, e.g. clubmen. Once a certain number have been produced the AI will no longer train them, freeing up resources and population room for newer units to be created.

Critical

Research that is marked as 'critical' will be given a higher priority than normal research. If the research in question is not possible due to insufficient resources, the CPU player will put the AI on hold until there are sufficient resources to research the technology. This property can only be applied to research, not buildings or units.

Autobuild

Even without a strategy (AI file) to process, there are still certain things a CPU player will automatically build or train. By default these units and buildings are on auto-build mode, however they can be turned off via the personality file.

  • Houses
  • Dropsites
  • Farms
  • Towers
  • Docks
  • Transports
  • Fishing boats
  • Warships

Coding an AI

Testing

AOESpeed is a vital tool for testing AI and PER files. This program allows the game speed to be manipulated, allowing for the tester to view how their CPU player behaves without having to spend a huge amount of time waiting for things to unfold.

File information

The .ai file itself is simply a text file with the .ai file extension. A text file (.txt) will not be recognized by the game so cannot be loaded by a CPU player or used in the scenario builder. The files themselves are stored in the data folder (Age of Empires\data). For Rise of Rome AI and Per files the data2 folder must be used (Age of Empires\data2). AI files are embedded in the scenario file so any custom scenario containing an AI need not have the AI included with it as a separate file. Some submitters do not know this and submit their AI files as well, however AI files may be zipped simply to show the downloader how the AI was constructed, which is otherwise almost impossible (see AOK Trigger Studio).

For further information on AI editing please consult the word documents supplied with the game - STRATSMP, STRATTYP and STRATSMX (for RoR expansion).

External links

Personal tools