The Glest Wiki
Register
m (Reverted edits by 188.182.154.77 (talk | block) to last version by Hofmic)
No edit summary
Tag: rte-source
 
Line 1: Line 1:
  +
Those informations are/may be very outdated, please go to: [https://docs.megaglest.org/MG/AI_control new wiki]
   
 
''This feature is available in rev 2603 and later.''
 
''This feature is available in rev 2603 and later.''

Latest revision as of 16:19, 21 June 2016

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

XML[]

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

Documentation[]

ai-behavior[]

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-units[]

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.

See also[]