Object definitions are used for all game objects in clonk: the wooden hut, goal objects and the clonk himself. An object definition is a group file composed from the following components:
Table for activities, normally used for objects with animations. The ActMap is defined in the Script.c as a property list.
Graphics of the object. Base graphics, animation phases and a picture for display in menus are stored in a 32 bit picture with transparency channel (PNG format, 32 bit RGBA color, non interlaced). An optional zoom factor for high-resolution graphics can be provided in the '*'-portion of the name.
The part of the object's graphics which is to be colored in the player color (see ColorByOwner in DefCore.txt) can also be defined using a separate graphics file. In Overlay.png gray scales should be used instead of blue color.
An optional normal map for the object, where the red, green and blue components in the image correspond to the normal vectors to be used for the lighting of the object. If this file is not present, the normal vector at each pixel points straight into Z direction (outside of the screen).
- Graphics*.png/Overlay*.png (Graphics*.*.png/Overlay*.*.png)
Image describing areas in this object that are solid, so vertices of other objects will collide with it. Pixels are made solid if they are 50% or less transparent in this image. Source rectangle within this graphic and target position on the object must be set in DefCore.txt property "SolidMask" or using the script function SetSolidMask.
A 3D model can be used as an object's graphics instead of a bitmap. It needs to be provided in OGRE format. There are exporters for most 3D modeling tools. All files that are required by the mesh (especially material scripts, textures and skeletons) need also to be present in the object.
Skeleton files contain bones and animations for a 3D model. They are usually created by the exporter if bones and/or animations are used for the mesh.
OGRE material scripts are simple text files which contain information about the material of a 3D model. Each model is assigned a material which specifies how it is rendered. Normally these scripts are being generated by the exporter, but they can also be hand-edited afterwards (using a text editor) to apply additional effects.
Any number of textures defined in the OGRE material scripts.
Object local sounds. As these are always loaded and not dynamically unloaded as are scenario sounds you should use these sparingly and with small sound files only.Object local sounds within valid definitions are automatically put into a namespace with the ID of the object. They can be played using Sound("id::soundname").
Additional files for crew members
For object definitions defining a clonk type you can specify custom rank names for this clonk type here. The rank names will then also replace rank names of existing crew members of this type. The file should contain a simple text list of names of maximum 30 characters each. By using the approriate language codes you can create language dependent sets of rank names.
You can also define custom rank symbols for clonk types which are then displayed in the game instead of the standard symbols from Graphics.ocg. A rank symbol should always be square and there should be enough many symbols for all ranks. See the global Rank.png in the Graphics.ocg for an example.