ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

TaskForces

From ModEnc
Jump to: navigation, search
This page should correctly be named "[TaskForces]"; it is wrong due to technical restrictions.


In Tiberian Sun through Yuri's Revenge, this section defines a list of all AI TaskForces in the game. A TaskForce is, like its name says, a group of units that gets recruited by the AI to perform a specific task. Each TaskForce 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 TaskForce's units does care about its ordering - it reads the lines indexed from 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 FinalAlert 2 or AI Editor V2 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 TaskForce 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 infamous -G suffix is used to distinguish global (ai(md).ini) TaskForces from local (map) ones (which have no suffix). It has no effect however.
  • There is an unknown effect attached to the hexadecimal prefix of a TaskForce's ID.