Home
Screenshots
Downloads
Forums
Docs
Servers
Stats
IRC Chat
Mods

Special Special    Search Search    Login/Logout Login

Main Page » Include Files
Landscape Include Files

This page is a work in progress. As a result, it may be lacking features or descriptions for some things available in actual game.

Contents

Description

Include files are a type of landscape file that is new to version 41 of Scorched 3D that provides two functions.

First, include files allow you to access the settings that were previously only available to you when loading server settings or by changing them manually. What this means is that you can use an include file to change things like gravity, number of teams, number of bots and weaponsize from within a landscape definition rather than having to adjust the server settings manually to achieve the desired setup for your map.

Second, in addition to providing this new access to the server settings, include files can also be used to build ANY other type of landscape asset. What this means is, you no longer have to create your boids in one file, your ships in another file, your placements in yet another file and then reference them all separately if you don't want or need to. With the include type of file, you could theoretically create all these things a specific landscape needs in one file if you wanted to.

Like most of the other optional landscape features, include files can be referenced from either Definition_Files or Texture_Files. To use an include file in either one, you will need to add the following to the corresponding defn or tex file:

<includes>

  <include>data/landscapes/yourincludefile.xml</include>
  <include>data/landscapes/anotherfile.xml</include>

</includes>


File Layout

The include files should typically located under your mod's /data/landscapes folder. Although you can arrange them however you desire. They are usually named optionsmyfilename.xml, where myfilename is the name of the landscape or other identifier for whats in the file. Although, again, you can name them whatever you want, this is just convention.

The basic layout of each include file will look like this:

<options>

  <options> This is where you can set server options
     <option>
        ... a server option type
     </option>
     <option>
        ... More options can be supplied if desired
     </option>
  </options>

In addition to this new access to server options, include files can also optionally contain any number and combination of the following as well.

  <placement type='...'> (optional) a landscape placement type
     ... 
     <object type='...'> a landscape object type
        ...
     </object>
  </placement>
  <movement type='...'> (optional) a landscape object movement type
     ...
  </movement>
  <sound> (optional) a landscape sound
     <position type='...'> a landscape sound position type
        ...
     </position>
     <timing type='...'> a landscape sound timing type
        ...
     </timing>
     <sound> The sound file and its properties
        ...
     </sound>
  </sound>
  <event> (optional) a landscape event
     <condition type='...'>  an event condition type
        ...
     </condition>
     <action type='...'>  an event action type
        ...
     </action>
  </event>
  <music> (optional)
     ...
  </music>

</options>


Option Types

The options available are basically anything that you can set in a server.xml file. Refer to your server.xml file for details on what the available settings are. If you want a good up to date server.xml file to examine, start up a server and use the admin interface to save your server file.

Each Option will fall within its own <option></option> tags just like the server.xml file:

  <option>
     <name>OptionName</name>
     </value>OptionValue</value>
  </option>
  <option>
     ...
  </option>

Other Landscape Assets

In addition to being able to access the server settings within an include file, you can also construct any type of landscape asset that is available to you in any of the other landscape files besides the texture and definition files. This means that placements (that optionally move), sounds, events and music can all be built within an include file now in addition to the old method of building them in their own individual file types.

For more detail on the other types of landscape assets you can construct in an include file, refer to that asset's documentation. The layout will be the exact same as that asset's individual files are. You just omit the main opening/closing tags for that file type. For instance to construct a sound in an include file, you need everything that falls within the <sound></sound> tags, but you won't have to put the <ambientsound></ambientsound> tags that are normally required in an ambient sound file. The same rule applies to the other asset types available as well.

Any of the following can be constructed in an include file:
Placements
Movement
Sounds
Events
Music


Closing Remarks

Include files are now essentially the single most power tool available to you when creating landscaped for Scorched 3D. They not only provide you with all new access to server settings that were previously not available to landscapes, but they provide you access to practically every other type of landscape asset available as well. For more information on each of the other types of landscape assets, refer back to the Syntax_For_Landscapes page.




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.