DefCore.txt DefCore The component DefCore.txt defines the basic characteristics of an object. This includes the object category (whether it is a building or a living being), graphics, entrance and collection areas, value, mass, and so on. Here also the object id is defined which is used to identify the object type in script calls or other components. Every object definition must have a unique object id. ValueData typeDescription id definition idId of the object. Version 3 IntegersMinimal engine version required by the object. Should be always the current engine version at the time of the last change. RequireDef Definition IDsList of definition IDs this object depends upon. Category IntegerCategory of the object. Also see object categories. ContactCalls Integer0 or 1. If 1, Contactcalls are called in the object script. Width IntegerWidth of the object. Height IntegerHeight of the object. Offset 2 IntegerCoordinate offset of the top left corner to the object center. Value IntegerValue of the object in money points. Mass IntegerWeight of the object. Rock 10, clonk 50, hut 1000, castle 10000. Components ID listElements from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. SolidMask 6 integersSolid areas of the object. Target rectangle from the SolidMask.png graphics onto the object. TopFace 6 integersCovering layer of the object graphics. Target rectangle from the source graphics onto the object. Picture 4 integersRepresentative image of the object. Rectangle from the source graphics. Vertices IntegerNumber of vertices of the object. 1 to 30. VertexX up to 30 integersList of horizontal vertex coordinates of the object. See vertices. VertexY up to 30 integersList of vertical coordinates of the object vertices. VertexCNAT up to 30 integersList of direction indicators of the object vertices. See CNAT. VertexFriction up to 30 integersList of friction values of the object vertices, each 1 to 100. Entrance 4 integersPosition of the entrance region relative to the object centre. Collection 4 integersPosition of the intake region relative to the object centre. FireTop IntegerFlame distance to the object's bottom line. Exclusive Integer0 or 1. Determines whether the object blocks objects behind it. Line Integer0 or 1. If 1 the object is a line and exhibits special behaviour. CrewMember Integer0 or 1. If 1, the object is added to the player's crew upon purchase. Objects created using CreateObject have to be added to a player's crew manually using MakeCrewMember. Construction Integer0 or 1. Determines whether the object can be built. GrabPutGet IntegerBit mask: bit 0 (value 1) putting possible, bit 1 (value 2) getting possible. Rotate Integer0 no rotation, 1 full rotation, 2-360 limited rotation. Float IntegerFloatation in liquids: 0 no floatation, otherwise floatation height above the object center. ColorByOwner Integer0 or 1. If 1, the specified sections of the object's graphcis are colored by the player color. HorizontalFix Integer0 or 1. If 1, the object can only move vertically. BorderBound IntegerBit mask: bit 0 (value 1) stop at the sides, bit 1 (value 2) stop at the top, bit 2 (value 4) stop at the bottom. UprightAttach IntegerIf not 0, the unrotated object attaches to solid areas (attachment directions 8-10). StretchGrowth Integer0 or 1. If 1, the uncomplete object (see GetCon) is scaled, not sliced from the bottom like a construction site. IncompleteActivity Integer0 or 1. If 1, the object can have activities set even if it's not complete. Oversize Integer0 or 1. The object can be scaled over 100% using DoCon. AttractLightning Integer0 or 1. The object attracts lightning. Fragile Integer0 or 1. The object should not be thrown. NoPushEnter Integer0 or 1. The object can not be pushed into another object's entrance (e.g. elevator case). VehicleControl IntegerBit mask: bit 0 (value 1) object can be controlled by grabbing from the outside and/or bit 1 (value 2) from the inside. With active VehicleControl, clonk orders (commands) are also passed to the grabbed object as ControlCommand calls and can be processed and/or overloaded by the controlled object's script. See Control-Funktionen. Pathfinder Integer1 - 10. Determines search depth of the pathfinder algorithm (default 1). Warning: higher values may slow down the game. By setting this value you can also enable non-CrewMember objects to use pathfinding when executing commands. NoComponentMass Integer0 or 1. If 1, the object's contents is not added to the object's total mass. This can be used to prevent small container objects from turning into killer throwing items. NoStabilize Integer0 or 1. If 1, the object will not straighten itself to 0° if within a certain upright range. ClosedContainer Integer0 or 1. If 1, clonks inside this object can not lighten the Fog of War outside. SilentCommands Integer0 or 1. Can be used to prevent failure messages caused by failed commands. TemporaryCrew Integer0 or 1. If 1, the object is not stored in the permanent crew of a player. BlitMode Integer0 or 1. Value 1 for addtive drawing. Use SetObjectBlitMode for more flexibility. NoBreath Integer0 or 1. If 1, the object does not need oxygen, even if it's a living being. ConSizeOff IntegerValues grater than 0 are deducted from the top of necessary construction space. NoGet Integer0 or 1. If 1 the object can not be taken from containers by a clonk. LiftTop IntegerIf an object with Action procedure "LIFT" lifts its target to this value above object center the function LiftTop is called in the object script. RotatedEntrance Integer0 entrance is open if the object is upright only; 1 entrance is always open; 2-360 entrance is open within the specified object rotation in degrees. MoveToRange IntegerMaximum range at which the waypoint of a movement command can be touched for a successful hit. Default value 5. NoTransferZones Integer0 or 1. If 1 the object's pathfinding will ignore any transfer zones.
Section [DefCore]
Newton2013-11