Fandom

Glest

MG/AI control

< MG

275pages on
this wiki
Add New Page
Talk0 Share

Those informations are/may be very outdated, please go to: new wiki

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

XMLEdit

<ai-behavior>
	<worker-units>
		<unit name="castle" minimum="1"/>
	</worker-units>
	<warrior-units>
		<unit name="battle_machine" minimum="1"/>
		<unit name="archer" minimum="1"/>
	</warrior-units>
	<resource-producer-units>
		<unit name="pig" minimum="1"/>
	</resource-producer-units>
	<building-units>
		<unit name="blacksmith" minimum="1"/>
	</building-units>
	<upgrades>
		<upgrade name="stables"/>
		<upgrade name="robotics"/>
		<upgrade name="advanced_architecture"/>
	</upgrades>
</ai-behavior>

DocumentationEdit

ai-behaviorEdit

This tag will be present in the <faction> tag of the faction XML, and will contain all the other elements to define the AI's behavior.

worker-unitsEdit

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-unitsEdit

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-unitsEdit

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-unitsEdit

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.

upgradesEdit

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

See alsoEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.