TaskForces
In Tiberian Sun through Yuri's Revenge, this section defines a list of all AI task forces in the game. A task force is, like its name says, a group of units that gets recruited by the AI to perform a specific task. Each task force listed in this section needs its own section in the file. In that section, up to six unittypes can be defined. Unlike most other object lists, the list containing the task force's units does care about its ordering - the lines are read from index 0 to 5 in ascending order. The game also reads a flag named Group from each such section. It is common practice to add flags like Name for your own reference, which third party tools such as C&C AI Editor or FinalAlert 2 usually can use as well.
Format
[TaskForces] 0 = 0638CD41-G 1 = 0638CD42-G [0638CD41-G] Index = count,unittype Index = count,unittype Group = -1 [0638CD42-G] Index = count,unittype Index = count,unittype Group = -2
Here, count stands for the amount of this unit to recruit, and unittype stands for the ID of the unit in question. AircraftTypes, InfantryTypes and VehicleTypes are accepted here.
Note again: Index is read from 0 to 5 inclusive in ascending order, unlike other object lists which read the contained items without paying attention to the keys on the left side.
Additional information
- This section is read from ai(md).ini and the current map file.
- Unlike AITriggerTypes, there is no known difference on where a task force is declared, they are compiled into a single list after reading both files. The game does keep track of which ones were declared in the "global" scope (ai(md).ini) and which - in the "local" scope (map itself), but the only usage of that seems to be the unused functions to save them back to the source file.
- The hexadecimal prefix of a task force's ID is used in pointer remapping during saving and loading. It should not be lower than 0x01000000 to avoid conflicts with real pointers.
- The -G suffix in a task force's ID is used to distinguish global (ai(md).ini) task forces from local (map) ones (which have no suffix).