<?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=Ringwaul</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=Ringwaul"/>
	<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/w/Special:Contributions/Ringwaul"/>
	<updated>2026-04-28T22:42:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1242</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1242"/>
		<updated>2012-11-01T06:48:36Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* To export just the mesh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fair warning: This is not a very user friendly guide. I wrote it up in about 15 minutes without polishing it at all, just writing in exactly what was needed. Mostly it is a note to self so I don&#039;t forget the steps involved, now that I&#039;ve figured out how to export without problems 100% of the time.&lt;br /&gt;
&lt;br /&gt;
This is a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If you don&#039;t load up the clonk&#039;s blend file directly it won&#039;t load Actions.txt, it seems. (if 2.49 is your default program for .blend files you can just run ClonkOpenRevolution.blend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
This guide&#039;s section would be relevant for making more Clonk skins. Model a clonk, texture it, import it into 2.49 (.obj works well for that), make sure it&#039;s at the correct scale, and rig it to the Armature (visible on layer 16).&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• Save and reopen the file as previously instructed. Actions.txt does not reload reliably and this works around it.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• Hit &#039;Update&#039; to update the animation list (only &#039;Walk&#039; should appear now)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name back to whatever it was originally. They should be identical (for example, ME:&amp;quot;clonkAlchemist&amp;quot; [F] OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
• rename the exported &#039;Graphics.mesh&#039; file to the respective Clonk. ie: GraphicsSteampunk.mesh/GraphicsFarmer.mesh etc.&lt;br /&gt;
&lt;br /&gt;
== To export the animations ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims. Don&#039;t use it if you&#039;re using a define &#039;Group=&#039;, or just don&#039;t use it at all. Renaming the actual animation in blender is safer.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guide to ClonkOpenRevolution.blend&#039;s Layers ==&lt;br /&gt;
*Layers 1-10 (the entire top row): These layers are for skins. Currently only layers 1-4 are filled. Layer 5 will be filled with the Fisherman clonk whenever he gets created.&lt;br /&gt;
*Layer 11: IK Control for the Clonk&#039;s armature. Used for animating the clonk.&lt;br /&gt;
*Layer 12: Typical Layer for other model(s) used when animating. For example, you could put the sword on this layer to help animate swordplay, or the axe to animate wood-cutting. Putting the model in the right spot/parented to the correct bone is up to you.&lt;br /&gt;
*Layer 13: Store layer for a bunch of tools/weapons. Not all those from OC are stored here, you&#039;ll have to import those.&lt;br /&gt;
*Layer 14: Currently Empty&lt;br /&gt;
*Layer 15: Contains boompack and javelin, and for some reason a &#039;box&#039;&lt;br /&gt;
*Layer 16: FK Armature. Helpful for identifying bone names. While the IK armature is used to create animations in blender, FK is what actually gets exported to OC&#039;s engine. So you&#039;ll want to know what the names of bones are for mesh attachment and whatnot.&lt;br /&gt;
*Layer 17: Currently Empty&lt;br /&gt;
*Layer 18: Contains an accurate guide for aiming animations. 0 should be animation start, and 180 animation end. Remember to use linear interpolation with aiming animations.&lt;br /&gt;
*Layer 19: Contains Crate model. Was used to animate the CarryArms* animations.&lt;br /&gt;
*Layer 20: Some old CR hands I guess? And the 3D models for the IK controllers.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1241</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1241"/>
		<updated>2012-11-01T06:38:06Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* To export just the mesh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fair warning: This is not a very user friendly guide. I wrote it up in about 15 minutes without polishing it at all, just writing in exactly what was needed. Mostly it is a note to self so I don&#039;t forget the steps involved, now that I&#039;ve figured out how to export without problems 100% of the time.&lt;br /&gt;
&lt;br /&gt;
This is a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If you don&#039;t load up the clonk&#039;s blend file directly it won&#039;t load Actions.txt, it seems. (if 2.49 is your default program for .blend files you can just run ClonkOpenRevolution.blend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
This guide&#039;s section would be relevant for making more Clonk skins. Model a clonk, texture it, import it into 2.49 (.obj works well for that), make sure it&#039;s at the correct scale, and rig it to the Armature (visible on layer 16).&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name and Mesh Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• Hit &#039;Update&#039; to update the animation list (only &#039;Walk&#039; should appear now)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name and Mesh name back to whatever it was originally. They should be identical (for example, ME:&amp;quot;clonkAlchemist&amp;quot; [F] OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
• rename the exported &#039;Graphics.mesh&#039; file to the respective Clonk. ie: GraphicsSteampunk.mesh/GraphicsFarmer.mesh etc.&lt;br /&gt;
&lt;br /&gt;
== To export the animations ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims. Don&#039;t use it if you&#039;re using a define &#039;Group=&#039;, or just don&#039;t use it at all. Renaming the actual animation in blender is safer.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guide to ClonkOpenRevolution.blend&#039;s Layers ==&lt;br /&gt;
*Layers 1-10 (the entire top row): These layers are for skins. Currently only layers 1-4 are filled. Layer 5 will be filled with the Fisherman clonk whenever he gets created.&lt;br /&gt;
*Layer 11: IK Control for the Clonk&#039;s armature. Used for animating the clonk.&lt;br /&gt;
*Layer 12: Typical Layer for other model(s) used when animating. For example, you could put the sword on this layer to help animate swordplay, or the axe to animate wood-cutting. Putting the model in the right spot/parented to the correct bone is up to you.&lt;br /&gt;
*Layer 13: Store layer for a bunch of tools/weapons. Not all those from OC are stored here, you&#039;ll have to import those.&lt;br /&gt;
*Layer 14: Currently Empty&lt;br /&gt;
*Layer 15: Contains boompack and javelin, and for some reason a &#039;box&#039;&lt;br /&gt;
*Layer 16: FK Armature. Helpful for identifying bone names. While the IK armature is used to create animations in blender, FK is what actually gets exported to OC&#039;s engine. So you&#039;ll want to know what the names of bones are for mesh attachment and whatnot.&lt;br /&gt;
*Layer 17: Currently Empty&lt;br /&gt;
*Layer 18: Contains an accurate guide for aiming animations. 0 should be animation start, and 180 animation end. Remember to use linear interpolation with aiming animations.&lt;br /&gt;
*Layer 19: Contains Crate model. Was used to animate the CarryArms* animations.&lt;br /&gt;
*Layer 20: Some old CR hands I guess? And the 3D models for the IK controllers.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1240</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1240"/>
		<updated>2012-11-01T06:31:04Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* To export just the mesh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fair warning: This is not a very user friendly guide. I wrote it up in about 15 minutes without polishing it at all, just writing in exactly what was needed. Mostly it is a note to self so I don&#039;t forget the steps involved, now that I&#039;ve figured out how to export without problems 100% of the time.&lt;br /&gt;
&lt;br /&gt;
This is a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If you don&#039;t load up the clonk&#039;s blend file directly it won&#039;t load Actions.txt, it seems. (if 2.49 is your default program for .blend files you can just run ClonkOpenRevolution.blend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
This guide&#039;s section would be relevant for making more Clonk skins. Model a clonk, texture it, import it into 2.49 (.obj works well for that), make sure it&#039;s at the correct scale, and rig it to the Armature (visible on layer 16).&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name back to whatever it was originally. This should be exactly the same as the Mesh name (for example, ME:&amp;quot;clonkAlchemist&amp;quot; | OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
• rename the exported &#039;Graphics.mesh&#039; file to the respective Clonk. ie: GraphicsSteampunk.mesh/GraphicsFarmer.mesh etc.&lt;br /&gt;
&lt;br /&gt;
== To export the animations ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims. Don&#039;t use it if you&#039;re using a define &#039;Group=&#039;, or just don&#039;t use it at all. Renaming the actual animation in blender is safer.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guide to ClonkOpenRevolution.blend&#039;s Layers ==&lt;br /&gt;
*Layers 1-10 (the entire top row): These layers are for skins. Currently only layers 1-4 are filled. Layer 5 will be filled with the Fisherman clonk whenever he gets created.&lt;br /&gt;
*Layer 11: IK Control for the Clonk&#039;s armature. Used for animating the clonk.&lt;br /&gt;
*Layer 12: Typical Layer for other model(s) used when animating. For example, you could put the sword on this layer to help animate swordplay, or the axe to animate wood-cutting. Putting the model in the right spot/parented to the correct bone is up to you.&lt;br /&gt;
*Layer 13: Store layer for a bunch of tools/weapons. Not all those from OC are stored here, you&#039;ll have to import those.&lt;br /&gt;
*Layer 14: Currently Empty&lt;br /&gt;
*Layer 15: Contains boompack and javelin, and for some reason a &#039;box&#039;&lt;br /&gt;
*Layer 16: FK Armature. Helpful for identifying bone names. While the IK armature is used to create animations in blender, FK is what actually gets exported to OC&#039;s engine. So you&#039;ll want to know what the names of bones are for mesh attachment and whatnot.&lt;br /&gt;
*Layer 17: Currently Empty&lt;br /&gt;
*Layer 18: Contains an accurate guide for aiming animations. 0 should be animation start, and 180 animation end. Remember to use linear interpolation with aiming animations.&lt;br /&gt;
*Layer 19: Contains Crate model. Was used to animate the CarryArms* animations.&lt;br /&gt;
*Layer 20: Some old CR hands I guess? And the 3D models for the IK controllers.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1239</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1239"/>
		<updated>2012-11-01T06:30:25Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Guide to ClonkOpenRevolution.blend&amp;#039;s Layers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fair warning: This is not a very user friendly guide. I wrote it up in about 15 minutes without polishing it at all, just writing in exactly what was needed. Mostly it is a note to self so I don&#039;t forget the steps involved, now that I&#039;ve figured out how to export without problems 100% of the time.&lt;br /&gt;
