a small analysis on the goals.txt and the strategies.txt from an answer of Azmel to a mail of mine
<font face=courier size=2>
For every goal type record in Goals.txt, there is a corresponding entry in one or more of the strategy records in strategies.txt. Each GoalElement specifies (for that particular strategy) what the priority is for performing a particular goal relative to other goals. The priority is sometimes also refered to as the raw priority. Before any units are assigned to a goal, all goals of a particular type are sorted based on their raw_priority modified by any positive or negative bonuses for that goal type from it's Goals.txt record. Only the top "MaxEval" number of goals are ever matched to units. The MaxEval number can be absolute (ie. the best three goals) or relative (ie. two per city, or best four goals if we have two cities). If you increase the MaxEval attribute, you increase the pool of goals that the AI will consider, and usually improve intelligence at the expense of processing speed. If MaxEval is set to 0, then no goals of this type will be performed. The MaxExec field limits the number of a particular goal type that will be performed. This lets you consider the 10 best seige goals, but only actually seige the best two cities so that your troops don't get too spread out.
In general, goals execute from highest to lowest priority. The defense goal type usually has the highest priority so that units will be assigned to defend cities first, and then assigned to seige cities and perform other goals. For example, if the GoalElement for GOAL_ATTACK has a higher priority than for GOAL_SEIGE, then AI units will first try to attack enemy armies, and then with any remaining unassigned units, try to seige enemy cities. However, if two goals have very close raw priorities, then the match priority becomes more important. The match priority is computed based on how good a match a particular army is for a specific goal. In general, the closer an army is to a goal, the better it's match. That way even when seige goals have a higher raw priority, an army right next to an enemy unit will attack it rather than move 20 cells to seige a city.
Hope this brief explaination helps. Although it's a complicated system, with a little work it should be possible for anyone interested enough to tweak and customize.</font>
Wes, forget the units and wonders, get into these two files!!
<font face=courier size=2>
For every goal type record in Goals.txt, there is a corresponding entry in one or more of the strategy records in strategies.txt. Each GoalElement specifies (for that particular strategy) what the priority is for performing a particular goal relative to other goals. The priority is sometimes also refered to as the raw priority. Before any units are assigned to a goal, all goals of a particular type are sorted based on their raw_priority modified by any positive or negative bonuses for that goal type from it's Goals.txt record. Only the top "MaxEval" number of goals are ever matched to units. The MaxEval number can be absolute (ie. the best three goals) or relative (ie. two per city, or best four goals if we have two cities). If you increase the MaxEval attribute, you increase the pool of goals that the AI will consider, and usually improve intelligence at the expense of processing speed. If MaxEval is set to 0, then no goals of this type will be performed. The MaxExec field limits the number of a particular goal type that will be performed. This lets you consider the 10 best seige goals, but only actually seige the best two cities so that your troops don't get too spread out.
In general, goals execute from highest to lowest priority. The defense goal type usually has the highest priority so that units will be assigned to defend cities first, and then assigned to seige cities and perform other goals. For example, if the GoalElement for GOAL_ATTACK has a higher priority than for GOAL_SEIGE, then AI units will first try to attack enemy armies, and then with any remaining unassigned units, try to seige enemy cities. However, if two goals have very close raw priorities, then the match priority becomes more important. The match priority is computed based on how good a match a particular army is for a specific goal. In general, the closer an army is to a goal, the better it's match. That way even when seige goals have a higher raw priority, an army right next to an enemy unit will attack it rather than move 20 cells to seige a city.
Hope this brief explaination helps. Although it's a complicated system, with a little work it should be possible for anyone interested enough to tweak and customize.</font>
Wes, forget the units and wonders, get into these two files!!
Comment