# Object Definitions

Object Definitions
Object definitions are used for all game objects in clonk: fire monsters, the wooden hut, and the clonk himself. An object definition is a group file composed from the following components:
Object properties

DefCore.txt
  Object properties.
ActMap
  Table for activities, normally used for objects with animations. The ActMap is defined in the Script.c as a property list.

Script

Script.c
  The object script. See object scripts and localization.

Raster Graphics

Graphics.png
  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).
Overlay.png
  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.
Graphics*.png/Overlay*.png
  Objects can also contain alternative sets of graphics which can be selected ingame using the script command SetGraphics(). The name corresponds to the file name portion following "Graphics". The matching overlay is automatically selected. For more information see SetGraphics().

3D Graphics

Graphics.mesh
  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
  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.
*.material
  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.
*.png
  Any number of textures defined in the OGRE material scripts.

Sounds

*.wav/*.ogg
  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.

Additional files for crew members

Rank.txt/Rank*.txt
  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.
Rank.png
  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.

Sven2
2002-04
matthes
2004-06