&lt;br /&gt;
This is a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If you don&#039;t load up the clonk&#039;s blend file directly it won&#039;t load Actions.txt, it seems. (if 2.49 is your default program for .blend files you can just run ClonkOpenRevolution.blend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
This guide&#039;s section would be relevant for making more Clonk skins. Model a clonk, texture it, import it into 2.49 (.obj works well for that), make sure it&#039;s at the correct scale, and rig it to the Armature (visible on layer 16).&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name back to whatever it was originally. This should be exactly the same as the Mesh name (for example, ME:&amp;quot;clonkAlchemist&amp;quot; | OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
• rename the exported &#039;Graphics.mesh&#039; file to the respective Clonk. ie: GraphicsSteampunk.mesh/GraphicsFarmer.mesh etc. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export the animations ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims. Don&#039;t use it if you&#039;re using a define &#039;Group=&#039;, or just don&#039;t use it at all. Renaming the actual animation in blender is safer.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guide to ClonkOpenRevolution.blend&#039;s Layers ==&lt;br /&gt;
*Layers 1-10 (the entire top row): These layers are for skins. Currently only layers 1-4 are filled. Layer 5 will be filled with the Fisherman clonk whenever he gets created.&lt;br /&gt;
*Layer 11: IK Control for the Clonk&#039;s armature. Used for animating the clonk.&lt;br /&gt;
*Layer 12: Typical Layer for other model(s) used when animating. For example, you could put the sword on this layer to help animate swordplay, or the axe to animate wood-cutting. Putting the model in the right spot/parented to the correct bone is up to you.&lt;br /&gt;
*Layer 13: Store layer for a bunch of tools/weapons. Not all those from OC are stored here, you&#039;ll have to import those.&lt;br /&gt;
*Layer 14: Currently Empty&lt;br /&gt;
*Layer 15: Contains boompack and javelin, and for some reason a &#039;box&#039;&lt;br /&gt;
*Layer 16: FK Armature. Helpful for identifying bone names. While the IK armature is used to create animations in blender, FK is what actually gets exported to OC&#039;s engine. So you&#039;ll want to know what the names of bones are for mesh attachment and whatnot.&lt;br /&gt;
*Layer 17: Currently Empty&lt;br /&gt;
*Layer 18: Contains an accurate guide for aiming animations. 0 should be animation start, and 180 animation end. Remember to use linear interpolation with aiming animations.&lt;br /&gt;
*Layer 19: Contains Crate model. Was used to animate the CarryArms* animations.&lt;br /&gt;
*Layer 20: Some old CR hands I guess? And the 3D models for the IK controllers.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1238</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1238"/>
		<updated>2012-11-01T06:29:21Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fair warning: This is not a very user friendly guide. I wrote it up in about 15 minutes without polishing it at all, just writing in exactly what was needed. Mostly it is a note to self so I don&#039;t forget the steps involved, now that I&#039;ve figured out how to export without problems 100% of the time.&lt;br /&gt;
&lt;br /&gt;
This is a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If you don&#039;t load up the clonk&#039;s blend file directly it won&#039;t load Actions.txt, it seems. (if 2.49 is your default program for .blend files you can just run ClonkOpenRevolution.blend)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
This guide&#039;s section would be relevant for making more Clonk skins. Model a clonk, texture it, import it into 2.49 (.obj works well for that), make sure it&#039;s at the correct scale, and rig it to the Armature (visible on layer 16).&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name back to whatever it was originally. This should be exactly the same as the Mesh name (for example, ME:&amp;quot;clonkAlchemist&amp;quot; | OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
• rename the exported &#039;Graphics.mesh&#039; file to the respective Clonk. ie: GraphicsSteampunk.mesh/GraphicsFarmer.mesh etc. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export the animations ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims. Don&#039;t use it if you&#039;re using a define &#039;Group=&#039;, or just don&#039;t use it at all. Renaming the actual animation in blender is safer.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guide to ClonkOpenRevolution.blend&#039;s Layers ==&lt;br /&gt;
*Layers 1-10 (the entire top row): These layers are for skins. Currently only layers 1-4 are filled. Layer 5 will be filled with the Fisherman clonk whenever he gets created.&lt;br /&gt;
*Layer 11: IK Control for the Clonk&#039;s armature. Used for animating the clonk.&lt;br /&gt;
*Layer 12: Typical Layer for other model(s) used when animating. For example, you could put the sword on this layer to help animate swordplay, or the axe to animate wood-cutting. Putting the model in the right spot/parented to the correct bone is up to you.&lt;br /&gt;
*Layer 13: Store layer for a bunch of tools/weapons. Not all those from OC are stored here, you&#039;ll have to import those.&lt;br /&gt;
*Layer 14: Currently Empty&lt;br /&gt;
*Layer 15: Contains boompack and javelin, and for some reason a &#039;box&#039;&lt;br /&gt;
*Layer 16: FK Armature. Helpful for identifying bone names. While IK is animated on, FK is what actually gets exported to OC&#039;s engine. So you&#039;ll want to know what the names of bones are for mesh attachment and whatnot.&lt;br /&gt;
*Layer 17: Currently Empty&lt;br /&gt;
*Layer 18: Contains an accurate guide for aiming animations. 0 should be animation start, and 180 animation end. Remember to use linear interpolation with aiming animations.&lt;br /&gt;
*Layer 19: Contains Crate model. Was used to animate the CarryArms* animations.&lt;br /&gt;
*Layer 20: Some old CR hands I guess? And the 3D models for the IK controllers.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1237</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1237"/>
		<updated>2012-11-01T05:50:26Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Known bugs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a note to self until I can make a more user friendly page. Just so I don&#039;t forget how to, now that I&#039;ve figured it out perfectly.&lt;br /&gt;
&lt;br /&gt;
This is more or less a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If 2.49 is your default blender application you probably don&#039;t have to do this, but no one really uses 2.49 anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name back to whatever it was originally. This should be exactly the same as the Mesh name (for example, ME:&amp;quot;clonkAlchemist&amp;quot; | OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export the skeleton ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims. Don&#039;t use it if you&#039;re using a define &#039;Group=&#039;, or just don&#039;t use it at all. Renaming the actual animation in blender is safer.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1236</id>
		<title>Exporting the Clonk</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Exporting_the_Clonk&amp;diff=1236"/>
		<updated>2012-11-01T05:49:13Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: Created page with &amp;quot;This is a note to self until I can make a more user friendly page. Just so I don&amp;#039;t forget how to, now that I&amp;#039;ve figured it out perfectly.  This is more or less a guide on how ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a note to self until I can make a more user friendly page. Just so I don&#039;t forget how to, now that I&#039;ve figured it out perfectly.&lt;br /&gt;
