<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
  SYSTEM '../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../clonk.xsl"?>
<doc>
  <title>Scenarios</title>
  <h>Scenarios</h>
  <part>
    <text>Scenarios are the playing worlds which the player can select and start from the menu. With their components the scenario designer can adjust freely everything from the landscape, the goals and rules, the available objects and materials to the look in the menu.</text>
	
    <h id="Properties">Basic contents</h>
    <dl>
      <dt id="Szenariotxt"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="scenario/scenario.html">Scenario.txt</emlink></dt>
      <dd>
        <text>Contains most scenario settings.</text>
      </dd>
      <dt id="Scriptc"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="scenario/script.html">Script.c</emlink></dt>
      <dd>
        <text>The scenario script.</text>
      </dd>
      <dt id="Landscapebmp"><img height="16" src="../../images/icon_image.png" width="16"/>Map.bmp</dt>
      <dd>
        <text>Static landscapes are stretched by factor MapZoom defined in Scenario.txt to the size of the actual landscape in the game. The colors used in Map.bmp correspond to materials and textures as defined in <emlink href="material/index.html#TexMaptxt">TexMap.txt</emlink>.</text>
      </dd>
      <dt id="MapFgBg"><img height="16" src="../../images/icon_image.png" width="16"/>MapFg.bmp / MapBg.bmp</dt>
      <dd>
        <text>Same as Map.bmp as defined above, except that foreground and background materials can be drawn separately. In Map.bmp, color indices greater than 127 will result in underground materials. In MapFg.bmp and MapBg.bmp, all color indices up to 255 can be used, and undergroup materials are simply specified by tunnel material in the background map.</text>
      </dd>
      <dt id="Landscapetxt"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="scenario/MapCreatorS2.html">Landscape.txt</emlink></dt>
      <dd>
        <text>Advanced scenario designers can use this component to define highly complex, fully random generated dynamic landscapes. This does require certain mathematical skill and some patience, however.</text>
      </dd>
      <dt id="Scriptc"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="script/MapScript.html">Map.c</emlink></dt>
      <dd>
        <text>Script for dynamic generation of map. See <emlink href="script/MapScript.html">map script documentation</emlink>.</text>
      </dd>
	</dl>
	

    <h id="TitleAndDescription">Title, description and illustration</h>
    <dl>
      <dt id="Titletxt"><img height="16" src="../../images/icon_text.png" width="16"/>Title.txt</dt>
      <dd>
        <text>For language dependent titles you should create a Title.txt component with the appropriate contents:</text>
        <code>DE:Angriff der Killerwipfe
