2 TerrainFileFormat
leper edited this page 2014-05-04 02:33:43 +00:00

Terrain group XML format

Terrains are currently organized into groups, with each group in its own directory inside [art/terrains]source:/ps/trunk/binaries/data/mods/public/art/terrains (see mod layout). The group is defined by a terrains.xml file in that directory, with the following format:

<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE Terrains SYSTEM "/art/textures/terrain/types/terrains.dtd">
<Terrains>
	<Terrain groups="grass" />
</Terrains>

Terrain texture XML format

Individual terrain textures are then defined in XML files within each group, along with associated material (see MaterialSystem). Their XML format is the following:

<?xml version="1.0" encoding="utf-8"?>
<terrain>
	<textures>
		<texture name="baseTex" file="types/grass1.png"/>
	</textures>
	<material>terrain_base.xml</material>
</terrain>