<?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=Zapper</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=Zapper"/>
	<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/w/Special:Contributions/Zapper"/>
	<updated>2026-04-06T06:39:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1651</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1651"/>
		<updated>2015-08-18T12:58:17Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Modifying the Material file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
If you run into any problems with these instructions, 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;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG|center]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
When working with actions, it is a good idea to click the little &amp;quot;[F]&amp;quot; next to the action name in the action editor to make sure the actions are never deleted.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_SaveDatablock.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
The actions should now all be visible in the NLA editor in separate strips.&lt;br /&gt;
[[{{ns:file}}:Blender_NLA_Editor_ActionStrips.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Modifying the Material file ==&lt;br /&gt;
&#039;&#039;&#039;Graphics.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Graphics.material is the file which defines which materials to apply to meshes. Manually modifying Graphics.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Graphics.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 Rock_Grey&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 Rock_uv.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 Graphics.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 Rock_Grey&#039; example).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;br /&gt;
&lt;br /&gt;
To view a .mesh file you can use the free tool &amp;quot;Ogre Meshy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The exporter also comes with a test scenario to view objects ingame. For more information please see the Readme.txt of the exporter.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1650</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1650"/>
		<updated>2015-08-18T12:56:47Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* 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;
There is currently only a guide for [[Exporting_Blender_Models|exporting &#039;&#039;&#039;Blender&#039;&#039;&#039; models for OpenClonk]].&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>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1649</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1649"/>
		<updated>2015-08-18T12:53:48Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
If you run into any problems with these instructions, 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;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG|center]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
When working with actions, it is a good idea to click the little &amp;quot;[F]&amp;quot; next to the action name in the action editor to make sure the actions are never deleted.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_SaveDatablock.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
The actions should now all be visible in the NLA editor in separate strips.&lt;br /&gt;
[[{{ns:file}}:Blender_NLA_Editor_ActionStrips.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Modifying the Material file ==&lt;br /&gt;
&#039;&#039;&#039;Graphics.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Graphics.material is the file which defines which materials to apply to meshes. Manually modifying Graphics.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Graphics.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 Rock_Grey&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 Graphics.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 Rock_Grey&#039; example).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;br /&gt;
&lt;br /&gt;
To view a .mesh file you can use the free tool &amp;quot;Ogre Meshy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The exporter also comes with a test scenario to view objects ingame. For more information please see the Readme.txt of the exporter.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1648</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1648"/>
		<updated>2015-08-18T12:52:01Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Modifying the Material file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG|center]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
When working with actions, it is a good idea to click the little &amp;quot;[F]&amp;quot; next to the action name in the action editor to make sure the actions are never deleted.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_SaveDatablock.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
The actions should now all be visible in the NLA editor in separate strips.&lt;br /&gt;
[[{{ns:file}}:Blender_NLA_Editor_ActionStrips.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Modifying the Material file ==&lt;br /&gt;
&#039;&#039;&#039;Graphics.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Graphics.material is the file which defines which materials to apply to meshes. Manually modifying Graphics.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Graphics.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 Rock_Grey&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 Graphics.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 Rock_Grey&#039; example).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;br /&gt;
&lt;br /&gt;
To view a .mesh file you can use the free tool &amp;quot;Ogre Meshy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The exporter also comes with a test scenario to view objects ingame. For more information please see the Readme.txt of the exporter.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1647</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1647"/>
		<updated>2015-08-18T12:51:19Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG|center]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
When working with actions, it is a good idea to click the little &amp;quot;[F]&amp;quot; next to the action name in the action editor to make sure the actions are never deleted.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_SaveDatablock.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
The actions should now all be visible in the NLA editor in separate strips.&lt;br /&gt;
[[{{ns:file}}:Blender_NLA_Editor_ActionStrips.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Modifying the Material file ==&lt;br /&gt;
&#039;&#039;&#039;Graphics.material&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Graphics.material is the file which defines which materials to apply to meshes. Manually modifying Graphics.material is crucial to the mesh appearing properly in game. When you export (assuming you are using a texture) your Graphics.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 Graphics.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;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;br /&gt;
&lt;br /&gt;
To view a .mesh file you can use the free tool &amp;quot;Ogre Meshy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The exporter also comes with a test scenario to view objects ingame. For more information please see the Readme.txt of the exporter.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1646</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1646"/>
		<updated>2015-08-18T12:35:26Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Importing the files into OpenClonk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG|center]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
When working with actions, it is a good idea to click the little &amp;quot;[F]&amp;quot; next to the action name in the action editor to make sure the actions are never deleted.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_SaveDatablock.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
The actions should now all be visible in the NLA editor in separate strips.&lt;br /&gt;
[[{{ns:file}}:Blender_NLA_Editor_ActionStrips.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;br /&gt;
&lt;br /&gt;
To view a .mesh file you can use the free tool &amp;quot;Ogre Meshy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The exporter also comes with a test scenario to view objects ingame. For more information please see the Readme.txt of the exporter.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1645</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1645"/>
		<updated>2015-08-18T12:32:18Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG|center]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
When working with actions, it is a good idea to click the little &amp;quot;[F]&amp;quot; next to the action name in the action editor to make sure the actions are never deleted.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_SaveDatablock.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
The actions should now all be visible in the NLA editor in separate strips.&lt;br /&gt;
[[{{ns:file}}:Blender_NLA_Editor_ActionStrips.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_SaveDatablock.PNG&amp;diff=1644</id>
		<title>File:Blender ActionEditor SaveDatablock.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_SaveDatablock.PNG&amp;diff=1644"/>
		<updated>2015-08-18T12:31:54Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_NLA_Editor_ActionStrips.PNG&amp;diff=1643</id>
		<title>File:Blender NLA Editor ActionStrips.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_NLA_Editor_ActionStrips.PNG&amp;diff=1643"/>
		<updated>2015-08-18T12:27:24Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1642</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1642"/>
		<updated>2015-08-18T12:17:31Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
[[{{ns:file}}:Blender_MeshName.PNG]]&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
[[{{ns:file}}:Blender_ObjectName.PNG]]&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
[[{{ns:file}}:Blender_MaterialName.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_NLA_Editor.PNG]]&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_Empty_NLA_Editor.PNG]]&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Select_Action.PNG]]&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
[[{{ns:file}}:Blender_ActionEditor_Push_Action.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1641</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1641"/>
		<updated>2015-08-18T12:16:11Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Setting up the Exporter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;copy the files from the folder BlenderAddon to:&#039;&#039;&#039;&lt;br /&gt;
*Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
*Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
[version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enable the addon:&#039;&#039;&#039;&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
*Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_MeshName.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ObjectName.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_MaterialName.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ActionEditor_NLA_Editor.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_Empty_NLA_Editor.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ActionEditor_Select_Action.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ActionEditor_Push_Action.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1640</id>
		<title>Exporting Blender Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_Blender_Models&amp;diff=1640"/>
		<updated>2015-08-18T12:10:44Z</updated>

		<summary type="html">&lt;p&gt;Zapper: Created page with &amp;quot; == Setting up the Exporter ==  Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up the Exporter ==&lt;br /&gt;
&lt;br /&gt;
Randrian provides an own OGRE exporter for OpenClonk, which can be found on the renderclonks page[http://www.renderclonks.de/files/OgreClonkExporter.zip].&lt;br /&gt;
&lt;br /&gt;
To install the exporter, follow the steps in the contained Readme.txt, which are also listed here for convenience:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;p&amp;gt;copy the files from the folder BlenderAddon to:&lt;br /&gt;
    Linux: ~/.config/blender/[version]/scripts/addons/ &lt;br /&gt;
    Windows: [blender directory]/[version]/scripts/addons/ &lt;br /&gt;
    [version] should be the version of the installed Blender e.g. 2.71&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;p&amp;gt;enable the addon:&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 Clonk Exporter&amp;quot; addon.&lt;br /&gt;
    Then click on &amp;quot;Save User Settings&amp;quot;.&lt;br /&gt;
    HINT: You can also use the search box to look for an addon containing &amp;quot;Clonk&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From now on, you will find &amp;quot;Ogre3D Clonk&amp;quot; as an exporter listed under File-&amp;gt;Export.&lt;br /&gt;
&lt;br /&gt;
== Preparing the Model in Blender ==&lt;br /&gt;
The model needs an armature. If you do not have any animations, please add an armature and rename the one bone to &amp;quot;main&amp;quot; - which is our convention for single-bone armatures.&lt;br /&gt;
&lt;br /&gt;
Rename the mesh of the object to something meaningful:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_MeshName.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Also rename the whole object to the same name.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ObjectName.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure the object has at least one material and give the materials your object name as a prefix (f.e. Rock_Grey or Idol_Gold), because in OpenClonk all material names are global.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_MaterialName.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting a Model ==&lt;br /&gt;
Make sure you have the object selected in object mode.&lt;br /&gt;
For exporting a model without animations, open the exporter (File-&amp;gt;Export-&amp;gt;&amp;quot;Ogre3D Clonk&amp;quot;), select a directory and click &amp;quot;Export Ogre&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You will then find a .mesh and a .material that you need to keep. The .scene file is not required (if it exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exporting Animations ==&lt;br /&gt;
To prepare the animations for the export, you need to add them as NLA tracks doing the following steps:&lt;br /&gt;
&lt;br /&gt;
Open two windows, one for the &amp;quot;Dope Sheet&amp;quot; and one for the &amp;quot;NLA Editor&amp;quot;. In the Dope Sheet, select the &amp;quot;Action Editor&amp;quot;.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ActionEditor_NLA_Editor.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have the &amp;quot;Armature&amp;quot; selected in the NLA Editor.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_Empty_NLA_Editor.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every action you first need to select the action in the Action Editor.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ActionEditor_Select_Action.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you click on &amp;quot;Push Down&amp;quot; next to the action name to add the action as a new NLA strip.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;{{ns:file}}&amp;lt;nowiki&amp;gt;:Blender_ActionEditor_Push_Action.PNG]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the exporter, make sure you have &amp;quot;Independent Animations&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
The exporter now also generates a .skeleton file (that must not be renamed).&lt;br /&gt;
&lt;br /&gt;
== Importing the files into OpenClonk ==&lt;br /&gt;
To get the objects into the game, you need to put the .mesh, .material and .skeleton file into your object definition. If you have additional textures (for example an UV map), you need to move the texture into the same folder (you can not rename it after the export).&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_MaterialName.PNG&amp;diff=1639</id>
		<title>File:Blender MaterialName.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_MaterialName.PNG&amp;diff=1639"/>
		<updated>2015-08-18T12:04:13Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_ObjectName.PNG&amp;diff=1638</id>
		<title>File:Blender ObjectName.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_ObjectName.PNG&amp;diff=1638"/>
		<updated>2015-08-18T11:52:58Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_Push_Action.PNG&amp;diff=1637</id>
		<title>File:Blender ActionEditor Push Action.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_Push_Action.PNG&amp;diff=1637"/>
		<updated>2015-08-18T11:48:59Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_Select_Action.PNG&amp;diff=1636</id>
		<title>File:Blender ActionEditor Select Action.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_Select_Action.PNG&amp;diff=1636"/>
		<updated>2015-08-18T11:45:14Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_Empty_NLA_Editor.PNG&amp;diff=1635</id>
		<title>File:Blender Empty NLA Editor.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_Empty_NLA_Editor.PNG&amp;diff=1635"/>
		<updated>2015-08-18T11:42:44Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_NLA_Editor.PNG&amp;diff=1634</id>
		<title>File:Blender ActionEditor NLA Editor.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_ActionEditor_NLA_Editor.PNG&amp;diff=1634"/>
		<updated>2015-08-18T11:38:34Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Blender_MeshName.PNG&amp;diff=1633</id>
		<title>File:Blender MeshName.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Blender_MeshName.PNG&amp;diff=1633"/>
		<updated>2015-08-18T11:32:21Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=C4Script_Style_Guidelines&amp;diff=1620</id>
		<title>C4Script Style Guidelines</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=C4Script_Style_Guidelines&amp;diff=1620"/>
		<updated>2015-03-29T06:21:40Z</updated>

		<summary type="html">&lt;p&gt;Zapper: Added conventions about access specifiers; also cleanups&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since many people are involved in the project, it is necessary to define some styling guidelines so that other developers can read your code more easily. Objects that have a public interface should be documented in a Javadoc-like syntax. Please adhere to this example if you edit or add new scripts. &lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
 /**&lt;br /&gt;
 	&#039;&#039;Object title&#039;&#039;&lt;br /&gt;
 	&#039;&#039;Description, including implementation details that might be interesting for other scripters&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 	@author &#039;&#039;Author(s)&#039;&#039;&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
  local some_variable;&lt;br /&gt;
 &lt;br /&gt;
 /** &#039;&#039;Explanation of what the function does&#039;&#039;&lt;br /&gt;
 	@param foo &#039;&#039;What the parameter foo is&#039;&#039;&lt;br /&gt;
 	@return &#039;&#039;What comes out of this function&#039;&#039;&lt;br /&gt;
 */&lt;br /&gt;
 public func DoSomething(int foo)&lt;br /&gt;
 {&lt;br /&gt;
 	// &#039;&#039;implementation commentars&#039;&#039;&lt;br /&gt;
 	if (foo == DIR_Left)&lt;br /&gt;
 	{&lt;br /&gt;
 		some_variable++;&lt;br /&gt;
 		CreateObject(Goal_Melee);&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	if (foo &amp;amp;&amp;amp; some_variable)&lt;br /&gt;
 		foo = foo + 1;&lt;br /&gt;
 &lt;br /&gt;
 	return foo;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== In words ===&lt;br /&gt;
&lt;br /&gt;
====Naming conventions====&lt;br /&gt;
* generally, use meaningful identifiers which are self explanatory: e.g. &amp;lt;tt&amp;gt;weapon_strength&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;iStr&amp;lt;/tt&amp;gt;&lt;br /&gt;
* for variables don&#039;t use hungarian notation, preferably use &amp;lt;tt&amp;gt;lowercase_separated_by_underscores&amp;lt;/tt&amp;gt;&lt;br /&gt;
* for functions use &amp;lt;tt&amp;gt;CamelCase()&amp;lt;/tt&amp;gt;&lt;br /&gt;
* for static constants use &amp;lt;tt&amp;gt;PREFIX_Identifier&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Indents, braces and spaces====&lt;br /&gt;
* indent code with one tab&lt;br /&gt;
* use the braces on own lines on the same indent level as the control structure / function declaration&lt;br /&gt;
* &amp;lt;code&amp;gt;{...}&amp;lt;/code&amp;gt; braces are not required for single line statements but can be added if it improves readability&lt;br /&gt;
* use spaces between operators like +, -, *, /, &amp;amp;&amp;amp;, || etc.&lt;br /&gt;
* keywords (&amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;while&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt;, etc.) are followed by a space.&lt;br /&gt;
* function names are not followed by space, commas are&lt;br /&gt;
&lt;br /&gt;
====Access specifiers for object methods====&lt;br /&gt;
Non-global methods that are part of a public interface and intended to be called from other objects or scripts, should be prefixed with the &amp;lt;tt&amp;gt;public&amp;lt;/tt&amp;gt; keyword. As a part of the public interface of an object &amp;lt;tt&amp;gt;public&amp;lt;/tt&amp;gt; methods should be documented with comments accordingly.&lt;br /&gt;
Non-interface methods should be prefixed with the &amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt; keyword. Do not leave out the access specifier. The keyword &amp;lt;tt&amp;gt;protected&amp;lt;/tt&amp;gt; is deprecated.&lt;br /&gt;
&lt;br /&gt;
====Comments and Documentation====&lt;br /&gt;
* especially for library objects or objects with an interface used by other objects, write an introductory comment including title, author(s) and a description&lt;br /&gt;
* please comment your script where it is necessary for other scripters to understand what you&#039;ve done&lt;br /&gt;
* please use Javadoc-like syntax when documenting your code so that a reference can be automatically created from it later&lt;br /&gt;
&lt;br /&gt;
====Naming prefixes for IDs====&lt;br /&gt;
* for libraries, icons and GUI elements: &amp;lt;tt&amp;gt;Library_*&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Icon_*&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;GUI_*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* for goals, rules and environment objects: &amp;lt;tt&amp;gt;Goal_*&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Rule_*&amp;lt;/code&amp;gt;, &amp;lt;tt&amp;gt;Environment_*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* for spells: &amp;lt;tt&amp;gt;Magic_*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* objects which are exclusively used by their parent objects should prefix their parent object name. e.g. &amp;lt;tt&amp;gt;ParkourCheckpoint&amp;lt;/tt&amp;gt; for a checkpoint of the parkour goal&lt;br /&gt;
&lt;br /&gt;
====Misc====&lt;br /&gt;
* For C4Script veterans: You don&#039;t need to write &amp;lt;code&amp;gt;#strict 2&amp;lt;/code&amp;gt; at the start of each script. All scripts are considered to be in &#039;&#039;strict 2&#039;&#039; style&lt;br /&gt;
* If you need multiple statements in a block, use one (&amp;lt;tt&amp;gt;if (...) { foo(); bar(); }&amp;lt;/tt&amp;gt;)! Avoid constructs like &amp;lt;tt&amp;gt;if (...) foo() &amp;amp;&amp;amp; bar();&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;if (...) Or(foo(), bar());&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:GuiPositioning.jpg&amp;diff=1431</id>
		<title>File:GuiPositioning.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:GuiPositioning.jpg&amp;diff=1431"/>
		<updated>2014-02-17T21:41:15Z</updated>

		<summary type="html">&lt;p&gt;Zapper: This gives an impression in what kind of GUI layout a certain positioning will result.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This gives an impression in what kind of GUI layout a certain positioning will result.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1327</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1327"/>
		<updated>2013-02-04T10:49:57Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Effect variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects:&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can access those entries like properties in a proplist&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var axe = FindObject(Find_ID(Axe));&lt;br /&gt;
// can collect the axe?&lt;br /&gt;
if (axe.Collectible)&lt;br /&gt;
	Collect(axe);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= nil value =&lt;br /&gt;
Variables can now have the value &amp;quot;nil&amp;quot; which simply stands for &amp;quot;nothing&amp;quot;. An unassigned variable will now have the value &amp;quot;nil&amp;quot; instead of &amp;quot;0&amp;quot; in ClonkRage&lt;br /&gt;
&lt;br /&gt;
= -&amp;gt; for function calls =&lt;br /&gt;
In ClonkRage you could had &amp;quot;object&amp;quot; parameters for most of the functions. You could for example both write:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Collect(my_item, clonk); // or&lt;br /&gt;
clonk-&amp;gt;Collect(my_item, 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in OpenClonk a lot of the &amp;quot;object&amp;quot; parameters are gone and you should always use the direct call with the &amp;quot;-&amp;gt;&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
clonk-&amp;gt;Collect(my_item);&lt;br /&gt;
// wrong: Collect(my_item, clonk);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, effect fx, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	fx.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, effect fx, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; fx.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1326</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1326"/>
		<updated>2013-02-04T10:49:08Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects:&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can access those entries like properties in a proplist&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var axe = FindObject(Find_ID(Axe));&lt;br /&gt;
// can collect the axe?&lt;br /&gt;
if (axe.Collectible)&lt;br /&gt;
	Collect(axe);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= nil value =&lt;br /&gt;
Variables can now have the value &amp;quot;nil&amp;quot; which simply stands for &amp;quot;nothing&amp;quot;. An unassigned variable will now have the value &amp;quot;nil&amp;quot; instead of &amp;quot;0&amp;quot; in ClonkRage&lt;br /&gt;
&lt;br /&gt;
= -&amp;gt; for function calls =&lt;br /&gt;
In ClonkRage you could had &amp;quot;object&amp;quot; parameters for most of the functions. You could for example both write:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Collect(my_item, clonk); // or&lt;br /&gt;
clonk-&amp;gt;Collect(my_item, 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in OpenClonk a lot of the &amp;quot;object&amp;quot; parameters are gone and you should always use the direct call with the &amp;quot;-&amp;gt;&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
clonk-&amp;gt;Collect(my_item);&lt;br /&gt;
// wrong: Collect(my_item, clonk);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	effect.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; effect.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1325</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1325"/>
		<updated>2013-02-04T10:24:44Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Proplists */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects:&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can access those entries like properties in a proplist&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var axe = FindObject(Find_ID(Axe));&lt;br /&gt;
// can collect the axe?&lt;br /&gt;
if (axe.Collectible)&lt;br /&gt;
	Collect(axe);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	effect.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; effect.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1324</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1324"/>
		<updated>2013-02-04T10:23:28Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* DefCore */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
You can access those entries like properties in a proplist&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var axe = FindObject(Find_ID(Axe));&lt;br /&gt;
// can collect the axe?&lt;br /&gt;
if (axe.Collectible)&lt;br /&gt;
	Collect(axe);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	effect.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; effect.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1323</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1323"/>
		<updated>2013-02-04T10:21:27Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	effect.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; effect.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1322</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1322"/>
		<updated>2013-02-04T10:20:50Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code type=&amp;quot;c4script&amp;quot;&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	effect.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; effect.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1321</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1321"/>
		<updated>2013-02-04T10:17:57Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= IDs =&lt;br /&gt;
Every object has an ID. In ClonkRage that were 4-character-strings like &amp;quot;CLNK&amp;quot; or &amp;quot;ROCK&amp;quot;. In OpenClonk they can have any length and consist of the typical characters, for example &amp;quot;Clonk&amp;quot;, &amp;quot;Rock&amp;quot;, &amp;quot;Rule_NoPowerNeed&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
That makes code so much more readable!&lt;br /&gt;
&lt;br /&gt;
= Proplists =&lt;br /&gt;
Proplists are what you might know from other languages as a &amp;quot;map&amp;quot;. You can assign values to keys.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var my_proplist = { foo = 3, bar = &amp;quot;Hello!&amp;quot; };&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist.bar, my_proplist.foo);&lt;br /&gt;
// the following line does the same&lt;br /&gt;
Log(&amp;quot;%s %d&amp;quot;, my_proplist[&amp;quot;bar&amp;quot;], my_proplist[&amp;quot;foo&amp;quot;]);&lt;br /&gt;
// create new property!&lt;br /&gt;
my_proplist.test = 123;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A lot of things are now proplists, for example the objects&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var clonk = FindObject(Find_ID(Clonk));&lt;br /&gt;
// print Name property of the clonk&lt;br /&gt;
Log(&amp;quot;Hello, I am %s!&amp;quot;, clonk.Name);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
or effects and the ActMap (see below).&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know, OpenClonk now supports 3D models. I won&#039;t go over how to create a model here, that would be overkill. I&#039;d much rather just give a short overview:&amp;lt;br /&amp;gt;&lt;br /&gt;
Model files have to be named &amp;quot;Graphics.mesh&amp;quot;, similarly to &amp;quot;Graphics.png&amp;quot;. The skeleton-file name for the animation and the material-file name for the texture do not follow such a restriction. &amp;lt;br/&amp;gt;&lt;br /&gt;
Note that materials have a global namespace, so two different objects with the material &amp;quot;Gold&amp;quot; would not work (Nugget &amp;amp; Idol, for example) - prefix your material names with the object ID (Nugget_Gold and Idol_Gold)!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenClonk provides several functions to work with models or &amp;quot;meshes&amp;quot;. Good entry points are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
int PlayAnimation(string animation, int slot, array position, array weight, int sibling);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and the properties &amp;quot;MeshTransformation&amp;quot; and &amp;quot;PictureTransformation&amp;quot; that you can use to f.e. rotate models.&lt;br /&gt;
&lt;br /&gt;
= Effect variables =&lt;br /&gt;
Remember &amp;quot;EffectVar&amp;quot; from ClonkRage that you could use to store variables in effects? The effect is now a proplist and that means that you can simply assign properties to it if you need variables:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	// invent new property!&lt;br /&gt;
	effect.max_time = 100;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; effect.max_time) return -1;&lt;br /&gt;
	Message(&amp;quot;Not over yet!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There are also some standard properties like &amp;quot;Interval&amp;quot; that you can use to change the interval at which Fx*Timer is called (see the [http://docs.openclonk.org/en/sdk/script/Effects.html#Properties reference])&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1311</id>
		<title>Script: CR to OC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_CR_to_OC&amp;diff=1311"/>
		<updated>2013-01-21T10:43:09Z</updated>

		<summary type="html">&lt;p&gt;Zapper: Created page with &amp;quot;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt; This page does n...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are coming from ClonkRage scripting, you will find some new things in OpenClonk. Not much and not very difficult, but you will have to know them.&amp;lt;br /&amp;gt;&lt;br /&gt;
This page does not explain every thing in detail, but should give you an overview.&lt;br /&gt;
&lt;br /&gt;
= ActMap =&lt;br /&gt;
The ActMap.txt is completely gone, you can declare actions directly in the script of an object now, like this: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local ActMap=&lt;br /&gt;
{&lt;br /&gt;
	Attach = &lt;br /&gt;
	{&lt;br /&gt;
		Prototype = Action,&lt;br /&gt;
		Name=&amp;quot;Attach&amp;quot;,&lt;br /&gt;
		Procedure=DFA_ATTACH,&lt;br /&gt;
		NextAction=&amp;quot;Be&amp;quot;,&lt;br /&gt;
		Length=1,&lt;br /&gt;
		FacetBase=1,&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This has the positive effect that you can modify actions when the game is running!&lt;br /&gt;
&lt;br /&gt;
= DefCore =&lt;br /&gt;
A lot of entries from the DefCore.txt went into script, too. Here an example from the axe script:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local Collectible = 1;&lt;br /&gt;
local Name = &amp;quot;$Name$&amp;quot;;&lt;br /&gt;
local Description = &amp;quot;$Description$&amp;quot;;&lt;br /&gt;
local UsageHelp = &amp;quot;$UsageHelp$&amp;quot;;&lt;br /&gt;
local Rebuy = true;&lt;br /&gt;
local ChopStrength = 10;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This helps if you need your own entries. Sadly there is no system which DefCore entries have moved to script and which haven&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= zoomed Graphics.png =&lt;br /&gt;
You can use 2D graphics just like in CR. But you can also defined versions for zoom levels so that the graphics do not look too pixelized at high zoom. You do that by simply putting a dot and the zoom level into the graphics name:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Graphics.4.png&lt;br /&gt;
Overlay.4.png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= 3D Models =&lt;br /&gt;
As you know,&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:Overview&amp;diff=1310</id>
		<title>Script:Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:Overview&amp;diff=1310"/>
		<updated>2013-01-20T23:02:11Z</updated>

		<summary type="html">&lt;p&gt;Zapper: moved Script:Overview to Script: Overview&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Script: Overview]]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1309</id>
		<title>Script: Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1309"/>
		<updated>2013-01-20T23:02:11Z</updated>

		<summary type="html">&lt;p&gt;Zapper: moved Script:Overview to Script: Overview&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;
&lt;br /&gt;
[[Category:Scripting Tutorial]]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1308</id>
		<title>Script: Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1308"/>
		<updated>2013-01-20T23:01:27Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &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;
&lt;br /&gt;
[[Category:Scripting Tutorial]]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1307</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1307"/>
		<updated>2013-01-20T23:01:14Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historical reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Effects as timers =&lt;br /&gt;
Sometimes you need to change behavior of objects at runtime, for example when the Clonk is affected by a poision, you might want to deal some damage every few seconds. For a purpose like that, &#039;&#039;Effects&#039;&#039; are ideal in C4Script! &#039;&#039;Effect&#039;&#039; is actually a bit a misleading name even though they can obviously be used for both graphical and behavioral effects.[br]&lt;br /&gt;
Effects are not much more than simple timers that can be added to an object at runtime. I will here only shortly describe the purpose of effects, if you need to know the syntax, check this page: [http://docs.openclonk.org/en/sdk/script/Effects.html C4Script Reference] &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to create Effects? ==&lt;br /&gt;
If you want to write a new Effect, you have to choose a name for your effect first, for example &#039;&#039;MyEffect&#039;&#039;. Then you can think about when you want certain things to happen, I&#039;ll chose the start of the Effect and every second here - other examples would be when the object takes damage or at the end of the Effect (for example when the object dies).&amp;lt;br /&amp;gt;&lt;br /&gt;
Effect functions are always prefixed with a &#039;&#039;Fx&#039;&#039; and suffixed with the name of a certain callback, f.e. &#039;&#039;Start&#039;&#039;. My example Effect now looks like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	if (temp) return;&lt;br /&gt;
	CastParticles(&amp;quot;MagicSpark&amp;quot;, 30, 10, target-&amp;gt;GetX(), target-&amp;gt;GetY(), 20, 30, RGB(50, 200, 20), RGB(50, 255, 50));&lt;br /&gt;
}&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; 36 * 10) return -1;&lt;br /&gt;
	target-&amp;gt;DoEnergy(-1);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You probably notices the weird line &#039;&#039;if (temp) return;&#039;&#039; at the beginning of my &#039;&#039;Fx*Start&#039;&#039; function. Effects can use a priority system and when an Effect with a higher priority is added, lower-priority-Effects are temporarily stopped and started again. This has its applications, but right now I don&#039;t want to do anything on those temporary calls. I only want to cast my particles when the Effect is &#039;&#039;really&#039;&#039; added initially.&amp;lt;br /&amp;gt;&lt;br /&gt;
Okay, where did I tell my Effect when it is started or how often the &#039;&#039;Fx*Timer&#039;&#039; function is called? Well, I didn&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
An Effect has to be started from a script with &#039;&#039;AddEffect&#039;&#039;, imagine the following line would be in the script of the object where I defined my effect and that object is called &#039;&#039;MyMine&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	var clonk = FindObject(Find_Distance(20), Find_ID(Clonk));&lt;br /&gt;
	if (!clonk) return;&lt;br /&gt;
	AddEffect(&amp;quot;MyEffect&amp;quot;, clonk, 20, 36, nil, MyMine);&lt;br /&gt;
}&lt;br /&gt;
/* ...here follow our effect functions as defined above... */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When I used &#039;&#039;AddEffect&#039;&#039; I had to define the target of the effect (&#039;&#039;clonk&#039;&#039;), the priority (here an arbitrary &#039;&#039;20&#039;&#039;) and the interval of the timer call (&#039;&#039;36&#039;&#039;) - and, most importantly where I defined my effect (&#039;&#039;MyMine&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
The effect will run until either the target dies or the &#039;&#039;Fx*Timer&#039;&#039; function returns &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Some Hints ==&lt;br /&gt;
&lt;br /&gt;
* You can define effects with the timer interval of 0. They will run forever until you manually remove them. Useful as data storages or statuses.&lt;br /&gt;
* You can even add effects that are not defined anywhere! They will be removed whenever their &#039;&#039;Fx*Timer&#039;&#039; function would be called the first time and obviously do not get any callbacks. That is an interesting trick if you quickly want to attach some internal status information to an object.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:Introduction&amp;diff=1306</id>
		<title>Script:Introduction</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:Introduction&amp;diff=1306"/>
		<updated>2013-01-20T22:48:29Z</updated>

		<summary type="html">&lt;p&gt;Zapper: moved Script:Introduction to Script:Overview&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Script:Overview]]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1305</id>
		<title>Script: Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1305"/>
		<updated>2013-01-20T22:48:29Z</updated>

		<summary type="html">&lt;p&gt;Zapper: moved Script:Introduction to Script:Overview&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;
&lt;br /&gt;
[[Category:Script Tutorial]]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1304</id>
		<title>Script: Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Overview&amp;diff=1304"/>
		<updated>2013-01-20T22:44:06Z</updated>

		<summary type="html">&lt;p&gt;Zapper: Created page with &amp;quot;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...&amp;quot;&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;
&lt;br /&gt;
[[Category:Script Tutorial]]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1303</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1303"/>
		<updated>2013-01-20T22:24:57Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Effects as timers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historical reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Effects as timers =&lt;br /&gt;
Sometimes you need to change behavior of objects at runtime, for example when the Clonk is affected by a poision, you might want to deal some damage every few seconds. For a purpose like that, &#039;&#039;Effects&#039;&#039; are ideal in C4Script! &#039;&#039;Effect&#039;&#039; is actually a bit a misleading name even though they can obviously be used for both graphical and behavioral effects.[br]&lt;br /&gt;
Effects are not much more than simple timers that can be added to an object at runtime. I will here only shortly describe the purpose of effects, if you need to know the syntax, check this page: [http://docs.openclonk.org/en/sdk/script/Effects.html C4Script Reference] &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to create Effects? ==&lt;br /&gt;
If you want to write a new Effect, you have to choose a name for your effect first, for example &#039;&#039;MyEffect&#039;&#039;. Then you can think about when you want certain things to happen, I&#039;ll chose the start of the Effect and every second here - other examples would be when the object takes damage or at the end of the Effect (for example when the object dies).&amp;lt;br /&amp;gt;&lt;br /&gt;
Effect functions are always prefixed with a &#039;&#039;Fx&#039;&#039; and suffixed with the name of a certain callback, f.e. &#039;&#039;Start&#039;&#039;. My example Effect now looks like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	if (temp) return;&lt;br /&gt;
	CastParticles(&amp;quot;MagicSpark&amp;quot;, 30, 10, target-&amp;gt;GetX(), target-&amp;gt;GetY(), 20, 30, RGB(50, 200, 20), RGB(50, 255, 50));&lt;br /&gt;
}&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; 36 * 10) return -1;&lt;br /&gt;
	target-&amp;gt;DoEnergy(-1);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You probably notices the weird line &#039;&#039;if (temp) return;&#039;&#039; at the beginning of my &#039;&#039;Fx*Start&#039;&#039; function. Effects can use a priority system and when an Effect with a higher priority is added, lower-priority-Effects are temporarily stopped and started again. This has its applications, but right now I don&#039;t want to do anything on those temporary calls. I only want to cast my particles when the Effect is &#039;&#039;really&#039;&#039; added initially.&amp;lt;br /&amp;gt;&lt;br /&gt;
Okay, where did I tell my Effect when it is started or how often the &#039;&#039;Fx*Timer&#039;&#039; function is called? Well, I didn&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
An Effect has to be started from a script with &#039;&#039;AddEffect&#039;&#039;, imagine the following line would be in the script of the object where I defined my effect and that object is called &#039;&#039;MyMine&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	var clonk = FindObject(Find_Distance(20), Find_ID(Clonk));&lt;br /&gt;
	if (!clonk) return;&lt;br /&gt;
	AddEffect(&amp;quot;MyEffect&amp;quot;, clonk, 20, 36, nil, MyMine);&lt;br /&gt;
}&lt;br /&gt;
/* ...here follow our effect functions as defined above... */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When I used &#039;&#039;AddEffect&#039;&#039; I had to define the target of the effect (&#039;&#039;clonk&#039;&#039;), the priority (here an arbitrary &#039;&#039;20&#039;&#039;) and the interval of the timer call (&#039;&#039;36&#039;&#039;) - and, most importantly where I defined my effect (&#039;&#039;MyMine&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
The effect will run until either the target dies or the &#039;&#039;Fx*Timer&#039;&#039; function returns &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Some Hints ==&lt;br /&gt;
&lt;br /&gt;
* You can define effects with the timer interval of 0. They will run forever until you manually remove them. Useful as data storages or statuses.&lt;br /&gt;
* You can even add effects that are not defined anywhere! They will be removed whenever their &#039;&#039;Fx*Timer&#039;&#039; function would be called the first time and obviously do not get any callbacks. That is an interesting trick if you quickly want to attach some internal status information to an object.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1302</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1302"/>
		<updated>2013-01-20T18:23:49Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historical reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Effects as timers =&lt;br /&gt;
Sometimes you need to change behavior of objects at runtime, for example when the Clonk is affected by a poision, you might want to deal some damage every few seconds. For a purpose like that, &#039;&#039;Effects&#039;&#039; are ideal in C4Script! &#039;&#039;Effect&#039;&#039; is actually a bit a misleading name even thought they can obviously be used for both graphical and behavioral effects.[br]&lt;br /&gt;
Effects are not much more than simple timers that can be added to an object at runtime. I will here only shortly describe the purpose of effects, if you need to know the syntax, check this page: [http://docs.openclonk.org/en/sdk/script/Effects.html C4Script Reference] &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to create Effects? ==&lt;br /&gt;
If you want to write a new Effect, you have to choose a name for your effect first, for example &#039;&#039;MyEffect&#039;&#039;. Then you can think about when you want certain things to happen, I&#039;ll chose the start of the Effect and every second here - other examples would be when the object takes damage or at the end of the Effect (for example when the object dies).&amp;lt;br /&amp;gt;&lt;br /&gt;
Effect functions are always prefixed with a &#039;&#039;Fx&#039;&#039; and suffixed with the name of a certain callback, f.e. &#039;&#039;Start&#039;&#039;. My example Effect now looks like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	if (temp) return;&lt;br /&gt;
	CastParticles(&amp;quot;MagicSpark&amp;quot;, 30, 10, target-&amp;gt;GetX(), target-&amp;gt;GetY(), 20, 30, RGB(50, 200, 20), RGB(50, 255, 50));&lt;br /&gt;
}&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; 36 * 10) return -1;&lt;br /&gt;
	target-&amp;gt;DoEnergy(-1);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You probably notices the weird line &#039;&#039;if (temp) return;&#039;&#039; at the beginning of my &#039;&#039;Fx*Start&#039;&#039; function. Effects can use a priority system and when an Effect with a higher priority is added, lower-priority-Effects are temporarily stopped and started again. This has its applications, but right now I don&#039;t want to do anything on those temporary calls. I only want to cast my particles when the Effect is &#039;&#039;really&#039;&#039; added initially.&amp;lt;br /&amp;gt;&lt;br /&gt;
Okay, where did I tell my Effect when it is started or how often the &#039;&#039;Fx*Timer&#039;&#039; function is called? Well, I didn&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
An Effect has to be started from a script with &#039;&#039;AddEffect&#039;&#039;, imagine the following line would be in the script of the object where I defined my effect and that object is called &#039;&#039;MyMine&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	var clonk = FindObject(Find_Distance(20), Find_ID(Clonk));&lt;br /&gt;
	if (!clonk) return;&lt;br /&gt;
	AddEffect(&amp;quot;MyEffect&amp;quot;, clonk, 20, 36, nil, MyMine);&lt;br /&gt;
}&lt;br /&gt;
/* ...here follow our effect functions as defined above... */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When I used &#039;&#039;AddEffect&#039;&#039; I had to define the target of the effect (&#039;&#039;clonk&#039;&#039;), the priority (here an arbitrary &#039;&#039;20&#039;&#039;) and the interval of the timer call (&#039;&#039;36&#039;&#039;) - and, most importantly where I defined my effect (&#039;&#039;MyMine&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
The effect will run until either the target dies or the &#039;&#039;Fx*Timer&#039;&#039; function returns &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Some Hints ==&lt;br /&gt;
&lt;br /&gt;
* You can define effects with the timer interval of 0. They will run forever until you manually remove them. Useful as data storages or statuses.&lt;br /&gt;
* You can even add effects that are not defined anywhere! They will be removed whenever their &#039;&#039;Fx*Timer&#039;&#039; function would be called the first time and obviously do not get any callbacks. That is an interesting trick if you quickly want to attach some internal status information to an object.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1301</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1301"/>
		<updated>2013-01-20T18:22:27Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historical reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Effects as timers =&lt;br /&gt;
Sometimes you need to change behavior of objects at runtime, for example when the Clonk is affected by a poision, you might want to deal some damage every few seconds. For a purpose like that, &#039;&#039;Effects&#039;&#039; are ideal in C4Script! &#039;&#039;Effect&#039;&#039; is actually a bit a misleading name even thought they can obviously be used for both graphical and behavioral effects.[br]&lt;br /&gt;
Effects are not much more than simple timers that can be added to an object at runtime. I will here only shortly describe the purpose of effects, if you need to know the syntax, check this page: [http://docs.openclonk.org/en/sdk/script/Effects.html C4Script Reference] &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to create Effects? ==&lt;br /&gt;
If you want to write a new Effect, you have to choose a name for your effect first, for example &#039;&#039;MyEffect&#039;&#039;. Then you can think about when you want certain things to happen, I&#039;ll chose the start of the Effect and every second here - other examples would be when the object takes damage or at the end of the Effect (for example when the object dies).&amp;lt;br /&amp;gt;&lt;br /&gt;
Effect functions are always prefixed with a &#039;&#039;Fx&#039;&#039; and suffixed with the name of a certain callback, f.e. &#039;&#039;Start&#039;&#039;. My example Effect now looks like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	if (temp) return;&lt;br /&gt;
	CastParticles(&amp;quot;MagicSpark&amp;quot;, 30, 10, target-&amp;gt;GetX(), target-&amp;gt;GetY(), 20, 30, RGB(50, 200, 20), RGB(50, 255, 50));&lt;br /&gt;
}&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; 36 * 10) return -1;&lt;br /&gt;
	target-&amp;gt;DoEnergy(-1);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You probably notices the weird line &#039;&#039;if (temp) return;&#039;&#039; at the beginning of my &#039;&#039;Fx*Start&#039;&#039; function. Effects can use a priority system and when an Effect with a higher priority is added, lower-priority-Effects are temporarily stopped and started again. This has its applications, but right now I don&#039;t want to do anything on those temporary calls. I really only want to cast my particles when the Effect is &#039;&#039;really&#039;&#039; added initially.&amp;lt;br /&amp;gt;&lt;br /&gt;
Okay, where did I tell my Effect when it is started or how often the &#039;&#039;Fx*Timer&#039;&#039; function is called? Well, I didn&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
An Effect has to be started from a script with &#039;&#039;AddEffect&#039;&#039;, imagine the following line would be in the script of the object where I defined my effect and that object is called &#039;&#039;MyMine&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	var clonk = FindObject(Find_Distance(20), Find_ID(Clonk));&lt;br /&gt;
	if (!clonk) return;&lt;br /&gt;
	AddEffect(&amp;quot;MyEffect&amp;quot;, clonk, 20, 36, nil, MyMine);&lt;br /&gt;
}&lt;br /&gt;
/* ...here follow our effect functions as defined above... */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When I used &#039;&#039;AddEffect&#039;&#039; I had to define the target of the effect (&#039;&#039;clonk&#039;&#039;), the priority (here an arbitrary &#039;&#039;20&#039;&#039;) and the interval of the timer call (&#039;&#039;36&#039;&#039;) - and, most importantly where I defined my effect (&#039;&#039;MyMine&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
The effect will run until either the target dies or the &#039;&#039;Fx*Timer&#039;&#039; function returns &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Some Hints ==&lt;br /&gt;
&lt;br /&gt;
* You can define effects with the timer interval of 0. They will run forever until you manually remove them. Useful as data storages or statuses.&lt;br /&gt;
* You can even add effects that are not defined anywhere! They will be removed whenever their &#039;&#039;Fx*Timer&#039;&#039; function would be called the first time and obviously do not get any callbacks. That is an interesting trick if you quickly want to attach some internal status information to an object.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1300</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1300"/>
		<updated>2013-01-20T18:22:03Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historical reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Effects as timers =&lt;br /&gt;
Sometimes you need to change behavior of objects at runtime, for example when the Clonk is affected by a poision, you might want to deal some damage every few seconds. For a purpose like that, &#039;&#039;Effects&#039;&#039; are ideal in C4Script! &#039;&#039;Effect&#039;&#039; is actually a bit a misleading name even thought they can obviously be used for both graphical and behavioral effects.[br]&lt;br /&gt;
Effects are not much more than simple timers that can be added to an object at runtime. I will here only shortly describe the purpose of effects, if you need to know the syntax, check this page: [http://docs.openclonk.org/en/sdk/script/Effects.html C4Script Reference] &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to create Effects? ==&lt;br /&gt;
If you want to write a new Effect, you have to choose a name for your effect first, for example &#039;&#039;MyEffect&#039;&#039;. Then you can think about when you want certain things to happen, I&#039;ll chose the start of the Effect and every second here - other examples would be when the object takes damage or at the end of the Effect (for example when the object dies).&amp;lt;br /&amp;gt;&lt;br /&gt;
Effect functions are always prefixed with a &#039;&#039;Fx&#039;&#039; and suffixed with the name of a certain callback, f.e. &#039;&#039;Start&#039;&#039;. My example Effect now looks like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func FxMyEffectStart(object target, proplist effect, bool temp)&lt;br /&gt;
{&lt;br /&gt;
	if (temp) return;&lt;br /&gt;
	CastParticles(&amp;quot;MagicSpark&amp;quot;, 30, 10, target-&amp;gt;GetX(), target-&amp;gt;GetY(), 20, 30, RGB(50, 200, 20), RGB(50, 255, 50));&lt;br /&gt;
}&lt;br /&gt;
func FxMyEffectTimer(object target, proplist effect, int time)&lt;br /&gt;
{&lt;br /&gt;
	if (time &amp;gt; 36 * 10) return -1;&lt;br /&gt;
	target-&amp;gt;DoEnergy(-1);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You probably notices the weird line &#039;&#039;if (temp) return;&#039;&#039; at the beginning of my &#039;&#039;Fx*Start&#039;&#039; function. Effects can use a priority system and when an Effect with a higher priority is added, lower-priority-Effects are temporarily stopped and started again. This has its applications, but right now I don&#039;t want to do anything on those temporary calls. I really only want to cast my particles when the Effect is &#039;&#039;really&#039;&#039; added initially.&amp;lt;br /&amp;gt;&lt;br /&gt;
Okay, where did I tell my Effect when it is started or how often the &#039;&#039;Fx*Timer&#039;&#039; function is called? Well, I didn&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
An Effect has to be started from a script with &#039;&#039;AddEffect&#039;&#039;, imagine the following line would be in the script of the object where I defined my effect and that object is called &#039;&#039;MyMine&#039;&#039;:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	var clonk = FindObject(Find_Distance(20), Find_ID(Clonk));&lt;br /&gt;
	if (!clonk) return;&lt;br /&gt;
	AddEffect(&amp;quot;MyEffect&amp;quot;, clonk, 20, 36, nil, MyMine);&lt;br /&gt;
}&lt;br /&gt;
/* ...here follow our effect functions as defined above... */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When I used &#039;&#039;AddEffect&#039;&#039; I had to define the target of the effect (&#039;&#039;clonk&#039;&#039;), the priority (here an arbitrary &#039;&#039;20&#039;&#039;) and the interval of the timer call (&#039;&#039;36&#039;&#039;) - and, most importantly where I defined my effect (&#039;&#039;MyMine&#039;&#039;).&amp;lt;br /&amp;gt;&lt;br /&gt;
The effect will run until either the target dies or the &#039;&#039;Fx*Timer&#039;&#039; function returns &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Some Hints&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* You can define effects with the timer interval of 0. They will run forever until you manually remove them. Useful as data storages or statuses.&lt;br /&gt;
* You can even add effects that are not defined anywhere! They will be removed whenever their &#039;&#039;Fx*Timer&#039;&#039; function would be called the first time and obviously do not get any callbacks. That is an interesting trick if you quickly want to attach some internal status information to an object.&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1299</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1299"/>
		<updated>2013-01-20T18:00:51Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historical reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1298</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1298"/>
		<updated>2013-01-20T18:00:06Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Callbacks =&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historic reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1297</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1297"/>
		<updated>2013-01-20T17:59:01Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Callbacks ==&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
	Explode(100);&lt;br /&gt;
	return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
	if (OnFire()) return true;&lt;br /&gt;
	else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
	AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
	// explode when a moving object is near&lt;br /&gt;
	if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
		Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
	if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
	return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historic reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1296</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1296"/>
		<updated>2013-01-20T17:58:00Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Callbacks ==&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
    Explode(100);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
     if (OnFire()) return true;&lt;br /&gt;
     else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
    AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
    // explode when a moving object is near&lt;br /&gt;
    if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
        Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
    if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
    return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historic reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1295</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1295"/>
		<updated>2013-01-20T17:54:09Z</updated>

		<summary type="html">&lt;p&gt;Zapper: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Callbacks ==&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
    Explode(100);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
     if (OnFire()) return true;&lt;br /&gt;
     else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/* script of a mine */&lt;br /&gt;
// called on object creation&lt;br /&gt;
func Initialize() &lt;br /&gt;
{&lt;br /&gt;
    AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
 // our custom callback&lt;br /&gt;
func Check()&lt;br /&gt;
{&lt;br /&gt;
    // explode when a moving object is near&lt;br /&gt;
    if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
        Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
// CatchBlow is called when an object takes a hit&lt;br /&gt;
func CatchBlow(int level) &lt;br /&gt;
{&lt;br /&gt;
    if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
    return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference]&amp;lt;br /&amp;gt;&lt;br /&gt;
Due to historic reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1294</id>
		<title>Script: Callbacks and Timers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Script:_Callbacks_and_Timers&amp;diff=1294"/>
		<updated>2013-01-20T17:51:42Z</updated>

		<summary type="html">&lt;p&gt;Zapper: Created page with &amp;quot;Category:C4Script Tutorial  This page assumes that you know the basics about scripting.[br] You probably reached a stage where you asked yourself &amp;quot;okay, I know how things ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:C4Script Tutorial]]&lt;br /&gt;
&lt;br /&gt;
This page assumes that you know the basics about scripting.[br]&lt;br /&gt;
You probably reached a stage where you asked yourself &amp;quot;okay, I know how things work in theory - but how do I actually bring them alive?&amp;quot;. You might want your object to interact with others or to do certain things on certain events.[br]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Callbacks ==&lt;br /&gt;
Callbacks are functions in your scripts that are called automatically when something special happens and which you can use to &#039;&#039;react&#039;&#039; to certain events. A common example is an object that explodes when it collides with the landscape, you would use the callback &#039;&#039;func Hit(int x_velocity, int y_velocity)&#039;&#039; for that. That function is called whenever your object hits the landscape (but not other objects!). To use a callback, you can simply write a function with the name of the callback into your script like that:[br]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func Hit(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
    Explode(100);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
[br]&lt;br /&gt;
Note that some callbacks also expect return values that define the reaction of your object. Take &#039;&#039;func RejectEntrance(object into_object)&#039;&#039; that you can use to prevent your object from being picked up, for example you might want your object to be non-collectable when it is on fire:[br]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func RejectCollect()&lt;br /&gt;
{&lt;br /&gt;
     if (OnFire()) return true;&lt;br /&gt;
     else return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that I omitted the parameter &#039;&#039;object into_object&#039;&#039;. The callback is still called. If you don&#039;t need certain parameters, you can leave them out.&lt;br /&gt;
[br]&lt;br /&gt;
If you want a callback that is called repeatedly every few frames, you can use the &amp;lt;code&amp;gt;AddTimer(string name, int interval)&amp;lt;/code&amp;gt; function to add a custom callback:[br]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
// script of a mine&lt;br /&gt;
func Initialize() // called on object creation&lt;br /&gt;
{&lt;br /&gt;
    AddTimer(&amp;quot;Check&amp;quot;, 30);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func Check() // our custom callback&lt;br /&gt;
{&lt;br /&gt;
    // explode when a moving object is near&lt;br /&gt;
    if (ObjectCount(Find_Distance(20), Find_OCF(OCF_HitSpeed1)) &amp;gt; 0)&lt;br /&gt;
        Explode(30);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=== inheritance and _inherited() ===&lt;br /&gt;
When you read through some of the original scripts, you will find something weird like &#039;&#039;return _inherited(...)&#039;&#039; at the end of some callbacks. The function &#039;&#039;_inherited()&#039;&#039; is used to call the same function of the parent object when your object &#039;&#039;#include&#039;&#039;s another one. So for example when you write an extension to the Clonk, you might want that the original Clonk-script still receives the function call:[br]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
func CatchBlow(int level) // CatchBlow is called when an object takes a hit&lt;br /&gt;
{&lt;br /&gt;
    if (level &amp;gt; 10) Sound(&amp;quot;Hurt*&amp;quot;);&lt;br /&gt;
    return _inherited(level, ...);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The three dots &#039;&#039;...&#039;&#039; stand for all the other parameters that you did not assign a name. So if you have a named parameter you still have to write it manually into the &#039;&#039;_inherited&#039;&#039;-call. In the above example I omitted the &#039;&#039;object by&#039;&#039; parameter of &#039;&#039;CatchBlow&#039;&#039;.[br]&lt;br /&gt;
=== List of Callbacks ===&lt;br /&gt;
You can find a list of some of the callbacks here: [http://docs.openclonk.org/en/sdk/definition/script.html#ObjektCallsderEngine C4Script Reference][br]&lt;br /&gt;
Due to historic reasons there are (currently) not all existing callbacks listed. If you are looking for a certain callback that you are sure to exist, you can go into our IRC channel and ask ;)[br]&lt;br /&gt;
[br]&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=IRCMeeting/20111021&amp;diff=1165</id>
		<title>IRCMeeting/20111021</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=IRCMeeting/20111021&amp;diff=1165"/>
		<updated>2011-10-21T22:12:53Z</updated>

		<summary type="html">&lt;p&gt;Zapper: Created page with &amp;quot;== Full Log == &amp;lt;pre&amp;gt;[20:09:12] &amp;lt;Ringwaul&amp;gt; Ok, the first topic will be (as listed in the forum) discussion of what developers have recently created [20:09:44] &amp;lt;Ringwaul&amp;gt; We&amp;#039;ll be ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Full Log ==&lt;br /&gt;
&amp;lt;pre&amp;gt;[20:09:12] &amp;lt;Ringwaul&amp;gt; Ok, the first topic will be (as listed in the forum) discussion of what developers have recently created&lt;br /&gt;
[20:09:44] &amp;lt;Ringwaul&amp;gt; We&#039;ll be forming the meeting around who is currently here, not necessarly the top-bottom list of topics&lt;br /&gt;
[20:09:49] &amp;lt;Ringwaul&amp;gt; http://pastebin.com/E2E3AYqZ&lt;br /&gt;
[20:09:52] &amp;lt;Zapper&amp;gt; Ringwaul, google docs? https://docs.google.com/document/d/106836RpSYWllSw3PavIMLorgZPO1jsJfWhJ48Nb7Hks/edit?hl=en_US&lt;br /&gt;
[20:10:05] &amp;lt;Ringwaul&amp;gt; sure&lt;br /&gt;
[20:10:49] &amp;lt;Ringwaul&amp;gt; Okay, first in the list, JCaesar with the sound system changes&lt;br /&gt;
[20:11:35] &amp;lt;Ringwaul&amp;gt; If you could explain for developers what major differences they need to know&lt;br /&gt;
[20:12:22] &amp;lt;Clonkonaut&amp;gt; JCaesar here?&lt;br /&gt;
[20:12:30] &amp;lt;Ringwaul&amp;gt; Unless you are busy and would like to pass that on for another meeting/time&lt;br /&gt;
[20:12:31] &amp;lt;Zapper&amp;gt; I poked him in TS. But he is muted there as well&lt;br /&gt;
[20:12:37] &amp;lt;Ringwaul&amp;gt; Ah, ok&lt;br /&gt;
[20:12:49] &amp;lt;Isilkor&amp;gt; &amp;lt;!Ringwaul&amp;gt; Oh, a log?  &amp;lt;- more like minutes&lt;br /&gt;
[20:12:50] &amp;lt;Ringwaul&amp;gt; Next topic, Clonkonaut and I will cover the windmill&lt;br /&gt;
[20:12:53] &amp;lt;Guenther&amp;gt; As far as I know the only change is that ? means &amp;quot;one character&amp;quot; and * &amp;quot;any number of characters&amp;quot;&lt;br /&gt;
[20:13:06] &amp;lt;Guenther&amp;gt; als well as &amp;quot;foo&amp;quot; matches foo.ogg&lt;br /&gt;
[20:13:14] &amp;lt;Ringwaul&amp;gt; alright, seems good&lt;br /&gt;
[20:13:25] &amp;lt;Maikel`&amp;gt; Is that documented already?&lt;br /&gt;
[20:13:43] &amp;lt;Guenther&amp;gt; (And that Sound.ocg sounds are kept in memory, which shouldn&#039;t affect script much)&lt;br /&gt;
[20:14:02] &amp;lt;Ringwaul&amp;gt; Alright, Clonkonaut, since you scripted the windmill you can take it for now&lt;br /&gt;
[20:14:14] &amp;lt;Clonkonaut&amp;gt; okay&lt;br /&gt;
[20:14:15] &amp;lt;Guenther&amp;gt; Maikel`: I don&#039;t think so, except that WildcardMatch uses the same thing&lt;br /&gt;
[20:14:42] &amp;lt;Ringwaul&amp;gt; I made some changes so if need be I will add some comments&lt;br /&gt;
[20:15:01] &amp;lt;Clonkonaut&amp;gt; first of all the windmill is an example of a regular producer in OC, like eg the foundry&lt;br /&gt;
[20:15:17] &amp;lt;Clonkonaut&amp;gt; we come to that when the producer lib will be explained&lt;br /&gt;
[20:15:30] &amp;lt;Clonkonaut&amp;gt; it takes seeds and produces flour&lt;br /&gt;
[20:15:59] &amp;lt;Clonkonaut&amp;gt; the windmill needs energy. Unlike a &#039;regular&#039; producer it can produce energy itself when there&#039;s wind&lt;br /&gt;
[20:16:12] &amp;lt;Clonkonaut&amp;gt; however, if there&#039;s not you can attach an external source of energy&lt;br /&gt;
[20:16:17] &amp;lt;Ringwaul&amp;gt; (for now it uses the same particle as the axe for a special effect. we may need to make this a global particle)&lt;br /&gt;
[20:17:14] &amp;lt;Clonkonaut&amp;gt; for a future perspective: maybe someone comes up with nice ideas about ~rock dust (or x dust). The mill may be used to crush any object&lt;br /&gt;
[20:18:00] &amp;lt;Ringwaul&amp;gt; okay, any questions on the windmill?&lt;br /&gt;
[20:18:03] &amp;lt;ST-DDT&amp;gt; how does the windmill detect crushable objects?&lt;br /&gt;
[20:18:24] &amp;lt;ST-DDT&amp;gt; is that a funtion or a predefined list&lt;br /&gt;
[20:18:27] &amp;lt;Ringwaul&amp;gt; Current it can&#039;t, but theoretically it would use IsWindmillIngredient()&lt;br /&gt;
[20:18:28] &amp;lt;PeterW&amp;gt; And would flints be crushable? :)&lt;br /&gt;
[20:18:44] &amp;lt;Zapper&amp;gt; &amp;lt;Ringwaul&amp;gt; okay, any questions on the windmill? &amp;lt;- it can produce energy. So I guess I can build a windmill as a more expensive wind generator?&lt;br /&gt;
[20:19:08] &amp;lt;Clonkonaut&amp;gt; we will alter it to IsWindmillIngredient() @ST-DDT&lt;br /&gt;
[20:19:12] &amp;lt;Ringwaul&amp;gt; No, it can only generate engery for itself. It may be able to in the current system, but that is not the plan&lt;br /&gt;
[20:19:17] &amp;lt;PeterW&amp;gt; I still think that it&#039;s really awkward to have a building be energy producer, consumer *and* production building at the same time&lt;br /&gt;
[20:19:31] &amp;lt;Zapper&amp;gt; &amp;lt;Ringwaul&amp;gt; No, it can only generate engery for itself. It may be able to in the current system, but that is not the plan &amp;lt;- well, why not? :)&lt;br /&gt;
[20:19:41] &amp;lt;occ&amp;gt; �03gbrammer� * �06b0190500eb� docs/sdk/script/fn/Sound.xml�:� docs: Update Sound() for recent changes&lt;br /&gt;
[20:20:02] &amp;lt;Clonkonaut&amp;gt; PeterW: the flint may be crushable, yep. I don&#039;t mind where it&#039;s done ;) the windmill doesn&#039;t produce energy for *other* structures&lt;br /&gt;
[20:20:03] &amp;lt;Ringwaul&amp;gt; Zapper: It&#039;s not a bad idea, to remove redundancy of the wind-generator. Though that model was well made&lt;br /&gt;
[20:20:15] &amp;lt;Zapper&amp;gt; or, to rephrase the question: Did you decide against that feature for some reason?&lt;br /&gt;
[20:20:19] &amp;lt;Ringwaul&amp;gt; Unforunately ideas and features should be limited to meta-topic 2 (next meeting)&lt;br /&gt;
[20:20:27] &amp;lt;PeterW&amp;gt; Is that a good thing? @ can&#039;t produce energy&lt;br /&gt;
[20:20:27] &amp;lt;Zapper&amp;gt; okay&lt;br /&gt;
[20:20:42] &amp;lt;Clonkonaut&amp;gt; no, just the current state&lt;br /&gt;
[20:20:57] &amp;lt;Ringwaul&amp;gt; Okay, let&#039;s move onto the next topic&lt;br /&gt;
[20:21:09] &amp;lt;PeterW&amp;gt; I mean, it makes sense and everything. But wouldn&#039;t a seperate automated millstone structure do so as well? :)&lt;br /&gt;
[20:21:16] &amp;lt;Ringwaul&amp;gt; Oh, whoops. Didn&#039;t cover the windmill&#039;s children topics&lt;br /&gt;
[20:21:36] &amp;lt;Clonkonaut&amp;gt; yeah, I can sum the children up&lt;br /&gt;
[20:21:44] &amp;lt;Ringwaul&amp;gt; alright&lt;br /&gt;
[20:22:06] &amp;lt;Clonkonaut&amp;gt; it&#039;s a pretty basic production line wheat -&amp;gt; seeds -&amp;gt; flour -(add water)&amp;gt; bread&lt;br /&gt;
[20:22:35] &amp;lt;Ringwaul&amp;gt; When we have the oven, this production line will be complete&lt;br /&gt;
[20:22:37] &amp;lt;Clonkonaut&amp;gt; the connection between seeds and flour is the windmill, the connection between flour and bread is missing (the &#039;kitchen&#039; building)&lt;br /&gt;
[20:22:51] &amp;lt;Ringwaul&amp;gt; -oven +kitchen ;)&lt;br /&gt;
[20:23:07] &amp;lt;Clonkonaut&amp;gt; yeah, oven, kitchen, whatever, the name doesn&#039;t matter :)&lt;br /&gt;
[20:23:25] &amp;lt;Clonkonaut&amp;gt; wheat is a plant and behaves like a plant (hoho!)&lt;br /&gt;
[20:23:36] &amp;lt;Maikel`&amp;gt; Isn&#039;t it possible to put these two buildings together?&lt;br /&gt;
[20:23:39] &amp;lt;Ringwaul&amp;gt; Seeds can also (obviously) be planted to grow more wheat, which when harvested yields 2 seeds&lt;br /&gt;
[20:23:40] &amp;lt;PeterW&amp;gt; Can it be sown?&lt;br /&gt;
[20:23:49] &amp;lt;JCaesar&amp;gt; Here now, sry, meal was too good.&lt;br /&gt;
[20:24:00] &amp;lt;Ringwaul&amp;gt; :D&lt;br /&gt;
[20:24:02] &amp;lt;Clonkonaut&amp;gt; yes, using seeds (pressing the mouse) will plant wheat when you&#039;re standing on soil&lt;br /&gt;
[20:24:18] &amp;lt;Ringwaul&amp;gt; There is even a (reused) animation :)&lt;br /&gt;
[20:24:33] &amp;lt;Clonkonaut&amp;gt; you can speed up the growing by spilling water all over the place&lt;br /&gt;
[20:24:50] &amp;lt;Ringwaul&amp;gt; Too much water drowns the plant, yes? I&#039;ve experienced that but didn&#039;t check the script&lt;br /&gt;
[20:24:53] &amp;lt;Clonkonaut&amp;gt; if there&#039;s less than 10 pixel (I think) of water the wheat will grow faster&lt;br /&gt;
[20:25:08] &amp;lt;Clonkonaut&amp;gt; if there are more pixels, wheat will die&lt;br /&gt;
[20:25:14] &amp;lt;Clonkonaut&amp;gt; (more pixels of water)&lt;br /&gt;
[20:25:16] &amp;lt;Ringwaul&amp;gt; Ok&lt;br /&gt;
[20:25:21] &amp;lt;PeterW&amp;gt; Will it die when not harvested?&lt;br /&gt;
[20:25:22] &amp;lt;Clonkonaut&amp;gt; the water is consumed by the plant&lt;br /&gt;
[20:25:35] &amp;lt;Clonkonaut&amp;gt; no, it will just be there for now&lt;br /&gt;
[20:25:46] &amp;lt;Ringwaul&amp;gt; It also seeds itself, no?&lt;br /&gt;
[20:25:50] &amp;lt;Clonkonaut&amp;gt; yes&lt;br /&gt;
[20:25:59] &amp;lt;Ringwaul&amp;gt; Okay. That seems to cover that topic&lt;br /&gt;
[20:26:01] &amp;lt;Clonkonaut&amp;gt; the source of your first seeds are natural wheat plants&lt;br /&gt;
[20:26:03] &amp;lt;PeterW&amp;gt; Hm&lt;br /&gt;
[20:26:14] &amp;lt;Zapper&amp;gt; question: Do I need tools for harvesting at the moment?&lt;br /&gt;
[20:26:20] &amp;lt;Ringwaul&amp;gt; no&lt;br /&gt;
[20:26:22] &amp;lt;PeterW&amp;gt; The water usage wouldn&#039;t be enough to be useful for keeping sea levels? ;)&lt;br /&gt;
[20:26:33] &amp;lt;Clonkonaut&amp;gt; I will cover harvesting when coming to the plant lib @Zapper&lt;br /&gt;
[20:26:42] &amp;lt;Zapper&amp;gt; okay&lt;br /&gt;
[20:27:05] &amp;lt;Ringwaul&amp;gt; Okay, if no one objects, let&#039;s move onto the Beyond the Rocks scenario folder, topic led by Maikel&lt;br /&gt;
[20:28:05] &amp;lt;Maikel`&amp;gt; I just added two scenarios there, so we can test settlement objects in &amp;quot;realistic&amp;quot; scenarios&lt;br /&gt;
[20:28:48] &amp;lt;Maikel`&amp;gt; I am not sure what the final goal as intended by Clonkonaut was, but I suspect that we need at least four scenarios for a release&lt;br /&gt;
[20:29:46] &amp;lt;Ringwaul&amp;gt; So, in relevance to the Back to the Rocks folder, it will be the folder for the settlement scenarios instead of melee and parkour&lt;br /&gt;
[20:29:59] &amp;lt;Guenther&amp;gt; We don&#039;t. If someone is uncomfortable with the number of scenarios, we can call it a beta or preview.&lt;br /&gt;
[20:30:34] &amp;lt;Maikel`&amp;gt; One scenario is the basic goldmine that we all know from CR, the other is a mountain with lots of iron and coal and you need to mine that.&lt;br /&gt;
[20:30:52] &amp;lt;Ringwaul&amp;gt; (Off topic: I would also like to make a bakery scen ;) )&lt;br /&gt;
[20:31:01] &amp;lt;Guenther&amp;gt; (Also, the idiosyncratic folder names are cute but not worth the confusion.)&lt;br /&gt;
[20:31:24] &amp;lt;Maikel`&amp;gt; I am all for Parkours/Melees/Worlds ;)&lt;br /&gt;
[20:31:37] &amp;lt;JCaesar&amp;gt; I hoped Beyond the rocks was intended to be a working title...&lt;br /&gt;
[20:31:39] &amp;lt;PeterW&amp;gt; With &amp;quot;Worlds&amp;quot; = settlement?&lt;br /&gt;
[20:31:44] &amp;lt;Maikel`&amp;gt; yes&lt;br /&gt;
[20:31:58] &amp;lt;Guenther&amp;gt; I&#039;m for nominating someone to make that decision and do the work for implementing it&lt;br /&gt;
[20:32:00] * ShadoOw (~ShadoOw@euirc-5688c77b.dip.t-dialin.net) Quit (Quit: Verlassend�)&lt;br /&gt;
[20:32:17] &amp;lt;PeterW&amp;gt; Choosing the titles? ;)&lt;br /&gt;
[20:32:21] &amp;lt;Guenther&amp;gt; And not bikeshed the naming discussion beyond &amp;quot;a newbie should be able to tell from the title what the contents are about&amp;quot;&lt;br /&gt;
[20:32:23] &amp;lt;Zapper&amp;gt; noted down as todo @title of folders&lt;br /&gt;
[20:32:27] &amp;lt;Ringwaul&amp;gt; Ok, remember this is only a topic to discuss what&#039;s been made, where we will discuss where we take it from there in meeting 2&lt;br /&gt;
[20:32:27] &amp;lt;ST-DDT&amp;gt; a short description would be enough&lt;br /&gt;
[20:32:33] &amp;lt;PeterW&amp;gt; Maikel&#039;s proposal sounds sane&lt;br /&gt;
[20:32:52] &amp;lt;Clonkonaut&amp;gt; Beyond the Rocks was just my first idea about a scenario folder&lt;br /&gt;
[20:32:55] &amp;lt;Ringwaul&amp;gt; Short ideas and proposals are fine&lt;br /&gt;
[20:33:09] &amp;lt;Clonkonaut&amp;gt; as Guenther said it thought it was cute :)&lt;br /&gt;
[20:33:27] &amp;lt;PeterW&amp;gt; Cute yes, but hard to distinguish :)&lt;br /&gt;
[20:33:28] &amp;lt;Maikel`&amp;gt; Closing this topic, these scenarios may be abused for any settlement testing purposes.&lt;br /&gt;
[20:33:54] &amp;lt;Ringwaul&amp;gt; Okay, next topic: the liquid pipe system. ST-DDT will be covering this one, as well as Clonkonaut&lt;br /&gt;
[20:34:12] &amp;lt;PeterW&amp;gt; (plus we might not want to call the next release &amp;quot;Back to the rocks&amp;quot; anymore.(&lt;br /&gt;
[20:34:39] &amp;lt;Ringwaul&amp;gt; Zapper: please delete topic 15 as we don&#039;t have enough time for something so irrelevant&lt;br /&gt;
[20:34:46] &amp;lt;Zapper&amp;gt; sure&lt;br /&gt;
[20:34:56] &amp;lt;Clonkonaut&amp;gt; I can give a rough summary on how I think the liquids work but I&#039;m not sure&lt;br /&gt;
[20:35:05] &amp;lt;Clonkonaut&amp;gt; so ST-DDT might want to take the first steps ;)&lt;br /&gt;
[20:35:10] &amp;lt;ST-DDT&amp;gt; in CR the pump calls ObjectExtractLiquid&lt;br /&gt;
[20:35:22] &amp;lt;occ&amp;gt; �03gbrammer� * �b0e41a67402b� Version.txt�:� Post-release version bump&lt;br /&gt;
[20:35:40] &amp;lt;ST-DDT&amp;gt; in my opion this is bad, because you cannot block liquid flow&lt;br /&gt;
[20:35:49] &amp;lt;Guenther&amp;gt; PeterW: The only reason 5.2 was still called that was that I didn&#039;t feel like changing the graphics&lt;br /&gt;
[20:36:13] &amp;lt;ST-DDT&amp;gt; so i decided to change this to LiquidOutput/LiquidGet&lt;br /&gt;
[20:36:37] &amp;lt;Ringwaul&amp;gt; So a &amp;quot;spout&amp;quot; can be shut on/off and an object can request liquid?&lt;br /&gt;
[20:36:40] &amp;lt;ST-DDT&amp;gt; LiquidOutput and Input are for Structures and Vehicles&lt;br /&gt;
[20:36:52] &amp;lt;ST-DDT&amp;gt; yes&lt;br /&gt;
[20:37:11] &amp;lt;Ringwaul&amp;gt; (sorry, didn&#039;t mean to interrupt :/)&lt;br /&gt;
[20:37:13] &amp;lt;ST-DDT&amp;gt; it ask the source pipe give me 10 &amp;quot;water&amp;quot;&lt;br /&gt;
[20:37:48] &amp;lt;ST-DDT&amp;gt; and than the pipe will ask the connected linekit or structure&lt;br /&gt;
[20:38:04] &amp;lt;boni&amp;gt; wouldn&#039;t it be better to ask the pipe itself, and the pipe then determines where it takes it from? (inb4 star-connections for pipes, or multiple pipes connected after each other)&lt;br /&gt;
[20:38:09] &amp;lt;ST-DDT&amp;gt; this will return &amp;quot;oh sorry i only got 3 water&amp;quot;&lt;br /&gt;
[20:38:44] &amp;lt;ST-DDT&amp;gt; after that the pump put this 3 water into the drainpipe&lt;br /&gt;
[20:39:23] &amp;lt;PeterW&amp;gt; That&#039;s almost like pressure, isn&#039;t it? :)&lt;br /&gt;
[20:39:24] &amp;lt;ST-DDT&amp;gt; but the connected steamengine don&#039;t want water so it returns a 0&lt;br /&gt;
[20:39:45] &amp;lt;Zapper&amp;gt; What if a pump does not know how much water is left in the lake?&lt;br /&gt;
[20:40:19] &amp;lt;ST-DDT&amp;gt; the pump cannot empty its contents until the pumptarget acept this&lt;br /&gt;
[20:40:23] -occ:#openclonk-dev- linux-x86-gcc build status: �03c4group c4script clonk OK� (built branch default (b0e41a67402b); Log: http://hg.openclonk.org/+lLWbBwQ0)&lt;br /&gt;
[20:40:28] * Sven2 (_ve_2@goldwipf.de) Quit (Quit: �)&lt;br /&gt;
[20:40:42] &amp;lt;ST-DDT&amp;gt; the pump only limit which and how many liquid is pumped&lt;br /&gt;
[20:40:48] &amp;lt;Ringwaul&amp;gt; That makes sense&lt;br /&gt;
[20:41:07] &amp;lt;ST-DDT&amp;gt; you can also ask for anything using &amp;quot;*&amp;quot;&lt;br /&gt;
[20:41:36] &amp;lt;ST-DDT&amp;gt; the linekit uses ExtractLiquid to gain these materials&lt;br /&gt;
[20:41:54] &amp;lt;PeterW&amp;gt; So you can just pluck everything together and get a network that can deliver anything you &amp;quot;ask&amp;quot; for?&lt;br /&gt;
[20:41:56] &amp;lt;ST-DDT&amp;gt; you can also redirect liquids&lt;br /&gt;
[20:42:05] &amp;lt;ST-DDT&amp;gt; yes&lt;br /&gt;
[20:42:20] &amp;lt;Maikel`&amp;gt; how abount infinite loops?&lt;br /&gt;
[20:42:40] &amp;lt;PeterW&amp;gt; Not sure I see the problem that solves&lt;br /&gt;
[20:42:51] &amp;lt;ST-DDT&amp;gt; LiquidInput(String Material, int amount, object pPump, object pPipe)&lt;br /&gt;
[20:43:05] &amp;lt;ST-DDT&amp;gt; infine loops aren&#039;t blocked at this time&lt;br /&gt;
[20:43:36] &amp;lt;ST-DDT&amp;gt; but this could be fixed using a counterparam&lt;br /&gt;
[20:44:01] &amp;lt;ST-DDT&amp;gt; which terminate execution after 100 redirection&lt;br /&gt;
[20:44:15] &amp;lt;ST-DDT&amp;gt; or you cann append a list of visited structures&lt;br /&gt;
[20:44:43] &amp;lt;Maikel`&amp;gt; Okay, that&#039;s fine&lt;br /&gt;
[20:44:54] &amp;lt;ST-DDT&amp;gt; i included two libaries, which are sample codes at the moment&lt;br /&gt;
[20:45:14] &amp;lt;Maikel`&amp;gt; I still need to see it in action for some production facility that needs liquid (I need to adapt the producer library)&lt;br /&gt;
[20:45:24] &amp;lt;Zapper&amp;gt; Maikel`, windmill? ;)&lt;br /&gt;
[20:45:36] &amp;lt;Ringwaul&amp;gt; Kitchen makes more sense, for baking bread&lt;br /&gt;
[20:45:38] -occ:#openclonk-dev- linux-x64-clang build status: �03c4group c4script clonk OK� (built branch default (b0e41a67402b); Log: http://hg.openclonk.org/+OJlnPbrf)&lt;br /&gt;
[20:45:39] &amp;lt;Maikel`&amp;gt; yes, that requires some coding still&lt;br /&gt;
[20:45:48] &amp;lt;Zapper&amp;gt; ah, right, kitchen, sorry&lt;br /&gt;
[20:45:49] &amp;lt;ST-DDT&amp;gt; the first offers an internal tank like the steamengine could use. (limited to oil)&lt;br /&gt;
[20:46:42] &amp;lt;Zapper&amp;gt; So the libraries are not general yet?&lt;br /&gt;
[20:46:50] &amp;lt;ST-DDT&amp;gt; the script is compled i think you only have to LiquidInput(....)&lt;br /&gt;
[20:46:50] &amp;lt;ST-DDT&amp;gt; if Material!=oil&lt;br /&gt;
[20:46:50] &amp;lt;ST-DDT&amp;gt; return 0&lt;br /&gt;
[20:46:50] &amp;lt;ST-DDT&amp;gt; return _inherited;&lt;br /&gt;
[20:47:12] &amp;lt;Zapper&amp;gt; (&amp;quot;general&amp;quot; as in &amp;quot;dynamic&amp;quot;)&lt;br /&gt;
[20:47:33] &amp;lt;ST-DDT&amp;gt; i think they are dynamic&lt;br /&gt;
[20:48:04] &amp;lt;Maikel`&amp;gt; I see some need for changes in these libraries coming from the interplay with the producer anyways&lt;br /&gt;
[20:48:18] &amp;lt;Ringwaul&amp;gt; (note: I grossly under-estimated time needs, so we will extend meta-topic 1 until the end of the hour :/)&lt;br /&gt;
[20:48:32] &amp;lt;ST-DDT&amp;gt; as i sayed befor you only have to write 3 lines to implement the functionallity of steamengine&lt;br /&gt;
[20:48:33] &amp;lt;Ringwaul&amp;gt; (We should have a short time after to assign tasks)&lt;br /&gt;
[20:48:53] &amp;lt;Maikel`&amp;gt; Btw I have dinner in a few minutes&lt;br /&gt;
[20:49:02] &amp;lt;ST-DDT&amp;gt; the second libary does that what the engine in CR did before inserting lqiuids to barrels&lt;br /&gt;
[20:49:25] &amp;lt;Ringwaul&amp;gt; Maikel: okay, we&#039;ll cover the producer next, if that&#039;s Ok&lt;br /&gt;
[20:49:35] &amp;lt;ST-DDT&amp;gt; i finished&lt;br /&gt;
[20:49:42] -occ:#openclonk-dev- win32-x86-mingw build status: �03c4group c4script clonk OK� (built branch default (b0e41a67402b); Log: http://hg.openclonk.org/+ixulCJvX)&lt;br /&gt;
[20:49:44] &amp;lt;Ringwaul&amp;gt; Alright&lt;br /&gt;
[20:49:46] &amp;lt;Zapper&amp;gt; kk&lt;br /&gt;
[20:50:41] &amp;lt;Maikel`&amp;gt; ok&lt;br /&gt;
[20:50:41] &amp;lt;ST-DDT&amp;gt; what is occ notice.....&lt;br /&gt;
[20:50:59] &amp;lt;ST-DDT&amp;gt; the compiler?&lt;br /&gt;
[20:51:02] &amp;lt;Ringwaul&amp;gt; ST-DDT: yes&lt;br /&gt;
[20:51:02] &amp;lt;Clonkonaut&amp;gt; yep&lt;br /&gt;
[20:51:18] &amp;lt;Ringwaul&amp;gt; Maikel, can you cover the topic or do you want to delay it for another time?&lt;br /&gt;
[20:51:27] &amp;lt;Maikel`&amp;gt; The producer library covers all aspects of automatic object production by structures&lt;br /&gt;
[20:51:35] &amp;lt;Ringwaul&amp;gt; ah, k&lt;br /&gt;
[20:51:36] &amp;lt;Ringwaul&amp;gt; ;)&lt;br /&gt;
[20:51:37] &amp;lt;Maikel`&amp;gt; I&#039;ll do it now, 10mins before dinner&lt;br /&gt;
[20:53:03] &amp;lt;Maikel`&amp;gt; The user can currently add requests to a queue which the producer will execute if resources, etc. are available (due to missing menus, you can&#039;t clear queues add multiple item&#039;s&lt;br /&gt;
[20:53:08] &amp;lt;Maikel`&amp;gt; view the queue etc.&lt;br /&gt;
[20:53:10] &amp;lt;Maikel`&amp;gt; )&lt;br /&gt;
[20:53:31] &amp;lt;Ringwaul&amp;gt; (Newton had a nice menu design for that btw)&lt;br /&gt;
[20:53:49] &amp;lt;PeterW&amp;gt; What about automated production?&lt;br /&gt;
[20:54:04] &amp;lt;Maikel`&amp;gt; The library then checks for components, fuel, liquids(TODO) and power and executes production&lt;br /&gt;
[20:54:07] &amp;lt;Maikel`&amp;gt; automated as in?&lt;br /&gt;
[20:54:10] -occ:#openclonk-dev- win32-x64-mingw build status: �03c4group c4script clonk OK� (built branch default (b0e41a67402b); Log: http://hg.openclonk.org/+v3XQOI98)&lt;br /&gt;
[20:54:36] &amp;lt;Maikel`&amp;gt; If you leftclick ore in the foundry you just need to throw in ore and coal and it works&lt;br /&gt;
[20:54:44] &amp;lt;PeterW&amp;gt; Well, it produces whatever you selected until you select something else or it runs out of resources&lt;br /&gt;
[20:55:17] &amp;lt;Maikel`&amp;gt; it produces 1 (rightclick) or inf(leftclick), but better menus should improve that&lt;br /&gt;
[20:55:59] &amp;lt;PeterW&amp;gt; Well, imo infinite production makes most sense as the default&lt;br /&gt;
[20:56:16] &amp;lt;PeterW&amp;gt; That makes it consistent with mill-like structures&lt;br /&gt;
[20:56:31] &amp;lt;Zapper&amp;gt; (I don&#039;t think that is wise!)&lt;br /&gt;
[20:56:38] &amp;lt;Maikel`&amp;gt; only for the foundry currently, certainly not for the toolshed&lt;br /&gt;
[20:56:39] &amp;lt;PeterW&amp;gt; (Obviously it should have a stop setting)&lt;br /&gt;
[20:56:58] &amp;lt;PeterW&amp;gt; Toolshed?&lt;br /&gt;
[20:57:00] &amp;lt;Zapper&amp;gt; Noted down in the protocol&lt;br /&gt;
[20:57:08] &amp;lt;Ringwaul&amp;gt; PeterW: tools workshop&lt;br /&gt;
[20:57:12] &amp;lt;Clonkonaut&amp;gt; if we decide on automated production, we should make a seperated workshop library&lt;br /&gt;
[20:57:14] &amp;lt;Maikel`&amp;gt; We need better menus :(&lt;br /&gt;
[20:57:21] &amp;lt;Clonkonaut&amp;gt; which produces &#039;on demand&#039;&lt;br /&gt;
[20:57:31] &amp;lt;PeterW&amp;gt; Yeah, better menus we need ;)&lt;br /&gt;
[20:57:57] &amp;lt;Ringwaul&amp;gt; Ok, anything else?&lt;br /&gt;
[20:58:06] &amp;lt;Maikel`&amp;gt; the interface is the problem currently, not the library(although that needs some work if the interface is better)&lt;br /&gt;
[20:58:12] &amp;lt;Maikel`&amp;gt; yeah&lt;br /&gt;
[20:58:20] &amp;lt;Maikel`&amp;gt; automatic rejection of contents&lt;br /&gt;
[20:58:32] &amp;lt;PeterW&amp;gt; Well, it sort-of makes sense for workshops, as you mostly only need one item of what you want to produce&lt;br /&gt;
[20:58:46] &amp;lt;Maikel`&amp;gt; I intended the library to automatically reject anything that isn&#039;t need for production&lt;br /&gt;
[20:58:49] &amp;lt;PeterW&amp;gt; But say, for chemical stuff, mass-production might be the more common case&lt;br /&gt;
[20:59:09] &amp;lt;Maikel`&amp;gt; but this currently means looping through all definitions on a RejectCollect() call :(&lt;br /&gt;
[20:59:37] &amp;lt;Clonkonaut&amp;gt; that&#039;s why Ringwaul inserted the Is*Ingredient callback&lt;br /&gt;
[20:59:53] &amp;lt;PeterW&amp;gt; We&#039;d actually need it the other way round&lt;br /&gt;
[21:00:04] &amp;lt;PeterW&amp;gt; UsesIngredient() in the producer&lt;br /&gt;
[21:00:13] &amp;lt;Clonkonaut&amp;gt; the current producers, foundry and windmill, only accept items flagged as IsFoundryIngredient / IsWindmillIngredient&lt;br /&gt;
[21:00:16] &amp;lt;Zapper&amp;gt; &amp;lt;Clonkonaut&amp;gt; that&#039;s why Ringwaul inserted the Is*Ingredient callback &amp;lt;- which means I cannot add a new item that needs wood without changing the script of wood, too :&amp;lt;&lt;br /&gt;
[21:00:22] &amp;lt;PeterW&amp;gt; We&#039;d need that anyway for menus - at least the way I&#039;d imagine them&lt;br /&gt;
[21:00:35] &amp;lt;Maikel`&amp;gt; actually you can get the used ingredients from components and fuel&lt;br /&gt;
[21:00:41] &amp;lt;Ringwaul&amp;gt; Hm? I made Is*Ingredient so it would be extendable&lt;br /&gt;
[21:01:10] &amp;lt;JCaesar&amp;gt; Hm, why do we need a loop over all Definitions on all RejectCollect()-Calls?&lt;br /&gt;
[21:01:13] &amp;lt;JCaesar&amp;gt; Actually, only once would be fine, right?&lt;br /&gt;
[21:01:16] &amp;lt;Maikel`&amp;gt; Yeah the thing ringwaul introduced fails(no offense)&lt;br /&gt;
[21:01:22] &amp;lt;Ringwaul&amp;gt; heh :)&lt;br /&gt;
[21:01:27] &amp;lt;Zapper&amp;gt; dislike from my side!&lt;br /&gt;
[21:01:44] &amp;lt;Maikel`&amp;gt; once in initialize may be fine&lt;br /&gt;
[21:02:06] &amp;lt;JCaesar&amp;gt; Once globally should suffice.&lt;br /&gt;
[21:02:14] &amp;lt;PeterW&amp;gt; What&#039;s the harm in making it explicit in the producer?&lt;br /&gt;
[21:02:25] &amp;lt;Ringwaul&amp;gt; I added that becaues I didn&#039;t quite understand how producers defined what they could collect. I noticed windmills collecting flour and foundries collecting metal, and that&#039;s not right&lt;br /&gt;
[21:02:27] &amp;lt;Maikel`&amp;gt; or we introduce FindDefinition :)&lt;br /&gt;
[21:02:32] &amp;lt;PeterW&amp;gt; It seems strange that a single faulty object definition might change the object rejection behaviour of the lab&lt;br /&gt;
[21:02:37] &amp;lt;JCaesar&amp;gt; PeterW: You risk forgetting one of the two things.&lt;br /&gt;
[21:02:56] &amp;lt;PeterW&amp;gt; Well, you just need to test whether you can actually produce it&lt;br /&gt;
[21:03:17] &amp;lt;Zapper&amp;gt; okay. I marked that in a BIG �4RED�1 in the protocol&lt;br /&gt;
[21:03:27] &amp;lt;Zapper&amp;gt; discuss another time? :)&lt;br /&gt;
[21:03:31] &amp;lt;Maikel`&amp;gt; meta topic 2&lt;br /&gt;
[21:03:33] &amp;lt;Ringwaul&amp;gt; Yes, looks like it&lt;br /&gt;
[21:03:34] &amp;lt;Clonkonaut&amp;gt; no, you need to test whether an object you can produced is made of this&lt;br /&gt;
[21:03:34] &amp;lt;JCaesar&amp;gt; And then you change the ingredients of an object and forget that it is not needed any longer.&lt;br /&gt;
[21:03:34] &amp;lt;Maikel`&amp;gt; &amp;lt;-- dinner&lt;br /&gt;
[21:03:37] &amp;lt;JCaesar&amp;gt; Zapper, hm, well, k.&lt;br /&gt;
[21:03:49] &amp;lt;Clonkonaut&amp;gt; -d&lt;br /&gt;
[21:03:57] &amp;lt;PeterW&amp;gt; Well, you&#039;d see it pop up in the menu all the time&lt;br /&gt;
[21:03:58] &amp;lt;PeterW&amp;gt; Hm&lt;br /&gt;
[21:04:06] &amp;lt;PeterW&amp;gt; I suppose that argument cuts both ways though.&lt;br /&gt;
[21:04:08] &amp;lt;PeterW&amp;gt; But let&#039;s move on :)&lt;br /&gt;
[21:04:14] &amp;lt;Ringwaul&amp;gt; Meta topic 3 rather&lt;br /&gt;
[21:04:23] &amp;lt;Ringwaul&amp;gt; I know it&#039;s weird, but meta-topic 2 will be in meeting 2&lt;br /&gt;
[21:04:42] &amp;lt;PeterW&amp;gt; What&#039;s a meta-topic? o_O&lt;br /&gt;
[21:04:44] &amp;lt;Zapper&amp;gt; I don&#039;t even know what meta topic 2 is, so it&#039;s okay&lt;br /&gt;
[21:04:47] &amp;lt;Clonkonaut&amp;gt; okay, gold bar / nugget?&lt;br /&gt;
[21:04:57] &amp;lt;Ringwaul&amp;gt; Ah, quick explaination&lt;br /&gt;
[21:05:10] &amp;lt;JCaesar&amp;gt; http://forum.openclonk.org/topic_show.pl?tid=866 &amp;lt;- PeterW: The numbers listed here.&lt;br /&gt;
[21:05:15] &amp;lt;PeterW&amp;gt; perhaps discussing whether topics make sense? :)&lt;br /&gt;
[21:05:21] &amp;lt;PeterW&amp;gt; That would be a meta-topic&lt;br /&gt;
[21:05:29] &amp;lt;Ringwaul&amp;gt; 3 gold nugget + 1 coal = gold bar from foundry. Currently we have concensus what gold will be used for&lt;br /&gt;
[21:05:40] &amp;lt;Ringwaul&amp;gt; no consensus*&lt;br /&gt;
[21:05:47] &amp;lt;Zapper&amp;gt; ah :D&lt;br /&gt;
[21:06:01] &amp;lt;Ringwaul&amp;gt; Now onto assigning tasks from the settlement design document :D&lt;br /&gt;
[21:06:14] &amp;lt;PeterW&amp;gt; We haven&#039;t? o_O @ consensus&lt;br /&gt;
[21:06:18] &amp;lt;Clonkonaut&amp;gt; first thing I want to say: I know the naming objections against nuggets and I have in mind renaming it to &#039;gold&#039; again.&lt;br /&gt;
[21:06:40] &amp;lt;Zapper&amp;gt; PeterW, we two do not count as a consensus I am afraid :)&lt;br /&gt;
[21:06:44] &amp;lt;Ringwaul&amp;gt; The most priority things we need are finishing the producer menu system and creating the buildings&lt;br /&gt;
[21:06:47] &amp;lt;JCaesar&amp;gt; PeterW: Not really, since some (including me) are against classicale base trading.&lt;br /&gt;
[21:07:03] &amp;lt;PeterW&amp;gt; Then be against gold&lt;br /&gt;
[21:07:56] &amp;lt;Ringwaul&amp;gt; up till now clonkonaut and I have been coordinating in the creation of the producer buildings&lt;br /&gt;
[21:07:57] &amp;lt;PeterW&amp;gt; I mean, when there&#039;s no gold, there won&#039;t be trading&lt;br /&gt;
[21:08:24] &amp;lt;PeterW&amp;gt; This only becomes an issue if you *also* want to do something else with gold, no?&lt;br /&gt;
[21:09:12] &amp;lt;Ringwaul&amp;gt; Buildings that still need to be made are: Armory, Chemical Lab, Kitchen (oven?), Loom, Inventor&#039;s Shop, and Shipyard&lt;br /&gt;
[21:09:20] &amp;lt;Ringwaul&amp;gt; Both graphically and script-wise&lt;br /&gt;
[21:09:51] &amp;lt;Ringwaul&amp;gt; Since they mostly inherit from the producer, scripting shouldn&#039;t be too much work&lt;br /&gt;
[21:10:32] &amp;lt;Ringwaul&amp;gt; I was thinking for the graphical section, Mimmo_O and I would concept and model the remaining structures&lt;br /&gt;
[21:11:18] &amp;lt;Ringwaul&amp;gt; Is that agreeable? Or would you like to work on a different subject?&lt;br /&gt;
[21:11:32] &amp;lt;Clonkonaut&amp;gt; in case you lack of ideas, I maybe would make some drafts&lt;br /&gt;
[21:12:13] &amp;lt;Ringwaul&amp;gt; Sounds good. I don&#039;t have too much experience with structural design. Also, if Matthi has the time his designs are also nice&lt;br /&gt;
[21:12:50] &amp;lt;Ringwaul&amp;gt; Ping! Mimmo_O&lt;br /&gt;
[21:12:55] &amp;lt;Ringwaul&amp;gt; You there? :z&lt;br /&gt;
[21:13:01] &amp;lt;JCaesar&amp;gt; Clonkonaut: The shipyard needs a large pump to fill the baloon!&lt;br /&gt;
[21:13:20] &amp;lt;Zapper&amp;gt; and it needs to pump water in there so that I can throw my air ship onto the head of my enemy&lt;br /&gt;
[21:13:46] * JCaesar doubts you can carry a blimp filled with water)&lt;br /&gt;
[21:13:53] &amp;lt;Ringwaul&amp;gt; heh&lt;br /&gt;
[21:14:14] &amp;lt;Clonkonaut&amp;gt; did we skip the remaining topics btw?&lt;br /&gt;
[21:14:20] &amp;lt;JCaesar&amp;gt; .oO(airship-acid-bomb)&lt;br /&gt;
[21:14:40] &amp;lt;Ringwaul&amp;gt; Clonkonaut: We&#039;re leaving them for tomorrow&lt;br /&gt;
[21:14:55] &amp;lt;Clonkonaut&amp;gt; oh :I&lt;br /&gt;
[21:15:08] &amp;lt;Clonkonaut&amp;gt; I&#039;m maybe not present tomorrow!&lt;br /&gt;
[21:15:31] &amp;lt;Ringwaul&amp;gt; Shucks. Well, topic 3 seems a lot more barren than I anticipated&lt;br /&gt;
[21:15:43] &amp;lt;Zapper&amp;gt; What is topic 3? :&amp;lt;&lt;br /&gt;
[21:16:01] &amp;lt;JCaesar&amp;gt; &amp;quot;3. Assigning tasks from the Settlement Design Doc. This should be fairly straightforward.&amp;quot;&lt;br /&gt;
[21:16:15] &amp;lt;Clonkonaut&amp;gt; I could finish my topics today. Eat and StonyObjectHit aren&#039;t much to tell which would leave us with the plant lib&lt;br /&gt;
[21:16:24] &amp;lt;Ringwaul&amp;gt; Okay, that seems like a good idea&lt;br /&gt;
[21:16:39] &amp;lt;Ringwaul&amp;gt; Let&#039;s return to that for the remainder of today&#039;s meeting&lt;br /&gt;
[21:17:51] &amp;lt;Clonkonaut&amp;gt; okay, I&#039;ll make it quick&lt;br /&gt;
[21:18:41] &amp;lt;Clonkonaut&amp;gt; StonyObjectHit generates a proper hit sound for &amp;quot;stony objects&amp;quot; (rock, ore, nugget, ...)&lt;br /&gt;
[21:19:00] &amp;lt;Zapper&amp;gt; Is that a sound or a function?&lt;br /&gt;
[21:19:07] &amp;lt;Clonkonaut&amp;gt; a function&lt;br /&gt;
[21:19:08] &amp;lt;Zapper&amp;gt; Sound(&amp;quot;StonyObjectHit*&amp;quot;)?&lt;br /&gt;
[21:19:10] &amp;lt;Zapper&amp;gt; ah&lt;br /&gt;
[21:19:12] &amp;lt;Zapper&amp;gt; any reason for that?&lt;br /&gt;
[21:19:13] &amp;lt;Clonkonaut&amp;gt; StonyObjectHit(x,y)&lt;br /&gt;
[21:19:20] &amp;lt;Ringwaul&amp;gt; Zapper: yup&lt;br /&gt;
[21:19:36] &amp;lt;Clonkonaut&amp;gt; x and y are the same parameters of hit and an object should just pass them on&lt;br /&gt;
[21:19:38] &amp;lt;Guenther&amp;gt; For 20., I can offer these three links: http://forum.openclonk.org/topic_show.pl?pid=14337#pid14337 http://forum.openclonk.org/topic_show.pl?tid=815 http://bugs.openclonk.org/view.php?id=532&lt;br /&gt;
[21:20:02] &amp;lt;Clonkonaut&amp;gt; (func Hit(x,y) { StonyObjectHit(x,y) })&lt;br /&gt;
[21:20:19] &amp;lt;Zapper&amp;gt; What does that function do?&lt;br /&gt;
[21:20:24] &amp;lt;Clonkonaut&amp;gt; when hitting soft ground (earth, sand, everthing with CanDig=1) it sounds a &#039;thump&#039;&lt;br /&gt;
[21:20:25] &amp;lt;Ringwaul&amp;gt; This way, a stone object makes a different sound when it hits a soft surface than a hard surface&lt;br /&gt;
[21:20:34] &amp;lt;Zapper&amp;gt; ah&lt;br /&gt;
[21:20:36] &amp;lt;Zapper&amp;gt; okay&lt;br /&gt;
[21:20:41] &amp;lt;Clonkonaut&amp;gt; when hitting hard ground (rock, ore, everything with no CanDig) it a sounds &#039;clang&#039;&lt;br /&gt;
[21:20:52] &amp;lt;Clonkonaut&amp;gt; (I called them SoftHit* and HardHit* iirc)&lt;br /&gt;
[21:21:04] &amp;lt;Guenther&amp;gt; (Soon, you&#039;ll be able to do that with just local Hit = some_lib.StonyObjectHit; I&#039;m almost done with the necessary engine changes.)&lt;br /&gt;
[21:21:07] &amp;lt;Isilkor&amp;gt; shouldn&#039;t it make more of a clack if it&#039;s a stony object&lt;br /&gt;
[21:21:18] &amp;lt;Ringwaul&amp;gt; GÃ¼nther: neat :)&lt;br /&gt;
[21:21:30] &amp;lt;Clonkonaut&amp;gt; Isilkor: imagine throwing a rock into mud&lt;br /&gt;
[21:21:36] &amp;lt;Clonkonaut&amp;gt; it doesn&#039;t clang, it thumps!&lt;br /&gt;
[21:21:56] &amp;lt;Clonkonaut&amp;gt; but when throwing it against a cliff, it clangs&lt;br /&gt;
[21:21:57] &amp;lt;Isilkor&amp;gt; 21:20 &amp;lt;!Clonkonaut&amp;gt; when hitting hard ground (rock, ore, everything with no CanDig) it a sounds &#039;clang&#039;&lt;br /&gt;
[21:22:00] &amp;lt;Ringwaul&amp;gt; I think he meant &amp;quot;clang&amp;quot; is a metal sound where &amp;quot;clack&amp;quot; is a rock sound&lt;br /&gt;
[21:22:14] &amp;lt;Clonkonaut&amp;gt; oh yeah, whatever ;)&lt;br /&gt;
[21:22:38] &amp;lt;Clonkonaut&amp;gt; because the thumps were awkward for sliding objects&lt;br /&gt;
[21:22:44] &amp;lt;Ringwaul&amp;gt; Forreal&lt;br /&gt;
[21:22:58] &amp;lt;Ringwaul&amp;gt; We&#039;ll also need another for metal objects clanging against hard surfaces&lt;br /&gt;
[21:23:06] &amp;lt;Clonkonaut&amp;gt; StonyObjectHit() produces a lighter sound if the object&#039;s fast&lt;br /&gt;
[21:23:17] &amp;lt;Clonkonaut&amp;gt; (assuming it will slide on eg it is on a slope)&lt;br /&gt;
[21:23:21] &amp;lt;Ringwaul&amp;gt; Oh, cool. Didn&#039;t know&lt;br /&gt;
[21:23:22] &amp;lt;JCaesar&amp;gt; stone-&amp;gt;dirt:thumb,stone-&amp;gt;stone:clak,stone-&amp;gt;iron:doing,wood-&amp;gt;dirt/stone:thumb,wood-&amp;gt;iron:dong,*-&amp;gt;slide:slrf.&lt;br /&gt;
[21:23:25] &amp;lt;JCaesar&amp;gt; Or so?&lt;br /&gt;
[21:24:07] &amp;lt;Clonkonaut&amp;gt; okay, that&#039;s with stonyobjecthit. It is somwhere in System.ocg. Probably Helpers.c&lt;br /&gt;
[21:24:10] &amp;lt;Ringwaul&amp;gt; Well, we figure ore/rock will probably make the same sound when hit as a landscape material&lt;br /&gt;
[21:24:58] &amp;lt;Clonkonaut&amp;gt; Eat() is more or less a dummy function in the clonk&lt;br /&gt;
[21:25:12] &amp;lt;Clonkonaut&amp;gt; just regaining energy. Eat(10)-&amp;gt;10 energy&lt;br /&gt;
[21:25:33] &amp;lt;Ringwaul&amp;gt; By the way, did you disable movement while eating?&lt;br /&gt;
[21:25:41] &amp;lt;Clonkonaut&amp;gt; I hope so&lt;br /&gt;
[21:25:46] &amp;lt;Ringwaul&amp;gt; I added a check so he could only do it while walking&lt;br /&gt;
[21:25:51] &amp;lt;Clonkonaut&amp;gt; no, I think itÃ„s disabled&lt;br /&gt;
[21:25:54] &amp;lt;Clonkonaut&amp;gt; *&#039;&lt;br /&gt;
[21:25:59] &amp;lt;Ringwaul&amp;gt; ah, kk&lt;br /&gt;
[21:26:17] &amp;lt;Clonkonaut&amp;gt; okay, plants&lt;br /&gt;
[21:26:22] &amp;lt;Clonkonaut&amp;gt; last of my topics&lt;br /&gt;
[21:27:03] &amp;lt;Clonkonaut&amp;gt; Engine changes for plants: Placement=3 will place the plants underground (tunnel background), Placement=4 is a combination of 0 (surface) and 3 (underground)&lt;br /&gt;
[21:28:15] &amp;lt;Clonkonaut&amp;gt; short plants are moved up/down if needed. The position is determined by two vertices (CNAT_Center should be free, CNAT_Bottom should have contact)&lt;br /&gt;
[21:28:35] &amp;lt;Clonkonaut&amp;gt; this is done Construction. I just fixed the function, it was in there before I started&lt;br /&gt;
[21:28:46] &amp;lt;Ringwaul&amp;gt; &amp;gt;_&amp;gt;&lt;br /&gt;
[21:28:52] &amp;lt;Clonkonaut&amp;gt; *in Construction&lt;br /&gt;
[21:29:03] &amp;lt;ST-DDT&amp;gt; are CNAT_Left==1/2 in CR they weren&#039;t&lt;br /&gt;
[21:29:18] &amp;lt;Ringwaul&amp;gt; Written by some nub who couldn&#039;t script worth beans ~cough~ me ~cough~&lt;br /&gt;
[21:29:52] &amp;lt;Clonkonaut&amp;gt; there are two type of plants which do more than just &#039;being there&#039;&lt;br /&gt;
[21:29:54] &amp;lt;Ringwaul&amp;gt; you can check the docs&lt;br /&gt;
[21:30:32] &amp;lt;Clonkonaut&amp;gt; one are wood-giving plants (like trees)&lt;br /&gt;
[21:30:53] &amp;lt;Zapper&amp;gt; Mh, construction?&lt;br /&gt;
[21:30:54] &amp;lt;Matthi&amp;gt; You may make a list of needed designs&lt;br /&gt;
[21:31:00] &amp;lt;Matthi&amp;gt; And maybe I&#039;ll have a go^&lt;br /&gt;
[21:31:02] &amp;lt;Zapper&amp;gt; Does that mean that I cannot place plants via script on certain positions?&lt;br /&gt;
[21:31:02] &amp;lt;Clonkonaut&amp;gt; just having IsTree() return true; is enough&lt;br /&gt;
[21:31:05] &amp;lt;ST-DDT&amp;gt; i mean the CNAT_values have i numerical repleacement, but this changes functionallity to&lt;br /&gt;
[21:31:13] &amp;lt;ST-DDT&amp;gt; in CR&lt;br /&gt;
[21:31:46] &amp;lt;Matthi&amp;gt; but for now, I&#039;ll go to a Currywurstparty, see you later&lt;br /&gt;
[21:31:48] &amp;lt;Clonkonaut&amp;gt; Zapper: they may change their position by around 5 pixels&lt;br /&gt;
[21:31:54] &amp;lt;Ringwaul&amp;gt; bai bai&lt;br /&gt;
[21:31:54] &amp;lt;Zapper&amp;gt; Ah, okay&lt;br /&gt;
[21:32:03] &amp;lt;Zapper&amp;gt; I thought they look for a proper place on the landscape&lt;br /&gt;
[21:32:24] &amp;lt;Clonkonaut&amp;gt; nono. They just look if CNAT_Center has contact&lt;br /&gt;
[21:32:52] &amp;lt;Ringwaul&amp;gt; I take it that it doesn&#039;t create an infinite loop if CNAT_Centre is under CNAT_Bottom? ;)&lt;br /&gt;
[21:33:05] &amp;lt;Clonkonaut&amp;gt; I&#039;ll check that :)&lt;br /&gt;
[21:33:10] &amp;lt;Clonkonaut&amp;gt; okay, the second type of important plants (next to trees) are harvestable crops&lt;br /&gt;
[21:33:20] &amp;lt;Zapper&amp;gt; What do trees do?&lt;br /&gt;
[21:33:29] &amp;lt;Clonkonaut&amp;gt; being chopped down&lt;br /&gt;
[21:33:32] &amp;lt;Zapper&amp;gt; kk&lt;br /&gt;
[21:33:38] &amp;lt;Clonkonaut&amp;gt; and then being cut into wood&lt;br /&gt;
[21:33:42] &amp;lt;Clonkonaut&amp;gt; with the sawmill or the axe&lt;br /&gt;
[21:34:08] &amp;lt;Clonkonaut&amp;gt; doing it with an axe is lossy (only half of the wood of the wood)&lt;br /&gt;
[21:34:20] &amp;lt;Clonkonaut&amp;gt; -wood +tree&lt;br /&gt;
[21:34:36] * clonkine (~test@87.185.161.euirc-923b5638) has joined #openclonk-dev&lt;br /&gt;
[21:34:47] &amp;lt;Ringwaul&amp;gt; And crops?&lt;br /&gt;
[21:34:58] &amp;lt;Clonkonaut&amp;gt; to have a harvestable plant, it needs CanBeHarvested() return true&lt;br /&gt;
[21:35:16] &amp;lt;Clonkonaut&amp;gt; IsHarvestable will return true if GetCon() &amp;gt;= 100&lt;br /&gt;
[21:35:28] &amp;lt;Clonkonaut&amp;gt; only if the plant is IsHarvestable, it will show up in the action bar&lt;br /&gt;
[21:35:34] &amp;lt;Ringwaul&amp;gt; &amp;quot;&amp;gt;=&amp;quot; giant pumpkins!&lt;br /&gt;
[21:35:42] &amp;lt;Ringwaul&amp;gt; :D&lt;br /&gt;
[21:35:44] &amp;lt;Clonkonaut&amp;gt; Interacting will then do Split2Components&lt;br /&gt;
[21:35:45] &amp;lt;Zapper&amp;gt; I still think that &amp;quot;IsHarvestable&amp;quot; is exactly the same as &amp;quot;CanBeHarvested&amp;quot; :x&lt;br /&gt;
[21:35:48] &amp;lt;Zapper&amp;gt; language-wise&lt;br /&gt;
[21:36:24] &amp;lt;Ringwaul&amp;gt; Yeah, but might as well stick with the &amp;quot;Is&amp;quot; standard&lt;br /&gt;
[21:36:24] &amp;lt;Clonkonaut&amp;gt; yes. I just need two functions because no one wanted this.Harvest ;)&lt;br /&gt;
[21:36:35] &amp;lt;Zapper&amp;gt; IsCrop? :]&lt;br /&gt;
[21:36:45] &amp;lt;Guest462071&amp;gt; ReadyToHarvest?&lt;br /&gt;
[21:36:56] &amp;lt;Clonkonaut&amp;gt; yeah, that&#039;ll do&lt;br /&gt;
[21:37:00] &amp;lt;Clonkonaut&amp;gt; *note*&lt;br /&gt;
[21:37:07] &amp;lt;Zapper&amp;gt; I will change it to IsCrop in the protocol then!&lt;br /&gt;
[21:37:24] &amp;lt;Clonkonaut&amp;gt; the tool is a reoccuring topic&lt;br /&gt;
[21:37:43] &amp;lt;Clonkonaut&amp;gt; my first attempt is now &#039;no tool&#039;&lt;br /&gt;
[21:38:06] * Matthi (~a@clonk-center.de) Quit (Connection reset by peer�)&lt;br /&gt;
[21:38:07] &amp;lt;Clonkonaut&amp;gt; if we want an harvesting tool, I would prefer a scythe&lt;br /&gt;
[21:38:25] &amp;lt;PeterW&amp;gt; Sword?&lt;br /&gt;
[21:38:31] &amp;lt;Clonkonaut&amp;gt; and definitely not the sword&lt;br /&gt;
[21:38:36] &amp;lt;boni&amp;gt; :D&lt;br /&gt;
[21:38:41] &amp;lt;PeterW&amp;gt; That&#039;s how Terraria does it! :)&lt;br /&gt;
[21:38:43] &amp;lt;boni&amp;gt; Zapper has planted a seed in PeterWs head.&lt;br /&gt;
[21:38:50] &amp;lt;Zapper&amp;gt; swords are just cool, ok&lt;br /&gt;
[21:38:56] &amp;lt;Clonkonaut&amp;gt; the sword is produced in the armory&lt;br /&gt;
[21:39:11] &amp;lt;Zapper&amp;gt; However currently I am completely fine with using the hatchet (=tools workshop) for harvesting too!&lt;br /&gt;
[21:39:17] &amp;lt;Clonkonaut&amp;gt; assuming we have a peaceful settlement game (so ~80% of the time?), there is no need for an armory&lt;br /&gt;
[21:39:50] &amp;lt;PeterW&amp;gt; I&#039;d prefer &amp;quot;no tool&amp;quot; or something existing to having a new one&lt;br /&gt;
[21:39:51] &amp;lt;Clonkonaut&amp;gt; by making the sword mandatory we will force the player to construct an otherwise useless building&lt;br /&gt;
[21:40:11] &amp;lt;Zapper&amp;gt; mh, the axe is produced in the tools workshop, right?&lt;br /&gt;
[21:40:20] &amp;lt;Clonkonaut&amp;gt; yes&lt;br /&gt;
[21:40:32] &amp;lt;Zapper&amp;gt; kk, I am all for renaming the axe to &amp;quot;hatchet&amp;quot; and use it for harvesting! /o/&lt;br /&gt;
[21:40:35] &amp;lt;Zapper&amp;gt; *using&lt;br /&gt;
[21:40:49] &amp;lt;Ringwaul&amp;gt; heh&lt;br /&gt;
[21:41:00] &amp;lt;Zapper&amp;gt; it&#039;s only 50% as cool as the sword, though&lt;br /&gt;
[21:41:06] &amp;lt;Clonkonaut&amp;gt; that&#039;d be strange&lt;br /&gt;
[21:41:20] &amp;lt;Ringwaul&amp;gt; Is we use an axe for chopping, killing, and harvesting that seems a bit much&lt;br /&gt;
[21:41:34] &amp;lt;PeterW&amp;gt; Make it work with the sword as well. Give an achievement for coolness if somebody uses it!&lt;br /&gt;
[21:41:46] &amp;lt;Zapper&amp;gt; that&#039;s what I want :&amp;lt;&lt;br /&gt;
[21:41:58] &amp;lt;Zapper&amp;gt; Hatchet: Trees, Crops, weak weapon. Sword: Crops, stronger weapon!&lt;br /&gt;
[21:41:59] &amp;lt;PeterW&amp;gt; We just have to make it less good at killing&lt;br /&gt;
[21:42:15] &amp;lt;PeterW&amp;gt; Then I think it should be okay&lt;br /&gt;
[21:42:16] &amp;lt;Clonkonaut&amp;gt; yeah. Probably a Rainbow Dash icon for harvesting it 20% cooler&lt;br /&gt;
[21:42:20] &amp;lt;Zapper&amp;gt; So that you could defend your settlement against evil monsters even in the beginning of a settlement game! ;)&lt;br /&gt;
[21:42:39] &amp;lt;Ringwaul&amp;gt; So no scythe for harvesting? :&amp;lt;&lt;br /&gt;
[21:42:44] &amp;lt;Zapper&amp;gt; hatchet!1&lt;br /&gt;
[21:42:53] &amp;lt;Clonkonaut&amp;gt; PeterW: less good for killing? The sword?&lt;br /&gt;
[21:42:56] &amp;lt;PeterW&amp;gt; I don&#039;t know. Would you have another use for it in mind?&lt;br /&gt;
[21:42:59] &amp;lt;PeterW&amp;gt; No, the axe&lt;br /&gt;
[21:43:06] &amp;lt;Clonkonaut&amp;gt; the axe is very weak&lt;br /&gt;
[21:43:12] &amp;lt;Clonkonaut&amp;gt; it does 5 damage&lt;br /&gt;
[21:43:12] &amp;lt;Zapper&amp;gt; &amp;quot;axe&amp;quot; sounds too mutch like the killing tool for me :&amp;lt;&lt;br /&gt;
[21:43:19] &amp;lt;PeterW&amp;gt; That&#039;s okay then?&lt;br /&gt;
[21:43:25] &amp;lt;PeterW&amp;gt; Yeah, whatever, hatchet&lt;br /&gt;
[21:43:40] &amp;lt;PeterW&amp;gt; Does it still blow back the opponent?&lt;br /&gt;
[21:43:47] &amp;lt;Clonkonaut&amp;gt; well, a hatchet is certainly no tool for chopping big trees&lt;br /&gt;
[21:43:55] &amp;lt;PeterW&amp;gt; That could be *very* useful to keep monsters out of your settlement already&lt;br /&gt;
[21:43:57] &amp;lt;Clonkonaut&amp;gt; no @blowing back&lt;br /&gt;
[21:44:02] &amp;lt;Clonkonaut&amp;gt; that&#039;s what the club is for&lt;br /&gt;
[21:44:03] &amp;lt;PeterW&amp;gt; Even without huge damage&lt;br /&gt;
[21:44:04] &amp;lt;PeterW&amp;gt; Ah&lt;br /&gt;
[21:44:05] &amp;lt;PeterW&amp;gt; Hm&lt;br /&gt;
[21:44:11] &amp;lt;Zapper&amp;gt; Clonkonaut&amp;gt; well, a hatchet is certainly no tool for chopping big trees &amp;lt;- Since ancient times people even used herrings for that!&lt;br /&gt;
[21:44:19] &amp;lt;Ringwaul&amp;gt; :)&lt;br /&gt;
[21:44:37] &amp;lt;Clonkonaut&amp;gt; the fighting aspect of the axe is a mere gimmick just because it feels right to be able to hack on enemies&lt;br /&gt;
[21:44:59] &amp;lt;Clonkonaut&amp;gt; but two weapon to balance (sword, club) are enough for &#039;big killing&#039;&lt;br /&gt;
[21:45:04] &amp;lt;Clonkonaut&amp;gt; the axe will not interfere with this&lt;br /&gt;
[21:45:49] &amp;lt;Zapper&amp;gt; Nothing against that!&lt;br /&gt;
[21:46:19] &amp;lt;Clonkonaut&amp;gt; and I&#039;d rather have no tool for harvesting than forcing the player to produce a sword&lt;br /&gt;
[21:46:23] &amp;lt;Ringwaul&amp;gt; Wellp, I do have to go now. Feel free to add whatever results of more discussion in the protocol :)&lt;br /&gt;
[21:46:32] &amp;lt;Zapper&amp;gt; Clonkonaut, hatchet!111&lt;br /&gt;
[21:46:41] &amp;lt;Zapper&amp;gt; the sword can harvest stuff as a gimmick!&lt;br /&gt;
[21:46:42] &amp;lt;boni&amp;gt; chopchop&lt;br /&gt;
[21:46:45] &amp;lt;Ringwaul&amp;gt; night everyone&lt;br /&gt;
[21:46:49] &amp;lt;Zapper&amp;gt; good night!&lt;br /&gt;
[21:46:55] * Ringwaul (~quassel@euirc-2eae63cb.va.shawcable.net) Quit (Quit: baibai�)&lt;br /&gt;
[21:47:09] &amp;lt;Clonkonaut&amp;gt; yeah, that&#039;s again counter-intuitive&lt;br /&gt;
[21:47:58] &amp;lt;Zapper&amp;gt; how? :&amp;lt;&lt;br /&gt;
[21:47:59] &amp;lt;Clonkonaut&amp;gt; I never harvested wheat though I think a hatchet is of no help&lt;br /&gt;
[21:48:05] &amp;lt;Zapper&amp;gt; If I hit crops with a sword, the crops die, ok&lt;br /&gt;
[21:48:06] &amp;lt;JCaesar&amp;gt; irl, harvesting can be done with teeth, buttcheeks or preferably your bare hands. &lt;br /&gt;
[21:48:18] &amp;lt;JCaesar&amp;gt; So could could basically harvest with anything.&lt;br /&gt;
[21:48:26] &amp;lt;Zapper&amp;gt; harvesting needs something sharp to cut the wheat&lt;br /&gt;
[21:48:37] &amp;lt;Zapper&amp;gt; a scythe is a lot more comfortable than a hatchet&lt;br /&gt;
[21:48:41] &amp;lt;Zapper&amp;gt; latter works, though!&lt;br /&gt;
[21:49:11] &amp;lt;Zapper&amp;gt; also I doubt it will be counter-intuitive for the player!&lt;br /&gt;
[21:49:14] &amp;lt;Clonkonaut&amp;gt; and you need something sharp. The hatchet isn&#039;t sharp enough&lt;br /&gt;
[21:49:41] &amp;lt;Zapper&amp;gt; i doubt you can see that in the picture of the hatchet :)&lt;br /&gt;
[21:49:42] &amp;lt;Zapper&amp;gt; anyway&lt;br /&gt;
[21:49:47] &amp;lt;Zapper&amp;gt; anything else left for the meeting?&lt;br /&gt;
[21:49:54] * Guest462071 is now known as Randrian&lt;br /&gt;
[21:50:06] &amp;lt;Clonkonaut&amp;gt; nope, that was my part. The rest&#039;s for tomorrow&lt;br /&gt;
[21:50:19] &amp;lt;Zapper&amp;gt; Then I would put the protocol into the forum&lt;br /&gt;
[21:51:07] &amp;lt;PeterW&amp;gt; That &amp;quot;animated materials&amp;quot; stuff is for tomorrow as well then?&lt;br /&gt;
[21:51:16] &amp;lt;Zapper&amp;gt; animated materials?&lt;br /&gt;
[21:51:23] &amp;lt;Zapper&amp;gt; like, animated graphics?&lt;br /&gt;
[21:51:26] &amp;lt;Zapper&amp;gt; *textures&lt;br /&gt;
[21:51:30] &amp;lt;PeterW&amp;gt; I don&#039;t know, somebody put it on the list, next to my name :)&lt;br /&gt;
[21:51:45] &amp;lt;Zapper&amp;gt; oh, I guess so.. :)&lt;br /&gt;
[21:52:33] &amp;lt;PeterW&amp;gt; Well, I have to go as well.&lt;br /&gt;
[21:52:41] &amp;lt;PeterW&amp;gt; See you all tomorrow then&lt;br /&gt;
[21:52:44] * PeterW (~scpmw@euirc-2cb74147.csunix.comp.leeds.ac.uk) Quit (Quit: Leaving�)&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=IRCMeeting&amp;diff=1164</id>
		<title>IRCMeeting</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=IRCMeeting&amp;diff=1164"/>
		<updated>2011-10-21T22:10:07Z</updated>

		<summary type="html">&lt;p&gt;Zapper: /* Past meetings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Developer IRC Meeting ==&lt;br /&gt;
&lt;br /&gt;
During a hot development phase early 2010 we met regularly in the IRC channel #openclonk-dev. Below are the logs of these meetings (if available). Future meetings should be announced in the forum.&lt;br /&gt;
&lt;br /&gt;
== Past meetings ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-collapse: collapse; border: 1px solid black;&amp;quot; border=1 cellpadding=2&lt;br /&gt;
!Date&lt;br /&gt;
!IRC Logs&lt;br /&gt;
!Misc&lt;br /&gt;
|-&lt;br /&gt;
|2011-10-21&lt;br /&gt;
|[[IRCMeeting/20111021|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-07-31&lt;br /&gt;
|[[IRCMeeting/20100731|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-04-24&lt;br /&gt;
|N/A&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-04-17&lt;br /&gt;
|[[IRCMeeting/20100417|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-04-10&lt;br /&gt;
|[[IRCMeeting/20100410|IRC Log]]&lt;br /&gt;
|Meeting date changed to 6pm on saturday&lt;br /&gt;
|-&lt;br /&gt;
|2010-04-05&lt;br /&gt;
|[[IRCMeeting/20100405|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-03-29&lt;br /&gt;
|N/A&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-03-22&lt;br /&gt;
|Real Life meeting in Offenburg&lt;br /&gt;
|[http://forum.openclonk.org/topic_show.pl?tid=464 Inventory concept] [http://forum.openclonk.org/topic_show.pl?tid=461 Release notes] [http://forum.openclonk.org/topic_show.pl?tid=465 HUD notes]&lt;br /&gt;
|-&lt;br /&gt;
|2010-03-15&lt;br /&gt;
|N/A&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-03-08&lt;br /&gt;
|[[IRCMeeting/20100308|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-03-01&lt;br /&gt;
|[[IRCMeeting/20100301|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-02-22&lt;br /&gt;
|N/A&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-02-15&lt;br /&gt;
|[[IRCMeeting/20100215|IRC Log]]&lt;br /&gt;
|Mini meeting, mostly consisted of playing test rounds&lt;br /&gt;
|-&lt;br /&gt;
|2010-02-08&lt;br /&gt;
|[[IRCMeeting/20100208|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-02-01&lt;br /&gt;
|[[IRCMeeting/20100201|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-01-25&lt;br /&gt;
|[[IRCMeeting/20100125|IRC Log]]&lt;br /&gt;
|N/A&lt;br /&gt;
|-&lt;br /&gt;
|2010-01-18&lt;br /&gt;
|[[IRCMeeting/20100118|IRC Log]]&lt;br /&gt;
|[[IRCMeeting/20100118-gobby|Gobby Log]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zapper</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=908</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=908"/>
		<updated>2011-04-21T14:37:13Z</updated>

		<summary type="html">&lt;p&gt;Zapper: typo&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] and the [http://forum.openclonk.org/board_show.pl?bid=3 sound studio] in the forum.&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 Blender 2.49, you&#039;ll need the [http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Blender+Exporter OGRE Exporter] (to my knowledge, there currently is no exporter for Blender 2.5). There are other programs which can export to OGRE format, but this guide will only cover the method of exporting from Blender.  You will also want to obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software]. While this is not strictly necessary, meshes in .mesh format will load tremendously faster than meshes in .mesh.xml format, so it is highly recommended.&lt;br /&gt;
&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;
*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;
*Rename the “ .mesh” file to “Graphics.mesh”. &lt;br /&gt;
*If you did not use the XML Converter, rename the “ .mesh.xml” file to &#039;Graphics.mesh.xml&#039; (The “ .mesh” and “ .mesh.xml” files will be named after the object exported from blender. i.e. &#039;Cube.mesh&#039;)&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&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;
               ambient 0.500000 0.500000 0.500000 1.000000&lt;br /&gt;
               diffuse 0.640000 0.640000 0.640000 1.000000&lt;br /&gt;
               specular 0.500000 0.500000 0.500000 1.000000 12.500000&lt;br /&gt;
               emissive 0.000000 0.000000 0.000000 1.000000&lt;br /&gt;
               scene_blend alpha_blend&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&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;
== 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>Zapper</name></author>
	</entry>
</feed>