US:Attack of the Killer Wipfs</code>
		<text>Important: No quotation marks and special characters should be used.</text>
      </dd>
      <dt id="Title"><img height="16" src="../../images/icon_image.png" width="16"/>Title.png</dt>
      <dd>
        <text>The title picture of the scenario in png format. Size: 200x150 pixel.</text>
      </dd>
      <dt id="Icon"><img height="16" src="../../images/icon_image.png" width="16"/>Icon.png</dt>
      <dd>
        <text>The icon of the scenario in png format. Size: 24x24 pixel.</text>
      </dd>
      <dt id="Desc__txt"><img height="16" src="../../images/icon_text.png" width="16"/>Desc__.txt</dt>
      <dd>
        <text>The description of the scenario. '__' must be replaced by the two digit language code, e.g. DE for German and US for American English. Multiple descriptions for several languages can be contained in a scenario file of which the game will automatically load the one appropriate for the configured language.</text>
        <text>The first line of the file will be used as a heading.</text>
      </dd>
	</dl>
	
	
    <h id="Additional">Additional files</h>
    <dl>
      <dt id="ParameterDefstxt"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="scenario/ParameterDefs.html">ParameterDefs.txt</emlink></dt>
      <dd>
        <text>Contains custom scenario parameters that players can adjust like e.g. difficulty settings.</text>
      </dd>
      <dt id="Teamstxt"><img height="16" src="../../images/icon_text.png" width="16"/><emlink href="scenario/Teams.html">Teams.txt</emlink></dt>
      <dd>
        <text>Contains the Teamsettings for multiplayer scenarios.</text>
      </dd>
      <dt id="ocd"><img height="16" src="../../images/icon_object_definition.png" width="16"/><emlink href="definition/index.html">*.ocd</emlink></dt>
      <dd>
        <text>Scenarios can contain local object definitions which are then available in that scenario only.</text>
        <text>The engine will also search all parent folders (ocf) of the scenario for additional local object definitions. In this way, a scenario folder can contain object definitions which are then available in all its contents scenarios.</text>
      </dd>
      <dt id="Soundocg"><img height="16" src="../../images/icon_system.png" width="16"/>Sound.ocg</dt>
      <dd>
		<text>Scenarios can contain any number of sound files (*.ogg or *.wav). These can be played back by script during the game. Scenario local sounds are loaded dynamically on demand which might cause delays with large scenario files. The sounds should be stored in a local sound group.</text>
		<text>Just like the global sound file, scenario local Sound.ocg groups may contain any subfolders with .ocg extension to define sound namespaces. For example, a file Sound.ocg/Animals.ocg/Growl.ogg can be played back using <funclink>Sound</funclink>("Animals::Growl").</text>
      </dd>
      <dt id="Musicocg"><img height="16" src="../../images/icon_system.png" width="16"/>Music.ocg</dt>
      <dd>
		<text>If the scenario contains music (*.ogg) files, these can be played back during the game in random order. Also see the script command <emlink href="script/fn/Music.html">Music</emlink>(). Local music files should be stored in a local music group.</text>
      </dd>
      <dt id="Materialocg"><img height="16" src="../../images/icon_system.png" width="16"/><emlink href="material/index.html">Material.ocg</emlink></dt>
      <dd>
        <text>Scenarios can contain local material definition groups. See <a href="#UeberladungenOCS">overloading rules</a>.</text>
      </dd>
      <dt id="Graphicsocg"><img height="16" src="../../images/icon_system.png" width="16"/>Graphics.ocg</dt>
      <dd>
        <text>Scenarios can overload individual entries of the global Graphics.ocg group as well as add new content like a sky background image or loader graphics (*.png or *.jpg). Sky graphics should either be tileable or big enough that it won't even tile if the player zooms out very far.  Loader screen are displayed while the scenario is loading. If multiple files are present (Loader1.png, Loader2.png, Loader3.png...), one is selected randomly. You can optionally specify which loader to use in Scenario.txt. Loader image files located in parent scenario folders are also used.See <a href="#UeberladungenOCS">overloading rules</a>.</text>
      </dd>
      <dt id="Namestxt"><img height="16" src="../../images/icon_text.png" width="16"/>Names.txt</dt>
      <dd>
        <text>These names are used for clonks created in this scenario.</text>
      </dd>
      <dt id="Infotxt"><img height="16" src="../../images/icon_text.png" width="16"/>Info.txt</dt>
      <dd>
        <text>Here an author can store additional information about the development of his scenario, his email address, or other information he wants to share with other developers.</text>
      </dd>
	</dl>
	
	
    <h id="SaveGames">Additional files created for saved games or scenarios</h>
    <dl>
      <dt id="MatMaptxt"><img height="16" src="../../images/icon_text.png" width="16"/>MatMap.txt</dt>
      <dd>
        <text>Stores the material table used in this scenario. The materials listed here are used by the exact landscape and have to be available in the loaded Material.ocg group.</text>
      </dd>
      <dt id="Objectstxt"><img height="16" src="../../images/icon_text.png" width="16"/>Game.txt</dt>
      <dd>
        <text>This component is generated by the engine and stores runtime object data of a savegame.</text>
      </dd>
      <dt id="Objectsc"><img height="16" src="../../images/icon_text.png" width="16"/>Objects.c</dt>
      <dd>
        <text>This component is generated by the engine if the game is stored as a scenario. Contains an InitializeObjects() function to recreate all objects placed during editing before. See <emlink href="definition/script.html#ScenSave">Object saving</emlink>.</text>
      </dd>
    </dl>
    <h id="UeberladungenOCS">Overloading Rules</h>
    <text>Various system components (graphics, loader screens, materials, music, or objects) can be overloaded in scenarios. In doing this, parent scenario folders (ocf) are searched. Also, components located in child groups will always overload the same components located in parent groups.</text>
  </part>
  <author>Sven2</author><date>2002-04</date>
  <author>matthes</author><date>2004-06</date>
</doc>
