<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openclonk.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Andriel</id>
	<title>OpenClonk Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openclonk.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Andriel"/>
	<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/w/Special:Contributions/Andriel"/>
	<updated>2026-04-28T20:55:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Building_with_Windows&amp;diff=1464</id>
		<title>Building with Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Building_with_Windows&amp;diff=1464"/>
		<updated>2014-04-19T09:50:51Z</updated>

		<summary type="html">&lt;p&gt;Andriel: /* Get CMake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[DE:Kompilieren unter Windows|German Version here]]&lt;br /&gt;
&lt;br /&gt;
= Get the sources =&lt;br /&gt;
&lt;br /&gt;
The source of OpenClonk is hold in a so-called version control system. Put simply, this is something that allows programmers to coordinate their work (see [[Git Workflow|the Git article]] for how that works). For the moment, it&#039;s just a couple of files you want to download.&lt;br /&gt;
&lt;br /&gt;
== Install TortoiseGit ==&lt;br /&gt;
&lt;br /&gt;
The notable difference to a simple download is that you need a special program to do it. Our version control system is Git, and we will use the [http://code.google.com/p/tortoisegit/ TortoiseGit] client. Follow that link and click &amp;quot;Download&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit.png|860px]]&lt;br /&gt;
&lt;br /&gt;
As the website tells you, the installation of TortoiseGit has two parts: TortoiseGit and msysGit. It also says that you should start with TortoiseGit, so let us get that installer first. Make sure to choose the right architecture for your version of Windows:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit2.png|860px]]&lt;br /&gt;
&lt;br /&gt;
And walk through the installation. Just selecting the default options should get you through alright.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;OpenClonk team members:&#039;&#039; If you want to use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] to push commits, make sure to select the appropriate option along the way. Do it again for the msysGit installation below.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit4.png]]&lt;br /&gt;
&lt;br /&gt;
Next, you need msysGit, which is what actually does all the work behind the scenes. Following the [http://code.google.com/p/msysgit/downloads/list?can=2&amp;amp;q=%22Full+installer+for+official+Git+for+Windows%22 &amp;quot;Full installer for official Git&amp;quot;] link will get you to another download page:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit3.png|860px]]&lt;br /&gt;
&lt;br /&gt;
This installation will ask even more confusing questions. But again default options won&#039;t cause anything to break, I would just recommend deactivating some GUI options, as TortoiseGit already offers them:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit5.png]]&lt;br /&gt;
&lt;br /&gt;
After a bit of waiting and (if you&#039;re lucky) not a single request to restart your computer, this should have given you a working TortoiseGit installation.&lt;br /&gt;
&lt;br /&gt;
== Clone ==&lt;br /&gt;
&lt;br /&gt;
Okay, now we are going to download the sources. Git calls this &amp;quot;cloning&amp;quot; because it&#039;s actually a lot more than just the sources you get. After you&#039;re done, you can check the [[Git Workflow]] page for how to work with your clone.&lt;br /&gt;
&lt;br /&gt;
For now, just find a place where you want the source to be, open the context menu by right-click and select &amp;quot;Git Clone...&amp;quot; from the TortoiseGit menu:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit6.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A dialog will appear asking for the repository URL and the destination path. In our case, we want the source to be the OpenClonk repository.  The URL you need is normally &amp;quot;git://git.openclonk.org/openclonk.git&amp;quot;.  Here&#039;s how it should look like:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;OpenClonk team members:&#039;&#039; Use &amp;quot;ssh://git@git.openclonk.org/openclonk.git&amp;quot; instead and activate the option to auto-load the PuTTY key for maximum convenience.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit_pub.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;OK&amp;quot;, TortoiseGit will work for a while. After watching a tortoise somersaulting for a while, it should finish. Congratulations, you now have the bleeding edge of OpenClonk development on your hard drive!&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit_finish.png]]&lt;br /&gt;
&lt;br /&gt;
This a lot of stuff and most likely you won&#039;t understand much of it. Here&#039;s a quick orientation guide of the actually important bits:&lt;br /&gt;
* &amp;quot;docs&amp;quot; - the sources of our [http://docs.openclonk.org/en/sdk/ documentation]&lt;br /&gt;
* &amp;quot;planet&amp;quot; - these are the game resources - scripts, graphics and everything to explain how to make a game out of them&lt;br /&gt;
* &amp;quot;src&amp;quot; - all the source code of the game engine. Lots of C++ ahead.&lt;br /&gt;
&lt;br /&gt;
= Get it to Compile =&lt;br /&gt;
&lt;br /&gt;
This is nice, but we are interested in seeing the game run, aren&#039;t we? For this, we need a program that will take all those C++ files and make an executable file out of it. Unfortunately, programming is complicated stuff so even setting up the tools and the environment has become a bit of science. But this won&#039;t stop us.&lt;br /&gt;
&lt;br /&gt;
== Get Microsoft Visual Studio ==&lt;br /&gt;
&lt;br /&gt;
You can say what you want about Microsoft, but they sure make nice development environments. And they are even giving a lot of it away for free. We will use [http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express Visual Studio C++ 2012]. Follow that link, find the 2012 Express Edition &#039;&#039;&#039;for Windows Desktop&#039;&#039;&#039;, then download the [http://go.microsoft.com/?linkid=9816758 web installer]:&lt;br /&gt;
&lt;br /&gt;
[[File:msvc11_web_download.png|860px|Make extra sure you got the &amp;quot;Windows Desktop&amp;quot; variant.]]&lt;br /&gt;
&lt;br /&gt;
Run it, accept the licensing terms, click the big &amp;quot;Install&amp;quot; link and accept the UAC prompt.&lt;br /&gt;
&lt;br /&gt;
Then go make a coffee because the install will probably take a while. If the setup asks you to restart your computer, do so; it will continue when you log back in.&lt;br /&gt;
&lt;br /&gt;
== Get Dependencies ==&lt;br /&gt;
&lt;br /&gt;
Like most big programs, OpenClonk doesn&#039;t stand on its own. Some things (like opening PNG images) were already programmed by other programers far better than we could ever do. This is why we have to get a few so-called &amp;quot;libraries&amp;quot; before Clonk can be built.&lt;br /&gt;
&lt;br /&gt;
You could expend some effort try to find, download, and compile all those libraries by yourself, but that would take quite some time. Instead, just download one of the packages we&#039;ve provided for your convenience. If you&#039;re trying to build a 32-bit binary of OpenClonk or you don&#039;t really know what this is all about, use [http://www.nosebud.de/~nh/openclonk/openclonk-deps-vc110-i386.zip the x86 package]; for a 64-bit binary, use [http://www.nosebud.de/~nh/openclonk/openclonk-deps-vc110-amd64.zip the amd64 package]. Then unpack the .zip archive and put the &amp;quot;deps&amp;quot; folder into the directory where you also want your build files.&lt;br /&gt;
&lt;br /&gt;
== Get CMake ==&lt;br /&gt;
&lt;br /&gt;
Before all this becomes useful, we still need something that tells the compiler &#039;&#039;how&#039;&#039; all those sources and libraries should be compiled together.&lt;br /&gt;
&lt;br /&gt;
For this, Visual C++ needs a project file. But there is none - we have to consult &#039;&#039;another&#039;&#039; program to generate it for us. This might seem confusing - but the point is that there are a lot of build environments besides Visual Studio, and having all those project files next to each other would become a problem in the long run.&lt;br /&gt;
&lt;br /&gt;
What we need is [http://www.cmake.org/cmake/resources/software.html#latest CMake]. Follow that link and download the installer:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake1.png|860px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You know what to do.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the installation, start the CMake GUI from the start menu. Put the path you cloned the repository into the source code path field.&lt;br /&gt;
You can set the build path to any directory you want, but it is important that the &amp;quot;deps&amp;quot; folder from the last step is also in that directory.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now click the &amp;quot;Configure&amp;quot; button in the lower left. It will ask what compiler we want to use. Select the compiler you want to use; either &amp;quot;Visual Studio 11&amp;quot; if you downloaded the 32-bit library package above, or &amp;quot;Visual Studio 11 Win64&amp;quot; if you got the 64-bit package.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake4.png]]&lt;br /&gt;
&lt;br /&gt;
If you get some error messages (in red), you&#039;re probably missing some dependencies. Don&#039;t worry if cmake complains about some missing paths, it shouldn&#039;t affect you.&lt;br /&gt;
&lt;br /&gt;
The last step is to click the &amp;quot;Generate&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
== Your First Build ==&lt;br /&gt;
&lt;br /&gt;
Okay, now we have everything needed to make OpenClonk run for the first time. Go into the source directory and double-click on the &amp;quot;openclonk.sln&amp;quot; file that should now have appeared:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_build1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual C++ should open and look similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_build2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We only want to build the engine, so select &amp;quot;openclonk&amp;quot; from the list, right-click and select &amp;quot;Set as Start-Up project&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_build3.png]]&lt;br /&gt;
&lt;br /&gt;
Now press F5 (or, if you prefer, click the &amp;quot;Local Windows Debugger&amp;quot; button in the tool bar). Visual Studio will notice that you don&#039;t actually have a current compiled version of OpenClonk yet. Tell it to build one, and if you like also tell it to always just automatically build a new version using the check box.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_outofdate.png]]&lt;br /&gt;
&lt;br /&gt;
If all goes well, after a couple of minutes you&#039;ll be looking at the OpenClonk main menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Openclonk_first_start.jpg]]&lt;br /&gt;
&lt;br /&gt;
In case you are wondering why OpenClonk suddenly starts in some kind of pseudo windowed mode: This is because we just built a debug build (note the &amp;quot;dbg&amp;quot; after the version?). This build is a bit slower but allows you to get a better look at the internals of the engine while it&#039;s running. Maybe we&#039;ll have another article about that soon.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Building_with_Windows&amp;diff=1463</id>
		<title>Building with Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Building_with_Windows&amp;diff=1463"/>
		<updated>2014-04-19T09:48:10Z</updated>

		<summary type="html">&lt;p&gt;Andriel: /* Get Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[DE:Kompilieren unter Windows|German Version here]]&lt;br /&gt;
&lt;br /&gt;
= Get the sources =&lt;br /&gt;
&lt;br /&gt;
The source of OpenClonk is hold in a so-called version control system. Put simply, this is something that allows programmers to coordinate their work (see [[Git Workflow|the Git article]] for how that works). For the moment, it&#039;s just a couple of files you want to download.&lt;br /&gt;
&lt;br /&gt;
== Install TortoiseGit ==&lt;br /&gt;
&lt;br /&gt;
The notable difference to a simple download is that you need a special program to do it. Our version control system is Git, and we will use the [http://code.google.com/p/tortoisegit/ TortoiseGit] client. Follow that link and click &amp;quot;Download&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit.png|860px]]&lt;br /&gt;
&lt;br /&gt;
As the website tells you, the installation of TortoiseGit has two parts: TortoiseGit and msysGit. It also says that you should start with TortoiseGit, so let us get that installer first. Make sure to choose the right architecture for your version of Windows:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit2.png|860px]]&lt;br /&gt;
&lt;br /&gt;
And walk through the installation. Just selecting the default options should get you through alright.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;OpenClonk team members:&#039;&#039; If you want to use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] to push commits, make sure to select the appropriate option along the way. Do it again for the msysGit installation below.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit4.png]]&lt;br /&gt;
&lt;br /&gt;
Next, you need msysGit, which is what actually does all the work behind the scenes. Following the [http://code.google.com/p/msysgit/downloads/list?can=2&amp;amp;q=%22Full+installer+for+official+Git+for+Windows%22 &amp;quot;Full installer for official Git&amp;quot;] link will get you to another download page:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit3.png|860px]]&lt;br /&gt;
&lt;br /&gt;
This installation will ask even more confusing questions. But again default options won&#039;t cause anything to break, I would just recommend deactivating some GUI options, as TortoiseGit already offers them:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit5.png]]&lt;br /&gt;
&lt;br /&gt;
After a bit of waiting and (if you&#039;re lucky) not a single request to restart your computer, this should have given you a working TortoiseGit installation.&lt;br /&gt;
&lt;br /&gt;
== Clone ==&lt;br /&gt;
&lt;br /&gt;
Okay, now we are going to download the sources. Git calls this &amp;quot;cloning&amp;quot; because it&#039;s actually a lot more than just the sources you get. After you&#039;re done, you can check the [[Git Workflow]] page for how to work with your clone.&lt;br /&gt;
&lt;br /&gt;
For now, just find a place where you want the source to be, open the context menu by right-click and select &amp;quot;Git Clone...&amp;quot; from the TortoiseGit menu:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit6.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A dialog will appear asking for the repository URL and the destination path. In our case, we want the source to be the OpenClonk repository.  The URL you need is normally &amp;quot;git://git.openclonk.org/openclonk.git&amp;quot;.  Here&#039;s how it should look like:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;OpenClonk team members:&#039;&#039; Use &amp;quot;ssh://git@git.openclonk.org/openclonk.git&amp;quot; instead and activate the option to auto-load the PuTTY key for maximum convenience.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit_pub.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;OK&amp;quot;, TortoiseGit will work for a while. After watching a tortoise somersaulting for a while, it should finish. Congratulations, you now have the bleeding edge of OpenClonk development on your hard drive!&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_tgit_finish.png]]&lt;br /&gt;
&lt;br /&gt;
This a lot of stuff and most likely you won&#039;t understand much of it. Here&#039;s a quick orientation guide of the actually important bits:&lt;br /&gt;
* &amp;quot;docs&amp;quot; - the sources of our [http://docs.openclonk.org/en/sdk/ documentation]&lt;br /&gt;
* &amp;quot;planet&amp;quot; - these are the game resources - scripts, graphics and everything to explain how to make a game out of them&lt;br /&gt;
* &amp;quot;src&amp;quot; - all the source code of the game engine. Lots of C++ ahead.&lt;br /&gt;
&lt;br /&gt;
= Get it to Compile =&lt;br /&gt;
&lt;br /&gt;
This is nice, but we are interested in seeing the game run, aren&#039;t we? For this, we need a program that will take all those C++ files and make an executable file out of it. Unfortunately, programming is complicated stuff so even setting up the tools and the environment has become a bit of science. But this won&#039;t stop us.&lt;br /&gt;
&lt;br /&gt;
== Get Microsoft Visual Studio ==&lt;br /&gt;
&lt;br /&gt;
You can say what you want about Microsoft, but they sure make nice development environments. And they are even giving a lot of it away for free. We will use [http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express Visual Studio C++ 2012]. Follow that link, find the 2012 Express Edition &#039;&#039;&#039;for Windows Desktop&#039;&#039;&#039;, then download the [http://go.microsoft.com/?linkid=9816758 web installer]:&lt;br /&gt;
&lt;br /&gt;
[[File:msvc11_web_download.png|860px|Make extra sure you got the &amp;quot;Windows Desktop&amp;quot; variant.]]&lt;br /&gt;
&lt;br /&gt;
Run it, accept the licensing terms, click the big &amp;quot;Install&amp;quot; link and accept the UAC prompt.&lt;br /&gt;
&lt;br /&gt;
Then go make a coffee because the install will probably take a while. If the setup asks you to restart your computer, do so; it will continue when you log back in.&lt;br /&gt;
&lt;br /&gt;
== Get Dependencies ==&lt;br /&gt;
&lt;br /&gt;
Like most big programs, OpenClonk doesn&#039;t stand on its own. Some things (like opening PNG images) were already programmed by other programers far better than we could ever do. This is why we have to get a few so-called &amp;quot;libraries&amp;quot; before Clonk can be built.&lt;br /&gt;
&lt;br /&gt;
You could expend some effort try to find, download, and compile all those libraries by yourself, but that would take quite some time. Instead, just download one of the packages we&#039;ve provided for your convenience. If you&#039;re trying to build a 32-bit binary of OpenClonk or you don&#039;t really know what this is all about, use [http://www.nosebud.de/~nh/openclonk/openclonk-deps-vc110-i386.zip the x86 package]; for a 64-bit binary, use [http://www.nosebud.de/~nh/openclonk/openclonk-deps-vc110-amd64.zip the amd64 package]. Then unpack the .zip archive and put the &amp;quot;deps&amp;quot; folder into the directory where you also want your build files.&lt;br /&gt;
&lt;br /&gt;
== Get CMake ==&lt;br /&gt;
&lt;br /&gt;
Before all this becomes useful, we still need something that tells the compiler &#039;&#039;how&#039;&#039; all those sources and libraries should be compiled together.&lt;br /&gt;
&lt;br /&gt;
For this, Visual C++ needs a project file. But there is none - we have to consult &#039;&#039;another&#039;&#039; program to generate it for us. This might seem confusing - but the point is that there are a lot of build environments besides Visual Studio, and having all those project files next to each other would become a problem in the long run.&lt;br /&gt;
&lt;br /&gt;
What we need is [http://www.cmake.org/cmake/resources/software.html#latest CMake]. Follow that link and download the installer:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake1.png|860px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You know what to do.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the installation, start the CMake GUI from the start menu. Put the path you cloned the repository into the source code path field.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now click the &amp;quot;Configure&amp;quot; button in the lower left. It will ask what compiler we want to use. Select the compiler you want to use; either &amp;quot;Visual Studio 11&amp;quot; if you downloaded the 32-bit library package above, or &amp;quot;Visual Studio 11 Win64&amp;quot; if you got the 64-bit package.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_cmake4.png]]&lt;br /&gt;
&lt;br /&gt;
If you get some error messages (in red), you&#039;re probably missing some dependencies. Don&#039;t worry if cmake complains about some missing paths, it shouldn&#039;t affect you.&lt;br /&gt;
&lt;br /&gt;
The last step is to click the &amp;quot;Generate&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
== Your First Build ==&lt;br /&gt;
&lt;br /&gt;
Okay, now we have everything needed to make OpenClonk run for the first time. Go into the source directory and double-click on the &amp;quot;openclonk.sln&amp;quot; file that should now have appeared:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_build1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual C++ should open and look similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_build2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We only want to build the engine, so select &amp;quot;openclonk&amp;quot; from the list, right-click and select &amp;quot;Set as Start-Up project&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_build3.png]]&lt;br /&gt;
&lt;br /&gt;
Now press F5 (or, if you prefer, click the &amp;quot;Local Windows Debugger&amp;quot; button in the tool bar). Visual Studio will notice that you don&#039;t actually have a current compiled version of OpenClonk yet. Tell it to build one, and if you like also tell it to always just automatically build a new version using the check box.&lt;br /&gt;
&lt;br /&gt;
[[File:build_windows_outofdate.png]]&lt;br /&gt;
&lt;br /&gt;
If all goes well, after a couple of minutes you&#039;ll be looking at the OpenClonk main menu.&lt;br /&gt;
&lt;br /&gt;
[[File:Openclonk_first_start.jpg]]&lt;br /&gt;
&lt;br /&gt;
In case you are wondering why OpenClonk suddenly starts in some kind of pseudo windowed mode: This is because we just built a debug build (note the &amp;quot;dbg&amp;quot; after the version?). This build is a bit slower but allows you to get a better look at the internals of the engine while it&#039;s running. Maybe we&#039;ll have another article about that soon.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Help:Editing&amp;diff=1458</id>
		<title>Help:Editing</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Help:Editing&amp;diff=1458"/>
		<updated>2014-03-16T17:56:55Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Created page with &amp;quot;Use &amp;lt;nowiki&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/nowiki&amp;gt; for line break.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Use &amp;lt;nowiki&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/nowiki&amp;gt; for line break.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1456</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1456"/>
		<updated>2014-03-16T17:53:43Z</updated>

		<summary type="html">&lt;p&gt;Andriel: /* Exporting Meshes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are three main areas where artists can contribute: Modelling 3D objects and the texturing thereof, which requires different skills and doesn&#039;t need to be done by the same person. Most of our modellers use Blender, however which modeller you use is not important as long as it can export meshes to the OGRE format.&lt;br /&gt;
For creating scenario backgrounds, textures for models, scenario decoration and stuff, we actually need people who are good with Photoshop, GIMP or any other image manipulation software. &lt;br /&gt;
Also, we are in desperate need for people who are talented at creating sounds and/or music.&lt;br /&gt;
&lt;br /&gt;
Have a look in the [http://forum.openclonk.org/board_show.pl?bid=2 art workshop].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modelling ==&lt;br /&gt;
[[File:Foundry_mesh.png|200px|thumb|right|The mesh of the foundry]] We got rid of the old graphics from Clonk Rage which were so tiny that it was already hard to play the game in a proper resolution. (The character you control smaller than a mouse cursor? Come on!) For OpenClonk, the graphics are about three times as big and detailed as in the old Clonk series. &lt;br /&gt;
Unlike in previous clonk titles, most objects are actually models that are rendered in game. The file format we use for this is the [http://www.ogre3d.org/ OGRE] format as it is a format designed to be used in games plus all important modellers can export into this format. However, we do exchange of the models in their native format (mostly .blend).&lt;br /&gt;
&lt;br /&gt;
Now, for creating models that are to be rendered ingame (in OpenClonk), there are a few additional things that have to be considered if you are used to creating models that are rendered before the start of the game. Apart from the polygon count, for each model we only use one UV-mapped texture rather than zillion materials with different colors/googled textures. More guidelines on how to create a real time model for OpenClonk can be read here: [[Modelling Workflow]].&lt;br /&gt;
&lt;br /&gt;
You might ask yourself if there is a guideline of how many polygons a model should max have. Yes, there is one: So many, that the object looks both good ingame with a 3x zoom and on it&#039;s picture graphic (whichever is bigger). Also, unanimated inventory items like materials don&#039;t need to be rendered ingame. As sprites, the polygon count doesn&#039;t matter.&lt;br /&gt;
&lt;br /&gt;
Also, if you want to contribute a model, please always include the 3D-model when you attach a rendering of the same to your post. Otherwise, if you somehow lose your model, all the work was in vain. &lt;br /&gt;
&lt;br /&gt;
== Textures ==&lt;br /&gt;
[[File:Foundry_texture.png|200px|thumb|left|UV mapped texture of the foundry]]&lt;br /&gt;
[[File:Foundry_render.png|200px|thumb|right|Foundry with mesh and texture]]&lt;br /&gt;
We use the [http://creativecommons.org/licenses/by/3.0/ CC-by] licence for OpenClonk and ask you to license your contributions under the same license. As many textures in texture archives have licenses which are not compatible with CC-by, we will have to create many textures on our own. But don&#039;t worry, it&#039;s quite easy and there are some really good tutorials on how to create quality textures from photos.&lt;br /&gt;
&lt;br /&gt;
Here is a list of bigger texture archives and it&#039;s licenses which is a good source for resources: [[Texture Archives]]&lt;br /&gt;
&lt;br /&gt;
My experience is that textures for 3D-models which are based on actual photos always turn out better then textures which where painted by oneself.&lt;br /&gt;
&lt;br /&gt;
You might also ask yourself if there is a guideline of how big the texture for one 3D-model should be. Right: So big that it doesn&#039;t look blurred ingame with a 3x zoom and on it&#039;s picture graphic (whichever is bigger).&lt;br /&gt;
&lt;br /&gt;
For material textures, we need seamless textures. Regarding this, there are different methods to create seamless textures from (a set of) photos, here is how I do it: [[Tutorial: Creating Seamless Textures]].&lt;br /&gt;
For GIMP, there are two filters which can do this automatically: The plugin &#039;&#039;[http://gimp-texturize.sourceforge.net/ Texturize]&#039;&#039; and the filter &#039;&#039;Resynthesise&#039;&#039;. Both work good with textures with small random patterns like gravel, plaster, sand or ground. However, they don&#039;t produce quite as convincing results for bigger regular patterns like (roofing) tiles, bricks, wickerwork, pavements etc. The manual method that I proposed always produces better results and if you are experienced in this, it&#039;s a thing of five minutes.&lt;br /&gt;
&lt;br /&gt;
== Exporting Meshes ==&lt;br /&gt;
Exporting a model properly for OpenClonk can be a tricky process, but we&#039;ve compiled a step-by-step guide on how to do so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installing the Exporter Addon&#039;&#039;&#039;[[File:InstallingBlender2OgreAddon.png|200px|thumb|right|Enabling the addon.]]&lt;br /&gt;
Download the [http://code.google.com/p/blender2ogre/downloads/list blender2ogre exporter] for your version of Blender.&lt;br /&gt;
&lt;br /&gt;
*Put the downloaded file &#039;io_export_ogreDotScene.py&#039; into your [blender directory]/[version]/scripts/addons folder.&lt;br /&gt;
*Load up Blender, go to File&amp;gt;User Preferences&amp;gt;Addons&amp;gt;Import-Export and enable the &amp;quot;OGRE Exporter&amp;quot; addon. Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
You now have the exporter set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
(This is for objects without animations. For exporting animated objects, please refer to the [[NLA Hijacking]] guide and then continue at &amp;quot;Using the Exported Files&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To export the model, select it (in Object Mode) and go to File&amp;gt;Export&amp;gt;Ogre3D (.scene and .mesh).  &lt;br /&gt;
Models used for OpenClonk must be exported with specific options:&lt;br /&gt;
[[File:ExportSettingsStatic.png|450px|thumb|center|Use these settings for objects without animations.]]&lt;br /&gt;
After clicking &amp;quot;Export Ogre&amp;quot;, you will be sent back to the 3D View and a Mini-Report will pop up, showing information about the exported mesh and potential errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFilesNew.png|250px|thumb|right|Typical bunch of exported files before user modification.]]&lt;br /&gt;
After you have exported the mesh, some files will be created in the chosen directory. You have to convert the &#039; .mesh.xml&#039; file the exporter has created into the &#039; .mesh&#039; format, the format used by OpenClonk, using the OgreXmlConverter.&lt;br /&gt;
Follow these steps:&lt;br /&gt;
*Obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software], bundled inside the OGRE Command Line Tools package (look in &#039;See Also&#039; box for download).&lt;br /&gt;
*Extract the OGRE Command Line Tools somewhere easily accessible (ie: C:\OgreCommandLineTools).&lt;br /&gt;
*Drag&#039;n&#039;Drop the &#039; .mesh.xml&#039; file onto OgreXMLConverter.exe&lt;br /&gt;
*Delete the &#039; .mesh.xml&#039; file and the &#039; .log file&#039; which has been created.&lt;br /&gt;
*Make sure the &#039; .mesh&#039; file is named &#039;Graphics.mesh&#039; and the &#039; .material&#039; file is named &#039;Scene.material&#039;. &lt;br /&gt;
*Put &#039;Graphics.mesh&#039;, the &#039;Scene.material&#039; file, and any textures used by the mesh to your object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scene.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scene.material is the file which defines which materials to apply to meshes. Manually modifying Scene.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Scene.material file will look more or less like this (don&#039;t worry if it looks somewhat different):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
material MyCube&lt;br /&gt;
{&lt;br /&gt;
     receive_shadows on&lt;br /&gt;
     technique&lt;br /&gt;
     {&lt;br /&gt;
          pass&lt;br /&gt;
          {&lt;br /&gt;
               cull_hardware none&lt;br /&gt;
               scene_blend alpha_blend&lt;br /&gt;
&lt;br /&gt;
               ambient 1.0 1.0 1.0 1.0&lt;br /&gt;
               diffuse 1.0 1.0 1.0 1.0&lt;br /&gt;
               specular 0.0 0.0 0.0 0.0 12.5&lt;br /&gt;
               emissive 0.0 0.0 0.0 0.0&lt;br /&gt;
&lt;br /&gt;
               texture_unit&lt;br /&gt;
               {&lt;br /&gt;
                    texture MyCube.png&lt;br /&gt;
                    tex_address_mode wrap&lt;br /&gt;
                    filtering trilinear&lt;br /&gt;
               }&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
*If &#039;depth_write off&#039; exists, delete that line.&lt;br /&gt;
*If you are using alpha, make sure &#039;scene_blend alpha_blend&#039; exists (as shown above).&lt;br /&gt;
*If your mesh has visible backface(s), make sure to add &#039;cull_hardware none&#039; (as shown above).&lt;br /&gt;
*Depending on the method you used to define alpha in blender, the &#039;pass&#039; section in Scene.Material may look like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;pass&lt;br /&gt;
{&lt;br /&gt;
     ambient 0.500000 0.500000 0.500000 0.000000&lt;br /&gt;
     diffuse 0.640000 0.640000 0.640000 0.000000&lt;br /&gt;
     specular 0.500000 0.500000 0.500000 0.000000 12.500000&lt;br /&gt;
     emissive 0.000000 0.000000 0.000000 0.000000&lt;br /&gt;
     ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
If so, make sure the fourth parameter on ambient, diffuse, specular, and emissive is &#039;1.0&#039;, not &#039;0.000000&#039; (as shown in the &#039;material MyCube&#039; example).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By following these steps, you should be able to properly export models for OpenClonk. If you run into any problems, please leave a post on the [http://forum.openclonk.org/board_show.pl?bid=16 forum] addressing the issue. (You don&#039;t have to register to post there)&lt;br /&gt;
&lt;br /&gt;
== Sounds &amp;amp; Music ==&lt;br /&gt;
Any game is only half as good without proper sounds and music. If you played the titles of the old Clonk series, you will probably still suffer from the memories of the midi music from the last millenium, like &amp;quot;Pizza strings&amp;quot; or &amp;quot;On a razor blade&amp;quot;. Anyway. So we need both people who are good at creating, editing (and searching) sound effects and talented people who can make music for OpenClonk. &lt;br /&gt;
There are some sound archives out there which have CC-licensed sound effects, also it can&#039;t hurt to ask the authors of one of the many many mods for commercial games if we are allowed to use their sounds under the terms of a CC-license (preferably CC-by).&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Meshes_From_Blender_2.49b_(Old_Guide)&amp;diff=1450</id>
		<title>Exporting Meshes From Blender 2.49b (Old Guide)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Meshes_From_Blender_2.49b_(Old_Guide)&amp;diff=1450"/>
		<updated>2014-03-16T09:55:47Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;WARNING: This is an old article for an outdated version of Blender! Please refer to the  new article instead.&amp;#039;&amp;#039;&amp;#039;  ----  Exporting a mode...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;WARNING: This is an old article for an outdated version of Blender! Please refer to the [[Artists_Guide#Exporting_Meshes | new article]] instead.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Exporting a model properly for OpenClonk can be a tricky process, but we&#039;ve compiled a step-by-step guide on how to do so.&lt;br /&gt;
&lt;br /&gt;
Firstly, you&#039;ll need the proper tools. For [http://download.blender.org/release/Blender2.49b/ Blender 2.49b], you&#039;ll need the OGRE Exporter. Randrian has created an improved version of the OGRE Exporter which adds critical features necessary for animation blending. [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Download Link]&lt;br /&gt;
&lt;br /&gt;
*Extract the OGRE Exporter into your .blender/scripts/ folder.&lt;br /&gt;
*Install [http://www.python.org/download/releases/2.6.2/ Python 2.6.2]&lt;br /&gt;
*Obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software], bundled inside the OGRE Command Line Tools package (look in &#039;See Also&#039; box for download).&lt;br /&gt;
*Extract the OGRE Command Line Tools somewhere easily accessible (ie: C:\OgreCommandLineTools).&lt;br /&gt;
*Load up blender, and create a new window and set the window type to &#039;Scripts Window&#039;. Then click File&amp;gt;Export&amp;gt;OGRE Meshes to load the exporter GUI into that window.&lt;br /&gt;
*Hit the &#039;Preferences&#039; button in the OGRE GUI. Set the location of the OGRE XML Exporter to Manual, and link to the location of the OgreXmlConverter.exe.&lt;br /&gt;
*In the directory of your .blend file, create an empty Actions.txt file. More on this later.&lt;br /&gt;
By following these steps, you should be able to properly export models for OpenClonk. If you run into any problems, leave a post on the forum addressing the issue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Guidelines for Modelling&#039;&#039;&#039;&lt;br /&gt;
*Model on the Y/Z view-plane. Models in OpenClonk appear as they do on the Y/Z plane in blender. The X-Axis goes &#039;into&#039; the screen. Make sure you model with regard to these axes (The Y/Z plane is the default side view in Blender).&lt;br /&gt;
*Do not use Mesh Transformations. Mesh transformations are not handled properly by the OGRE exporter, and will cause deformation in game. If you have transformations applied to an existing model, you can remove them (select the model and press alt+g, alt+s, alt+r). Caution: Avoid animating before removing transformations!&lt;br /&gt;
*3D Model must be Three-Dimensional. The 3D mesh must have length on all axes. Making a perfectly flat object on only two axes will cause it to not appear in-game. To fix this, move a vertex so the mesh has length on all axes.&lt;br /&gt;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://www.cs.ucr.edu/~macchiea/cs134/lab1/ogrehelp/ogremeshesexporter.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039;[[File:OgreExporter.png|200px|thumb|right|The OGRE Exporter frame in Blender]]&lt;br /&gt;
To export the model, you&#039;ll need to have a window for the OGRE exporter in Blender. Make a new pane for scripts, and click &#039;File/Export/OGRE Meshes&#039;. Models used for OpenClonk must be exported with specific options.&lt;br /&gt;
*“Fix Up Axis to Y” should not be enabled.&lt;br /&gt;
*If you have the XML converter, make sure “OgreXMLConverter” is enabled.&lt;br /&gt;
*If you have already made manual modifications to the Scene.material file and are re-exporting the mesh and/or skeleton, make sure &#039;Export Materials&#039; is not enabled.&lt;br /&gt;
*&#039;Path:&#039; will be where the OGRE files are exported to. You can use a temporary directory and then copy them into your OpenClonk object definition, or you can export the OGRE files directly into the object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFiles.png|250px|thumb|right|Typical exported files before user modification.]]&lt;br /&gt;
Once you have exported the mesh, some files will be created in the chosen directory. Follow these steps:&lt;br /&gt;
*Make sure the “ .mesh” file is named “Graphics.mesh”. &lt;br /&gt;
*If you exported the OGRE files to a temporary directory, copy &#039;Graphics.mesh&#039;, the &#039; .skeleton&#039; file, the &#039;Scene.material&#039; file, and any textures used by the mesh to your object definition.&lt;br /&gt;
*If you have exported the OGRE files directly to your object definition, you can delete all .xml files and the .log file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scene.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scene.material is the file which defines which materials to apply to meshes. Manually modifying Scene.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Scene.material file will look more or less like this (don&#039;t worry if it looks somewhat different):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
material MyCube&lt;br /&gt;
{&lt;br /&gt;
     receive_shadows on&lt;br /&gt;
     technique&lt;br /&gt;
     {&lt;br /&gt;
          pass&lt;br /&gt;
          {&lt;br /&gt;
               cull_hardware none&lt;br /&gt;
               scene_blend alpha_blend&lt;br /&gt;
&lt;br /&gt;
               ambient 1.0 1.0 1.0 1.0&lt;br /&gt;
               diffuse 1.0 1.0 1.0 1.0&lt;br /&gt;
               specular 0.0 0.0 0.0 0.0 12.5&lt;br /&gt;
               emissive 0.0 0.0 0.0 0.0&lt;br /&gt;
&lt;br /&gt;
               texture_unit&lt;br /&gt;
               {&lt;br /&gt;
                    texture MyCube.png&lt;br /&gt;
                    tex_address_mode wrap&lt;br /&gt;
                    filtering trilinear&lt;br /&gt;
               }&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
*If &#039;depth_write off&#039; exists, delete that line.&lt;br /&gt;
*If you are using alpha, make sure &#039;scene_blend alpha_blend&#039; exists (as shown above).&lt;br /&gt;
*If your mesh has visible backface(s), make sure to add &#039;cull_hardware none&#039; (as shown above).&lt;br /&gt;
*Depending on the method you used to define alpha in blender, the &#039;pass&#039; section in Scene.Material may look like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;pass&lt;br /&gt;
{&lt;br /&gt;
     ambient 0.500000 0.500000 0.500000 0.000000&lt;br /&gt;
     diffuse 0.640000 0.640000 0.640000 0.000000&lt;br /&gt;
     specular 0.500000 0.500000 0.500000 0.000000 12.500000&lt;br /&gt;
     emissive 0.000000 0.000000 0.000000 0.000000&lt;br /&gt;
     ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
If so, make sure the fourth parameter on ambient, diffuse, specular, and emissive is &#039;1.00000&#039;, not &#039;0.000000&#039; (as shown in the &#039;material MyCube&#039; example).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Actions.txt&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This file controls what animations are exported, which frames of said animations, and which bones will be affected by the exported animations. Most often than not you will not need to use this functionality; your Actions.txt file could simply resemble this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;[Action]&lt;br /&gt;
Name=Open&lt;br /&gt;
&lt;br /&gt;
[Action]&lt;br /&gt;
Name=Close&lt;br /&gt;
&lt;br /&gt;
[End]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other tags available for an [Action] include &#039;Start=&#039;, &#039;End=&#039;, &#039;ExportName=&#039;, and &#039;Group=&#039;.&lt;br /&gt;
&lt;br /&gt;
Start and End will define the frames (in blender) that will be exported. ExportName will simply change the name of the Action on export (Useful if you have multiple versions of an animation but only need one exported).&lt;br /&gt;
&lt;br /&gt;
A group is a special filter used to stop bones from affecting the exported animation. For example, if we want an aiming animation to only affect the upper body, or a blinking animation to only affect the character&#039;s eyelids.&lt;br /&gt;
Groups can either use the &#039;Include=&#039; tag or &#039;Exclude=&#039; tag. &lt;br /&gt;
&lt;br /&gt;
As an example, a group which only affects the eyelids of the Clonk:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;[Group]&lt;br /&gt;
Name=Eyelids&lt;br /&gt;
Include=eye_lid.R&lt;br /&gt;
Include=eye_lid.L&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would make the exported animation only control the eye_lid.* bones and nothing else. Conversely, using the &#039;Exclude=&#039; tag makes the animation use every bone excluding those defined. As an example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
[Group]&lt;br /&gt;
Name=UpperBody&lt;br /&gt;
Exclude=skeleton_leg*&lt;br /&gt;
Exclude=skeleton_foot*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defining the group in an Action entry is fairly simple; just add the tag &#039;Group=&#039; and enter the group&#039;s name. For example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
[Action]&lt;br /&gt;
Name=CloseEyes&lt;br /&gt;
Group=Eyelids&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example of a finished Actions.txt file, [http://hg.openclonk.org/openclonk-resources/raw-file/9c271b749d31/models/Vehicles/catapult/Actions.txt this is the Catapult&#039;s].&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Modelling_Workflow&amp;diff=1449</id>
		<title>Modelling Workflow</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Modelling_Workflow&amp;diff=1449"/>
		<updated>2014-03-16T09:52:18Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this article, I explain our workflow of creating a model for OpenClonk at the example of the lorry originally created by Mimmo. Also, I list things that are important to consider when modelling for use in OpenClonk.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Modelling ==&lt;br /&gt;
*Model on the Y/Z view-plane. Models in OpenClonk appear as they do on the Y/Z plane in blender. The X-Axis goes &#039;into&#039; the screen. Make sure you model with regard to these axes (The Y/Z plane is the default side view in Blender).&lt;br /&gt;
*Do not use Mesh Transformations. Mesh transformations are not handled properly by the OGRE exporter, and will cause deformation in game. If you have transformations applied to an existing model, you can remove them (select the model and press alt+g, alt+s, alt+r). Caution: Avoid animating before removing transformations!&lt;br /&gt;
*3D Model must be Three-Dimensional. The 3D mesh must have length on all axes. Making a perfectly flat object on only two axes will cause it to not appear in-game. To fix this, move a vertex so the mesh has length on all axes.&lt;br /&gt;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://code.google.com/p/blender2ogre/#Blender_to_Ogre_Exporter_Features&lt;br /&gt;
&lt;br /&gt;
== Sketch ==&lt;br /&gt;
Every good modelling process starts with a sketch or some other image as a pattern. For the lorry, Mimmo used a picture from wikimedia commons.&lt;br /&gt;
&lt;br /&gt;
[[File:Kipplore.jpeg|300px]]&lt;br /&gt;
&lt;br /&gt;
== Low-Poly Model ==&lt;br /&gt;
This is the low-poly model of the lorry from Mimmo. If you plan to create both low- and high-poly models, always create the low-poly model first. I assume that you know how to model ;-)&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry.png|300px]]&lt;br /&gt;
&lt;br /&gt;
The guideline on how low-poly the model should be is: The model with texture still needs to look good when displayed 3x the size as in Clonk Rage - there is no fixed number on how many polygons are good since it depends strongly on the model. &lt;br /&gt;
&lt;br /&gt;
== Delete hidden faces ==&lt;br /&gt;
Details which can be displayed on the texture can be deleted. As you can see in the images, I deleted the bottom and top of the thing where the wheels are attached and replaced the top by a simpler geometry. This is actually all small shit and doesn&#039;t matter too much. You don&#039;t need to overdo this step as thanks to [http://en.wikipedia.org/wiki/Backface_culling#Backface_culling backface culling], faces that face away from the camera are not drawn anyway.&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry_bottom1.png|300px]]&lt;br /&gt;
[[File:Lorry_bottom2.png|280px]]&lt;br /&gt;
&lt;br /&gt;
The lorry here is just a simple example of this removing-the-polygons step because of&lt;br /&gt;
# geometric details in the texture that go into the texture rather than in the model&lt;br /&gt;
# polygons that are inside other objects and thus never visible or hidden from any view to the object&lt;br /&gt;
&lt;br /&gt;
When I first wrote this tutorial I suggested to delete the faces that face away from the camera. However, this is unecessary as noted above.&lt;br /&gt;
&lt;br /&gt;
== UV unwrap ==&lt;br /&gt;
After having created the final low-poly model, create a good and clear UV map. The quality of the texture map (, normal map etc) strongly depends on the quality of this work, do not underestimate this step. However, I assume that you know how to unwrap a model ([http://www.blender.org/documentation/htmlI/x5336.html Tutorial for Blender]).&lt;br /&gt;
However, here are a few tips that are especially valid for OpenClonk:&lt;br /&gt;
* Mark the seams preferably on the backside of the model. E.g. if there is a cylinder, mark the seam on the side that is not seen ingame. Then the texturer doesn&#039;t need to worry (so much) about tileability.&lt;br /&gt;
* Regions of the model which are connected in the model should be connected in the uv map too as long as the uv mapping doesn&#039;t distort the whole thing (too much).&lt;br /&gt;
* Try to arrange the uv regions in a way that regions in the model which are upright are upright and not distorted in the uv map too. This helps the texturer a lot when he want to apply textures with a regular pattern like bricks.&lt;br /&gt;
* You can map faces that should look the same - like for example each of the 4 front wheels of the lorry - to the same position in the UV map.&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry_uv1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t plan to texture your model right away by yourself, be so kind and create and label a uv-map template and save it as an image. This helps the person who does the texturing work big deal; because the work of the texturing can be done (better) by 2D-artists and doesn&#039;t have to be up to the person who did the modelling.&lt;br /&gt;
Depending on the actual size of the model ingame, you can save the UV map template in different sizes. For the lorry, I chose 256x256 because it is a very tiny model.&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry_uv2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Texturing ==&lt;br /&gt;
As the model and texture for the lorry is already completed, I can show it to you here:&lt;br /&gt;
&lt;br /&gt;
[[File:lorry_render.png|256px]]&lt;br /&gt;
[[File:lorry_tex.png|256px]]&lt;br /&gt;
[[File:lorry_uv.png|256px]]&lt;br /&gt;
&lt;br /&gt;
Note that PNG textures can contain alpha. This is how transparency (imagine leaves on trees) is realized in OpenClonk.&lt;br /&gt;
&lt;br /&gt;
== Animation and normal maps ==&lt;br /&gt;
After you created a UV map, you can add the animations if there are any. Additionally, if the model is egible for having a normal map, you can create a high-poly model of the lorry where you actually do model even the little geometric details. But keep in mind, to be able to bake a normal map with a high-poly model, the high- and low-poly model must have the same geometry ([http://blenderartists.org/forum/showthread.php?t=138194 Tutorial for Blender]). In Blender, there is a option called &amp;quot;multires&amp;quot; which allows you to create several models in different detail levels based on one low-poly model and it&#039;s geometry.&lt;br /&gt;
&lt;br /&gt;
So when is a model egible of having a normal map. First there is to say that at this point of development we can not even say if we will be able to use normal maps. In general, creating normal maps for models only makes sense for those which have organic, round parts where too many polygons would need to be used. So, for blocky buildings it&#039;s normally not necessary - more for living creatures with one ([http://www.blender.org/development/release-logs/blender-246/render-baking/ Blender: example]) enclosing mesh.&lt;br /&gt;
&lt;br /&gt;
Here is also a free to use tool with which easily all kinds of maps can be created: [http://www.crazybump.com/ CrazyBump]&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1448</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1448"/>
		<updated>2014-03-16T09:51:33Z</updated>

		<summary type="html">&lt;p&gt;Andriel: /* Exporting Meshes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are three main areas where artists can contribute: Modelling 3D objects and the texturing thereof, which requires different skills and doesn&#039;t need to be done by the same person. Most of our modellers use Blender, however which modeller you use is not important as long as it can export meshes to the OGRE format.&lt;br /&gt;
For creating scenario backgrounds, textures for models, scenario decoration and stuff, we actually need people who are good with Photoshop, GIMP or any other image manipulation software. &lt;br /&gt;
Also, we are in desperate need for people who are talented at creating sounds and/or music.&lt;br /&gt;
&lt;br /&gt;
Have a look in the [http://forum.openclonk.org/board_show.pl?bid=2 art workshop].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modelling ==&lt;br /&gt;
[[File:Foundry_mesh.png|200px|thumb|right|The mesh of the foundry]] We got rid of the old graphics from Clonk Rage which were so tiny that it was already hard to play the game in a proper resolution. (The character you control smaller than a mouse cursor? Come on!) For OpenClonk, the graphics are about three times as big and detailed as in the old Clonk series. &lt;br /&gt;
Unlike in previous clonk titles, most objects are actually models that are rendered in game. The file format we use for this is the [http://www.ogre3d.org/ OGRE] format as it is a format designed to be used in games plus all important modellers can export into this format. However, we do exchange of the models in their native format (mostly .blend).&lt;br /&gt;
&lt;br /&gt;
Now, for creating models that are to be rendered ingame (in OpenClonk), there are a few additional things that have to be considered if you are used to creating models that are rendered before the start of the game. Apart from the polygon count, for each model we only use one UV-mapped texture rather than zillion materials with different colors/googled textures. More guidelines on how to create a real time model for OpenClonk can be read here: [[Modelling Workflow]].&lt;br /&gt;
&lt;br /&gt;
You might ask yourself if there is a guideline of how many polygons a model should max have. Yes, there is one: So many, that the object looks both good ingame with a 3x zoom and on it&#039;s picture graphic (whichever is bigger). Also, unanimated inventory items like materials don&#039;t need to be rendered ingame. As sprites, the polygon count doesn&#039;t matter.&lt;br /&gt;
&lt;br /&gt;
Also, if you want to contribute a model, please always include the 3D-model when you attach a rendering of the same to your post. Otherwise, if you somehow lose your model, all the work was in vain. &lt;br /&gt;
&lt;br /&gt;
== Textures ==&lt;br /&gt;
[[File:Foundry_texture.png|200px|thumb|left|UV mapped texture of the foundry]]&lt;br /&gt;
[[File:Foundry_render.png|200px|thumb|right|Foundry with mesh and texture]]&lt;br /&gt;
We use the [http://creativecommons.org/licenses/by/3.0/ CC-by] licence for OpenClonk and ask you to license your contributions under the same license. As many textures in texture archives have licenses which are not compatible with CC-by, we will have to create many textures on our own. But don&#039;t worry, it&#039;s quite easy and there are some really good tutorials on how to create quality textures from photos.&lt;br /&gt;
&lt;br /&gt;
Here is a list of bigger texture archives and it&#039;s licenses which is a good source for resources: [[Texture Archives]]&lt;br /&gt;
&lt;br /&gt;
My experience is that textures for 3D-models which are based on actual photos always turn out better then textures which where painted by oneself.&lt;br /&gt;
&lt;br /&gt;
You might also ask yourself if there is a guideline of how big the texture for one 3D-model should be. Right: So big that it doesn&#039;t look blurred ingame with a 3x zoom and on it&#039;s picture graphic (whichever is bigger).&lt;br /&gt;
&lt;br /&gt;
For material textures, we need seamless textures. Regarding this, there are different methods to create seamless textures from (a set of) photos, here is how I do it: [[Tutorial: Creating Seamless Textures]].&lt;br /&gt;
For GIMP, there are two filters which can do this automatically: The plugin &#039;&#039;[http://gimp-texturize.sourceforge.net/ Texturize]&#039;&#039; and the filter &#039;&#039;Resynthesise&#039;&#039;. Both work good with textures with small random patterns like gravel, plaster, sand or ground. However, they don&#039;t produce quite as convincing results for bigger regular patterns like (roofing) tiles, bricks, wickerwork, pavements etc. The manual method that I proposed always produces better results and if you are experienced in this, it&#039;s a thing of five minutes.&lt;br /&gt;
&lt;br /&gt;
== Exporting Meshes ==&lt;br /&gt;
Exporting a model properly for OpenClonk can be a tricky process, but we&#039;ve compiled a step-by-step guide on how to do so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installing the Exporter Addon&#039;&#039;&#039;[[File:InstallingBlender2OgreAddon.png|200px|thumb|right|Enabling the addon.]]&lt;br /&gt;
Download the [http://code.google.com/p/blender2ogre/downloads/list blender2ogre exporter] for your version of Blender.&lt;br /&gt;
&lt;br /&gt;
*Put the downloaded file &#039;io_export_ogreDotScene.py&#039; into your [blender directory]/[version]/scripts/addons folder.&lt;br /&gt;
*Load up Blender, go to File&amp;gt;User Preferences&amp;gt;Addons&amp;gt;Import-Export and enable the &amp;quot;OGRE Exporter&amp;quot; addon. Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
You now have the exporter set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
To export the model, select it (in Object Mode) and go to File&amp;gt;Export&amp;gt;Ogre3D(.scene and .mesh).  &lt;br /&gt;
Models used for OpenClonk must be exported with specific options:&lt;br /&gt;
[[File:ExportSettingsStatic.png|450px|thumb|center|Use these settings for objects without animations.]]&lt;br /&gt;
After clicking &amp;quot;Export Ogre&amp;quot;, you will be sent back to the 3D View and a Mini-Report will pop up, showing information about the exported mesh and potential errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFilesNew.png|250px|thumb|right|Typical bunch of exported files before user modification.]]&lt;br /&gt;
After you have exported the mesh, some files will be created in the chosen directory. You have to convert the &#039; .mesh.xml&#039; file the exporter has created into the &#039; .mesh&#039; format, the format used by OpenClonk, using the OgreXmlConverter.&lt;br /&gt;
Follow these steps:&lt;br /&gt;
*Obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software], bundled inside the OGRE Command Line Tools package (look in &#039;See Also&#039; box for download).&lt;br /&gt;
*Extract the OGRE Command Line Tools somewhere easily accessible (ie: C:\OgreCommandLineTools).&lt;br /&gt;
*Drag&#039;n&#039;Drop the &#039; .mesh.xml&#039; file onto OgreXMLConverter.exe&lt;br /&gt;
*Delete the &#039; .mesh.xml&#039; file and the &#039; .log file&#039; which has been created.&lt;br /&gt;
*Make sure the &#039; .mesh&#039; file is named &#039;Graphics.mesh&#039; and the &#039; .material&#039; file is named &#039;Scene.material&#039;. &lt;br /&gt;
*Put &#039;Graphics.mesh&#039;, the &#039;Scene.material&#039; file, and any textures used by the mesh to your object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scene.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scene.material is the file which defines which materials to apply to meshes. Manually modifying Scene.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Scene.material file will look more or less like this (don&#039;t worry if it looks somewhat different):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
material MyCube&lt;br /&gt;
{&lt;br /&gt;
     receive_shadows on&lt;br /&gt;
     technique&lt;br /&gt;
     {&lt;br /&gt;
          pass&lt;br /&gt;
          {&lt;br /&gt;
               cull_hardware none&lt;br /&gt;
               scene_blend alpha_blend&lt;br /&gt;
&lt;br /&gt;
               ambient 1.0 1.0 1.0 1.0&lt;br /&gt;
               diffuse 1.0 1.0 1.0 1.0&lt;br /&gt;
               specular 0.0 0.0 0.0 0.0 12.5&lt;br /&gt;
               emissive 0.0 0.0 0.0 0.0&lt;br /&gt;
&lt;br /&gt;
               texture_unit&lt;br /&gt;
               {&lt;br /&gt;
                    texture MyCube.png&lt;br /&gt;
                    tex_address_mode wrap&lt;br /&gt;
                    filtering trilinear&lt;br /&gt;
               }&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
*If &#039;depth_write off&#039; exists, delete that line.&lt;br /&gt;
*If you are using alpha, make sure &#039;scene_blend alpha_blend&#039; exists (as shown above).&lt;br /&gt;
*If your mesh has visible backface(s), make sure to add &#039;cull_hardware none&#039; (as shown above).&lt;br /&gt;
*Depending on the method you used to define alpha in blender, the &#039;pass&#039; section in Scene.Material may look like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;pass&lt;br /&gt;
{&lt;br /&gt;
     ambient 0.500000 0.500000 0.500000 0.000000&lt;br /&gt;
     diffuse 0.640000 0.640000 0.640000 0.000000&lt;br /&gt;
     specular 0.500000 0.500000 0.500000 0.000000 12.500000&lt;br /&gt;
     emissive 0.000000 0.000000 0.000000 0.000000&lt;br /&gt;
     ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
If so, make sure the fourth parameter on ambient, diffuse, specular, and emissive is &#039;1.0&#039;, not &#039;0.000000&#039; (as shown in the &#039;material MyCube&#039; example).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By following these steps, you should be able to properly export models for OpenClonk. If you run into any problems, leave a post on the forum addressing the issue.&lt;br /&gt;
&lt;br /&gt;
== Sounds &amp;amp; Music ==&lt;br /&gt;
Any game is only half as good without proper sounds and music. If you played the titles of the old Clonk series, you will probably still suffer from the memories of the midi music from the last millenium, like &amp;quot;Pizza strings&amp;quot; or &amp;quot;On a razor blade&amp;quot;. Anyway. So we need both people who are good at creating, editing (and searching) sound effects and talented people who can make music for OpenClonk. &lt;br /&gt;
There are some sound archives out there which have CC-licensed sound effects, also it can&#039;t hurt to ask the authors of one of the many many mods for commercial games if we are allowed to use their sounds under the terms of a CC-license (preferably CC-by).&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Modelling_Workflow&amp;diff=1447</id>
		<title>Modelling Workflow</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Modelling_Workflow&amp;diff=1447"/>
		<updated>2014-03-16T09:45:53Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this article, I explain our workflow of creating a model for open clonk at the example of the lorry originally created by Mimmo. Also, I list things that are important to consider when modelling for use in OpenClonk.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Modelling ==&lt;br /&gt;
*Model on the Y/Z view-plane. Models in OpenClonk appear as they do on the Y/Z plane in blender. The X-Axis goes &#039;into&#039; the screen. Make sure you model with regard to these axes (The Y/Z plane is the default side view in Blender).&lt;br /&gt;
*Do not use Mesh Transformations. Mesh transformations are not handled properly by the OGRE exporter, and will cause deformation in game. If you have transformations applied to an existing model, you can remove them (select the model and press alt+g, alt+s, alt+r). Caution: Avoid animating before removing transformations!&lt;br /&gt;
*3D Model must be Three-Dimensional. The 3D mesh must have length on all axes. Making a perfectly flat object on only two axes will cause it to not appear in-game. To fix this, move a vertex so the mesh has length on all axes.&lt;br /&gt;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://code.google.com/p/blender2ogre/#Blender_to_Ogre_Exporter_Features&lt;br /&gt;
&lt;br /&gt;
== Sketch ==&lt;br /&gt;
Every good modelling process starts with a sketch or some other image as a pattern. For the lorry, Mimmo used a picture from wikimedia commons.&lt;br /&gt;
&lt;br /&gt;
[[File:Kipplore.jpeg|300px]]&lt;br /&gt;
&lt;br /&gt;
== Low-Poly Model ==&lt;br /&gt;
This is the low-poly model of the lorry from Mimmo. If you plan to create both low- and high-poly models, always create the low-poly model first. I assume that you know how to model ;-)&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry.png|300px]]&lt;br /&gt;
&lt;br /&gt;
The guideline on how low-poly the model should be is: The model with texture still needs to look good when displayed 3x the size as in Clonk Rage - there is no fixed number on how many polygons are good since it depends strongly on the model. &lt;br /&gt;
&lt;br /&gt;
== Delete hidden faces ==&lt;br /&gt;
Details which can be displayed on the texture can be deleted. As you can see in the images, I deleted the bottom and top of the thing where the wheels are attached and replaced the top by a simpler geometry. This is actually all small shit and doesn&#039;t matter too much. You don&#039;t need to overdo this step as thanks to [http://en.wikipedia.org/wiki/Backface_culling#Backface_culling backface culling], faces that face away from the camera are not drawn anyway.&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry_bottom1.png|300px]]&lt;br /&gt;
[[File:Lorry_bottom2.png|280px]]&lt;br /&gt;
&lt;br /&gt;
The lorry here is just a simple example of this removing-the-polygons step because of&lt;br /&gt;
# geometric details in the texture that go into the texture rather than in the model&lt;br /&gt;
# polygons that are inside other objects and thus never visible or hidden from any view to the object&lt;br /&gt;
&lt;br /&gt;
When I first wrote this tutorial I suggested to delete the faces that face away from the camera. However, this is unecessary as noted above.&lt;br /&gt;
&lt;br /&gt;
== UV unwrap ==&lt;br /&gt;
After having created the final low-poly model, create a good and clear UV map. The quality of the texture map (, normal map etc) strongly depends on the quality of this work, do not underestimate this step. However, I assume that you know how to unwrap a model ([http://www.blender.org/documentation/htmlI/x5336.html Tutorial for Blender]).&lt;br /&gt;
However, here are a few tips that are especially valid for OpenClonk:&lt;br /&gt;
* Mark the seams preferably on the backside of the model. E.g. if there is a cylinder, mark the seam on the side that is not seen ingame. Then the texturer doesn&#039;t need to worry (so much) about tileability.&lt;br /&gt;
* Regions of the model which are connected in the model should be connected in the uv map too as long as the uv mapping doesn&#039;t distort the whole thing (too much).&lt;br /&gt;
* Try to arrange the uv regions in a way that regions in the model which are upright are upright and not distorted in the uv map too. This helps the texturer a lot when he want to apply textures with a regular pattern like bricks.&lt;br /&gt;
* You can map faces that should look the same - like for example each of the 4 front wheels of the lorry - to the same position in the UV map.&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry_uv1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t plan to texture your model right away by yourself, be so kind and create and label a uv-map template and save it as an image. This helps the person who does the texturing work big deal; because the work of the texturing can be done (better) by 2D-artists and doesn&#039;t have to be up to the person who did the modelling.&lt;br /&gt;
Depending on the actual size of the model ingame, you can save the UV map template in different sizes. For the lorry, I chose 256x256 because it is a very tiny model.&lt;br /&gt;
&lt;br /&gt;
[[File:Lorry_uv2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Texturing ==&lt;br /&gt;
As the model and texture for the lorry is already completed, I can show it to you here:&lt;br /&gt;
&lt;br /&gt;
[[File:lorry_render.png|256px]]&lt;br /&gt;
[[File:lorry_tex.png|256px]]&lt;br /&gt;
[[File:lorry_uv.png|256px]]&lt;br /&gt;
&lt;br /&gt;
Note that PNG textures can contain alpha. This is how transparency (imagine leaves on trees) is realized in OpenClonk.&lt;br /&gt;
&lt;br /&gt;
== Animation and normal maps ==&lt;br /&gt;
After you created a UV map, you can add the animations if there are any. Additionally, if the model is egible for having a normal map, you can create a high-poly model of the lorry where you actually do model even the little geometric details. But keep in mind, to be able to bake a normal map with a high-poly model, the high- and low-poly model must have the same geometry ([http://blenderartists.org/forum/showthread.php?t=138194 Tutorial for Blender]). In Blender, there is a option called &amp;quot;multires&amp;quot; which allows you to create several models in different detail levels based on one low-poly model and it&#039;s geometry.&lt;br /&gt;
&lt;br /&gt;
So when is a model egible of having a normal map. First there is to say that at this point of development we can not even say if we will be able to use normal maps. In general, creating normal maps for models only makes sense for those which have organic, round parts where too many polygons would need to be used. So, for blocky buildings it&#039;s normally not necessary - more for living creatures with one ([http://www.blender.org/development/release-logs/blender-246/render-baking/ Blender: example]) enclosing mesh.&lt;br /&gt;
&lt;br /&gt;
Here is also a free to use tool with which easily all kinds of maps can be created: [http://www.crazybump.com/ CrazyBump]&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ExportedFilesNew.png&amp;diff=1446</id>
		<title>File:ExportedFilesNew.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ExportedFilesNew.png&amp;diff=1446"/>
		<updated>2014-03-16T09:20:29Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Typical bunch of exported files before user modification.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical bunch of exported files before user modification.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ExportedFiles.png&amp;diff=1445</id>
		<title>File:ExportedFiles.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ExportedFiles.png&amp;diff=1445"/>
		<updated>2014-03-16T09:19:36Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Andriel uploaded a new version of &amp;amp;quot;File:ExportedFiles.png&amp;amp;quot;: Reverted to version as of 02:11, 6 October 2010&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical bunch of exported files before user modification.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ExportedFiles.png&amp;diff=1444</id>
		<title>File:ExportedFiles.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ExportedFiles.png&amp;diff=1444"/>
		<updated>2014-03-16T09:18:24Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Andriel uploaded a new version of &amp;amp;quot;File:ExportedFiles.png&amp;amp;quot;: Typical bunch of exported files before user modification.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical bunch of exported files before user modification.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ExportSettingsStatic.png&amp;diff=1443</id>
		<title>File:ExportSettingsStatic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ExportSettingsStatic.png&amp;diff=1443"/>
		<updated>2014-03-16T08:59:54Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Andriel uploaded a new version of &amp;amp;quot;File:ExportSettingsStatic.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Use these settings for objects without animations.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ExportSettingsStatic.png&amp;diff=1442</id>
		<title>File:ExportSettingsStatic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ExportSettingsStatic.png&amp;diff=1442"/>
		<updated>2014-03-16T08:22:26Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Use these settings for objects without animations.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Use these settings for objects without animations.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:InstallingBlender2OgreAddon.png&amp;diff=1441</id>
		<title>File:InstallingBlender2OgreAddon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:InstallingBlender2OgreAddon.png&amp;diff=1441"/>
		<updated>2014-03-16T08:05:14Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Enabling the addon.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Enabling the addon.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1382</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1382"/>
		<updated>2013-09-02T14:59:11Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script.&amp;lt;br&amp;gt; &#039;&#039;Script? But I have no idea of programming! :(&#039;&#039;&amp;lt;br&amp;gt; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy-to-learn scripting language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL ScriptInitial.png]]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword &#039;&#039;func&#039;&#039;) called &#039;&#039;Initialize&#039;&#039;. Everything between the curly brackets is executed when the function is called. (More about [http://docs.openclonk.org/en/sdk/script/Funcs.html &#039;&#039;&#039;functions&#039;&#039;&#039;]). It calls the function &#039;&#039;CreateEnvironment&#039;&#039; which is declared below and is empty as you can see in the screenshot. Delete both the call &#039;&#039;CreateEnvironment();&#039;&#039; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
= Goals =&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL SettlmentGoals.png]]&lt;br /&gt;
&lt;br /&gt;
==Wealth==&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
==Resource Extraction==&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: &#039;&#039;SetRessource(&amp;quot;Granite&amp;quot;);&#039;&#039; or &#039;&#039;SetRessource(&amp;quot;Gold&amp;quot;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Expansion==&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be &#039;&#039;SetExpansionGoal(500);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rules =&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CreateObject(XYXY, 0, 0, NO_OWNER);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says &#039;&#039;id=XYXY&#039;&#039;, that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL GoalsAndRules.png]]&lt;br /&gt;
&lt;br /&gt;
= Start Position and Equipment =&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
==Preparations==&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [http://docs.openclonk.org/en/sdk/script/for.html &#039;&#039;&#039;for loop&#039;&#039;&#039;], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
==Start Position==&lt;br /&gt;
&#039;&#039;&#039;Note: If you want the player to spawn at a random position, you can leave this out.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;clonk -&amp;gt; SetPosition(X, Y);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html &#039;&#039;&#039;CreateContents&#039;&#039;&#039;]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [http://docs.openclonk.org/en/sdk/script/fn/if.html#if &#039;&#039;&#039;if condition&#039;&#039;&#039;] and &#039;&#039;else&#039;&#039;!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable &#039;&#039;index&#039;&#039; from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL GiveContents.png]]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
==View Range==&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html &#039;&#039;&#039;SetPlayerZoomByViewRange&#039;&#039;&#039;] and [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html &#039;&#039;&#039;SetPlayerViewLock&#039;&#039;&#039;].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The data type &#039;&#039;nil&#039;&#039; can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerViewLock(plr, true);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addendum - Components of .ocs files =&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1381</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1381"/>
		<updated>2013-09-02T14:57:12Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Added a few images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script.&amp;lt;br&amp;gt; &#039;&#039;Script? But I have no idea of programming! :(&#039;&#039;&amp;lt;br&amp;gt; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy-to-learn scripting language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL ScriptInitial.png]]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword &#039;&#039;func&#039;&#039;) called &#039;&#039;Initialize&#039;&#039;. Everything between the curly brackets is executed when the function is called. (More about [http://docs.openclonk.org/en/sdk/script/Funcs.html &#039;&#039;&#039;functions&#039;&#039;&#039;]). It calls the function &#039;&#039;CreateEnvironment&#039;&#039; which is declared below and is empty as you can see in the screenshot. Delete both the call &#039;&#039;CreateEnvironment();&#039;&#039; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
= Goals =&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL SettlmentGoals.png]]&lt;br /&gt;
&lt;br /&gt;
==Wealth==&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
==Resource Extraction==&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: &#039;&#039;SetRessource(&amp;quot;Granite&amp;quot;);&#039;&#039; or &#039;&#039;SetRessource(&amp;quot;Gold&amp;quot;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Expansion==&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be &#039;&#039;SetExpansionGoal(500);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rules =&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CreateObject(XYXY, 0, 0, NO_OWNER);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says &#039;&#039;id=XYXY&#039;&#039;, that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL GoalsAndRules.png]]&lt;br /&gt;
&lt;br /&gt;
= Start Position and Equipment =&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
==Preparations==&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [http://docs.openclonk.org/en/sdk/script/for.html &#039;&#039;&#039;for loop&#039;&#039;&#039;], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
==Start Position==&lt;br /&gt;
&#039;&#039;&#039;Note: If you want the player to spawn at a random position, you can leave this out.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;clonk -&amp;gt; SetPosition(X, Y);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html &#039;&#039;&#039;CreateContents&#039;&#039;&#039;]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [http://docs.openclonk.org/en/sdk/script/fn/if.html#if &#039;&#039;&#039;if condition&#039;&#039;&#039;] and &#039;&#039;else&#039;&#039;!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable &#039;&#039;index&#039;&#039; from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL GiveContents.png]]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
==View Range==&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html &#039;&#039;&#039;SetPlayerZoomByViewRange&#039;&#039;&#039;] and [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html SetPlayerViewLock&#039;&#039;&#039;].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The data type &#039;&#039;nil&#039;&#039; can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerViewLock(plr, true);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addendum - Components of .ocs files =&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_GiveContents.png&amp;diff=1380</id>
		<title>File:TUT-SCEN-SETL GiveContents.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_GiveContents.png&amp;diff=1380"/>
		<updated>2013-09-02T14:56:26Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_GoalsAndRules.png&amp;diff=1379</id>
		<title>File:TUT-SCEN-SETL GoalsAndRules.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_GoalsAndRules.png&amp;diff=1379"/>
		<updated>2013-09-02T14:53:59Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_SettlmentGoals.png&amp;diff=1378</id>
		<title>File:TUT-SCEN-SETL SettlmentGoals.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_SettlmentGoals.png&amp;diff=1378"/>
		<updated>2013-09-02T14:51:57Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1377</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1377"/>
		<updated>2013-09-02T14:44:48Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script.&amp;lt;br&amp;gt; &#039;&#039;Script? But I have no idea of programming! :(&#039;&#039;&amp;lt;br&amp;gt; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy-to-learn scripting language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL ScriptInitial.png]]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword &#039;&#039;func&#039;&#039;) called &#039;&#039;Initialize&#039;&#039;. Everything between the curly brackets is executed when the function is called. (More about [http://docs.openclonk.org/en/sdk/script/Funcs.html &#039;&#039;&#039;functions&#039;&#039;&#039;]). It calls the function &#039;&#039;CreateEnvironment&#039;&#039; which is declared below and is empty as you can see in the screenshot. Delete both the call &#039;&#039;CreateEnvironment();&#039;&#039; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
= Goals =&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[img]http://img689.imageshack.us/img689/8895/vvgj.png[/img]&lt;br /&gt;
&lt;br /&gt;
==Wealth==&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
==Resource Extraction==&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: &#039;&#039;SetRessource(&amp;quot;Granite&amp;quot;);&#039;&#039; or &#039;&#039;SetRessource(&amp;quot;Gold&amp;quot;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Expansion==&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be &#039;&#039;SetExpansionGoal(500);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rules =&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CreateObject(XYXY, 0, 0, NO_OWNER);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says &#039;&#039;id=XYXY&#039;&#039;, that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[img]http://img534.imageshack.us/img534/2552/hzn.png[/img]&lt;br /&gt;
&lt;br /&gt;
= Start Position and Equipment =&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
==Preparations==&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [http://docs.openclonk.org/en/sdk/script/for.html &#039;&#039;&#039;for loop&#039;&#039;&#039;], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
==Start Position==&lt;br /&gt;
&#039;&#039;&#039;Note: If you want the player to spawn at a random position, you can leave this out.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;clonk -&amp;gt; SetPosition(X, Y);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html &#039;&#039;&#039;CreateContents&#039;&#039;&#039;]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [http://docs.openclonk.org/en/sdk/script/fn/if.html#if &#039;&#039;&#039;if condition&#039;&#039;&#039;] and &#039;&#039;else&#039;&#039;!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable &#039;&#039;index&#039;&#039; from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[img]http://img854.imageshack.us/img854/6408/n40b.png[/img]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
==View Range==&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html &#039;&#039;&#039;SetPlayerZoomByViewRange&#039;&#039;&#039;] and [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html SetPlayerViewLock&#039;&#039;&#039;].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The data type &#039;&#039;nil&#039;&#039; can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerViewLock(plr, true);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addendum - Components of .ocs files =&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1376</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1376"/>
		<updated>2013-09-02T14:43:43Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script.&amp;lt;br&amp;gt; &#039;&#039;Script? But I have no idea of programming! :(&#039;&#039;&amp;lt;br&amp;gt; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy-to-learn scripting language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:TUT-SCEN-SETL ScriptInitial.png]]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword &#039;&#039;func&#039;&#039;) called &#039;&#039;Initialize&#039;&#039;. Everything between the curly brackets is executed when the function is called. (More about [http://docs.openclonk.org/en/sdk/script/Funcs.html &#039;&#039;&#039;functions&#039;&#039;&#039;]). It calls the function &#039;&#039;CreateEnvironment&#039;&#039; which is declared below and is empty as you can see in the screenshot. Delete both the call &#039;&#039;CreateEnvironment();&#039;&#039; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
= Goals =&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[img]http://img689.imageshack.us/img689/8895/vvgj.png[/img]&lt;br /&gt;
&lt;br /&gt;
==Wealth==&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code c4script&amp;gt;var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);&amp;lt;/code c4script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
==Resource Extraction==&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: &#039;&#039;SetRessource(&amp;quot;Granite&amp;quot;);&#039;&#039; or &#039;&#039;SetRessource(&amp;quot;Gold&amp;quot;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Expansion==&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be &#039;&#039;SetExpansionGoal(500);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rules =&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CreateObject(XYXY, 0, 0, NO_OWNER);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says &#039;&#039;id=XYXY&#039;&#039;, that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[img]http://img534.imageshack.us/img534/2552/hzn.png[/img]&lt;br /&gt;
&lt;br /&gt;
= Start Position and Equipment =&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
==Preparations==&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [http://docs.openclonk.org/en/sdk/script/for.html &#039;&#039;&#039;for loop&#039;&#039;&#039;], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
==Start Position==&lt;br /&gt;
&#039;&#039;&#039;Note: If you want the player to spawn at a random position, you can leave this out.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;clonk -&amp;gt; SetPosition(X, Y);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html &#039;&#039;&#039;CreateContents&#039;&#039;&#039;]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [http://docs.openclonk.org/en/sdk/script/fn/if.html#if &#039;&#039;&#039;if condition&#039;&#039;&#039;] and &#039;&#039;else&#039;&#039;!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable &#039;&#039;index&#039;&#039; from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[img]http://img854.imageshack.us/img854/6408/n40b.png[/img]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
==View Range==&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html &#039;&#039;&#039;SetPlayerZoomByViewRange&#039;&#039;&#039;] and [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html SetPlayerViewLock&#039;&#039;&#039;].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The data type &#039;&#039;nil&#039;&#039; can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerViewLock(plr, true);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addendum - Components of .ocs files =&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_ScriptInitial.png&amp;diff=1375</id>
		<title>File:TUT-SCEN-SETL ScriptInitial.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN-SETL_ScriptInitial.png&amp;diff=1375"/>
		<updated>2013-09-02T14:40:27Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1374</id>
		<title>Tutorial: Scenario Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1374"/>
		<updated>2013-09-02T14:36:25Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Added link to follow-up tutorial one&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Hello and welcome to this guide on how to create your own scenarios for OpenClonk!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to make maps for OpenClonk.&lt;br /&gt;
It&#039;s up to you if you want to create a settlement scenario, an arena, a parcour or whatever. Here you will learn the basics and then you can visit one of the follow-up tutorials for the type of scenario you would like to make. &lt;br /&gt;
&lt;br /&gt;
I will use the Eclipse C4DT Editor, so if you did not already, follow [[C4DT Installation Guide|&#039;&#039;&#039;this guide&#039;&#039;&#039;]] for installing and setting it up properly.&lt;br /&gt;
&lt;br /&gt;
==First Steps==&lt;br /&gt;
Fire up Eclipse, you should be presented with your OpenClonk project. Right click on it and select New -&amp;gt; Szenario. In the following configuration window, you can specify the directory, the folder name (the name you see inside Eclipse), and the scenario titel itself. I recommend you to keep those two names the same so it doesn&#039;t get too confusing.&lt;br /&gt;
&lt;br /&gt;
[[File:SetName.png]]&lt;br /&gt;
&lt;br /&gt;
After hitting the Finish button, your scenario will most likely appear somewhere at the bottom, so press F5 to refresh and it will jump in it&#039;s place.&lt;br /&gt;
&lt;br /&gt;
==Landscape==&lt;br /&gt;
&lt;br /&gt;
Before continuing, let&#039;s talk a bit about the landscape. The landscape - also called map - is a fundamental part of any scenario. After you have finished the concept for your scenario and created the necessary files, designing a landscape is probably your first priority. In OpenClonk there are three ways to make landscapes, these are:&lt;br /&gt;
* Dynamic maps using Scenario.txt, which have the drawback of just being stretched and scaled sinusoidal chunks of different materials. This is an obsolete feature and should rather not be used as the landscapes it produces are very boring.&lt;br /&gt;
* Generated maps using a Landscape.txt file where you can create dynamic landscapes using complex algorithms. A lengthy tutorial about the map generator can be found [[Tutorial: Map Generator - The Basics|&#039;&#039;&#039;here&#039;&#039;&#039;]].&lt;br /&gt;
The choice for either a static map or a generated dynamic map depends on the scenario design, adventures rather use static maps opposed to settlement rounds.&lt;br /&gt;
* Static maps which store a hand-drawn landscape in a Map.bmp file, where each pixel represents a certain amount of pixels ingame. This is the method which will be covered in this tutorial.&lt;br /&gt;
&lt;br /&gt;
==Preparations for Static Map Creation==&lt;br /&gt;
&lt;br /&gt;
Expand your newly created scenario by clicking on the little arrow beneath it and open up the file called &amp;quot;Scenario.txt&amp;quot;. This file contains information about the scenario that will be executed at startup ([http://docs.openclonk.org/en/sdk/scenario/scenario.html more information]).&amp;lt;br&amp;gt;&lt;br /&gt;
Scroll down to the &amp;quot;[Landscape]&amp;quot; section and delete everything in it except &#039;&#039;MapWidth&#039;&#039; and &#039;&#039;MapHeight&#039;&#039;. Those two values determine the map size. Changing them after having painted something won&#039;t have any effect, so choose them carefully. If you are not sure, think of a scenario which is about the size you would like yours to have and look up it&#039;s map size. This is how Scenario.txt looks like in my case:&lt;br /&gt;
&lt;br /&gt;
[[File:Scentxt.png]]&lt;br /&gt;
&lt;br /&gt;
Save and close the file.&lt;br /&gt;
&lt;br /&gt;
Now we&#039;re gonna delete the file &amp;quot;Landscape.txt&amp;quot;, it is for dynamic map generation and we want to paint our map manually, so we do not need it.&lt;br /&gt;
&lt;br /&gt;
==Starting a Scenario in Editor Mode==&lt;br /&gt;
To edit a map, you have to start your scenario in Editor Mode, which gives you access to various editing tools. You can start a scenario with or without players. Unfortunately, it is not possible to toggle players inside Eclipse (yet), so you have to start OpenClonk and (de)activate players in the &amp;quot;Player Selection&amp;quot; dialogue.&amp;lt;br&amp;gt;&lt;br /&gt;
When starting without players, the game starts paused and you have to open a viewport yourself via Viewport -&amp;gt; New.I recommend you to start with a player though, because the viewport scrolling bars are broken and you can navigate better with the camera following a clonk.&amp;lt;br&amp;gt;&lt;br /&gt;
Either way, to start the scenario, select it and press the little play button in the action bar at the top.&lt;br /&gt;
&lt;br /&gt;
[[File:StartButton.png]]&lt;br /&gt;
                            | |&lt;br /&gt;
                            | |&lt;br /&gt;
                            V V&lt;br /&gt;
[[File:TUT-SCEN_EMStart.png]]&lt;br /&gt;
&lt;br /&gt;
And you will start in a perfectly clean world. Best conditions for creating your masterpiece, so let&#039;s get to the fun part! There are various tools available to design a map, they are explained in the next chapter:&lt;br /&gt;
&lt;br /&gt;
==Map Editing Tools==&lt;br /&gt;
(See [http://docs.openclonk.org/en/sdk/console.html this page] for more details.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pause/Resume Buttons:&#039;&#039;&#039; [[File:TUT-SCEN_PauseResume.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
As the name suggests, you can pause and resume the game using these. Left and right to them, you can see a frame counter, a real time counter, and the current FPS.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_GameCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
This cursor is the same as the ingame cursor, you can use it to throw objects, shoot arrows, and do all the other mouse control stuff.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only zoom with the scrolling wheel when this cursor is selected. Otherwise, you have to use F5/F6.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Editing Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_EditingCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
With this cursor, you can select objects, drag them around, duplicate them, and delete them. Try selecting your Clonk and drag him around. If there are multiple objects overlapping, you can rightclick and select the one you want in the contextmenu.&amp;lt;br&amp;gt;&lt;br /&gt;
When you pick the editing cursor, a properties window appears, and you can see the cursor position coordinates alongside the name of the object currently hovering over in the lower left corner of the engine window. These coordinates are especially important when it comes to determining the starting position or placing objects via script.&amp;lt;br&amp;gt;&lt;br /&gt;
You can delete and duplicate objects, and also access their contents, in the right click contextmenu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Landscape Brush:&#039;&#039;&#039; [[File:TUT-SCEN_LandscapeBrush.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Select this tool, and a little window will appear with all the options greyed out, which says &amp;quot;Dynamic landscape&amp;quot;. This means that the map is generated randomly on scenario start based on special [http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html Map Generator code.] (The Landscape.txt file we deleted, remember?) But since that&#039;s a bit more complicated and we just want to paint the map straight away inside the viewport, we&#039;re gonna switch to the second option: &amp;quot;Static landscape&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
Static landscape means you can paint a map with all the different materials, save the map into a Map.bmp file, and on next startup, you get the same map.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Do &#039;&#039;not&#039;&#039; use the third type, &amp;quot;Exact landscape&amp;quot;. It generates way too big files and is buggy, so you can loose all your progress.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_BrushTools.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The options in this window are pretty straightforward if you are familiar with an image editor like [http://www.gimp.org/ GIMP]. There are different brush types, you can adjust the stroke thickness with the slider, and you can select a material-texture combination. The right texture for each material is chosen automatically, but for some materials, like earth, there are multiple textures available, these are the ones above the hyphen. (You could theoretically also choose a texture from below and e.g. make gold which looks like rock.) Use the different textures to bring more diversity into your maps.&amp;lt;br&amp;gt;&lt;br /&gt;
The two buttons right to the slider determine the background appearing when the painted material is dug or blasted free. The lower one is tunnel background, the default, which is fine for most cases. However, you might want it to be sky background in a sky islands scenario for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_Log.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The log is where all the information is displayed, like status messages, errors and executed functions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commandline:&#039;&#039;&#039; [[File:TUT-SCEN_Commandline.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Is used to execute global script commands. You can click the little expand arrow to bring up list of &#039;&#039;all&#039;&#039; available functions. (Which are indeed quite a lot.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Adding Objects:&#039;&#039;&#039;&lt;br /&gt;
All the original objects are stored inside the Objects.ocd folder. You can add an object to your map by simply dragging the ocd file into the viewport.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Saving:&#039;&#039;&#039;&lt;br /&gt;
The engine doesn&#039;t save your changes automatically, so save your scenario frequently. Do this by selecting File -&amp;gt; Save scenario in the engine window. The log will say &amp;quot;Scenario saved.&amp;quot; and you can quit with peace of mind.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Delete your Clonk before saving, otherwise there will be an &amp;quot;Object XY is missing!&amp;quot; error on startup.&lt;br /&gt;
&lt;br /&gt;
==Follow-up Tutorials==&lt;br /&gt;
&lt;br /&gt;
Now you can design all sorts of maps, but just a pretty landscape isn&#039;t enough - for a complete scenario, you need things like goals, spawnpoints, etc. You will learn how to do this stuff in the follow-up tutorials:&lt;br /&gt;
&lt;br /&gt;
[[How to Create a Settlement Scenario|&#039;&#039;&#039;How to Create a Settlement Scenario&#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
[[How to Create an Arena Scenario|&#039;&#039;&#039;How to Create an Arena Scenario&#039;&#039;&#039;]] - &#039;&#039;Not yet available&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Those are planned for the near future, but I hope there will be more to come.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1371</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1371"/>
		<updated>2013-08-25T15:26:54Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script.&amp;lt;br&amp;gt; &#039;&#039;Script? But I have no idea of programming! :(&#039;&#039;&amp;lt;br&amp;gt; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy-to-learn scripting language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[img]http://img545.imageshack.us/img545/4609/2cx.png[/img]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword &#039;&#039;func&#039;&#039;) called &#039;&#039;Initialize&#039;&#039;. Everything between the curly brackets is executed when the function is called. (More about [http://docs.openclonk.org/en/sdk/script/Funcs.html &#039;&#039;&#039;functions&#039;&#039;&#039;]). It calls the function &#039;&#039;CreateEnvironment&#039;&#039; which is declared below and is empty as you can see in the screenshot. Delete both the call &#039;&#039;CreateEnvironment();&#039;&#039; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
= Goals =&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[img]http://img689.imageshack.us/img689/8895/vvgj.png[/img]&lt;br /&gt;
&lt;br /&gt;
==Wealth==&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
==Resource Extraction==&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: &#039;&#039;SetRessource(&amp;quot;Granite&amp;quot;);&#039;&#039; or &#039;&#039;SetRessource(&amp;quot;Gold&amp;quot;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Expansion==&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be &#039;&#039;SetExpansionGoal(500);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rules =&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CreateObject(XYXY, 0, 0, NO_OWNER);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says &#039;&#039;id=XYXY&#039;&#039;, that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[img]http://img534.imageshack.us/img534/2552/hzn.png[/img]&lt;br /&gt;
&lt;br /&gt;
= Start Position and Equipment =&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
==Preparations==&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [http://docs.openclonk.org/en/sdk/script/for.html &#039;&#039;&#039;for loop&#039;&#039;&#039;], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
==Start Position==&lt;br /&gt;
&#039;&#039;&#039;Note: If you want the player to spawn at a random position, you can leave this out.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;clonk -&amp;gt; SetPosition(X, Y);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html &#039;&#039;&#039;CreateContents&#039;&#039;&#039;]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [http://docs.openclonk.org/en/sdk/script/fn/if.html#if &#039;&#039;&#039;if condition&#039;&#039;&#039;] and &#039;&#039;else&#039;&#039;!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable &#039;&#039;index&#039;&#039; from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[img]http://img854.imageshack.us/img854/6408/n40b.png[/img]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
==View Range==&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html &#039;&#039;&#039;SetPlayerZoomByViewRange&#039;&#039;&#039;] and [http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html SetPlayerViewLock&#039;&#039;&#039;].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The data type &#039;&#039;nil&#039;&#039; can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SetPlayerViewLock(plr, true);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addendum - Components of .ocs files =&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1370</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1370"/>
		<updated>2013-08-25T10:59:03Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script. &amp;quot;Script? But I have no idea of programming! :(&amp;quot; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy to learn script language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[img]http://img545.imageshack.us/img545/4609/2cx.png[/img]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
[tt]func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword [tt]func[/tt]) called &amp;quot;Initialize&amp;quot;. Everything between the curly brackets is executed when the function is called. (More about [url=http://docs.openclonk.org/en/sdk/script/Funcs.html]functions[/url]). It calls the function &amp;quot;CreateEnvironment&amp;quot; which is declared below and is empty as you can see in the screenshot. Delete both the call &amp;quot;CreateEnvironment();&amp;quot; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
[b][b]---Goals---[/b][/b]&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[img]http://img689.imageshack.us/img689/8895/vvgj.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Wealth[/b]&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);[/tt]&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
[b]Resource Extraction[/b]&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);[/tt]&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: [tt]SetRessource(&amp;quot;Granite&amp;quot;);[/tt] or [tt]SetRessource(&amp;quot;Gold&amp;quot;);[/tt]&lt;br /&gt;
&lt;br /&gt;
[b]Expansion[/b]&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);[/tt]&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be [tt]SetExpansionGoal(500);[/tt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
[b][b]---Rules---[/b][/b]&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]CreateObject(XYXY, 0, 0, NO_OWNER);[/tt]&lt;br /&gt;
&lt;br /&gt;
whereas &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says [tt]id=XYXY[/tt], that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
[b]Note:[/b] You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[img]http://img534.imageshack.us/img534/2552/hzn.png[/img]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[b][b]=========================[/b][/b]&lt;br /&gt;
[b][b]---Start Position and Equipment---[/b][/b]&lt;br /&gt;
[b][b]=========================[/b][/b]&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
[b][b]Preparations[/b][/b]&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
[tt]func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
[tt]var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [url=http://docs.openclonk.org/en/sdk/script/for.html]for loop[/url], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
[b][b]Start Position[/b][/b]&lt;br /&gt;
[b]Note: If you want the player to spawn at a random position, you can leave this out.[/b]&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
[tt]clonk -&amp;gt; SetPosition(X, Y);[/tt]&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
[b]Equipment[/b]&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [url=http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html]CreateContents[/url]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
[tt]var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [url=http://docs.openclonk.org/en/sdk/script/fn/if.html#if]if condition[/url] and else!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable [tt]index[/tt] from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[img]http://img854.imageshack.us/img854/6408/n40b.png[/img]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
[b]View Range[/b]&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [url=http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html]SetPlayerZoomByViewRange[/url] and [url=http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html]SetPlayerViewLock[/url].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
[tt]SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);[/tt]&lt;br /&gt;
&lt;br /&gt;
(The data type [tt]nil[/tt] can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
[tt]SetPlayerViewLock(plr, true);[/tt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[h]Addendum - Components of .ocs files[/h]&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1369</id>
		<title>How to Create a Settlement Scenario</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=How_to_Create_a_Settlement_Scenario&amp;diff=1369"/>
		<updated>2013-08-25T10:56:38Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Welcome to this guide on how to create a Settlement scenario!&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt; This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&amp;#039;&amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to this guide on how to create a Settlement scenario!&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This is a follow-up tutorial, so all knowledge and progress from the [[Tutorial: Scenario Creation|&#039;&#039;&#039;previous guide&#039;&#039;&#039;]] is required.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last tutorial, you learned how to create a basic scenario with a map and how to add objects to the map. However, a few more things are required for a complete settlement scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Goals, rules, base material like shovels and axes, etc. - all these things are set in the script. &amp;quot;Script? But I have no idea of programming! :(&amp;quot; Don&#039;t worry, you don&#039;t need to be a C++ expert to get things working. OpenClonk features an easy to learn script language called C4Script. [[Script: Overview|&#039;&#039;&#039;Here&#039;&#039;&#039;]] is a short overview. Typically, the best way to get into scripting is looking at scripts from other objects and scenarios and finding out what they do. There is also an extensive [http://docs.openclonk.org/en/sdk/ &#039;&#039;&#039;documentation&#039;&#039;&#039;] I will often link to in this tutorial.&amp;lt;br&amp;gt;&lt;br /&gt;
And even if you have no idea of C4Script, this guide will give you templates and code snippets you can use and easily customise to fit your needs.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
&lt;br /&gt;
Expand your scenario and open the scenario script [http://docs.openclonk.org/en/sdk/scenario/script.html &#039;&#039;&#039;(docs)&#039;&#039;&#039;], a file called &amp;quot;Script.c&amp;quot;. It should look similar to this:&lt;br /&gt;
&lt;br /&gt;
[img]http://img545.imageshack.us/img545/4609/2cx.png[/img]&lt;br /&gt;
&lt;br /&gt;
Everything between /* and */ is a comment, highlighted in red by the Eclipse text editor. It will be ignored by the engine when executing the code. You can write a short description of your scenario below the name like I did.&lt;br /&gt;
Next we have this:&lt;br /&gt;
&lt;br /&gt;
[tt]func Initialize()&lt;br /&gt;
{&lt;br /&gt;
    CreateEnvironment();&lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
It is a function (keyword [tt]func[/tt]) called &amp;quot;Initialize&amp;quot;. Everything between the curly brackets is executed when the function is called. (More about [url=http://docs.openclonk.org/en/sdk/script/Funcs.html]functions[/url]). It calls the function &amp;quot;CreateEnvironment&amp;quot; which is declared below and is empty as you can see in the screenshot. Delete both the call &amp;quot;CreateEnvironment();&amp;quot; and the function below, so we are left with an empty Initialize function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
[b][b]---Goals---[/b][/b]&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to decide which goal(s) you want to have for your scenario. Inside Eclipse, you can scroll down, expand &amp;quot;Objects.ocd&amp;quot; and then &amp;quot;Goals.ocd&amp;quot; to see all goals currently in the game. In the screenshot, I highlighted the ones which work with settlement scenarios, I will go through all of them.&lt;br /&gt;
&lt;br /&gt;
[img]http://img689.imageshack.us/img689/8895/vvgj.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Wealth[/b]&lt;br /&gt;
&lt;br /&gt;
This one&#039;s very easy to set up, just paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]var goal = CreateObject(Goal_Wealth);&lt;br /&gt;
goal -&amp;gt; SetWealthGoal(XYXY);[/tt]&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the wealth the player should achieve to win.&lt;br /&gt;
&lt;br /&gt;
[b]Resource Extraction[/b]&lt;br /&gt;
&lt;br /&gt;
The goal is to mine all of a specific resource. Paste the following code into the Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]var goal = CreateObject(Goal_ResourceExtraction);&lt;br /&gt;
goal -&amp;gt; SetResource(&amp;quot;XYXY&amp;quot;);[/tt]&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the name of the ressource to extract, for example: [tt]SetRessource(&amp;quot;Granite&amp;quot;);[/tt] or [tt]SetRessource(&amp;quot;Gold&amp;quot;);[/tt]&lt;br /&gt;
&lt;br /&gt;
[b]Expansion[/b]&lt;br /&gt;
&lt;br /&gt;
A certain amount of the map must be claimed by constructing flags. Paste the following code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]var goal = CreateObject(Goal_Expansion);&lt;br /&gt;
goal -&amp;gt; SetExpansionGoal(XYXY);[/tt]&lt;br /&gt;
&lt;br /&gt;
Replace XYXY with the area to be covered in promillage of the total map. So for covering half the map, it would be [tt]SetExpansionGoal(500);[/tt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
[b][b]---Rules---[/b][/b]&lt;br /&gt;
[b][b]========[/b][/b]&lt;br /&gt;
&lt;br /&gt;
Rules restrict or allow something. As well as for the goals, you can look them up in the objects browser. Adding rules is easy: Copy the following piece of code into your Initialize function:&lt;br /&gt;
&lt;br /&gt;
[tt]CreateObject(XYXY, 0, 0, NO_OWNER);[/tt]&lt;br /&gt;
&lt;br /&gt;
whereas &amp;quot;XYXY&amp;quot; is replaced by the ID of the rule. The ID is the unique identifier every object has, like it&#039;s internal name. To find out the ID of an object, expand it and open the file &amp;quot;DefCore.txt&amp;quot;. In the second line, it says [tt]id=XYXY[/tt], that&#039;s the ID.&lt;br /&gt;
If you want multiple rules, just copy the snippet and insert another ID.&lt;br /&gt;
[b]Note:[/b] You don&#039;t need to have rules, Goldrush, a standard settlement scenario, has no rules set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what my Initialize function looks like after adding two goals and two rules. &lt;br /&gt;
&lt;br /&gt;
[img]http://img534.imageshack.us/img534/2552/hzn.png[/img]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[b][b]=========================[/b][/b]&lt;br /&gt;
[b][b]---Start Position and Equipment---[/b][/b]&lt;br /&gt;
[b][b]=========================[/b][/b]&lt;br /&gt;
&lt;br /&gt;
There is another important function: InitializePlayer. While Initalize is used to set up goals, rules, place objects, etc. (so gameworld-related things), InitializePlayer is for player-related stuff, like start position, base materials, or view range.&lt;br /&gt;
&lt;br /&gt;
[b][b]Preparations[/b][/b]&lt;br /&gt;
&lt;br /&gt;
Leave out one line after the closing curly bracket of the Initialize function and add this empty function below:&lt;br /&gt;
&lt;br /&gt;
[tt]func InitializePlayer(int plr)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
Right now not much is happening, put the following code into the newly created function:&lt;br /&gt;
&lt;br /&gt;
[tt]var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
That may look quite complicated, but it&#039;s basically a loop (a [url=http://docs.openclonk.org/en/sdk/script/for.html]for loop[/url], to be precise) which runs through all the crew members. What we write into that loop (again between the curly braces) will be executed for every crew member (the variable &amp;quot;clonk&amp;quot;) the player gets at the beginning of the scenario. The variable &amp;quot;index&amp;quot; is the index of the respective clonk, starting from 0 and then counting up until no more crew member is found, then the loop will end.&lt;br /&gt;
&lt;br /&gt;
[b][b]Start Position[/b][/b]&lt;br /&gt;
[b]Note: If you want the player to spawn at a random position, you can leave this out.[/b]&lt;br /&gt;
&lt;br /&gt;
First you&#039;ll need to find out the coordinates of the position at which you want the players to get spawned. OpenClonk uses a 2D coordinate system, point 0X,0Y is the upper left corner. The X axis goes right, the Y axis goes down. One unit corresponds to 1 pixel ingame.&lt;br /&gt;
To find out the coordinates, you need to start your scenario in editor mode and select the editing cursor. Then move the cursor to your desired start point (the center of the clonk will be at this position, so don&#039;t set it too close to the ground or the clonk will stuck) and read the coordinates in the lower left corner of the engine window. Keep them in mind, you will need them shortly.&lt;br /&gt;
Now copy this code into your loop:&lt;br /&gt;
&lt;br /&gt;
[tt]clonk -&amp;gt; SetPosition(X, Y);[/tt]&lt;br /&gt;
&lt;br /&gt;
And replace X and Y with your coordinates.&lt;br /&gt;
&lt;br /&gt;
[b]Equipment[/b]&lt;br /&gt;
&lt;br /&gt;
The command we need for placing something in a clonks inventory is [url=http://docs.openclonk.org/en/sdk/script/fn/CreateContents.html]CreateContents[/url]. It needs two arguments, ID and count of the object to be created (If count is not given, the default amount of 1 will be used). So if we wanted to give every crew member a shovel and a hammer, it would look like this:&lt;br /&gt;
&lt;br /&gt;
[tt]var clonk;&lt;br /&gt;
for(var index = 0; clonk = GetCrew(plr, index); ++index)&lt;br /&gt;
{&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Shovel);&lt;br /&gt;
     clonk -&amp;gt; CreateContents(Hammer);&lt;br /&gt;
}[/tt]&lt;br /&gt;
&lt;br /&gt;
But we don&#039;t want the same equipment for every crew member, we want the first one to have shovel and hammer, the second one shovel and axe. How to do this? Using an [url=http://docs.openclonk.org/en/sdk/script/fn/if.html#if]if condition[/url] and else!&lt;br /&gt;
Basically, you enter a condition inside the parentheses and if it returns true, the following command or code block will be executed. If it returns false, else will be executed. We have the variable [tt]index[/tt] from the for loop which indicates the number of the current crew member. Let&#039;s use this and say: If it is the first crew member (index = 0), give it shovel and hammer, else give it shovel and axe. It looks like that:&lt;br /&gt;
&lt;br /&gt;
[img]http://img854.imageshack.us/img854/6408/n40b.png[/img]&lt;br /&gt;
&lt;br /&gt;
Note that you can not only put the CreateContents commands into the if block, but also other things. You could for example let one crew member spawn at the left side of an abyss and the other one on the right side!&lt;br /&gt;
&lt;br /&gt;
[b]View Range[/b]&lt;br /&gt;
&lt;br /&gt;
You may want to limit the zoom range so the player can&#039;t zoom out the whole map. This is also done in the InitializePlayer function, but it isn&#039;t applied to individual clonks, but to the player. As our for loop runs through all crew members, we don&#039;t write the following code into it, but outside of it below.&lt;br /&gt;
We need two commands, [url=http://docs.openclonk.org/en/sdk/script/fn/SetPlayerZoomByViewRange.html]SetPlayerZoomByViewRange[/url] and [url=http://docs.openclonk.org/en/sdk/script/fn/SetPlayerViewLock.html]SetPlayerViewLock[/url].&lt;br /&gt;
First we will limit the zoom range so the player cannot some out farther than 500 pixels:&lt;br /&gt;
&lt;br /&gt;
[tt]SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_LimitMax);[/tt]&lt;br /&gt;
&lt;br /&gt;
(The data type [tt]nil[/tt] can be used to leave out a parameter.)&lt;br /&gt;
Then we will lock his view so he can&#039;t scroll around to explore the map:&lt;br /&gt;
&lt;br /&gt;
[tt]SetPlayerViewLock(plr, true);[/tt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  // Some natural disasters, earthquakes, volcanos, meteorites.&lt;br /&gt;
  Meteor-&amp;gt;SetChance(15);&lt;br /&gt;
  Earthquake-&amp;gt;SetChance(2);&lt;br /&gt;
  Volcano-&amp;gt;SetChance(4);&lt;br /&gt;
  Volcano-&amp;gt;SetMaterial(&amp;quot;DuroLava&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[h]Addendum - Components of .ocs files[/h]&lt;br /&gt;
This is an overview of all the files a Scenario.ocs can contain.&lt;br /&gt;
[img]http://img705.imageshack.us/img705/7878/confusingfiles.png[/img]&lt;br /&gt;
&lt;br /&gt;
[b]Material.ocg[/b]&lt;br /&gt;
Contains material-texture combinations. Don&#039;t change it, otherwise you will get a [tt]FATAL ERROR: Error loading materials.[/tt] and the game won&#039;t start. If that happens, just delete the file, it will be recreated.&lt;br /&gt;
&lt;br /&gt;
[b]Script.c[/b]&lt;br /&gt;
Contains the scenario script.&lt;br /&gt;
&lt;br /&gt;
[b]Game.txt[/b]&lt;br /&gt;
Contains information about every object that has been saved and will be created on scenario startup. These are informations like position, size, category, flags, properties, etc. Don&#039;t touch it and everything will be fine.&lt;br /&gt;
&lt;br /&gt;
[b]Landscape.txt[/b]&lt;br /&gt;
As mentioned before this file contains code to dynamically create a map. You can create complex landscapes that look different every game. Have a look at it:&lt;br /&gt;
[url=http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html]More information.[/url] [url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=13]German tutorial.[/url]&lt;br /&gt;
Not needed if you are manually painting a map.&lt;br /&gt;
&lt;br /&gt;
[b]Scenario.txt[/b]&lt;br /&gt;
Contains general scenario settings. These are some of the most important ones:&lt;br /&gt;
&lt;br /&gt;
[i]MinPlayer/MaxPlayer[/i]&lt;br /&gt;
Sets the minimum and maximum number of players to play this scenario. You could for example only make it playable with 2 to 4 players using [tt]MinPlayer=2[/tt] and [tt]MaxPlayer=4[/tt].&lt;br /&gt;
&lt;br /&gt;
[i]MapWidth/MapHeight[/i]&lt;br /&gt;
Specifies the map size.&lt;br /&gt;
[b]Note:[/b] Doesn&#039;t work if there already is a Map.bmp file. Use the method explained below to change the size of a painted map afterwards: Painting with an external program.&lt;br /&gt;
&lt;br /&gt;
[i]MapZoom[/i]&lt;br /&gt;
Something between 5 and 15. The factor the Map.bmp file is zoomed by for the actual gameworld. So if you have a 300x100 bitmap file and MapZoom=15, the ingame landscape will be 4500x1500 pixels big.&lt;br /&gt;
&lt;br /&gt;
[i]BottomOpen/TopOpen[/i]&lt;br /&gt;
If 1, objects and Clonks can fall out of the map.&lt;br /&gt;
&lt;br /&gt;
For all options, see [url=http://docs.openclonk.org/en/sdk/scenario/scenario.html]Scenario.txt.[/url]&lt;br /&gt;
&lt;br /&gt;
[b]Teams.txt[/b]&lt;br /&gt;
(See [url=http://docs.openclonk.org/en/sdk/scenario/Teams.html]docs[/url])&lt;br /&gt;
Used to define Teams. I will do another tutorial on that later.&lt;br /&gt;
&lt;br /&gt;
[b]Title.txt[/b]&lt;br /&gt;
Contains the scenario titel which is shown in the frontend. DE: is the German titel and US: the English one.&lt;br /&gt;
&lt;br /&gt;
[b]Title.png[/b]&lt;br /&gt;
The title graphic which will be shown alongside the description in the frontend. Has to have an aspect ratio of 4:3, preferably 640x480. Here is an article about how to design a good title graphics&lt;br /&gt;
&lt;br /&gt;
[b]Map.bmp[/b]&lt;br /&gt;
The static map is saved into this bitmap. The colours do not necessarily correspond with the actual materials, so don&#039;t worry if it is pink and green. :)&lt;br /&gt;
You can edit it with an external program, that way it is possible to change the map dimensions even after already having painted something. (Scale canvas) [b]Attention Windows 7 users:[/b] The &amp;quot;Paint&amp;quot; program shipped by default can&#039;t handle OpenClonks colour palette properly and will break your map! Use another program like [url=http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/Paint-XP.shtml]Paint XP[/url].&lt;br /&gt;
&lt;br /&gt;
[img]http://img547.imageshack.us/img547/6122/crasha.png[/img] [i]A typical Map.bmp (Crash landing)[/i]&lt;br /&gt;
&lt;br /&gt;
The easiest way to get the materials right is to paint all the materials you want into the map in the engine, and then open the Map.bmp and use the Colour Picker tool to copy a material colour.&lt;br /&gt;
[url=http://www.cc.striver.net/texts.php?action=sh&amp;amp;id=7]Here[/url] is an extensive tutorial about materials. (German only D: | outdated D;)&lt;br /&gt;
&lt;br /&gt;
[b]DescDE.rtf/DescUS.rtf[/b]&lt;br /&gt;
Contain the description in the respective language. Don&#039;t forget to write a description before releasing your work. :)&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1368</id>
		<title>Script: Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1368"/>
		<updated>2013-08-25T10:55:36Z</updated>

		<summary type="html">&lt;p&gt;Andriel: Added link to next part&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page should give you a short overview about the characteristics of C4Script in OpenClonk. It should be helpful if you either know some programming and quickly want to see how C4Script feels like or if you come from CR and want to see what changed.&amp;lt;br /&amp;gt;&lt;br /&gt;
If you come from CR scripting, you might want to jump directly to [[#Proplists]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Script files =&lt;br /&gt;
In OpenClonk one script-file usually belongs to an object or is in the global System.ocg directory.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Variables and Data types =&lt;br /&gt;
OpenClonk does not use strict typing, you declare function-local variables with &#039;&#039;var&#039;&#039;, object local variales outside of functions with &#039;&#039;local&#039;&#039; and global variables with &#039;&#039;static&#039;&#039;. Such &#039;&#039;static&#039;&#039; variables might also be declared constant with &#039;&#039;static const&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Variables which have not been assigned any value yet, contain the value &#039;&#039;nil&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Parameters can have a type that is checked when the function is called.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Functions =&lt;br /&gt;
Functions can be either declared &#039;&#039;global&#039;&#039; or without an access specifier which would make them object-local.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can call functions from the same object like you would expect with &#039;&#039;FunctionName(parameters...)&#039;&#039;. If you want to call a function in another object, use the arrow notation (&#039;&#039;my_object-&amp;gt;MyFunctionCall(par1, par2, par3);&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Arrays =&lt;br /&gt;
Arrays in Clonk are declared with brackets (&#039;&#039;var a = [];&#039;&#039; or &#039;&#039;var a = [3];&#039;&#039;) and grow dynamically when a field is assigned a value for the first time. You can get the length of arrays with &#039;&#039;GetLength()&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
Indices start at 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are like assoziative arrays (if you come from another programming language, think of a map) and are declared with curly braces (&#039;&#039;var p = {};&#039;&#039; or &#039;&#039;var p = { foo = 1, bar = 2 };&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
You can access elements from a proplist with either the dot-notation &#039;&#039;p.key&#039;&#039; and &#039;&#039;p.key = value;&#039;&#039; or with the brackets and the key as a string (&#039;&#039;p[&amp;quot;key&amp;quot;] = value;&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that in Clonk a lot of things are proplists: even objects! You can access the local variables of an object like any proplist elements.&amp;lt;br/&amp;gt;&lt;br /&gt;
Proplists can also contain functions, which are then called with the arrow notation as described above.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The next part of this tutorial about callbacks and timers is [[Script: Callbacks and Timers|&#039;&#039;&#039;here&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorial]]&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1367</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1367"/>
		<updated>2013-08-25T08:10:40Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are three main areas where artists can contribute: Modelling 3D objects and the texturing thereof, which requires different skills and doesn&#039;t need to be done by the same person. Most of our modellers use Blender, however which modeller you use is not important as long as it can export meshes to the OGRE format.&lt;br /&gt;
For creating scenario backgrounds, textures for models, scenario decoration and stuff, we actually need people who are good with Photoshop, GIMP or any other image manipulation software. &lt;br /&gt;
Also, we are in desperate need for people who are talented at creating sounds and/or music.&lt;br /&gt;
&lt;br /&gt;
Have a look in the [http://forum.openclonk.org/board_show.pl?bid=2 art workshop].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modelling ==&lt;br /&gt;
[[File:Foundry_mesh.png|200px|thumb|right|The mesh of the foundry]] We got rid of the old graphics from Clonk Rage which were so tiny that it was already hard to play the game in a proper resolution. (The character you control smaller than a mouse cursor? Come on!) For OpenClonk, the graphics are about three times as big and detailed as in the old Clonk series. &lt;br /&gt;
Unlike in previous clonk titles, most objects are actually models that are rendered in game. The file format we use for this is the [http://www.ogre3d.org/ OGRE] format as it is a format designed to be used in games plus all important modellers can export into this format. However, we do exchange of the models in their native format (mostly .blend).&lt;br /&gt;
&lt;br /&gt;
Now, for creating models that are to be rendered ingame (in OpenClonk), there are a few additional things that have to be considered if you are used to creating models that are rendered before the start of the game. Apart from the polygon count, for each model we only use one UV-mapped texture rather than zillion materials with different colors/googled textures. More guidelines on how to create a real time model for OpenClonk can be read here: [[Modelling Workflow]].&lt;br /&gt;
&lt;br /&gt;
You might ask yourself if there is a guideline of how many polygons a model should max have. Yes, there is one: So many, that the object looks both good ingame with a 3x zoom and on it&#039;s picture graphic (whichever is bigger). Also, unanimated inventory items like materials don&#039;t need to be rendered ingame. As sprites, the polygon count doesn&#039;t matter.&lt;br /&gt;
&lt;br /&gt;
Also, if you want to contribute a model, please always include the 3D-model when you attach a rendering of the same to your post. Otherwise, if you somehow lose your model, all the work was in vain. &lt;br /&gt;
&lt;br /&gt;
== Textures ==&lt;br /&gt;
[[File:Foundry_texture.png|200px|thumb|left|UV mapped texture of the foundry]]&lt;br /&gt;
[[File:Foundry_render.png|200px|thumb|right|Foundry with mesh and texture]]&lt;br /&gt;
We use the [http://creativecommons.org/licenses/by/3.0/ CC-by] licence for OpenClonk and ask you to license your contributions under the same license. As many textures in texture archives have licenses which are not compatible with CC-by, we will have to create many textures on our own. But don&#039;t worry, it&#039;s quite easy and there are some really good tutorials on how to create quality textures from photos.&lt;br /&gt;
&lt;br /&gt;
Here is a list of bigger texture archives and it&#039;s licenses which is a good source for resources: [[Texture Archives]]&lt;br /&gt;
&lt;br /&gt;
My experience is that textures for 3D-models which are based on actual photos always turn out better then textures which where painted by oneself.&lt;br /&gt;
&lt;br /&gt;
You might also ask yourself if there is a guideline of how big the texture for one 3D-model should be. Right: So big that it doesn&#039;t look blurred ingame with a 3x zoom and on it&#039;s picture graphic (whichever is bigger).&lt;br /&gt;
&lt;br /&gt;
For material textures, we need seamless textures. Regarding this, there are different methods to create seamless textures from (a set of) photos, here is how I do it: [[Tutorial: Creating Seamless Textures]].&lt;br /&gt;
For GIMP, there are two filters which can do this automatically: The plugin &#039;&#039;[http://gimp-texturize.sourceforge.net/ Texturize]&#039;&#039; and the filter &#039;&#039;Resynthesise&#039;&#039;. Both work good with textures with small random patterns like gravel, plaster, sand or ground. However, they don&#039;t produce quite as convincing results for bigger regular patterns like (roofing) tiles, bricks, wickerwork, pavements etc. The manual method that I proposed always produces better results and if you are experienced in this, it&#039;s a thing of five minutes.&lt;br /&gt;
&lt;br /&gt;
== Exporting Meshes ==&lt;br /&gt;
Exporting a model properly for OpenClonk can be a tricky process, but we&#039;ve compiled a step-by-step guide on how to do so.&lt;br /&gt;
&lt;br /&gt;
Firstly, you&#039;ll need the proper tools. For [http://download.blender.org/release/Blender2.49b/ Blender 2.49b], you&#039;ll need the OGRE Exporter. Randrian has created an improved version of the OGRE Exporter which adds critical features necessary for animation blending. [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Download Link]&lt;br /&gt;
&lt;br /&gt;
*Extract the OGRE Exporter into your .blender/scripts/ folder.&lt;br /&gt;
*Install [http://www.python.org/download/releases/2.6.2/ Python 2.6.2]&lt;br /&gt;
*Obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software], bundled inside the OGRE Command Line Tools package (look in &#039;See Also&#039; box for download).&lt;br /&gt;
*Extract the OGRE Command Line Tools somewhere easily accessible (ie: C:\OgreCommandLineTools).&lt;br /&gt;
*Load up blender, and create a new window and set the window type to &#039;Scripts Window&#039;. Then click File&amp;gt;Export&amp;gt;OGRE Meshes to load the exporter GUI into that window.&lt;br /&gt;
*Hit the &#039;Preferences&#039; button in the OGRE GUI. Set the location of the OGRE XML Exporter to Manual, and link to the location of the OgreXmlConverter.exe.&lt;br /&gt;
*In the directory of your .blend file, create an empty Actions.txt file. More on this later.&lt;br /&gt;
By following these steps, you should be able to properly export models for OpenClonk. If you run into any problems, leave a post on the forum addressing the issue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Guidelines for Modelling&#039;&#039;&#039;&lt;br /&gt;
*Model on the Y/Z view-plane. Models in OpenClonk appear as they do on the Y/Z plane in blender. The X-Axis goes &#039;into&#039; the screen. Make sure you model with regard to these axes (The Y/Z plane is the default side view in Blender).&lt;br /&gt;
*Do not use Mesh Transformations. Mesh transformations are not handled properly by the OGRE exporter, and will cause deformation in game. If you have transformations applied to an existing model, you can remove them (select the model and press alt+g, alt+s, alt+r). Caution: Avoid animating before removing transformations!&lt;br /&gt;
*3D Model must be Three-Dimensional. The 3D mesh must have length on all axes. Making a perfectly flat object on only two axes will cause it to not appear in-game. To fix this, move a vertex so the mesh has length on all axes.&lt;br /&gt;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://www.cs.ucr.edu/~macchiea/cs134/lab1/ogrehelp/ogremeshesexporter.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039;[[File:OgreExporter.png|200px|thumb|right|The OGRE Exporter frame in Blender]]&lt;br /&gt;
To export the model, you&#039;ll need to have a window for the OGRE exporter in Blender. Make a new pane for scripts, and click &#039;File/Export/OGRE Meshes&#039;. Models used for OpenClonk must be exported with specific options.&lt;br /&gt;
*“Fix Up Axis to Y” should not be enabled.&lt;br /&gt;
*If you have the XML converter, make sure “OgreXMLConverter” is enabled.&lt;br /&gt;
*If you have already made manual modifications to the Scene.material file and are re-exporting the mesh and/or skeleton, make sure &#039;Export Materials&#039; is not enabled.&lt;br /&gt;
*&#039;Path:&#039; will be where the OGRE files are exported to. You can use a temporary directory and then copy them into your OpenClonk object definition, or you can export the OGRE files directly into the object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFiles.png|250px|thumb|right|Typical exported files before user modification.]]&lt;br /&gt;
Once you have exported the mesh, some files will be created in the chosen directory. Follow these steps:&lt;br /&gt;
*Make sure the “ .mesh” file is named “Graphics.mesh”. &lt;br /&gt;
*If you exported the OGRE files to a temporary directory, copy &#039;Graphics.mesh&#039;, the &#039; .skeleton&#039; file, the &#039;Scene.material&#039; file, and any textures used by the mesh to your object definition.&lt;br /&gt;
*If you have exported the OGRE files directly to your object definition, you can delete all .xml files and the .log file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scene.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scene.material is the file which defines which materials to apply to meshes. Manually modifying Scene.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Scene.material file will look more or less like this (don&#039;t worry if it looks somewhat different):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
material MyCube&lt;br /&gt;
{&lt;br /&gt;
     receive_shadows on&lt;br /&gt;
     technique&lt;br /&gt;
     {&lt;br /&gt;
          pass&lt;br /&gt;
          {&lt;br /&gt;
               cull_hardware none&lt;br /&gt;
               scene_blend alpha_blend&lt;br /&gt;
&lt;br /&gt;
               ambient 1.0 1.0 1.0 1.0&lt;br /&gt;
               diffuse 1.0 1.0 1.0 1.0&lt;br /&gt;
               specular 0.0 0.0 0.0 0.0 12.5&lt;br /&gt;
               emissive 0.0 0.0 0.0 0.0&lt;br /&gt;
&lt;br /&gt;
               texture_unit&lt;br /&gt;
               {&lt;br /&gt;
                    texture MyCube.png&lt;br /&gt;
                    tex_address_mode wrap&lt;br /&gt;
                    filtering trilinear&lt;br /&gt;
               }&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
*If &#039;depth_write off&#039; exists, delete that line.&lt;br /&gt;
*If you are using alpha, make sure &#039;scene_blend alpha_blend&#039; exists (as shown above).&lt;br /&gt;
*If your mesh has visible backface(s), make sure to add &#039;cull_hardware none&#039; (as shown above).&lt;br /&gt;
*Depending on the method you used to define alpha in blender, the &#039;pass&#039; section in Scene.Material may look like this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;pass&lt;br /&gt;
{&lt;br /&gt;
     ambient 0.500000 0.500000 0.500000 0.000000&lt;br /&gt;
     diffuse 0.640000 0.640000 0.640000 0.000000&lt;br /&gt;
     specular 0.500000 0.500000 0.500000 0.000000 12.500000&lt;br /&gt;
     emissive 0.000000 0.000000 0.000000 0.000000&lt;br /&gt;
     ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
If so, make sure the fourth parameter on ambient, diffuse, specular, and emissive is &#039;1.00000&#039;, not &#039;0.000000&#039; (as shown in the &#039;material MyCube&#039; example).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Actions.txt&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This file controls what animations are exported, which frames of said animations, and which bones will be affected by the exported animations. Most often than not you will not need to use this functionality; your Actions.txt file could simply resemble this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;[Action]&lt;br /&gt;
Name=Open&lt;br /&gt;
&lt;br /&gt;
[Action]&lt;br /&gt;
Name=Close&lt;br /&gt;
&lt;br /&gt;
[End]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other tags available for an [Action] include &#039;Start=&#039;, &#039;End=&#039;, &#039;ExportName=&#039;, and &#039;Group=&#039;.&lt;br /&gt;
&lt;br /&gt;
Start and End will define the frames (in blender) that will be exported. ExportName will simply change the name of the Action on export (Useful if you have multiple versions of an animation but only need one exported).&lt;br /&gt;
&lt;br /&gt;
A group is a special filter used to stop bones from affecting the exported animation. For example, if we want an aiming animation to only affect the upper body, or a blinking animation to only affect the character&#039;s eyelids.&lt;br /&gt;
Groups can either use the &#039;Include=&#039; tag or &#039;Exclude=&#039; tag. &lt;br /&gt;
&lt;br /&gt;
As an example, a group which only affects the eyelids of the Clonk:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;[Group]&lt;br /&gt;
Name=Eyelids&lt;br /&gt;
Include=eye_lid.R&lt;br /&gt;
Include=eye_lid.L&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would make the exported animation only control the eye_lid.* bones and nothing else. Conversely, using the &#039;Exclude=&#039; tag makes the animation use every bone excluding those defined. As an example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
[Group]&lt;br /&gt;
Name=UpperBody&lt;br /&gt;
Exclude=skeleton_leg*&lt;br /&gt;
Exclude=skeleton_foot*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defining the group in an Action entry is fairly simple; just add the tag &#039;Group=&#039; and enter the group&#039;s name. For example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
[Action]&lt;br /&gt;
Name=CloseEyes&lt;br /&gt;
Group=Eyelids&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example of a finished Actions.txt file, [http://hg.openclonk.org/openclonk-resources/raw-file/9c271b749d31/models/Vehicles/catapult/Actions.txt this is the Catapult&#039;s].&lt;br /&gt;
&lt;br /&gt;
== Sounds &amp;amp; Music ==&lt;br /&gt;
Any game is only half as good without proper sounds and music. If you played the titles of the old Clonk series, you will probably still suffer from the memories of the midi music from the last millenium, like &amp;quot;Pizza strings&amp;quot; or &amp;quot;On a razor blade&amp;quot;. Anyway. So we need both people who are good at creating, editing (and searching) sound effects and talented people who can make music for OpenClonk. &lt;br /&gt;
There are some sound archives out there which have CC-licensed sound effects, also it can&#039;t hurt to ask the authors of one of the many many mods for commercial games if we are allowed to use their sounds under the terms of a CC-license (preferably CC-by).&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1366</id>
		<title>Tutorial: Scenario Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1366"/>
		<updated>2013-08-18T09:03:57Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Hello and welcome to this guide on how to create your own scenarios for OpenClonk!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to make maps for OpenClonk.&lt;br /&gt;
It&#039;s up to you if you want to create a settlement scenario, an arena, a parcour or whatever. Here you will learn the basics and then you can visit one of the follow-up tutorials for the type of scenario you would like to make. &lt;br /&gt;
&lt;br /&gt;
I will use the Eclipse C4DT Editor, so if you did not already, follow [[C4DT Installation Guide|&#039;&#039;&#039;this guide&#039;&#039;&#039;]] for installing and setting it up properly.&lt;br /&gt;
&lt;br /&gt;
==First Steps==&lt;br /&gt;
Fire up Eclipse, you should be presented with your OpenClonk project. Right click on it and select New -&amp;gt; Szenario. In the following configuration window, you can specify the directory, the folder name (the name you see inside Eclipse), and the scenario titel itself. I recommend you to keep those two names the same so it doesn&#039;t get too confusing.&lt;br /&gt;
&lt;br /&gt;
[[File:SetName.png]]&lt;br /&gt;
&lt;br /&gt;
After hitting the Finish button, your scenario will most likely appear somewhere at the bottom, so press F5 to refresh and it will jump in it&#039;s place.&lt;br /&gt;
&lt;br /&gt;
==Landscape==&lt;br /&gt;
&lt;br /&gt;
Before continuing, let&#039;s talk a bit about the landscape. The landscape - also called map - is a fundamental part of any scenario. After you have finished the concept for your scenario and created the necessary files, designing a landscape is probably your first priority. In OpenClonk there are three ways to make landscapes, these are:&lt;br /&gt;
* Dynamic maps using Scenario.txt, which have the drawback of just being stretched and scaled sinusoidal chunks of different materials. This is an obsolete feature and should rather not be used as the landscapes it produces are very boring.&lt;br /&gt;
* Generated maps using a Landscape.txt file where you can create dynamic landscapes using complex algorithms. A lengthy tutorial about the map generator can be found [[Tutorial: Map Generator - The Basics|&#039;&#039;&#039;here&#039;&#039;&#039;]].&lt;br /&gt;
The choice for either a static map or a generated dynamic map depends on the scenario design, adventures rather use static maps opposed to settlement rounds.&lt;br /&gt;
* Static maps which store a hand-drawn landscape in a Map.bmp file, where each pixel represents a certain amount of pixels ingame. This is the method which will be covered in this tutorial.&lt;br /&gt;
&lt;br /&gt;
==Preparations for Static Map Creation==&lt;br /&gt;
&lt;br /&gt;
Expand your newly created scenario by clicking on the little arrow beneath it and open up the file called &amp;quot;Scenario.txt&amp;quot;. This file contains information about the scenario that will be executed at startup ([http://docs.openclonk.org/en/sdk/scenario/scenario.html more information]).&amp;lt;br&amp;gt;&lt;br /&gt;
Scroll down to the &amp;quot;[Landscape]&amp;quot; section and delete everything in it except &#039;&#039;MapWidth&#039;&#039; and &#039;&#039;MapHeight&#039;&#039;. Those two values determine the map size. Changing them after having painted something won&#039;t have any effect, so choose them carefully. If you are not sure, think of a scenario which is about the size you would like yours to have and look up it&#039;s map size. This is how Scenario.txt looks like in my case:&lt;br /&gt;
&lt;br /&gt;
[[File:Scentxt.png]]&lt;br /&gt;
&lt;br /&gt;
Save and close the file.&lt;br /&gt;
&lt;br /&gt;
Now we&#039;re gonna delete the file &amp;quot;Landscape.txt&amp;quot;, it is for dynamic map generation and we want to paint our map manually, so we do not need it.&lt;br /&gt;
&lt;br /&gt;
==Starting a Scenario in Editor Mode==&lt;br /&gt;
To edit a map, you have to start your scenario in Editor Mode, which gives you access to various editing tools. You can start a scenario with or without players. Unfortunately, it is not possible to toggle players inside Eclipse (yet), so you have to start OpenClonk and (de)activate players in the &amp;quot;Player Selection&amp;quot; dialogue.&amp;lt;br&amp;gt;&lt;br /&gt;
When starting without players, the game starts paused and you have to open a viewport yourself via Viewport -&amp;gt; New.I recommend you to start with a player though, because the viewport scrolling bars are broken and you can navigate better with the camera following a clonk.&amp;lt;br&amp;gt;&lt;br /&gt;
Either way, to start the scenario, select it and press the little play button in the action bar at the top.&lt;br /&gt;
&lt;br /&gt;
[[File:StartButton.png]]&lt;br /&gt;
                            | |&lt;br /&gt;
                            | |&lt;br /&gt;
                            V V&lt;br /&gt;
[[File:TUT-SCEN_EMStart.png]]&lt;br /&gt;
&lt;br /&gt;
And you will start in a perfectly clean world. Best conditions for creating your masterpiece, so let&#039;s get to the fun part! There are various tools available to design a map, they are explained in the next chapter:&lt;br /&gt;
&lt;br /&gt;
==Map Editing Tools==&lt;br /&gt;
(See [http://docs.openclonk.org/en/sdk/console.html this page] for more details.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pause/Resume Buttons:&#039;&#039;&#039; [[File:TUT-SCEN_PauseResume.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
As the name suggests, you can pause and resume the game using these. Left and right to them, you can see a frame counter, a real time counter, and the current FPS.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_GameCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
This cursor is the same as the ingame cursor, you can use it to throw objects, shoot arrows, and do all the other mouse control stuff.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only zoom with the scrolling wheel when this cursor is selected. Otherwise, you have to use F5/F6.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Editing Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_EditingCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
With this cursor, you can select objects, drag them around, duplicate them, and delete them. Try selecting your Clonk and drag him around. If there are multiple objects overlapping, you can rightclick and select the one you want in the contextmenu.&amp;lt;br&amp;gt;&lt;br /&gt;
When you pick the editing cursor, a properties window appears, and you can see the cursor position coordinates alongside the name of the object currently hovering over in the lower left corner of the engine window. These coordinates are especially important when it comes to determining the starting position or placing objects via script.&amp;lt;br&amp;gt;&lt;br /&gt;
You can delete and duplicate objects, and also access their contents, in the right click contextmenu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Landscape Brush:&#039;&#039;&#039; [[File:TUT-SCEN_LandscapeBrush.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Select this tool, and a little window will appear with all the options greyed out, which says &amp;quot;Dynamic landscape&amp;quot;. This means that the map is generated randomly on scenario start based on special [http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html Map Generator code.] (The Landscape.txt file we deleted, remember?) But since that&#039;s a bit more complicated and we just want to paint the map straight away inside the viewport, we&#039;re gonna switch to the second option: &amp;quot;Static landscape&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
Static landscape means you can paint a map with all the different materials, save the map into a Map.bmp file, and on next startup, you get the same map.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Do &#039;&#039;not&#039;&#039; use the third type, &amp;quot;Exact landscape&amp;quot;. It generates way too big files and is buggy, so you can loose all your progress.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_BrushTools.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The options in this window are pretty straightforward if you are familiar with an image editor like [http://www.gimp.org/ GIMP]. There are different brush types, you can adjust the stroke thickness with the slider, and you can select a material-texture combination. The right texture for each material is chosen automatically, but for some materials, like earth, there are multiple textures available, these are the ones above the hyphen. (You could theoretically also choose a texture from below and e.g. make gold which looks like rock.) Use the different textures to bring more diversity into your maps.&amp;lt;br&amp;gt;&lt;br /&gt;
The two buttons right to the slider determine the background appearing when the painted material is dug or blasted free. The lower one is tunnel background, the default, which is fine for most cases. However, you might want it to be sky background in a sky islands scenario for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_Log.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The log is where all the information is displayed, like status messages, errors and executed functions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commandline:&#039;&#039;&#039; [[File:TUT-SCEN_Commandline.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Is used to execute global script commands. You can click the little expand arrow to bring up list of &#039;&#039;all&#039;&#039; available functions. (Which are indeed quite a lot.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Adding Objects:&#039;&#039;&#039;&lt;br /&gt;
All the original objects are stored inside the Objects.ocd folder. You can add an object to your map by simply dragging the ocd file into the viewport.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Saving:&#039;&#039;&#039;&lt;br /&gt;
The engine doesn&#039;t save your changes automatically, so save your scenario frequently. Do this by selecting File -&amp;gt; Save scenario in the engine window. The log will say &amp;quot;Scenario saved.&amp;quot; and you can quit with peace of mind.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Delete your Clonk before saving, otherwise there will be an &amp;quot;Object XY is missing!&amp;quot; error on startup.&lt;br /&gt;
&lt;br /&gt;
==Follow-up Tutorials==&lt;br /&gt;
&lt;br /&gt;
Now you can design all sorts of maps, but just a pretty landscape isn&#039;t enough - for a complete scenario, you need things like goals, spawnpoints, etc. You will learn how to do this stuff in the follow-up tutorials:&lt;br /&gt;
&lt;br /&gt;
How to create a Settlement Scenario - &#039;&#039;Not yet available&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How to create an Arena Scenario - &#039;&#039;Not yet available&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Those are planned for the near future, but I hope there will be more to come.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1364</id>
		<title>Tutorial: Scenario Creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Tutorial:_Scenario_Creation&amp;diff=1364"/>
		<updated>2013-08-13T11:59:09Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOT YET FINISHED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hello and welcome to this guide on how to create your own scenarios for OpenClonk!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to make maps for OpenClonk.&lt;br /&gt;
It&#039;s up to you if you want to create a settlement scenario, an arena, a parcour or whatever. Here you will learn the basics and then you can visit one of the follow-up tutorials for the type of scenario you would like to make. &lt;br /&gt;
&lt;br /&gt;
I will use the Eclipse C4DT Editor, so if you did not already, follow [[C4DT Installation Guide|&#039;&#039;&#039;this guide&#039;&#039;&#039;]] for installing and setting it up properly.&lt;br /&gt;
&lt;br /&gt;
==First Steps==&lt;br /&gt;
Fire up Eclipse, you should be presented with your OpenClonk project. Right click on it and select New -&amp;gt; Szenario. In the following configuration window, you can specify the directory, the folder name (the name you see inside Eclipse), and the scenario titel itself. I recommend you to keep those two names the same so it doesn&#039;t get too confusing.&lt;br /&gt;
&lt;br /&gt;
[[File:SetName.png]]&lt;br /&gt;
&lt;br /&gt;
After hitting the Finish button, your scenario will most likely appear somewhere at the bottom, so press F5 to refresh and it will jump in it&#039;s place.&lt;br /&gt;
&lt;br /&gt;
Now expand your newly created scenario by clicking on the little arrow beneath it and open up the file called &amp;quot;Scenario.txt&amp;quot;. This file contains information about the scenario that will be executed at startup ([http://docs.openclonk.org/en/sdk/scenario/scenario.html more information]).&amp;lt;br&amp;gt;&lt;br /&gt;
Scroll down to the &amp;quot;[Landscape]&amp;quot; section and delete everything in it except &#039;&#039;MapWidth&#039;&#039; and &#039;&#039;MapHeight&#039;&#039;. Those two values determine the map size. Changing them after having painted something won&#039;t have any effect, so choose them carefully. If you are not sure, think of a scenario which is about the size you would like yours to have and look up it&#039;s map size. This is how Scenario.txt looks like in my case:&lt;br /&gt;
&lt;br /&gt;
[[File:Scentxt.png]]&lt;br /&gt;
&lt;br /&gt;
Save and close the file.&lt;br /&gt;
&lt;br /&gt;
Now we&#039;re gonna delete the file &amp;quot;Landscape.txt&amp;quot;, it is for dynamic map generation and we want to paint our map manually, so we do not need it.&lt;br /&gt;
&lt;br /&gt;
==Starting a Scenario in Editor Mode==&lt;br /&gt;
To edit a map, you have to start your scenario in Editor Mode, which gives you access to various editing tools. You can start a scenario with or without players. Unfortunately, it is not possible to toggle players inside Eclipse (yet), so you have to start OpenClonk and (de)activate players in the &amp;quot;Player Selection&amp;quot; dialogue.&amp;lt;br&amp;gt;&lt;br /&gt;
When starting without players, the game starts paused and you have to open a viewport yourself via Viewport -&amp;gt; New.I recommend you to start with a player though, because the viewport scrolling bars are broken and you can navigate better with the camera following a clonk.&amp;lt;br&amp;gt;&lt;br /&gt;
Either way, to start the scenario, select it and press the little play button in the action bar at the top.&lt;br /&gt;
&lt;br /&gt;
[[File:StartButton.png]]&lt;br /&gt;
                            | |&lt;br /&gt;
                            | |&lt;br /&gt;
                            V V&lt;br /&gt;
[[File:TUT-SCEN_EMStart.png]]&lt;br /&gt;
&lt;br /&gt;
And you will start in a perfectly clean world. Best conditions for creating your masterpiece, so let&#039;s get to the fun part! There are various tools available to design a map, they are explained in the next chapter:&lt;br /&gt;
&lt;br /&gt;
==Map Editing Tools==&lt;br /&gt;
(See [http://docs.openclonk.org/en/sdk/console.html this page] for more details.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pause/Resume Buttons:&#039;&#039;&#039; [[File:TUT-SCEN_PauseResume.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
As the name suggests, you can pause and resume the game using these. Left and right to them, you can see a frame counter, a real time counter, and the current FPS.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_GameCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
This cursor is the same as the ingame cursor, you can use it to throw objects, shoot arrows, and do all the other mouse control stuff.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can only zoom with the scrolling wheel when this cursor is selected. Otherwise, you have to use F5/F6.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Editing Cursor:&#039;&#039;&#039; [[File:TUT-SCEN_EditingCursor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
With this cursor, you can select objects, drag them around, duplicate them, and delete them. Try selecting your Clonk and drag him around. If there are multiple objects overlapping, you can rightclick and select the one you want in the contextmenu.&amp;lt;br&amp;gt;&lt;br /&gt;
When you pick the editing cursor, a properties window appears, and you can see the cursor position coordinates alongside the name of the object currently hovering over in the lower left corner of the engine window. These coordinates are especially important when it comes to determining the starting position or placing objects via script.&amp;lt;br&amp;gt;&lt;br /&gt;
You can delete and duplicate objects, and also access their contents, in the right click contextmenu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Landscape Brush:&#039;&#039;&#039; [[File:TUT-SCEN_LandscapeBrush.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Select this tool, and a little window will appear with all the options greyed out, which says &amp;quot;Dynamic landscape&amp;quot;. This means that the map is generated randomly on scenario start based on special [http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html Map Generator code.] (The Landscape.txt file we deleted, remember?) But since that&#039;s a bit more complicated and we just want to paint the map straight away inside the viewport, we&#039;re gonna switch to the second option: &amp;quot;Static landscape&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
Static landscape means you can paint a map with all the different materials, save the map into a Map.bmp file, and on next startup, you get the same map.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Do &#039;&#039;not&#039;&#039; use the third type, &amp;quot;Exact landscape&amp;quot;. It generates way too big files and is buggy, so you can loose all your progress.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_BrushTools.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The options in this window are pretty straightforward if you are familiar with an image editor like [http://www.gimp.org/ GIMP]. There are different brush types, you can adjust the stroke thickness with the slider, and you can select a material-texture combination. The right texture for each material is chosen automatically, but for some materials, like earth, there are multiple textures available, these are the ones above the hyphen. (You could theoretically also choose a texture from below and e.g. make gold which looks like rock.) Use the different textures to bring more diversity into your maps.&amp;lt;br&amp;gt;&lt;br /&gt;
The two buttons right to the slider determine the background appearing when the painted material is dug or blasted free. The lower one is tunnel background, the default, which is fine for most cases. However, you might want it to be sky background in a sky islands scenario for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Log:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:TUT-SCEN_Log.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The log is where all the information is displayed, like status messages, errors and executed functions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commandline:&#039;&#039;&#039; [[File:TUT-SCEN_Commandline.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Is used to execute global script commands. You can click the little expand arrow to bring up list of &#039;&#039;all&#039;&#039; available functions. (Which are indeed quite a lot.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Adding Objects:&#039;&#039;&#039;&lt;br /&gt;
All the original objects are stored inside the Objects.ocd folder. You can add an object to your map by simply dragging the ocd file into the viewport.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Saving:&#039;&#039;&#039;&lt;br /&gt;
The engine doesn&#039;t save your changes automatically, so save your scenario frequently. Do this by selecting File -&amp;gt; Save scenario in the engine window. The log will say &amp;quot;Scenario saved.&amp;quot; and you can quit with peace of mind.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Delete your Clonk before saving, otherwise there will be an &amp;quot;Object XY is missing!&amp;quot; error on startup.&lt;br /&gt;
&lt;br /&gt;
==Follow-up Tutorials==&lt;br /&gt;
&lt;br /&gt;
Now you can design all sorts of maps, but just a pretty landscape isn&#039;t enough - for a complete scenario, you need things like goals, spawnpoints, etc. You will learn how to do this stuff in the follow-up tutorials:&lt;br /&gt;
&lt;br /&gt;
How to create a Settlement Scenario - &#039;&#039;Not yet available&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How to create an Arena Scenario - &#039;&#039;Not yet available&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Those are planned for the near future, but I hope there will be more to come.&lt;br /&gt;
&lt;br /&gt;
==Landscape==&lt;br /&gt;
&lt;br /&gt;
The landscape - also called map - is a fundamental part of any scenario. After you have finished the concept for your scenario and created the necessary files, creating a landscape is probably your first priority. In OpenClonk there are three ways to create a landscape, these are:&lt;br /&gt;
* Dynamic maps using Scenario.txt, which has the drawback of only having stretched and scaled sinusoidal landscapes. This is an obsolete feature and should rather not be used to create landscapes as they are boring.&lt;br /&gt;
* Static maps where a drawn landscape is stored in a Map.bmp file, where each pixel represents MapZoom pixels ingame. Check out this [[Tutorial: Dawing A Map|&#039;&#039;&#039;tutorial&#039;&#039;&#039;]] if you want to learn how to draw and save static landscapes.&lt;br /&gt;
* Generated maps using a Landscape.txt file where you can create dynamic landscapes using complex algorithms. A lengthy tutorial about the map generator can be found [[Tutorial: Map Generator - The Basics|&#039;&#039;&#039;here&#039;&#039;&#039;]].&lt;br /&gt;
The choice for either a static map or a generated dynamic map depends on the scenario design, adventures rather use static maps opposed to settlement rounds.&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Tutorial:_Map_Generator_-_The_Basics&amp;diff=1363</id>
		<title>Tutorial: Map Generator - The Basics</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Tutorial:_Map_Generator_-_The_Basics&amp;diff=1363"/>
		<updated>2013-08-13T11:58:02Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In OpenClonk there are three ways to create a landscape, these are:&lt;br /&gt;
* Dynamic maps using Scenario.txt, which has the drawback of only having stretched and scaled sinusoidal landscapes.&lt;br /&gt;
* Static maps where a drawn landscape is stored in a Map.bmp file, where each pixel represents MapZoom pixels ingame.&lt;br /&gt;
* Generated maps using a Landscape.txt file where you can create dynamic landscapes with as many design parameters as a static landscape.&lt;br /&gt;
This tutorial covers the last method, which is called the map generator. Of course, this kind of dynamic landscape design is not as simple as moving bars, you need to have at least a basic understanding of [http://en.wikipedia.org/wiki/Set_theory sets] and [http://en.wikipedia.org/wiki/Logical_connective logical operators] and know how to create scenarios.&lt;br /&gt;
&lt;br /&gt;
==Introduction &amp;amp; Features==&lt;br /&gt;
&lt;br /&gt;
The landscape generator allows one to create dynamic and interesting landscapes. Dynamic in this context means that every time you start a scenario the landscape will look different. This is a great benefit opposed to static maps, depending of the type of scenario a dynamic map may be a must. On the other hand it is harder to create landscapes that look exactly the way you want it. The map generator can&#039;t simply be told to put in five nice looking gold chunks of some size into the ground.&lt;br /&gt;
&lt;br /&gt;
Instead you have bit-layers which get a two dimensional 1-bit-texture. Then a material-texture-combination is assigned to that layer. Also you can create many sub layers inside a layer, which again can have sub layers and a material-texture-combination. Maybe it&#039;s easier to imagine as cutting several designs into pieces of paper and putting them behind each other, you&#039;ll get blank spots (where all papers have a hole), which will be like &amp;quot;Sky&amp;quot;. Maybe you set the first layer to be some kind of an &amp;quot;Earth&amp;quot;, that layer then has some shreds of paper on it that represent &amp;quot;Gold&amp;quot;. But once you get to some really complicated combinations you&#039;ll see that that comparison is somewhat non-representative of the map-generator. &lt;br /&gt;
&lt;br /&gt;
The approach taken in this tutorial is &amp;quot;learning by doing&amp;quot;, as it should be the most fun and allows for a smooth introduction into the generator. Though this tutorial can&#039;t be completed by just anyone, basic knowledge of scenario creation is understood. The tutorial is divided up in parts, each part covers some theory explained in examples and ends with an exercise. The examples contain a snippet from Landscape.txt file together with some explanation and the generated map displayed on the right. But before starting of with the theory and some example landscapes we need a scenario to view our dynamic landscapes. You can create a scenario or download the scenario containing the first example here[TODO: file]. The map generator reads out the Landscape.txt file inside the scenario folder and generates the landscape at the start of the round. Either create a new Landscape.txt file or open the existing one in the downloaded example scenario. You can only view one example at a time, to view a new one clean the file and copy &amp;amp; paste the new example into your Landscape.txt file. Landscapes are best viewed in editor mode as you can scroll through the landscape.&lt;br /&gt;
&lt;br /&gt;
The map generator also has its own [http://docs.openclonk.org/en/sdk/scenario/MapCreatorS2.html documentation]. Here all features of the generator can be found, and of course we will use it frequently in this sequence of tutorials. Furthermore we want to write readable generator code, so that we ourselves but most importantly others can profit from it. For this reason [[Map_Generator_Style_Guidelines|&#039;&#039;&#039;style guidelines&#039;&#039;&#039;]] for map generator code have been compiled which should be followed within the OpenClonk project.&lt;br /&gt;
&lt;br /&gt;
==Your First Landscape==&lt;br /&gt;
&lt;br /&gt;
[[File:MapGenerator_ExampleFirstLandscape.png|200px|thumb|right|One big lake!]]&lt;br /&gt;
The map generator works with nesting, similar to HTML, XML and others. Therefore we start by creating the outer element, the &amp;lt;code&amp;gt;map&amp;lt;/code&amp;gt;. This basically is a layer that spans the whole landscape of a scenario. So without further ado, here is your first example landscape.&lt;br /&gt;
 // &#039;&#039;My first dynamic landscape!&#039;&#039;&lt;br /&gt;
 map ExampleFirstLandscape {&lt;br /&gt;
 	mat=Water; tex=water;&lt;br /&gt;
 };&lt;br /&gt;
As you might have noticed this simply fills the whole map with water, but how does it work. The first line is a comment, everything after a // will be ignored until a new line occurs. Also multi line comments are possible, anything after a /* will be ignored completely until a */ is found. The third line has the keyword &amp;lt;code&amp;gt;map&amp;lt;/code&amp;gt;. &#039;&#039;Example1&#039;&#039; is the name of that map. The actual definition is inside the brackets { }. To close the definition you also need to put a semicolon behind the closing bracket.&lt;br /&gt;
&lt;br /&gt;
In this example we define the material (keyword &amp;lt;code&amp;gt;mat&amp;lt;/code&amp;gt;) and the texture (keyword &amp;lt;code&amp;gt;tex&amp;lt;/code&amp;gt;) of the map. This map will simply be completely filled with &#039;&#039;Water&#039;&#039; and that water will have the texture &#039;&#039;water&#039;&#039;. Valid materials and textures can be found in the TexMap.txt file in the Material.c4g folder, which is explained in the [http://docs.openclonk.org/en/sdk/material/index.html material documentation].&lt;br /&gt;
&lt;br /&gt;
==Layers==&lt;br /&gt;
&lt;br /&gt;
[[File:MapGenerator_ExampleOneLayer.png|200px|thumb|right|A golden layer submerged in water.]]&lt;br /&gt;
That first map is somewhat limited. Maybe you could do a submarine battle in it, but that&#039;s about it. So let&#039;s add a new layer, new layers can be created with &amp;lt;code&amp;gt;overlay&amp;lt;/code&amp;gt;.&lt;br /&gt;
 // &#039;&#039;Introduced a golden layer.&#039;&#039;&lt;br /&gt;
 map ExampleLayers {&lt;br /&gt;
 	mat=Water; tex=water;&lt;br /&gt;
 	overlay {&lt;br /&gt;
 		mat=Gold; tex=gold;&lt;br /&gt;
 		x=10; y=10; wdt=80; hgt=80;&lt;br /&gt;
 	};&lt;br /&gt;
 };&lt;br /&gt;
We added a sublayer to the map layer and that sublayer will be filled with the material &#039;&#039;Gold&#039;&#039;. Furthermore we told the layer to be limited to the area that starts at &amp;lt;code&amp;gt;x, y&amp;lt;/code&amp;gt; (in percent of the upper layer, the map) and to a height and width of 80% of the upper layer (the map). &lt;br /&gt;
&lt;br /&gt;
Notice that changing the map size in the Scenario.txt will automatically fit your map to the new size and the percentages of the sublayer will also automatically scale themselves to the new values.&lt;br /&gt;
&lt;br /&gt;
==Combining Layers==&lt;br /&gt;
&lt;br /&gt;
[[File:MapGenerator_ExampleCombinedLayers.png|200px|thumb|right|Combined rock and gold layers.]]&lt;br /&gt;
You can combine layers in multiple ways. Low and behold:&lt;br /&gt;
 // &#039;&#039;Gold, rock and set theory.&#039;&#039;&lt;br /&gt;
 map ExampleCombinedLayers {&lt;br /&gt;
 	mat=Water; tex=water;&lt;br /&gt;
 	overlay {&lt;br /&gt;
 		mat=Gold; tex=gold; &lt;br /&gt;
 		x=10; y=10; wdt=80; hgt=80;&lt;br /&gt;
 		overlay { &lt;br /&gt;
 			x=10; y=10; wdt=50; hgt=50; &lt;br /&gt;
 		} ^ overlay { &lt;br /&gt;
 			mat=Rock; tex=rock;&lt;br /&gt;
 			x=40; y=40; wdt=50; hgt=50;&lt;br /&gt;
 		};&lt;br /&gt;
 	};&lt;br /&gt;
 };&lt;br /&gt;
Here begins the fun. The first layer (the gold layer) has got two sublayers which were combined by a logical operator - the ^. Since both layers are inside that gold-layer they will not affect anything outside of that layer. Any coordinates or percentage values are relative to that outer layer.&lt;br /&gt;
&lt;br /&gt;
The two inner layers are combined by an operator. The last layer defines what material and texture will be used for that layer combination. You could also add more operators and layers, the operators will then be handled from left to right. Layers can be combined and sub-layered (meaning put into another layer) in any way you want. There are three logical operators:&lt;br /&gt;
* ^ is the XOR operator, that means anything covered by both layers will not be drawn, anything else covered by one of the layers will be drawn. This is shown in the example, the grey area in the top left corner is part of the first layer, the one in the lower left corner is the part of the second layer. The center is the part covered by both layers, which is not drawn due to the ^ operator.&lt;br /&gt;
* &amp;amp; is the AND operator, which draws any overlapping parts of the two layers.&lt;br /&gt;
* | is the OR operator, which draws anything any of the two layers would draw on their own.&lt;br /&gt;
As an exercise you can replace the XOR operator with the AND or the OR operator and see what happens. To be able to work with the landscape generator basic understanding of set theory and logical operators is quite handy.&lt;br /&gt;
&lt;br /&gt;
==Exercise: Set Theory==&lt;br /&gt;
&lt;br /&gt;
[[File:MapGenerator_ExerciseSetTheory.png|200px|thumb|right|Exercise: Create this landscape.]]&lt;br /&gt;
Since basic understanding of sets is required it will be tested in the this exercise. Try to construct a 5 by 5 checkers board out of gold and rock, looking like the landscape in the figure. There are multiple solutions, but try to use as little overlays as possible.&lt;br /&gt;
&lt;br /&gt;
[TODO: solution as some sort of spoiler]&lt;br /&gt;
&lt;br /&gt;
 // &#039;&#039;Checkers board out of gold and rock.&#039;&#039;&lt;br /&gt;
 map ExerciseSetTheory {&lt;br /&gt;
 	mat=Rock; tex=rock;&lt;br /&gt;
 	overlay { &lt;br /&gt;
 		x=20; y=0; wdt=20; hgt=100; 	&lt;br /&gt;
 	} ^ overlay { &lt;br /&gt;
 		x=60; y=0; wdt=20; hgt=100; 	&lt;br /&gt;
 	} ^ overlay { &lt;br /&gt;
 		x=0; y=20; wdt=100; hgt=20;&lt;br /&gt;
 	} ^ overlay {&lt;br /&gt;
 		mat=Gold; tex=gold;&lt;br /&gt;
 		x=0; y=60; wdt=100; hgt=20;&lt;br /&gt;
 	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Of course, this tutorial only covered the most important basics of dynamic landscapes. The following tutorials will require full knowledge about this one. If you have problems with the things covered by this tutorial it is most advisable to play around with operators and sublayers a little more.&lt;br /&gt;
&lt;br /&gt;
The next part of this tutorial about algorithms and transformations is [[Tutorial: Map Generator - Algorithms &amp;amp; Transformations|&#039;&#039;&#039;here&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Map Generator Tutorials]]&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_Commandline.png&amp;diff=1362</id>
		<title>File:TUT-SCEN Commandline.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_Commandline.png&amp;diff=1362"/>
		<updated>2013-08-13T10:31:48Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_Log.png&amp;diff=1361</id>
		<title>File:TUT-SCEN Log.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_Log.png&amp;diff=1361"/>
		<updated>2013-08-13T10:30:17Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_BrushTools.png&amp;diff=1360</id>
		<title>File:TUT-SCEN BrushTools.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_BrushTools.png&amp;diff=1360"/>
		<updated>2013-08-13T10:23:00Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_LandscapeBrush.png&amp;diff=1359</id>
		<title>File:TUT-SCEN LandscapeBrush.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_LandscapeBrush.png&amp;diff=1359"/>
		<updated>2013-08-13T10:20:39Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_EditingCursor.png&amp;diff=1358</id>
		<title>File:TUT-SCEN EditingCursor.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_EditingCursor.png&amp;diff=1358"/>
		<updated>2013-08-13T10:19:13Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_GameCursor.png&amp;diff=1357</id>
		<title>File:TUT-SCEN GameCursor.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_GameCursor.png&amp;diff=1357"/>
		<updated>2013-08-13T10:18:07Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_PauseResume.png&amp;diff=1356</id>
		<title>File:TUT-SCEN PauseResume.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_PauseResume.png&amp;diff=1356"/>
		<updated>2013-08-13T09:37:48Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_EMStart.png&amp;diff=1355</id>
		<title>File:TUT-SCEN EMStart.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:TUT-SCEN_EMStart.png&amp;diff=1355"/>
		<updated>2013-08-13T09:28:50Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:StartButton.png&amp;diff=1354</id>
		<title>File:StartButton.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:StartButton.png&amp;diff=1354"/>
		<updated>2013-08-13T08:02:33Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Scentxt.png&amp;diff=1353</id>
		<title>File:Scentxt.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Scentxt.png&amp;diff=1353"/>
		<updated>2013-08-13T07:58:52Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:SetName.png&amp;diff=1352</id>
		<title>File:SetName.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:SetName.png&amp;diff=1352"/>
		<updated>2013-08-13T07:56:53Z</updated>

		<summary type="html">&lt;p&gt;Andriel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Andriel</name></author>
	</entry>
</feed>