&lt;br /&gt;
This is more or less a guide on how to properly export a Clonk model or update/add to the Clonk&#039;s animations.&lt;br /&gt;
&lt;br /&gt;
This is not a guide on how to make extra animations for a mod. Sadly, as modular animation structure (each animation as a separate file, ie: gamebryo) is not how OGRE format works. OGRE exports the armature and all animations into a single *.skeleton file. There&#039;s not really anything I can do about that.&lt;br /&gt;
&lt;br /&gt;
For mods, it might be possible in the future to have a *.skeleton file containing some new animations and append it to the clonk somehow, like how #append-to works in script. This is totally conjecture though and is at the behest of the engine programmers (read: ck). This might become a necessary feature when OC is done and if people start making expansion packs and mods similar to CR&#039;s time.&lt;br /&gt;
&lt;br /&gt;
== Loading up the .blend file properly ==&lt;br /&gt;
• Make sure [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Randrian&#039;s Modified OGRE Exporter] is installed, not the vanilla one.&lt;br /&gt;
&lt;br /&gt;
• Open two explorer windows; one showing the directory of the ClonkOpenRevolution.blend file, and another showing blender 2.49&#039;s executable. Drag the clonk&#039;s .blend file onto the 2.49 exe. If 2.49 is your default blender application you probably don&#039;t have to do this, but no one really uses 2.49 anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export just the mesh ==&lt;br /&gt;
&lt;br /&gt;
• Edit [http://hg.openclonk.org/openclonk-resources/file/d2f59e9c8eb7/models/Livings/clonk/Actions.txt /models/Livings/clonk/Actions.txt] so it only has the Walk animation (keep all groups and everything. Just remove all [Action]s after walk. This speeds up the model export significantly.&lt;br /&gt;
&lt;br /&gt;
• For whichever model you are exporting, rename it&#039;s Object Name to &amp;quot;Clonk&amp;quot;. (OB: &amp;quot;Clonk&amp;quot; under Editing in buttons window)&lt;br /&gt;
&lt;br /&gt;
• make sure xml converter is pressed, and export&lt;br /&gt;
&lt;br /&gt;
• after exporting, change Object name back to whatever it was originally. This should be exactly the same as the Mesh name (for example, ME:&amp;quot;clonkAlchemist&amp;quot; | OB:&amp;quot;clonkAlchemist&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
• Switch back to Actions.txt, hit undo deleting the actions and save&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To export the skeleton ==&lt;br /&gt;
• make sure xml converter is pressed, and export. You don&#039;t need to change the Object name of whatever clonk you&#039;re exporting because that is not saved in the *.skeleton file. Only the mesh has a pointer to the skeleton, not the other way around.&lt;br /&gt;
&lt;br /&gt;
• Delete all the other exported files than the .skeleton and rename it &amp;quot;Clonk.skeleton&amp;quot;. Copy &amp;amp; paste into the Clonk.ocd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known bugs ==&lt;br /&gt;
• Having a &#039;ExportName=&#039; will cause the exporter to not notice the defined &#039;Group=&#039;. This is what caused the bugs relating to the bow not blending with the bow walk/kneel/etc. anims.&lt;br /&gt;
&lt;br /&gt;
• If you&#039;re not using an Actions.txt for your object but you have Randrian&#039;s installed this will cause problems. You can switch between them; I suggest just using Randrian&#039;s and always using an Actions.txt. Or you could just export from blender 2.6*; but 2.6* seemed to have some bug where if you played past the last 50 frames of an animation OC&#039;s engine would crash. I don&#039;t know if this is still the case.&lt;br /&gt;
&lt;br /&gt;
• Quaternions suck in blender 2.49. Like, they really really really suck. Interpolating between two keyframes usually ends up doing something stupid if the angle is too much, or because 2.49 felt like having a laugh at you. You can fix this in the IPO Curve editor by randomly editing the WXYZ quat channels of a bone&#039;s transform until you get the correct rotation.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1214</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1214"/>
		<updated>2012-05-12T11:40:44Z</updated>

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

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

		<summary type="html">&lt;p&gt;Ringwaul: /* 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] 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 [http://download.blender.org/release/Blender2.49b/ Blender 2.49b], you&#039;ll need the OGRE Exporter. Randrian has created an improved version of the OGRE Exporter which adds critical features necessary for animation blending. [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Download Link]&lt;br /&gt;
&lt;br /&gt;
*Extract the OGRE Exporter into your .blender/scripts/ folder.&lt;br /&gt;
*Install [http://www.python.org/download/releases/2.6.2/ Python 2.6.2]&lt;br /&gt;
*Obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software], bundled inside the OGRE Command Line Tools package (look in &#039;See Also&#039; box for download).&lt;br /&gt;
*Extract the OGRE Command Line Tools somewhere easily accessible (ie: C:\OgreCommandLineTools).&lt;br /&gt;
*Load up blender, and create a new window and set the window type to &#039;Scripts Window&#039;. Then click File&amp;gt;Export&amp;gt;OGRE Meshes to load the exporter GUI into that window.&lt;br /&gt;
*Hit the &#039;Preferences&#039; button in the OGRE GUI. Set the location of the OGRE XML Exporter to Manual, and link to the location of the OgreXmlConverter.exe.&lt;br /&gt;
*In the directory of your .blend file, create an empty Actions.txt file. More on this later.&lt;br /&gt;
By following these steps, you should be able to properly export models for OpenClonk. If you run into any problems, leave a post on the forum addressing the issue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Guidelines for Modelling&#039;&#039;&#039;&lt;br /&gt;
*Model on the Y/Z view-plane. Models in OpenClonk appear as they do on the Y/Z plane in blender. The X-Axis goes &#039;into&#039; the screen. Make sure you model with regard to these axes (The Y/Z plane is the default side view in Blender).&lt;br /&gt;
*Do not use Mesh Transformations. Mesh transformations are not handled properly by the OGRE exporter, and will cause deformation in game. If you have transformations applied to an existing model, you can remove them (select the model and press alt+g, alt+s, alt+r). Caution: Avoid animating before removing transformations!&lt;br /&gt;
*3D Model must be Three-Dimensional. The 3D mesh must have length on all axes. Making a perfectly flat object on only two axes will cause it to not appear in-game. To fix this, move a vertex so the mesh has length on all axes.&lt;br /&gt;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://www.cs.ucr.edu/~macchiea/cs134/lab1/ogrehelp/ogremeshesexporter.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039;[[File:OgreExporter.png|200px|thumb|right|The OGRE Exporter frame in Blender]]&lt;br /&gt;
To export the model, you&#039;ll need to have a window for the OGRE exporter in Blender. Make a new pane for scripts, and click &#039;File/Export/OGRE Meshes&#039;. Models used for OpenClonk must be exported with specific options.&lt;br /&gt;
*“Fix Up Axis to Y” should not be enabled.&lt;br /&gt;
*If you have the XML converter, make sure “OgreXMLConverter” is enabled.&lt;br /&gt;
*If you have already made manual modifications to the Scene.material file and are re-exporting the mesh and/or skeleton, make sure &#039;Export Materials&#039; is not enabled.&lt;br /&gt;
*&#039;Path:&#039; will be where the OGRE files are exported to. You can use a temporary directory and then copy them into your OpenClonk object definition, or you can export the OGRE files directly into the object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFiles.png|250px|thumb|right|Typical exported files before user modification.]]&lt;br /&gt;
Once you have exported the mesh, some files will be created in the chosen directory. Follow these steps:&lt;br /&gt;
*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 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;
               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 style=&amp;quot;color:green;width:75%;background-color:#dcdcdc&amp;quot;&amp;gt;pass&lt;br /&gt;
{&lt;br /&gt;
     ambient 0.500000 0.500000 0.500000 0.000000&lt;br /&gt;
     diffuse 0.640000 0.640000 0.640000 0.000000&lt;br /&gt;
     specular 0.500000 0.500000 0.500000 0.000000 12.500000&lt;br /&gt;
     emissive 0.000000 0.000000 0.000000 0.000000&lt;br /&gt;
     ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
If so, make sure the fourth parameter on ambient, diffuse, specular, and emissive is &#039;1.00000&#039;, not &#039;0.000000&#039; (as shown in the &#039;material MyCube&#039; example).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Actions.txt&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This file controls what animations are exported, which frames of said animations, and which bones will be affected by the exported animations. Most often than not you will not need to use this functionality; your Actions.txt file could simply resemble this:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;[Action]&lt;br /&gt;
Name=Open&lt;br /&gt;
&lt;br /&gt;
[Action]&lt;br /&gt;
Name=Close&lt;br /&gt;
&lt;br /&gt;
[End]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other tags available for an [Action] include &#039;Start=&#039;, &#039;End=&#039;, &#039;ExportName=&#039;, and &#039;Group=&#039;.&lt;br /&gt;
&lt;br /&gt;
Start and End will define the frames (in blender) that will be exported. ExportName will simply change the name of the Action on export (Useful if you have multiple versions of an animation but only need one exported).&lt;br /&gt;
&lt;br /&gt;
A group is a special filter used to stop bones from affecting the exported animation. For example, if we want an aiming animation to only affect the upper body, or a blinking animation to only affect the character&#039;s eyelids.&lt;br /&gt;
Groups can either use the &#039;Include=&#039; tag or &#039;Exclude=&#039; tag. &lt;br /&gt;
&lt;br /&gt;
As an example, a group which only affects the eyelids of the Clonk:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;[Group]&lt;br /&gt;
Name=Eyelids&lt;br /&gt;
Include=eye_lid.R&lt;br /&gt;
Include=eye_lid.L&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would make the exported animation only control the eye_lid.* bones and nothing else. Conversely, using the &#039;Exclude=&#039; tag makes the animation use every bone excluding those defined. As an example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
[Group]&lt;br /&gt;
Name=UpperBody&lt;br /&gt;
Exclude=skeleton_leg*&lt;br /&gt;
Exclude=skeleton_foot*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defining the group in an Action entry is fairly simple; just add the tag &#039;Group=&#039; and enter the group&#039;s name. For example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:green;width:25%;background-color:#dcdcdc&amp;quot;&amp;gt;&lt;br /&gt;
[Action]&lt;br /&gt;
Name=CloseEyes&lt;br /&gt;
Group=Eyelids&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example of a finished Actions.txt file, [http://hg.openclonk.org/openclonk-resources/raw-file/9c271b749d31/models/Vehicles/catapult/Actions.txt this is the Catapult&#039;s].&lt;br /&gt;
&lt;br /&gt;
== Sounds &amp;amp; Music ==&lt;br /&gt;
Any game is only half as good without proper sounds and music. If you played the titles of the old Clonk series, you will probably still suffer from the memories of the midi music from the last millenium, like &amp;quot;Pizza strings&amp;quot; or &amp;quot;On a razor blade&amp;quot;. Anyway. So we need both people who are good at creating, editing (and searching) sound effects and talented people who can make music for OpenClonk. &lt;br /&gt;
There are some sound archives out there which have CC-licensed sound effects, also it can&#039;t hurt to ask the authors of one of the many many mods for commercial games if we are allowed to use their sounds under the terms of a CC-license (preferably CC-by).&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1196</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=1196"/>
		<updated>2012-03-12T02:23:51Z</updated>

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

		<summary type="html">&lt;p&gt;Ringwaul: /* 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] 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 [http://download.blender.org/release/Blender2.49b/ Blender 2.49b], you&#039;ll need the OGRE Exporter. Randrian has created an improved version of the OGRE Exporter which adds critical features necessary for animation blending. [http://attach.openclonk.org/9/17909/OgreExporterOC.zip Download Link]&lt;br /&gt;
&lt;br /&gt;
*Extract the OGRE Exporter into your .blender/scripts/ folder.&lt;br /&gt;
*Install [http://www.python.org/download/releases/2.6.2/ Python 2.6.2]&lt;br /&gt;
*Obtain the [http://www.ogre3d.org/tikiwiki/OgreXmlConverter OGRE XML Converter software], bundled inside the OGRE Command Line Tools package (look in &#039;See Also&#039; box for download).&lt;br /&gt;
*Extract the OGRE Command Line Tools somewhere easily accessible (ie: C:\OgreCommandLineTools).&lt;br /&gt;
*Load up blender, and create a new window and set the window type to &#039;Scripts Window&#039;. Then click File&amp;gt;Export&amp;gt;OGRE Meshes to load the exporter GUI into that window.&lt;br /&gt;
*Hit the &#039;Preferences&#039; button in the OGRE GUI. Set the location of the OGRE XML Exporter to Manual, and link to the location of the OgreXmlConverter.exe.&lt;br /&gt;
*In the directory of your .blend file, create an empty Actions.txt file. More on this later.&lt;br /&gt;
By following these steps, you should be able to properly export models for OpenClonk. If you run into any problems, leave a post on the forum addressing the issue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Guidelines for Modelling&#039;&#039;&#039;&lt;br /&gt;
*Model on the Y/Z view-plane. Models in OpenClonk appear as they do on the Y/Z plane in blender. The X-Axis goes &#039;into&#039; the screen. Make sure you model with regard to these axes (The Y/Z plane is the default side view in Blender).&lt;br /&gt;
*Do not use Mesh Transformations. Mesh transformations are not handled properly by the OGRE exporter, and will cause deformation in game. If you have transformations applied to an existing model, you can remove them (select the model and press alt+g, alt+s, alt+r). Caution: Avoid animating before removing transformations!&lt;br /&gt;
*3D Model must be Three-Dimensional. The 3D mesh must have length on all axes. Making a perfectly flat object on only two axes will cause it to not appear in-game. To fix this, move a vertex so the mesh has length on all axes.&lt;br /&gt;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://www.cs.ucr.edu/~macchiea/cs134/lab1/ogrehelp/ogremeshesexporter.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039;[[File:OgreExporter.png|200px|thumb|right|The OGRE Exporter frame in Blender]]&lt;br /&gt;
To export the model, you&#039;ll need to have a window for the OGRE exporter in Blender. Make a new pane for scripts, and click &#039;File/Export/OGRE Meshes&#039;. Models used for OpenClonk must be exported with specific options.&lt;br /&gt;
*“Fix Up Axis to Y” should not be enabled.&lt;br /&gt;
*If you have the XML converter, make sure “OgreXMLConverter” is enabled.&lt;br /&gt;
*If you have already made manual modifications to the Scene.material file and are re-exporting the mesh and/or skeleton, make sure &#039;Export Materials&#039; is not enabled.&lt;br /&gt;
*&#039;Path:&#039; will be where the OGRE files are exported to. You can use a temporary directory and then copy them into your OpenClonk object definition, or you can export the OGRE files directly into the object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFiles.png|250px|thumb|right|Typical exported files before user modification.]]&lt;br /&gt;
Once you have exported the mesh, some files will be created in the chosen directory. Follow these steps:&lt;br /&gt;
*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>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1099</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1099"/>
		<updated>2011-10-05T20:22:50Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=5,2,0,1&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DefCores contain a fair amount of basic object data, but for now we only need to change the ID to something unique; for example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=5,2,0,1&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make use of the variables given by the Hit callback. The Hit callback is a function called by the engine whenever an object strikes the ground with sufficient force.&lt;br /&gt;
&lt;br /&gt;
The Hit function used in the previous example didn&#039;t make use of the variables which the Hit callback uses, so we&#039;ll have to add those into the script. Formerly the Hit function was written as such:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the brackets, add &amp;quot;int xdir, int ydir&amp;quot;. This will allow the Hit callback to receive the x speed and y speed of the object when it hit the ground. Now we can use these variables within the Hit function and manipulate the object&#039;s speed to simulate a bounce.&lt;br /&gt;
&lt;br /&gt;
To do this, a simple reversal of the ydir is enough. To set an object&#039;s y speed, we use the function &amp;quot;SetYDir()&amp;quot;. The new speed we wish the object to have will be written inside the brackets (the first parameter). Of course, to reverse a value, all we have to do is multiply the number by negative one. There is another thing we need to pay attention to specific to the Hit function; the variables for xdir and ydir have a precision value of 100. Therefore, in the SetYDir function we must define that (the second parameter).&lt;br /&gt;
&lt;br /&gt;
The script should be written something like this:&lt;br /&gt;
&amp;lt;pre width=50&amp;gt;&lt;br /&gt;
protected func Hit(int xdir, int ydir)&lt;br /&gt;
{&lt;br /&gt;
    SetYDir(ydir * -1, 100);&lt;br /&gt;
    return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1098</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1098"/>
		<updated>2011-10-05T19:03:27Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* The DefCore */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=5,2,0,1&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DefCores contain a fair amount of basic object data, but for now we only need to change the ID to something unique; for example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=5,2,0,1&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(level);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(-20);&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1097</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1097"/>
		<updated>2011-10-05T19:02:39Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* The DefCore */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DefCores contain a fair amount of basic object data, but for now we only need to change the ID to something unique; for example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(level);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(-20);&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1096</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=1096"/>
		<updated>2011-10-05T18:58:51Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Creating your First Object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(level);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(-20);&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=919</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=919"/>
		<updated>2011-05-22T22:10:58Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Make it Bounce! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(level);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(-20);&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=918</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=918"/>
		<updated>2011-05-18T02:19:37Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Make it Bounce! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(level);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(-20);&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this bounce isn&#039;t very realistic. And further unfortunately, due to when the hit function is called we can&#039;t simply put &#039;SetYDir((GetYDir() * -1) / 2);&#039; into the Hit Function for a quick and realistic bounce. This problem requires an effect to get the last vertical speed (ydir) before it hit the ground (which is now zero, causing no bounce to occur).&lt;br /&gt;
&lt;br /&gt;
Make your script as such for a realistic bounce:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local currentydir;&lt;br /&gt;
local lastydir;&lt;br /&gt;
&lt;br /&gt;
protected func Initialize()&lt;br /&gt;
{&lt;br /&gt;
	lastydir = 0;&lt;br /&gt;
	currentydir = 0;&lt;br /&gt;
	AddEffect(&amp;quot;Bounce&amp;quot;, this, 1,1,this);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Sound(&amp;quot;RockHit*&amp;quot;);&lt;br /&gt;
	SetYDir((lastydir * -1) / 2);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxBounceTimer(object target, int num, int timer)&lt;br /&gt;
{&lt;br /&gt;
	lastydir = crntydir;&lt;br /&gt;
	currentydir = GetYDir();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we are using some local variables for the object, and a timed effect. The FxBounceTimer function sets the &#039;lastydir&#039; to the previous &#039;currentydir&#039; and updates the &#039;currentydir&#039; variable to the actual vertical speed at the current frame. Thus two variables are stored; last frame&#039;s vertical speed and the current frame&#039;s vertical speed.&lt;br /&gt;
&lt;br /&gt;
Now in the Hit() function, we can use the &#039;lastydir&#039; variable. Test it in game, and watch your object bounce about. :]&lt;br /&gt;
&lt;br /&gt;
Remember, to quickly test objects use &#039;/script GetCursor()-&amp;gt;CreateContents(MyObject)&#039;, where &#039;MyObject&#039; is the ID of your object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=917</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=917"/>
		<updated>2011-05-18T01:17:03Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
==An Introduction to C4Script==&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(-20);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(GetYDir());&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this bounce isn&#039;t very realistic. And further unfortunately, due to when the hit function is called we can&#039;t simply put &#039;SetYDir((GetYDir() * -1) / 2);&#039; into the Hit Function for a quick and realistic bounce. This problem requires an effect to get the last vertical speed (ydir) before it hit the ground (which is now zero, causing no bounce to occur).&lt;br /&gt;
&lt;br /&gt;
Make your script as such for a realistic bounce:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local currentydir;&lt;br /&gt;
local lastydir;&lt;br /&gt;
&lt;br /&gt;
protected func Initialize()&lt;br /&gt;
{&lt;br /&gt;
	lastydir = 0;&lt;br /&gt;
	currentydir = 0;&lt;br /&gt;
	AddEffect(&amp;quot;Bounce&amp;quot;, this, 1,1,this);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Sound(&amp;quot;RockHit*&amp;quot;);&lt;br /&gt;
	SetYDir((lastydir * -1) / 2);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxBounceTimer(object target, int num, int timer)&lt;br /&gt;
{&lt;br /&gt;
	lastydir = crntydir;&lt;br /&gt;
	currentydir = GetYDir();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we are using some local variables for the object, and a timed effect. The FxBounceTimer function sets the &#039;lastydir&#039; to the previous &#039;currentydir&#039; and updates the &#039;currentydir&#039; variable to the actual vertical speed at the current frame. Thus two variables are stored; last frame&#039;s vertical speed and the current frame&#039;s vertical speed.&lt;br /&gt;
&lt;br /&gt;
Now in the Hit() function, we can use the &#039;lastydir&#039; variable. Test it in game, and watch your object bounce about. :]&lt;br /&gt;
&lt;br /&gt;
Remember, to quickly test objects use &#039;/script GetCursor()-&amp;gt;CreateContents(MyObject)&#039;, where &#039;MyObject&#039; is the ID of your object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=916</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=916"/>
		<updated>2011-05-18T01:16:31Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* C4Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=C4Script=&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
===An Introduction to C4Script===&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(-20);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(GetYDir());&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this bounce isn&#039;t very realistic. And further unfortunately, due to when the hit function is called we can&#039;t simply put &#039;SetYDir((GetYDir() * -1) / 2);&#039; into the Hit Function for a quick and realistic bounce. This problem requires an effect to get the last vertical speed (ydir) before it hit the ground (which is now zero, causing no bounce to occur).&lt;br /&gt;
&lt;br /&gt;
Make your script as such for a realistic bounce:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local currentydir;&lt;br /&gt;
local lastydir;&lt;br /&gt;
&lt;br /&gt;
protected func Initialize()&lt;br /&gt;
{&lt;br /&gt;
	lastydir = 0;&lt;br /&gt;
	currentydir = 0;&lt;br /&gt;
	AddEffect(&amp;quot;Bounce&amp;quot;, this, 1,1,this);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Sound(&amp;quot;RockHit*&amp;quot;);&lt;br /&gt;
	SetYDir((lastydir * -1) / 2);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxBounceTimer(object target, int num, int timer)&lt;br /&gt;
{&lt;br /&gt;
	lastydir = crntydir;&lt;br /&gt;
	currentydir = GetYDir();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we are using some local variables for the object, and a timed effect. The FxBounceTimer function sets the &#039;lastydir&#039; to the previous &#039;currentydir&#039; and updates the &#039;currentydir&#039; variable to the actual vertical speed at the current frame. Thus two variables are stored; last frame&#039;s vertical speed and the current frame&#039;s vertical speed.&lt;br /&gt;
&lt;br /&gt;
Now in the Hit() function, we can use the &#039;lastydir&#039; variable. Test it in game, and watch your object bounce about. :]&lt;br /&gt;
&lt;br /&gt;
Remember, to quickly test objects use &#039;/script GetCursor()-&amp;gt;CreateContents(MyObject)&#039;, where &#039;MyObject&#039; is the ID of your object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_documentation&amp;diff=915</id>
		<title>Scripting documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_documentation&amp;diff=915"/>
		<updated>2011-05-18T01:15:51Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: moved Scripting documentation to Scripting Documentation:&amp;amp;#32;capitalization of Documentation ;)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Scripting Documentation]]&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=914</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=914"/>
		<updated>2011-05-18T01:15:51Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: moved Scripting documentation to Scripting Documentation:&amp;amp;#32;capitalization of Documentation ;)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===C4Script===&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
===An Introduction to C4Script===&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(-20);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(GetYDir());&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this bounce isn&#039;t very realistic. And further unfortunately, due to when the hit function is called we can&#039;t simply put &#039;SetYDir((GetYDir() * -1) / 2);&#039; into the Hit Function for a quick and realistic bounce. This problem requires an effect to get the last vertical speed (ydir) before it hit the ground (which is now zero, causing no bounce to occur).&lt;br /&gt;
&lt;br /&gt;
Make your script as such for a realistic bounce:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local currentydir;&lt;br /&gt;
local lastydir;&lt;br /&gt;
&lt;br /&gt;
protected func Initialize()&lt;br /&gt;
{&lt;br /&gt;
	lastydir = 0;&lt;br /&gt;
	currentydir = 0;&lt;br /&gt;
	AddEffect(&amp;quot;Bounce&amp;quot;, this, 1,1,this);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Sound(&amp;quot;RockHit*&amp;quot;);&lt;br /&gt;
	SetYDir((lastydir * -1) / 2);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxBounceTimer(object target, int num, int timer)&lt;br /&gt;
{&lt;br /&gt;
	lastydir = crntydir;&lt;br /&gt;
	currentydir = GetYDir();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we are using some local variables for the object, and a timed effect. The FxBounceTimer function sets the &#039;lastydir&#039; to the previous &#039;currentydir&#039; and updates the &#039;currentydir&#039; variable to the actual vertical speed at the current frame. Thus two variables are stored; last frame&#039;s vertical speed and the current frame&#039;s vertical speed.&lt;br /&gt;
&lt;br /&gt;
Now in the Hit() function, we can use the &#039;lastydir&#039; variable. Test it in game, and watch your object bounce about. :]&lt;br /&gt;
&lt;br /&gt;
Remember, to quickly test objects use &#039;/script GetCursor()-&amp;gt;CreateContents(MyObject)&#039;, where &#039;MyObject&#039; is the ID of your object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=913</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=913"/>
		<updated>2011-05-18T01:07:54Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===C4Script===&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
===An Introduction to C4Script===&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(-20);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(GetYDir());&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this bounce isn&#039;t very realistic. And further unfortunately, due to when the hit function is called we can&#039;t simply put &#039;SetYDir((GetYDir() * -1) / 2);&#039; into the Hit Function for a quick and realistic bounce. This problem requires an effect to get the last vertical speed (ydir) before it hit the ground (which is now zero, causing no bounce to occur).&lt;br /&gt;
&lt;br /&gt;
Make your script as such for a realistic bounce:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local currentydir;&lt;br /&gt;
local lastydir;&lt;br /&gt;
&lt;br /&gt;
protected func Initialize()&lt;br /&gt;
{&lt;br /&gt;
	lastydir = 0;&lt;br /&gt;
	currentydir = 0;&lt;br /&gt;
	AddEffect(&amp;quot;Bounce&amp;quot;, this, 1,1,this);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Sound(&amp;quot;RockHit*&amp;quot;);&lt;br /&gt;
	SetYDir((lastydir * -1) / 2);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxBounceTimer(object target, int num, int timer)&lt;br /&gt;
{&lt;br /&gt;
	lastydir = crntydir;&lt;br /&gt;
	currentydir = GetYDir();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we are using some local variables for the object, and a timed effect. The FxBounceTimer function sets the &#039;lastydir&#039; to the previous &#039;currentydir&#039; and updates the &#039;currentydir&#039; variable to the actual vertical speed at the current frame. Thus two variables are stored; last frame&#039;s vertical speed and the current frame&#039;s vertical speed.&lt;br /&gt;
&lt;br /&gt;
Now in the Hit() function, we can use the &#039;lastydir&#039; variable. Test it in game, and watch your object bounce about. :]&lt;br /&gt;
&lt;br /&gt;
Remember, to quickly test objects use &#039;/script GetCursor()-&amp;gt;CreateContents(MyObject)&#039;, where &#039;MyObject&#039; is the ID of your object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=912</id>
		<title>Scripting Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Scripting_Documentation&amp;diff=912"/>
		<updated>2011-05-18T01:01:13Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;a couple of lines on what is c4script and why it is uses&lt;br /&gt;
&lt;br /&gt;
Links to the c4script documentation&lt;br /&gt;
&lt;br /&gt;
A list of examples of how to use library functions to achieve some minor tasks (create a bomb, position an object somewhere, move an object, and so on)&lt;br /&gt;
&lt;br /&gt;
===C4Script===&lt;br /&gt;
C4Script is the C-like script-language used by OpenClonk. C4Script controls in-game objects; from the Clonk to the GUI, everything is programmed with C4Script.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.openclonk.org/en/sdk/index.html C4Script Reference Library] is an online resource containing documentation of nearly all C4Script functions, as well as information on syntax and how to use many different features of the language.&lt;br /&gt;
&lt;br /&gt;
As a side note, the name &#039;C4Script&#039; comes from the first game it was used in, Clonk 4. Each following game in the series has vastly expanded on and improved the language since it&#039;s inception.&lt;br /&gt;
&lt;br /&gt;
===An Introduction to C4Script===&lt;br /&gt;
&lt;br /&gt;
Learning a new script language can be difficult, especially if you do not have any previous programming knowledge. This introduction will appeal to these users, as we do not expect any new developer to have a firm basis in C before starting. ;-)&lt;br /&gt;
&lt;br /&gt;
=Creating your First Object=&lt;br /&gt;
Here we will cover the basic steps on creating a new object usable within OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Because creating each new object from scratch would be tedious, repetitive work, we provide a template object to work with. This is available within the base Objects.ocd (TemplateObject.ocd).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy the template into the root directory of OpenClonk (the folder containing your game executable), and rename it to something such as &#039;MyObject.ocd&#039;. Now have a look inside your object&#039;s folder. There are a few things we&#039;ll need to change before it will load as your object, instead of over-riding the template.&lt;br /&gt;
&lt;br /&gt;
==The DefCore==&lt;br /&gt;
&lt;br /&gt;
Open the DefCore.txt file. You&#039;ll see something similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=TemplateObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
Category=C4D_Object&lt;br /&gt;
Width=8&lt;br /&gt;
Height=8&lt;br /&gt;
Offset=-4,-4&lt;br /&gt;
Vertices=3&lt;br /&gt;
VertexX=0,2,-2&lt;br /&gt;
VertexY=1,-1,-1&lt;br /&gt;
VertexFriction=20,20,20&lt;br /&gt;
Value=1&lt;br /&gt;
Mass=10&lt;br /&gt;
Components=Rock=1;Wood=1;&lt;br /&gt;
Rotate=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do all these things do? Here&#039;s a breakdown of the definitions we&#039;re using:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot;  border = 1 style=&amp;quot;width:100%; margin-right:0;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:10%;&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:15%;&amp;quot;| Data Type&lt;br /&gt;
! style=&amp;quot;width:75%;&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|definition ID&lt;br /&gt;
|An identifier the engine uses to name the object (must be unique!).&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|4 integers&lt;br /&gt;
|Minimal engine version required by the object. Should be always the current engine version at the time of the last change. Let&#039;s leave it as 4,10,0,0 (default OpenClonk).&lt;br /&gt;
|-&lt;br /&gt;
|Category&lt;br /&gt;
|String (max. 30 chars)&lt;br /&gt;
|Defines the base functionality of the object. Default here is C4D_Object (has gravity, collides with terrain, etc.). A thorough description of the different categories can be found [http://docs.openclonk.org/en/sdk/definition/category.html here].&lt;br /&gt;
|-&lt;br /&gt;
|Width&lt;br /&gt;
|Integer&lt;br /&gt;
|The X-length of the object. This relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Height&lt;br /&gt;
|Integer&lt;br /&gt;
|The Y-length of the object. Relates to the graphics data used.&lt;br /&gt;
|-&lt;br /&gt;
|Offset&lt;br /&gt;
|2 Integers&lt;br /&gt;
|The offset is where the object&#039;s pivot-point (or centre-point) is. Normally, you&#039;d want it to be in the centre of the object. Since the object is X=8, Y=8, the centre-point should go back to the half of X (-4) and to the half of Y (-4).&lt;br /&gt;
|-&lt;br /&gt;
|Vertices&lt;br /&gt;
|Integer&lt;br /&gt;
|The amount of vertex points the object has (1 to 30). Primarly used for collision. The following &#039;Vertex&#039; properties refine the vertices&#039; properties.&lt;br /&gt;
|-&lt;br /&gt;
|VertexX&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of horizontal vertex coordinates of the object. Vertex 1 is the first integer, vertex 2 is the second integer, etc.&lt;br /&gt;
|-&lt;br /&gt;
|VertexY&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of vertical vertex coordinates of the object. Follows the same pattern as VertexX (now it defines the vertices&#039; vertical coordinate).&lt;br /&gt;
|-&lt;br /&gt;
|VertexFriction&lt;br /&gt;
|up to 30 integers&lt;br /&gt;
|List of friction values of the object vertices, each 1 to 100. (How frictional a vertex is with the landscape)&lt;br /&gt;
|-&lt;br /&gt;
|Value&lt;br /&gt;
|Integer&lt;br /&gt;
|How much the object can be sold/bought for.&lt;br /&gt;
|-&lt;br /&gt;
|Mass&lt;br /&gt;
|Integer&lt;br /&gt;
|Weight of the object. For reference, rock = 10, clonk = 50, hut = 1,000, castle = 10,000.&lt;br /&gt;
|-&lt;br /&gt;
|Components&lt;br /&gt;
|ID list&lt;br /&gt;
|Objects from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. (The template object is made of 1 rock and 1 wood).&lt;br /&gt;
|-&lt;br /&gt;
|Rotate&lt;br /&gt;
|Integer&lt;br /&gt;
|0 no rotation, 1 full rotation, 2-360 limited rotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Okay! Now that we&#039;re done reading that, we&#039;ll need to change the object&#039;s ID to something unique. This can be exactly the same as the object&#039;s folder. For example:&lt;br /&gt;
&amp;lt;pre width=40&amp;gt;&lt;br /&gt;
[DefCore]&lt;br /&gt;
id=MyObject&lt;br /&gt;
Version=4,10,0,0&lt;br /&gt;
...etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything else in the DefCore is fine for our purposes, so let&#039;s have a look at the script.&lt;br /&gt;
&lt;br /&gt;
==The Script File==&lt;br /&gt;
[[File:ScriptFile.png|thumb|359px|right|View of the script file.]]&lt;br /&gt;
The script file contains the object&#039;s &#039;code&#039;, or the &#039;programming&#039; of the object. This is the real meat of custom objects.&lt;br /&gt;
&lt;br /&gt;
If you use Windows, to edit Script files in a more user-friendly way it is suggested you use a program such as [http://notepad-plus-plus.org/ Notepad++] instead of the default text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the &#039;Hit()&#039; function. Currently when the object hits the landscape, it makes a RockHit* sound. Let&#039;s make it explode instead. ;D&lt;br /&gt;
&lt;br /&gt;
Delete the line containing the Sound function, and write &#039;Explode(30);&#039; instead:&lt;br /&gt;
&amp;lt;pre width=30&amp;gt;protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Explode(30);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Script Tip&#039;&#039;&#039;: Notice every line ends with a semi-colon. If a line is not closed, the engine will throw a syntax error! The same goes for brackets, &#039; { } or ( ) &#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, make sure to modify the header for you object. Add the name, a description, and fill in the author! :]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test your object!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to try out your object in game. Run the game, and start a test scenario. Hit Ctrl+F5 to start Dev-mode, and type this in as a message (replace &#039;MyObject&#039; with the ID of your object):&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:50%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|/script GetCursor()-&amp;gt;CreateContents(MyObject)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your clonk should have the new object appear in his inventory. Throw it on the ground!&lt;br /&gt;
&lt;br /&gt;
===Other Fun Example Scripts for your Object===&lt;br /&gt;
&lt;br /&gt;
These examples will make you familiar with a few common script functions.&lt;br /&gt;
&lt;br /&gt;
====Make it Bounce!====&lt;br /&gt;
For this example, we&#039;ll make a secondary function that the Hit() function will call. While not quite necessary, this is a good way to become familiar with how functions work.&lt;br /&gt;
&lt;br /&gt;
Underneath the Hit function, start a new function called &#039;Bounce&#039;. The syntax should look as such:&lt;br /&gt;
[[File:BounceFunction.png|border]]&lt;br /&gt;
&lt;br /&gt;
Where the commented line is ( // ), remove that and add this function: &#039;SetYDir(-20);&#039;. Under that line, add a &lt;br /&gt;
&#039;return 1;&#039; to end the function. Now let&#039;s look back at the Hit() function. Remove the &#039;Explode()&#039; function there. This time, write in: &#039;Bounce(GetYDir());&#039;.&lt;br /&gt;
&lt;br /&gt;
Now when the Hit() function is called, it will call the Bounce function, passing &#039;-20&#039; as the &#039;level&#039; parameter. Test it out in game, see if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this bounce isn&#039;t very realistic. And further unfortunately, due to when the hit function is called we can&#039;t simply put &#039;SetYDir((GetYDir() * -1) / 2);&#039; into the Hit Function for a quick and realistic bounce. This problem requires an effect to get the last vertical speed (ydir) before it hit the ground (which is now zero, causing no bounce to occur).&lt;br /&gt;
&lt;br /&gt;
Make your script as such for a realistic bounce:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local currentydir;&lt;br /&gt;
local lastydir;&lt;br /&gt;
&lt;br /&gt;
protected func Initialize()&lt;br /&gt;
{&lt;br /&gt;
	lastydir = 0;&lt;br /&gt;
	currentydir = 0;&lt;br /&gt;
	AddEffect(&amp;quot;Bounce&amp;quot;, this, 1,1,this);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected func Hit()&lt;br /&gt;
{&lt;br /&gt;
	Sound(&amp;quot;RockHit*&amp;quot;);&lt;br /&gt;
	SetYDir((lastydir * -1) / 2);&lt;br /&gt;
	return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func FxBounceTimer(object target, int num, int timer)&lt;br /&gt;
{&lt;br /&gt;
	lastydir = crntydir;&lt;br /&gt;
	currentydir = GetYDir();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we are using some local variables for the object, and a timed effect. The FxBounceTimer function sets the &#039;lastydir&#039; to the previous &#039;currentydir&#039; and updates the &#039;currentydir&#039; variable to the actual vertical speed at the current frame. Thus two variables are stored; last frame&#039;s vertical speed and the current frame&#039;s vertical speed.&lt;br /&gt;
&lt;br /&gt;
Now in the Hit() function, we can use the &#039;lastydir&#039; variable. Test it in game, and watch your object bounce about. :]&lt;br /&gt;
&lt;br /&gt;
Remember, to quickly test objects use &#039;/script GetCursor()-&amp;gt;CreateContents(MyObject)&#039;, where &#039;MyObject&#039; is the ID of your object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Todo: Some more basic tuts&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:BounceFunction.png&amp;diff=911</id>
		<title>File:BounceFunction.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:BounceFunction.png&amp;diff=911"/>
		<updated>2011-05-17T23:47:34Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: Bounce function before any work is done&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bounce function before any work is done&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ScriptFile.png&amp;diff=910</id>
		<title>File:ScriptFile.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ScriptFile.png&amp;diff=910"/>
		<updated>2011-05-17T22:34:55Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: View of the script file from TemplateObject.ocd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;View of the script file from TemplateObject.ocd&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=909</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=909"/>
		<updated>2011-05-10T18:50:16Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Exporting Meshes */ Updated Modelling Guidelines - Avoid &amp;gt; 2 faced edges&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;
*Avoid edges with more than two faces connected to them. Edges with more than two faces will cause shading errors in game. An easy way to circumvent this is to separate the third face from the edge, so it is close to the original edge, but not connected.&lt;br /&gt;
*What features work with the OGRE format? Not all of the features listed in Blender will affect an exported 3D OGRE mesh. For a full list of compatible features, visit: http://www.cs.ucr.edu/~macchiea/cs134/lab1/ogrehelp/ogremeshesexporter.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exporting the Model&#039;&#039;&#039;[[File:OgreExporter.png|200px|thumb|right|The OGRE Exporter frame in Blender]]&lt;br /&gt;
To export the model, you&#039;ll need to have a window for the OGRE exporter in Blender. Make a new pane for scripts, and click &#039;File/Export/OGRE Meshes&#039;. Models used for OpenClonk must be exported with specific options.&lt;br /&gt;
*“Fix Up Axis to Y” should not be enabled.&lt;br /&gt;
*If you have the XML converter, make sure “OgreXMLConverter” is enabled.&lt;br /&gt;
*If you have already made manual modifications to the Scene.material file and are re-exporting the mesh and/or skeleton, make sure &#039;Export Materials&#039; is not enabled.&lt;br /&gt;
*&#039;Path:&#039; will be where the OGRE files are exported to. You can use a temporary directory and then copy them into your OpenClonk object definition, or you can export the OGRE files directly into the object definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using the Exported Files&#039;&#039;&#039;[[File:ExportedFiles.png|250px|thumb|right|Typical exported files before user modification.]]&lt;br /&gt;
Once you have exported the mesh, some files will be created in the chosen directory. Follow these steps:&lt;br /&gt;
*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>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Settlement_Concept&amp;diff=826</id>
		<title>Settlement Concept</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Settlement_Concept&amp;diff=826"/>
		<updated>2011-01-29T22:10:39Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* Construction Process (ideas!) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a settlement concept as I (PeterW) currently would like to see it implemented. It already contains a lot of ideas from other people, and I fully expect it to see a lot of updates when people think up better solutions. There even are sections marked as &amp;quot;&#039;&#039;&#039;ideas!&#039;&#039;&#039;&amp;quot; where I feel substantial improvements will be necessary in order to reach a good solution.&lt;br /&gt;
&lt;br /&gt;
Feedback is therefore obviously highly welcome. But please put it into the forum, so this document can stay consistent. I will try to update it whenever I feel that we have reached consensus on an issue.&lt;br /&gt;
&lt;br /&gt;
== Buildings ==&lt;br /&gt;
&lt;br /&gt;
Buildings are the main strategic game element of Clonk. This means they shape how the game will shake out in the long run. Buildings should be designed to be so they are long-lived and remain static until they are destroyed, which should typically take considerable effort.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
Constructing a building requires the Clonk to use a construction hammer. When the hammer gets activated where it is possible to perform a construction, it shows a menu above the Clonk, showing the building categories (production, structural, repair)&lt;br /&gt;
&lt;br /&gt;
When a category gets selected, it takes the menu to the building list. When the mouse is over a building, it automatically shows a preview of the building. If the construction is possible at the current location, the preview will be a picture of the building as it would look like after construction, with a green color. Otherwise, it is shown at the Clonk&#039;s location, using a red color.&lt;br /&gt;
&lt;br /&gt;
Some buildings might have construction aids that are shown alongside the preview (say, a preview of the shaft for the elevator, so you tell whether you will hit granite).&lt;br /&gt;
&lt;br /&gt;
Each building requires free space in order to build it, meaning that its face should not be covered be &amp;quot;too many&amp;quot; solid pixels or another building of the same plane. Additionally, some buildings might add further constraints (structural buildings, see below). When it is not possible to construct a building at the Clonk&#039;s current location, a best effort should be made to find a close location where the structure can indeed be built. Where no special rules apply, this could be implemented as simply trying out construction sites in a given radius (say, 5 pixels). This should be visible in the preview.&lt;br /&gt;
&lt;br /&gt;
=== Construction Material (ideas!) ===&lt;br /&gt;
&lt;br /&gt;
Ideas:&lt;br /&gt;
* Get from lorry&lt;br /&gt;
* Scratch the idea, just make player buy all buildings&lt;br /&gt;
&lt;br /&gt;
=== Construction Process (ideas!) ===&lt;br /&gt;
&lt;br /&gt;
Ideas:&lt;br /&gt;
* Construction works automatically (magic!)&lt;br /&gt;
* Have NPC Clonks build it :x&lt;br /&gt;
* Enemies should be able to cancel it, though.&lt;br /&gt;
&lt;br /&gt;
== Destruction ==&lt;br /&gt;
&lt;br /&gt;
A building gets &amp;quot;damaged&amp;quot; by:&lt;br /&gt;
* explosions&lt;br /&gt;
* lightning&lt;br /&gt;
* sparks from burning objects (TODO: we need a fire concept!)&lt;br /&gt;
&lt;br /&gt;
After a certain threshold damage is reached, the building starts burning. Whenever a building receives damage, a message is shown detailing how much more damage the building will be able to absorb (in relation to the building&#039;s total health).&lt;br /&gt;
&lt;br /&gt;
When a building burns, it changes definition to a &amp;quot;ruin&amp;quot; building variant. While it burns, it itself damages buildings that are close to it, by emitting sparks. Therefore a fire might &amp;quot;spread&amp;quot;. (Not sure on this one)&lt;br /&gt;
&lt;br /&gt;
A ruin will automatically stop burning after it has burnt down to half its health. At this point, it won&#039;t catch fire anymore, but lightening or explosions will cause the ruin to be destroyed instantly.&lt;br /&gt;
&lt;br /&gt;
Once a ruin has been extinguished, it can be rebuild for half the price required to build the complete structure. This applies even if the construction was extinguished before burning down to half its health.&lt;br /&gt;
&lt;br /&gt;
== Production Buildings ==&lt;br /&gt;
&lt;br /&gt;
Production buildings are about giving the settlement access to certain types of items or vehicles. Each production building should cover one class of items or vehicles.&lt;br /&gt;
&lt;br /&gt;
They are &#039;&#039;not defensive buildings&#039;&#039;, and therefore do nothing to protect Clonks or themselves. They might burn down quickly, have no fundament and don&#039;t provide an interior for Clonks to hide.&lt;br /&gt;
&lt;br /&gt;
They also &#039;&#039;don&#039;t act as storages or transport&#039;&#039;, as it is the function of vehicles. Production buildings will only ever contain a bounded amount of items for the sole purpose of performing &lt;br /&gt;
&lt;br /&gt;
=== Function ===&lt;br /&gt;
&lt;br /&gt;
There are two ways to produce an item or a vehicle: Either by providing the raw materials required, or by buying it for an amount of gold. The latter requires the building to be currently owned by the player&#039;s team.&lt;br /&gt;
&lt;br /&gt;
Both the amount of gold required for buying as well as the amount of raw materials required for building may depend on the item/vehicle to be produced. Note however that the variety of of raw materials used in each production building should be kept low. For example, the chamical lab should only accept sulphur and coal (just skip the intermediate steps from CR).&lt;br /&gt;
&lt;br /&gt;
There are three ways to provide a building with the the raw materials required for a production:&lt;br /&gt;
* Throw the material into a collection zone. The collection zone should ignore all material that the building does not consume, as well as any surplus raw material.&lt;br /&gt;
* Drag &amp;amp; drop from the inventory&lt;br /&gt;
* Place a container vehicle in front of the production building, e.g. a lorry.&lt;br /&gt;
&lt;br /&gt;
Production starts automatically once there is enough material present to produce an item. If there is surplus raw material, it gets placed in front of the building. The production building then enters a production state that might take some time to finish. The time may depend on the type of item being produced.&lt;br /&gt;
&lt;br /&gt;
After production, a produced item or vehicle is either:&lt;br /&gt;
* Placed into a container in front of the production building (preferred)&lt;br /&gt;
* Dropped in front of the building&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
&lt;br /&gt;
Each production building has a production menu that is shown as an overlay shown above the building once a Clonk approaches it.&lt;br /&gt;
&lt;br /&gt;
Most prominently, the production menu should show the currently selected product type, and what other product types are available. This should take the form of a menu, with the currently selected product type appropriately highlighted. Clicking on a product type that is not currently selected makes it the new selection. Clicking on a currently selected product attempts to buy it.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the menu must show the raw materials required for the production. This should take the form of a separate row in the production menu, showing all raw material types the building can consume. Each one should be annotated with a caption in the form of &amp;quot;X/Y&amp;quot; where X is the number of raw objects currently present and Y is the number of raw objects required to start production. Note that Y might be 0, in which case the object in question is not required for the selected product, but for other possible products of the building.&lt;br /&gt;
&lt;br /&gt;
Lasty, the menu should show the cost of the object in gold. This could be hidden when the player&#039;s does not currently own the production building.&lt;br /&gt;
&lt;br /&gt;
=== Ideas &amp;amp; Notes ===&lt;br /&gt;
&lt;br /&gt;
* Exploration: Need a way to find out about stuff *before* you produce it. Mousing over unselected product types could semi-highlight them, show production cost and maybe some info text. Not much a fan of tooltips, need to think about where to place them.&lt;br /&gt;
&lt;br /&gt;
* Automatically getting stuff out of lorries might be a bit too much. We don&#039;t really want production buildings to empty lorries while they are pushed through. Two fixes that don&#039;t kill the system:&lt;br /&gt;
** Ignore lorries that aren&#039;t currently standing&lt;br /&gt;
** Allow to &amp;quot;unselect&amp;quot; product by clicking somewhere neutral in the production menu&lt;br /&gt;
&lt;br /&gt;
* Take over the traditional diagonal item exits? I find them cumbersome.&lt;br /&gt;
&lt;br /&gt;
== Structural Buildings ==&lt;br /&gt;
&lt;br /&gt;
The objective of structural buildings is to give the owner a passive advantage where they were built.&lt;br /&gt;
&lt;br /&gt;
=== Walls ===&lt;br /&gt;
&lt;br /&gt;
The basis structural building is a wall. Most other structural buildings require an existing wall, and are removed once the wall burns down.&lt;br /&gt;
&lt;br /&gt;
When a wall gets built close to another wall, its construction site will automatically be aligned with the existing wall. If the new construction site is invalid (e.g. not enough space) it is not possible to construct a wall at the given location. The construction preview should reflect this appropriately.&lt;br /&gt;
&lt;br /&gt;
When a wall finishes construction, it might automatically gain a number of additional features:&lt;br /&gt;
* A solid roof&lt;br /&gt;
* A fundament, if there is no wall below it&lt;br /&gt;
* If there is no wall on either side: Two doors left and right&lt;br /&gt;
* If there is one wall on either side: The feature of the existing wall is moved. No additional feature is added.&lt;br /&gt;
&lt;br /&gt;
=== Side Features ===&lt;br /&gt;
&lt;br /&gt;
These features can be added to the left and right sides of walls. When there is a wall right next to another wall, the left feature of one wall counts as the right feature of the other.&lt;br /&gt;
&lt;br /&gt;
* Wall: Solid wall&lt;br /&gt;
* Door: Solid wall with an opening that is normally blocked by a &amp;quot;door&amp;quot; object. It will open automatically when a friendly Clonk gets close, and will close automatically when an enemy Clonk is close. The door object can be destroyed separately.&lt;br /&gt;
* Drawbridge: Solid wall that can be rotated as a whole.&lt;br /&gt;
&lt;br /&gt;
... to be continued ...&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=FAQ&amp;diff=768</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=FAQ&amp;diff=768"/>
		<updated>2010-12-17T20:55:28Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
=== How do I submit a patch? ===&lt;br /&gt;
This answer assumes that you are using TortoiseHG. After you checked out the source code and made your changes, you need to &#039;&#039;commit&#039;&#039; these changes. Afterwards, you can use the &#039;&#039;log&#039;&#039; to access this commit and use the context menu to &#039;&#039;export&#039;&#039; the patch. This will create a new file which you can paste into a forum post. If you made or changed a binary file, please also attach it to your post.&lt;br /&gt;
&lt;br /&gt;
=== Why is this Page in English? Clonk is a German game! ===&lt;br /&gt;
Clonk has been a German shareware game and thus it&#039;s community has been mainly German. With the switch to the English language for the OpenClonk community, we intend to widen the community to an international level and make it possible for non-Germans to contribute to and participate in OpenClonk.&lt;br /&gt;
&lt;br /&gt;
Of course, German, as well as other languages will continue to be supported in the game. Just the &#039;&#039;development&#039;&#039; and the community of OpenClonk will be in English.&lt;br /&gt;
&lt;br /&gt;
=== Why do you start from scratch regarding the game content? ===&lt;br /&gt;
During Clonk development of the last 10 years, the game content stayed mainly about the same or was just extended by add-ons. We will now break with backward compatibility and the old game content to finally create something new. Actually, the doctrine to keep the backward compatibility was already a barrier for a very long time which simply blocked lots of good changes.&lt;br /&gt;
&lt;br /&gt;
OpenClonk will be a &#039;&#039;different&#039;&#039; game than the old Clonk series, it won&#039;t be just a sequel in the fashion of previous Clonk development. The aim of OpenClonk is not to replace Clonk Rage by  &amp;quot;making it better&amp;quot; while keeping everything as it was before. Our aim is to improve the &#039;&#039;real&#039;&#039; strengths of Clonk.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;quot;You can&#039;t develop in a new direction without leaving the old ones. By just enhancing the game as it is, you will basically get the same game. You can never advance.&amp;quot;&#039;&#039; - Clonkonaut&lt;br /&gt;
&lt;br /&gt;
While improving the game we just don&#039;t want to artificially limit ourselves or our ideas by obligations of having to include certain objects. So, Clonk will still be Clonk, of course. The game was about mining, about production lines and economy, fast and fiddly melees, known for flexibility in scenario design and whatnot. In this project, we aim to improve these strengths by throwing overboard the old game content - creating space for new ideas, improving the gameplay, eliminating the 10-year-old game issues which we got all too used to, reconsider and plan production lines, ... all that stuff.&lt;br /&gt;
&lt;br /&gt;
Clonk Rage on the other hand will continue to exist alongside OpenClonk as the last title of the shareware series and will continue to include all that classical and that the community has come to love.&lt;br /&gt;
[http://forum.openclonk.org/topic_show.pl?pid=1677#pid1677 Also read this comment from MastroLindo]&lt;br /&gt;
&lt;br /&gt;
=== Will you convert all those great Clonk Rage expansions for OpenClonk? ===&lt;br /&gt;
No, and we never will. OpenClonk is not backwards compatible with Clonk Rage, and never will be. We have broken ties with the old game content which all these expansions rely on. Hence the name, they are expansions for Clonk Rage. Specifically, Clonk Rage. OpenClonk is a different game with different game content, graphics, and script language, and therefore cannot have it&#039;s game content expanded with expansions designed for a completely different game. To put this into perspective, you would not try to convert &#039;Starcraft: Broodwar&#039; for &#039;WarCraft 3&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Am I able to play with several players on one PC? ===&lt;br /&gt;
Generally yes. However, currently this is not possible yet.&lt;br /&gt;
&lt;br /&gt;
=== Will there be keyboard-only controls? ===&lt;br /&gt;
No. OpenClonk is played with keyboard and mouse as the whole game is designed to utilize the advantages of mouse control. This adds a completely new set of gameplay possibilities to the game that would never have been possible in the shareware Clonk titles. However, gamepad controls are supported in the game and they work quite well considering that a gamepad doesn&#039;t have a pointing device. But still the mouse controls are better in speed and precision of use, so gamepad controls are more designed for the classical splitscreen game.&lt;br /&gt;
However you can create your own keyboard-only control scheme based on the gamepad contorl scheme.&lt;br /&gt;
&lt;br /&gt;
=== Are other Clonk games available as source code? ===&lt;br /&gt;
&lt;br /&gt;
The source code for most older Clonk versions [http://www.clonk.de/source.php is available from Redwolf Design]. Here is a list of modified versions:&lt;br /&gt;
* [http://users.v-lo.krakow.pl/~anszom/clonk/index.en.shtml Linux port of Clonk Planet]&lt;br /&gt;
* [http://wiki.gp2x.org/wiki/Clonk2X Clonk Planet for GP2x]&lt;br /&gt;
* [http://www.goldwipf.de/ The GWE] ([http://www.ccan.de/cgi-bin/ccan/ccan-view.pl?a=view&amp;amp;i=5757 download from CCAN])&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=706</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=706"/>
		<updated>2010-11-24T00:53:17Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* 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] 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 loose 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>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=648</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=648"/>
		<updated>2010-10-13T20:36:56Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: /* 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] 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 loose 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 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>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=647</id>
		<title>Artists Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Artists_Guide&amp;diff=647"/>
		<updated>2010-10-06T02:35:07Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: Exporting Meshes Guide added&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 loose 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:&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 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>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:Scene.material.png&amp;diff=646</id>
		<title>File:Scene.material.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:Scene.material.png&amp;diff=646"/>
		<updated>2010-10-06T02:20:55Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:ExportedFiles.png&amp;diff=645</id>
		<title>File:ExportedFiles.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:ExportedFiles.png&amp;diff=645"/>
		<updated>2010-10-06T02:11:55Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: Typical bunch of exported files before user modification.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical bunch of exported files before user modification.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=File:OgreExporter.png&amp;diff=644</id>
		<title>File:OgreExporter.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=File:OgreExporter.png&amp;diff=644"/>
		<updated>2010-10-06T02:04:14Z</updated>

		<summary type="html">&lt;p&gt;Ringwaul: The OGRE Exporter frame in Blender 2.49b.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The OGRE Exporter frame in Blender 2.49b.&lt;/div&gt;</summary>
		<author><name>Ringwaul</name></author>
	</entry>
</feed>