Home
Screenshots
Downloads
Forums
Docs
Servers
Stats
IRC Chat
Mods

Special Special    Search Search    Login/Logout Login

Main Page » Landscapes.xml
The landscapes.xml file

Contents

Description

This is the landscape file which ties all of the other landscape files together to form a finished landscape. It contains some basic info about each landscape and determines which definition files and which texture files can be used by each of them.

If you haven't already, its always a good idea to look through the landscapes.xml file itself to get a feel for what it looks like. You can find it located in your game's installation directory under /data/landscapes.xml. The basic layout of the landscape file will be as follows:


Outline

<landscapes>

  <landscape>
     ...
  </landscape>
  <landscape>
     ...
  </landscape>

</landscape>


Each landscape file will have its own <landscape></landscape> tags and all the necessary info for each landscape is contained within them where the "..." is above.


Example

To see what needs to be within each landscape definition, lets look at an example from the game itself. Here is what the 'oldstyle' definition that comes included with the game looks like with a description of what each tag represents. Descriptions are in yellow.

<landscape>

   <name>oldstyle</name>
       * this is the name that will appear in the landscape options
   <description></description>
       * brief description of the landscape, appears in tooltip text in options>
   <picture>oldstyle-pic.bmp</picture>
       * this is the pic that is displayed in the landscape options, must be bmp
   <weight>100</weight>
       * weight determines how often the landscape is chosen when cycling maps
       * higher number = more frequent, lower number = less frequent
   <defn> definition files point to file(s) that contain data regarding the shape of the landscape
       <item>data/landscapes/defnoldstyle.xml</item>
           * location and name of the definition file
       <item>data/landscapes/defnlowlands.xml</item>
           * if multiple files are supplied, one is chosen randomly
   </defn>
   <tex> texture files point to file(s) that contain the data regarding the texturing of the landscape
       <item>data/landscapes/texdefault.xml</item>
           * location and name of the definition file
       <item>data/landscapes/texsshell.xml</item>
           * if multiple files are supplied, one is chosen randomly
       <item>data/landscapes/texsand.xml</item>
       <item>data/landscapes/texsnow.xml</item>
       <item>data/landscapes/textropical.xml</item>
       <item>data/landscapes/texvulcano.xml</item>
       <item>data/landscapes/texstorm.xml</item>
       <item>data/landscapes/texnight.xml</item>
       <item>data/landscapes/texsahara.xml</item>
   </tex>

</landscape>


Closing Remarks

That's about all there is to know about the landscapes.xml file. Most of the meat is contained in the other landscape files, but this file is what puts the final pieces together and makes the landscape available to the user.




Edit this pagePage historyWhat links hereRelated changes
Donate to Scorched3D Visit Scorched3D at SourceForge.net Get it from CNET Download.com! 5 Stars
© Copyright 2008 Gavin Camp. All Rights reserved.