Goals

Location: Data/XML/AI/Goals

Goals are the aims of the Player. They are grouped into categories, which are activated by the player template. The value of a Goal to the Player is determined by a perceptual equation, which is linked to the goal using a GoalFunction XML file.

The AI ranks goals according to their value in each category independently of the other categories. The goal cost is checked against the budget for the category. If the goal is within budget, it is passed. This process repeats until the budget is empty. If there is spare budget in the category, goals that did not make the value cutoff are randomly chosen.

Goal XML Tag Details
AIGoalApplicationFlags

The application of the goal, in an identify Friend-Foe sense: enemy, neutral, friendly, global, tactical_location, enemy_unit, friendly_unit, friendly_reinforcement_point, enemy_reinforcement_point, enemy_structure, friendly_build_pad

This limits the potential targets of the goal. This is important when you consider the perceptual equation linked to the goal, because the target may not match the equation's considerations.

GameMode

Galactic, Space, Land: the game mode that the goal applies to.

Category

Budget category of the goal.

Reachability

Connection to the AI- in galactic context, this is planetary, in tactical, it is "threat" (see later for more about threat)

Time_Limit

This seems to be the time allowed to spend trying the goal before giving up. Very difficult to test.

Build_Time_Delay_Tolerance

This is a multiplier of the total TaskForce build time, and lets the goal pass if production can be enacted within the total time. So if a speeder takes 20s to build, the tolerance is 1.5, the goal will allow a wait of up to 10s before production commences.

Is_Like

Similar goals within the same category, preventing the AI from activating goals that achieve similar things on the same target. e.g. all building construction Is_Like all other building construction.

Tracking_Duration

Time spent tracking the target of the goal in the case of failure e.g. "if the stealth unit failed in their plan (was killed) within the last 10 minutes the AI won't try that target again."  Per_Failure_Desire_Adjust

Reduce the value of the goal perceptual equation by this amount every time the plan fails.

Activation_Tracking_Duration

How long to "track" the goal once it is started, to allow for failure desire reduction to apply.  Per_Activation_Failure_Desire_Adjust

Reduce the value of the goal perceptual equation by this amount every time the plan fails to even begin.  Global_Exclusions

Completely prevent goals in this list from being attempted while this goal is active.