The Glest Wiki

The generate command is an easy way to produce static or consumable resources without creating a new unit. Thus, it can be used to prevent the need to make new units for each resource bunch. For example, instead of building dozens of energy sources, Magic players may need only one energy source with a generate command.

XML[]

<command>
	<type value="generate" />
	<name value="make_mana" />
	<image path="images/make_mana.bmp" />
	<unit-requirements />
	<upgrade-requirements />
	<produce-skill value="produce_skill" />
	<finished-sound enabled="true">
		<sound-file path="sound/sound.wav" />
	</finished-sound>
	<produced>
		<name value="10_mana" />
		<time value="60" />
		<image path="images/10_mana.bmp" />
		<image-cancel path="images/cancel.bmp" />
		<unit-requirements />
		<upgrade-requirements />
		<resource-requirements>
			<resource name="gold" amount="100" />
			<resource name="energy" amount="-10" />
		</resource-requirements>
	</produced>
 </command>

Elements[]

There are no new elements here besides the type value being "generate". It's basically a standard command with the beginning of a unit XML embedded inside the <produced> tag.

See also[]