\CTP2_DATA\DEFAULT\AIDATA\Goals.txt
The Goals file defines the various goals that the AI can pursue. The various goals that are defined within this file can then be set from the Strategies file where they are given priority ratings and other attributes.
The following flags define which units can execute a goal and what are valid targets. Multiple flags can be defined.
The following priority bonus values are added to the base priority values from the strategy to determine if the goal should be executed. Some are absolute bonuses that applied when true while others are scaled. Scaled bonuses are given as a ratio from 0 to the value of the bonus depending on game state. For example: the target with highest threat rating would get the full ThreatBonus and all other targets would be given a percentage of the bonus based on the ratio of it’s threat rating to the highest threat rating.
The following values are used by the diplomatic system. They allow a goal to be associated with a Threat. When a threat is given all goals that are associated with that threat will get a priority bonus making them more likely to be executed.
Example:
GOAL_ATTACK
{
The Goals file defines the various goals that the AI can pursue. The various goals that are defined within this file can then be set from the Strategies file where they are given priority ratings and other attributes.
The following flags define which units can execute a goal and what are valid targets. Multiple flags can be defined.
The following priority bonus values are added to the base priority values from the strategy to determine if the goal should be executed. Some are absolute bonuses that applied when true while others are scaled. Scaled bonuses are given as a ratio from 0 to the value of the bonus depending on game state. For example: the target with highest threat rating would get the full ThreatBonus and all other targets would be given a percentage of the bonus based on the ratio of it’s threat rating to the highest threat rating.
The following values are used by the diplomatic system. They allow a goal to be associated with a Threat. When a threat is given all goals that are associated with that threat will get a priority bonus making them more likely to be executed.
Example:
GOAL_ATTACK
{
RallyFirst
SquadClass:CanAttack
TargetType:AttackUnit
TargetType:SpecialUnit
TargetOwner:HotEnemy
Execute ORDER_ATTACK
ThreatBonus 100
EnemyValueBonus -250
AlliedValueBonus 1500
PowerBonus 500
DistanceToHomeBonus 0
DistanceToEnemyBonus 0
ChokePointBonus 50
UnexploredBonus -999999
ObsoleteArmyBonus 100
TreaspassingArmyBonus 0
ThreatenTypeestroyCity
ThreatenBonus 5000
ForceMatch:Offensive
TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY
}SquadClass:CanAttack
TargetType:AttackUnit
TargetType:SpecialUnit
TargetOwner:HotEnemy
Execute ORDER_ATTACK
ThreatBonus 100
EnemyValueBonus -250
AlliedValueBonus 1500
PowerBonus 500
DistanceToHomeBonus 0
DistanceToEnemyBonus 0
ChokePointBonus 50
UnexploredBonus -999999
ObsoleteArmyBonus 100
TreaspassingArmyBonus 0
ThreatenTypeestroyCity
ThreatenBonus 5000
ForceMatch:Offensive
TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY