MG/AI control

This feature is available in rev 2603 and later.

In MegaGlest, it's possible to control the AI to some degree by specifying which types of units and buildings are most important, as well as the priority for upgrades. Specifying these lets mods tailor the AI production specifically for their mod. Thus, it could be used to specify what units should be the backbone of the AI's army, what is the primary worker unit, etc. This is done in the faction XML

ai-behavior
This tag will be present in the &lt;faction&gt; tag of the faction XML, and will contain all the other elements to define the AI's behavior.

worker-units --are we sure of this?-- A Castle is not a worker unit.
Units specified here are treated as workers and make up the bulk of production and expansion. A minimum number is specified to tell the AI how many of this unit it should try and maintain at all times.

warrior-units
Units specified here are treated as warriors, meaning they will be used as the primary attack force. A minimum number is specified to tell the AI how many of this unit it should try and maintain at all times.

resource-producer-units
Units here are considered to be necessary for producing different resources, such as food. A minimum number is specified to tell the AI how many of this unit it should try and maintain at all times.

building-units
Units here are considered to be other important buildings that the AI should attempt to build early. A minimum number is specified to tell the AI how many of this unit it should try and maintain at all times.

upgrades
Upgrades here are considered to be important upgrades that are priority for the AI to develop.