Object Categories

The category of an object is a DWord bit mask composed of the following values. The first 5 categories must not be combined - of the bits 0-4 only one may be set at a time.
The categories listed here are not intended for use in C4Script, but for DefCore.txt. A list of constants defined in C4Script can be found here. For values missing there, you must either define constants yourself or use the integer values directly.
Bit Value Category Description Introduced in
0 1 C4D_StaticBack Immovable background object. 4.0.0.0 C4
1 2 C4D_Structure Buildings. 4.0.0.0 C4
2 4 C4D_Vehicle Vehicle. 4.0.0.0 C4
3 8 C4D_Living Living beings. 4.0.0.0 C4
4 16 C4D_Object A smaller item. 4.0.0.0 C4
5 32 C4D_Goal Game goal. 4.6.5.0 CP
6 64 C4D_Environment Environmental control object. 4.6.5.0 CP
7 128 C4D_SelectBuilding Scenario options: Object can be selected as a player-owned building at startup. 4.0.0.0 C4
8 256 C4D_SelectVehicle Scenario options: Object can be selected as a player-owned vehicle at startup. 4.0.0.0 C4
9 512 C4D_SelectMaterial Scenario options: Object can be selected as a player-owned material at startup. 4.0.0.0 C4
10 1024 C4D_SelectKnowledge Scenario options: Object can be selected as an available construction plan. 4.0.0.0 C4
11 2048 C4D_SelectHomebase Scenario options: Object can be selected as home base material. 4.0.0.0 C4
12 4096 C4D_SelectAnimal Scenario options: Object can be selected as placed animal. 4.0.0.0 C4
13 8192 C4D_SelectNest Scenario options: Object can be selected as a nest. 4.0.0.0 C4
14 16384 C4D_SelectInEarth Scenario options: Object can be selected for underground placement. 4.0.0.0 C4
15 32768 C4D_SelectVegetation Scenario options: Object can be selected as vegetation. 4.0.0.0 C4
16 65536 C4D_TradeLiving A living being that can be sold at the home base. 4.0.0.0 C4
17 131072 C4D_Magic A magic spell. 4.0.0.0 C4
18 262144 Reserved, used internally.
19 524288 C4D_Rule Rule control object. 4.6.5.0 CP
20 1048576 C4D_Background Object is behind the landscape. 4.9.1.0 GWE
21 2097152 C4D_Parallax Object moves parallax according to Local 0 and 1. For more information see C4D_Parallax. 4.9.1.0 GWE
22 4194304 C4D_MouseSelect Object can be clicked with the mouse, causing a MouseSelection(int iPlr) callback in the object. 4.9.5.0 CE
23 8388608 C4D_Foreground Object is always in the foreground, even before global particles. 4.9.5.0 CE
24 16777216 C4D_MouseIgnore Object cannot be selected with the mouse. 4.9.5.0 CE
25 33554432 C4D_IgnoreFoW Object is drawn above fog of war. Useful, for example, for status indicators and control elements. 4.9.6.0 CR

Changelog

Date Author Version Description
18th September 2022 Funni 4.0.0.0 C4 Version information for constants C4D_StaticBack, C4D_Structure, C4D_Vehicle, C4D_Living, C4D_Object, C4D_SelectBuilding, C4D_SelectVehicle, C4D_SelectMaterial, C4D_SelectKnowledge, C4D_SelectHomebase, C4D_SelectAnimal, C4D_SelectNest, C4D_SelectInEarth, C4D_SelectVegetation, C4D_TradeLiving and C4D_Magic added. The values were determined by inspecting the Clonk4 Objects.c4d. Possibly the constants were usable earlier in DefCore versions.
18th September 2022 Funni 4.6.5.0 CP Added version information for constants C4D_Goal, C4D_Environment and C4D_Rule. The values were taken from the C4D script constants group and the source code. It is possible that the constants were usable in earlier versions of DefCore. Some constants are first usable with 4.6.2.0 CP according to the CP documentation at that time.
18th September 2022 Funni 4.9.1.0 GWE Added version information for constants C4D_Background and C4D_Parallax. The values were taken from the C4D script constants group and the source code. It is possible that the constants were usable in earlier versions of DefCore.
18th September 2022 Funni 4.9.5.0 CE Added version information for constants C4D_MouseSelect, C4D_Foreground and C4D_MouseIgnore. The values were taken from the C4D script constants group and the source code. It is possible that the constants were usable in earlier versions of DefCore.
18th September 2022 Funni 4.9.6.0 CR Added version information for constant C4D_IgnoreFoW. The value was taken from the C4D script constants group and the source code. It is possible that the constant was usable in earlier versions of DefCore. 4.9.6.0 CR was called NET2-Engine before.
Sven2, May 2006
Newton, January 2005
Günther, January 2005
DerTod, 18th September 2022
Funni, 18th September 2022