| 1 | |
| 2 | == Terrain group XML format == |
| 3 | |
| 4 | Terrains are currently organized into groups, with each group in its own directory inside [source:/ps/trunk/binaries/data/mods/public/art/terrains /art/terrains] (see [wiki:Mod_Layout mod layout]). The group is defined by a `terrains.xml` file in that directory, with the following format: |
| 5 | |
| 6 | {{{ |
| 7 | #!xml |
| 8 | <?xml version="1.0" encoding="iso-8859-1" standalone="no"?> |
| 9 | <!DOCTYPE Terrains SYSTEM "/art/textures/terrain/types/terrains.dtd"> |
| 10 | <Terrains> |
| 11 | <Terrain groups="grass" /> |
| 12 | </Terrains> |
| 13 | }}} |
| 14 | |
| 15 | == Terrain texture XML format == |
| 16 | |
| 17 | Individual terrain textures are then defined in XML files within each group, along with associated material (see MaterialSystem). Their XML format is the following: |
| 18 | |
| 19 | {{{ |
| 20 | #!xml |
| 21 | <?xml version="1.0" encoding="utf-8"?> |
| 22 | <terrain> |
| 23 | <textures> |
| 24 | <texture name="baseTex" file="types/grass1.png"/> |
| 25 | </textures> |
| 26 | <material>terrain_base.xml</material> |
| 27 | </terrain> |
| 28 | }}} |