<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
  SYSTEM '../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../clonk.xsl"?>
<doc>
  <title>DefCore.txt</title>
  <h id="DefCoretxt">DefCore</h>
  <part>
    <text>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.</text>
    <text>
      <table>
        <caption id="SektionDefCore">Section [DefCore]</caption>
        <rowh>
          <col>Value</col>
          <col>Data type</col>
          <col>Description</col>
        </rowh>
        <row>
          <literal_col>id</literal_col>
          <col>definition id</col>
          <col>Id of the object.</col>
        </row>
        <row>
          <literal_col>Version</literal_col>
          <col>3 Integers</col>
          <col>Minimal engine version required by the object. Should be always the current engine version at the time of the last change.</col>
        </row>
        <row>
          <literal_col>Name</literal_col>
          <col>String (max. 30 chars)</col>
          <col>Name of the object. Will be overwritten by the applicable one in the Names.txt.</col>
        </row>
        <row>
          <literal_col>Category</literal_col>
          <col>Integer</col>
          <col>Category of the object. Also see <emlink href="definition/category.html">object categories</emlink>.</col>
        </row>
        <row>
          <literal_col>MaxUserSelect</literal_col>
          <col>Integer</col>
          <col>Maximal allowed count when placed in the menu system.</col>
        </row>
        <row>
          <literal_col>TimerCall</literal_col>
          <col>String (max. 30 chars)</col>
          <col>Regularly called timer function in the <emlink href="definition/script.html">object script</emlink>.</col>
        </row>
        <row>
          <literal_col>Timer</literal_col>
          <col>Integer</col>
          <col>Time interval between TimerCalls in frames. Default is 35.</col>
        </row>
        <row>
          <literal_col>ContactCalls</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, Contactcalls are called in the object script.</col>
        </row>
        <row>
          <literal_col>Width</literal_col>
          <col>Integer</col>
          <col>Width of the object.</col>
        </row>
        <row>
          <literal_col>Height</literal_col>
          <col>Integer</col>
          <col>Height of the object.</col>
        </row>
        <row>
          <literal_col>Offset</literal_col>
          <col>2 Integer</col>
          <col>Coordinate offset of the top left corner to the object center.</col>
        </row>
        <row>
          <literal_col>Value</literal_col>
          <col>Integer</col>
          <col>Value of the object in money points.</col>
        </row>
        <row>
          <literal_col>Mass</literal_col>
          <col>Integer</col>
          <col>Weight of the object. Rock 10, clonk 50, hut 1000, castle 10000.</col>
        </row>
        <row>
          <literal_col>Components</literal_col>
          <col>ID list</col>
          <col>Elements from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components.</col>
        </row>
        <row>
          <literal_col>SolidMask</literal_col>
          <col>6 integers</col>
          <col>Solid areas of the object. Target rectangle from the source graphics onto the object.</col>
        </row>
        <row>
          <literal_col>TopFace</literal_col>
          <col>6 integers</col>
          <col>Covering layer of the object graphics. Target rectangle from the source graphics onto the object.</col>
        </row>
        <row>
          <literal_col>Picture</literal_col>
          <col>4 integers</col>
          <col>Representative image of the object. Rectangle from the source graphics.</col>
        </row>
        <row>
          <literal_col>Vertices</literal_col>
          <col>Integer</col>
          <col>Number of vertices of the object. 1 to 30.</col>
        </row>
        <row>
          <literal_col>VertexX</literal_col>
          <col>up to 30 integers</col>
          <col>List of horizontal vertex coordinates of the object. See <emlink href="definition/vertices.html">vertices</emlink>.</col>
        </row>
        <row>
          <literal_col>VertexY</literal_col>
          <col>up to 30 integers</col>
          <col>List of vertical coordinates of the object vertices.</col>
        </row>
        <row>
          <literal_col>VertexCNAT</literal_col>
          <col>up to 30 integers</col>
          <col>List of direction indicators of the object vertices. See <emlink href="definition/cnat.html">CNAT</emlink>.</col>
        </row>
        <row>
          <literal_col>VertexFriction</literal_col>
          <col>up to 30 integers</col>
          <col>List of friction values of the object vertices, each 1 to 100.</col>
        </row>
        <row>
          <literal_col>Entrance</literal_col>
          <col>4 integers</col>
          <col>Position of the entrance region relative to the object centre.</col>
        </row>
        <row>
          <literal_col>Collection</literal_col>
          <col>4 integers</col>
          <col>Position of the intake region relative to the object centre.</col>
        </row>
        <row>
          <literal_col>FireTop</literal_col>
          <col>Integer</col>
          <col>Flame distance to the object's bottom line.</col>
        </row>
        <row>
          <literal_col>Placement</literal_col>
          <col>Integer</col>
          <col>Placement: 0 land surface, 1 in liquid, 2 in mid-air.</col>
        </row>
        <row>
          <literal_col>Exclusive</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether the object blocks objects behind it.</col>
        </row>
        <row>
          <literal_col>ContactIncinerate</literal_col>
          <col>Integer</col>
          <col>Probability of incineration by contact: 0 none, or 1 (high) to 5 (low).</col>
        </row>
        <row>
          <literal_col>BlastIncinerate</literal_col>
          <col>Integer</col>
          <col>Incineration by explosion: 0 none, otherwise the damage level of incineration.</col>
        </row>
        <row>
          <literal_col>BurnTo</literal_col>
          <col>C4ID</col>
          <col>Definition change upon incineration.</col>
        </row>
        <row>
          <literal_col>Base</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether the building can be a home base.</col>
        </row>
        <row>
          <literal_col>Line</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1 the object is a line and exhibits special behaviour.</col>
        </row>
        <row>
          <literal_col>CrewMember</literal_col>
          <col>Integer</col>
          <col>0 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 <emlink href="script/fn/MakeCrewMember">MakeCrewMember</emlink>.</col>
        </row>
        <row>
          <literal_col>Growth</literal_col>
          <col>Integer</col>
          <col>Growth of the object. Trees 1-4, living beings 15.</col>
        </row>
        <row>
          <literal_col>Rebuy</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether the object can be bought back after selling it.</col>
        </row>
        <row>
          <literal_col>Construction</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether the object can be built.</col>
        </row>
        <row>
          <literal_col>ConstructTo</literal_col>
          <col>C4ID</col>
          <col>Definition change upon building.</col>
        </row>
        <row>
          <literal_col>Grab</literal_col>
          <col>Integer</col>
          <col>0 no grabbing, 1 grab and push, 2 grab only.</col>
        </row>
        <row>
          <literal_col>GrabPutGet</literal_col>
          <col>Integer</col>
          <col>Bit mask: bit 0 (value 1) putting possible, bit 1 (value 2) getting possible.</col>
        </row>
        <row>
          <literal_col>Collectible</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether the object can be collected.</col>
        </row>
        <row>
          <literal_col>Rotate</literal_col>
          <col>Integer</col>
          <col>0 no rotation, 1 full rotation, 2-360 limited rotation.</col>
        </row>
        <row>
          <literal_col>Chop</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether the object can be chopped.</col>
        </row>
        <row>
          <literal_col>Float</literal_col>
          <col>Integer</col>
          <col>Floatation in liquids: 0 no floatation, otherwise floatation height above the object center.</col>
        </row>
        <row>
          <literal_col>ContainBlast</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines whether explosions in the object's contents affect other objects outside.</col>
        </row>
        <row>
          <literal_col>ColorByOwner</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the specified sections of the object's graphcis are colored by the player color.</col>
        </row>
        <row>
          <literal_col>ColorByMaterial</literal_col>
          <col>String (max. 15)</col>
          <col>The object is colored by the color of the specified material.</col>
        </row>
        <row>
          <literal_col>HorizontalFix</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object can only move vertically.</col>
        </row>
        <row>
          <literal_col>BorderBound</literal_col>
          <col>Integer</col>
          <col>Bit 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.</col>
        </row>
        <row>
          <literal_col>UprightAttach</literal_col>
          <col>Integer</col>
          <col>If not 0, the unrotated object attaches to solid areas (attachment directions 8-10).</col>
        </row>
        <row>
          <literal_col>StretchGrowth</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the uncomplete object (see <emlink href="script/fn/GetCon.html">GetCon</emlink>) is scaled, not sliced from the bottom like a construction site.</col>
        </row>
        <row>
          <literal_col>Basement</literal_col>
          <col>Integer</col>
          <col>0 no basement, 1 normal basement, other values reserved.</col>
        </row>
        <row>
          <literal_col>NoBurnDecay</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object does not decompose if burning.</col>
        </row>
        <row>
          <literal_col>IncompleteActivity</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object can have activities set even if it's not complete.</col>
        </row>
        <row>
          <literal_col>Oversize</literal_col>
          <col>Integer</col>
          <col>0 or 1. The object can be scaled over 100% using DoCon.</col>
        </row>
        <row>
          <literal_col>AttractLightning</literal_col>
          <col>Integer</col>
          <col>0 or 1. The object attracts lightning.</col>
        </row>
        <row>
          <literal_col>Fragile</literal_col>
          <col>Integer</col>
          <col>0 or 1. The object should not be thrown.</col>
        </row>
        <row>
          <literal_col>NoPushEnter</literal_col>
          <col>Integer</col>
          <col>0 or 1. The object can not be pushed into another object's entrance (e.g. elevator case).</col>
        </row>
        <row>
          <literal_col>VehicleControl</literal_col>
          <col>Integer</col>
          <col>Bit 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 <emlink href="definition/script.html#ControlFunktionen">Control-Funktionen</emlink>.</col>
        </row>
        <row>
          <literal_col>Pathfinder</literal_col>
          <col>Integer</col>
          <col>1 - 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.</col>
        </row>
        <row>
          <literal_col>NoComponentMass</literal_col>
          <col>Integer</col>
          <col>0 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.</col>
        </row>
        <row>
          <literal_col>NoStabilize</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object will not straighten itself to 0° if within a certain upright range.</col>
        </row>
        <row>
          <literal_col>ClosedContainer</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, clonks inside this object can not lighten the Fog of War outside.</col>
        </row>
        <row>
          <literal_col>SilentCommands</literal_col>
          <col>Integer</col>
          <col>0 or 1. Can be used to prevent failure messages caused by failed commands.</col>
        </row>
        <row>
          <literal_col>NoBurnDamage</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object does not take damage when burning.</col>
        </row>
        <row>
          <literal_col>TemporaryCrew</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object is not stored in the permanent crew of a player.</col>
        </row>
        <row>
          <literal_col>SmokeRate</literal_col>
          <col>Integer</col>
          <col>0 to 200: determines the amount of smoke caused by the burning object. 0 for no smoke, 100 is default. If other than 0, the object will always generate maximum smoke when traveling at high velocity (e.g. a fire arrow).</col>
        </row>
        <row>
          <literal_col>BlitMode</literal_col>
          <col>Integer</col>
          <col>0 or 1. Value 1 for addtive drawing.</col>
        </row>
        <row>
          <literal_col>NoBreath</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the object does not need oxygen, even if it's a living being.</col>
        </row>
        <row>
          <literal_col>ConSizeOff</literal_col>
          <col>Integer</col>
          <col>Values grater than 0 are deducted from the top of necessary construction space.</col>
        </row>
        <row>
          <literal_col>NoSell</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1 the object can not be sold.</col>
        </row>
        <row>
          <literal_col>NoGet</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1 the object can not be taken from containers by a clonk.</col>
        </row>
        <row>
          <literal_col>LiftTop</literal_col>
          <col>Integer</col>
          <col>If an object with Action procedure "<emlink href="definition/procedures.html">LIFT</emlink>" lifts its target to this value above object center the function LiftTop is called in the object script.</col>
        </row>
        <row>
          <literal_col>RotatedEntrance</literal_col>
          <col>Integer</col>
          <col>0 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.</col>
        </row>
        <row>
          <literal_col>MoveToRange</literal_col>
          <col>Integer</col>
          <col>Maximum range at which the waypoint of a movement command can be touched for a successful hit. Default value 5.</col>
        </row>
        <row>
          <literal_col>NoTransferZones</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1 the object's pathfinding will ignore any transfer zones.</col>
        </row>
        <row>
          <literal_col>AutoContextMenu</literal_col>
          <col>Integer</col>
          <col>0 or 1. If 1, the building's context menu will open automatically upon entry.</col>
        </row>
      </table>
    </text>
    <text>
      <table>
        <caption id="SektionPhysical">Section [Physical]</caption>
        <rowh>
          <col>Value</col>
          <col>Data type</col>
          <col>Description</col>
        </rowh>
        <row>
          <literal_col>Energy</literal_col>
          <col>Integer</col>
          <col>0-100000. Maximum life energy.</col>
        </row>
        <row>
          <literal_col>Breath</literal_col>
          <col>Integer</col>
          <col>0-100000. Maximum breath.</col>
        </row>
        <row>
          <literal_col>Walk</literal_col>
          <col>Integer</col>
          <col>0-100000. Walking speed.</col>
        </row>
        <row>
          <literal_col>Jump</literal_col>
          <col>Integer</col>
          <col>0-100000. Jump force.</col>
        </row>
        <row>
          <literal_col>Scale</literal_col>
          <col>Integer</col>
          <col>0-100000. Scaling speed.</col>
        </row>
        <row>
          <literal_col>Hangle</literal_col>
          <col>Integer</col>
          <col>0-100000. Hangling speed.</col>
        </row>
        <row>
          <literal_col>Dig</literal_col>
          <col>Integer</col>
          <col>0-100000. Digging speed.</col>
        </row>
        <row>
          <literal_col>Swim</literal_col>
          <col>Integer</col>
          <col>0-100000. Swimming speed.</col>
        </row>
        <row>
          <literal_col>Throw</literal_col>
          <col>Integer</col>
          <col>0-100000. Throwing force.</col>
        </row>
        <row>
          <literal_col>Push</literal_col>
          <col>Integer</col>
          <col>0-100000. Push power.</col>
        </row>
        <row>
          <literal_col>Magic</literal_col>
          <col>Integer</col>
          <col>0-100000. Maximal magic energy.</col>
        </row>
        <row>
          <literal_col>Float</literal_col>
          <col>Integer</col>
          <col>0-100. Flight speed.</col>
        </row>
        <row>
          <literal_col>CanScale</literal_col>
          <col>Integer</col>
          <col>0 or 1. Scale.</col>
        </row>
        <row>
          <literal_col>CanHangle</literal_col>
          <col>Integer</col>
          <col>0 or 1. Brachiation.</col>
        </row>
        <row>
          <literal_col>CanDig</literal_col>
          <col>Integer</col>
          <col>0 or 1. Dig.</col>
        </row>
        <row>
          <literal_col>CanConstruct</literal_col>
          <col>Integer</col>
          <col>0 or 1. Construct. If greater than 1, percentage construction speed. (100 normal, 50 half, etc.)</col>
        </row>
        <row>
          <literal_col>CorrosionResist</literal_col>
          <col>Integer</col>
          <col>0 or 1. Determines wether the object resists acid.</col>
        </row>
        <row>
          <literal_col>BreatheWater</literal_col>
          <col>Integer</col>
          <col>0 object breathes air, 1 object breathes water.</col>
        </row>
      </table>
    </text>
    <h>Note:</h>
    <text>When a crew member is created, it gets an own physical section in it's Objectinfo (oci). In there, the individual changes to the physicals (for example because of training) are saved and restored when an object enters a player's crew. The physical section of the defcore is only used for new crew members and normal objects.</text>
  </part>
  <author>Sven2</author><date>2002-04</date>
</doc>
