The Glest Wiki
Register
Advertisement
Engines_icons.png This article documents Glest, GAE, and MegaGlest

This is noted in the colored backgrounds, which denote lines as being engine specific. See the key below.[Editing help]

v  d  e


The faction XML is the base definition for each faction in a tech tree mod and defines the starting units, starting resources and music. The actual name of the file will be the faction's name (which must match the folder).

XML

GAE Only
GAE and MegaGlest Only
<?xml version="1.0" standalone="no"?>
<faction>
	<starting-resources>
		<resource name="resource_name" amount="100"/>
	</starting-resources>
	<starting-units>
		<unit name="unit_name" amount="1"/>
	</starting-units>
	<music value="true" path="music_tech.ogg"/>
	<!-- Start GAE Only -->
	<logo value="true">
		<team-colour path="logo_team.png" />
		<rgba-colour path="logo_rgba.png" />
	</logo>
	<attack-notice enabled="true" min-delay="15">
		<sound-file path="sound/attacked.ogg" />
	</attack-notice>
	<subfactions>
		<subfaction name="subfaction_name"/>
	</subfactions>
	<!-- End GAE Only -->
</faction>

Documentation

resource

Starting resources the faction start with. Name is the name of the resource, and amount is how much to begin with.

unit

Starting units. The name is the exact name of the unit, and the amount is how many to start with.

music

If true, the specified music will be played in a loop while using the specified faction. In GAE Only, you can specify multiple music tracks and can choose whether to shuffle them (play randomly) or in order. In order to use multiple tracks, play-list must be true, such as in the below example:

	<!-- Start GAE Only -->
	<music value="true" play-list="true" shuffle="true">
		<music-file path="music/track1.ogg" />
		<music-file path="music/track2.ogg" />
	</music>
	<!-- End GAE Only -->

Main article: GAE/Faction logos

If enabled, a faction logo will be placed in the unit info box when no units or resources are selected. This image is made of two parts, a team color part which uses greyscale to define how dark or how light team color is, and a true color image that will be rendered on top of the team color image. GAE only.

attack-notice

If enabled, a sound file will be played whenever your units are attacked offscreen. This will not trigger if you are attacked inside your viewing area, and will not sound more often than the min-delay, in seconds. Multiple sound files can be linked to by using multiple sound-file tags.

subfactions

If not a closed tag, a list of subfactions available must be registered here.

See also

Advertisement