The Player

The Player is the ultimate control for the AI. It compiles the budgets and goals using a Template and handles enacting plans. The Player defines the difficulty adjustment settings for each difficulty from DifficultyAdjustments.XML. They also control the FreeStore script used by the AI (see later chapters).

The Player assigned to a faction is controlled via the Galactic Conquest XML tag

Player Files
Located in:

Each Player has a Galactic FreeStore script, and Space/Land tactical FreeStore scripts defined in their XML files with appropriate tags.

The  tag decides what sets of goal-function pairs the AI player will use to control its activity. These are a list of names of the XML files located in  that you want the AI to use. More on Goal-Function pairs later.

The Templates tag decides what templates each major mode will be using. See below for information about Templates.

The  tag chooses the difficulty levels from the DifficultyAdjustments XML file. This allows you to set up different difficulty scaling for different players.

Template Files
Located in:

Templates lay out the Budgets, Goals and Plans for the Player that uses them.

The Priority tag controls when the template should fire- Priority 1 before 2, etc.

The Trigger tag turns entire templates on or off based on a perceptual equation. An example of this is the Empire's default template. It has a switch for tech advancement/normal behaviour.

The Budget tag contains a list of tags for possible budget categories used by the template. The possible categories are below, taken from the AIGoalCategoryType.XML file found in. The amount of value in each budget is controlled by a perceptual equation inside the goal category type tag.

Following the Budget are the controls for which goal and plan categories can be used. This is done via the  and   tags. This can be used to selectively toggle goal categories after a template switch, to make the AI become dormant or active as necessary.

As always, it is recommended to look at the vanilla files for context.