﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="cultivator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>DC 401</name>
        <specs>
            <neededPower>130</neededPower>
            <workingWidth>4.0</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_subsoiler</function>
        </functions>
        <image>$data/vehicles/kuhn/dc401/store_dc401.png</image>
        <price>10500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KUHN</brand>
        <category>subsoilers</category>
        <shopTranslationOffset>0 0.015 0</shopTranslationOffset>
        <vertexBufferMemoryUsage>336640</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>49408</indexBufferMemoryUsage>
        <textureMemoryUsage>1048576</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_cultivator</typeDesc>
        <filename>$data/vehicles/kuhn/dc401/dc401.i3d</filename>
        <size width="4.5" length="1.5" />
        <speedLimit value="12" />
        <components>
            <component centerOfMass="0 0.3 0" solverIterationCount="20" mass="925" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferencePoint" allowsLowering="true" lowerRotLimitScale="0 0 0" upperRotationOffset="15" lowerRotationOffset="0" >
                <distanceToGround lower="0.55" upper="1" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <attacherJoints>
        <attacherJoint node="lowerLink" upperRotationOffset="10" upperRotLimit="0 1 1" allowsLowering="false" isDefaultLowered="true" lockUpRotLimit="true">
            <topArm rotationNode="upperLink" translationNode="translatingPart" referenceNode="referenceNode" zScale="1"/>
            <schema position="1 0" rotation="0" invertX="false" liftedOffset="0 0"/>
        </attacherJoint>
        <sounds>
            <attach template="ATTACH_01" />
        </sounds>
    </attacherJoints>

    <powerTakeOffs>
        <output attacherJointIndices="1" skipToInputAttacherIndex="1" />
    </powerTakeOffs>

    <connectionHoses>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="topRightPipeSkipPoint" type="TOOL_CONNECTOR_TOP_RIGHT" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeHydraulicIn01" type="hydraulicIn" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeHydraulicOut01" type="hydraulicOut" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeHydraulicIn02" type="hydraulicIn" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeHydraulicOut02" type="hydraulicOut" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeHydraulicIn03" type="hydraulicIn" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeHydraulicOut03" type="hydraulicOut" length="1" isTwoPointHose="true"/>
        <skipNode attacherJointIndex="1" inputAttacherJointIndex="1" node="skipNodeElectric" type="electric" length="1" isTwoPointHose="true"/>
    </connectionHoses>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" forceFactor="1" threshold="0.1" depthNode="groundReferenceNode" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cultivator" functionName="processCultivatorArea" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <onlyActiveWhenLowered value="true"/>
        </workArea>
    </workAreas>

    <powerConsumer forceNode="dc401_main_component1" maxForce="16" />

    <animations>
        <animation name="moveSupport">
            <part node="supportCollision" startTime="0" endTime="0.3" startTrans="0 -0.093 -0.002" endTrans="0 -0.723 -0.002" />
            <part node="supportCollision" startTime="0" endTime="0.3" startRot="90 0 0" endRot="0 0 0" />
            <part node="support" startTime="0" endTime="0.15" visibility="false" />
            <part node="support" startTime="0.15" endTime="0.3" visibility="true" />

            <sound template="clackVar5"  startTime="0.29" direction="-1" volumeScale="0.9" pitchScale="1.6" linkNode="attacherJoint"/>
            <sound template="latchSmall" startTime="0.29" direction="-1" volumeScale="0.2" pitchScale="1.2" linkNode="attacherJoint"/>
            <sound template="clackVar1"  startTime="0.2"  direction="1"  volumeScale="1.2" pitchScale="1.6" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingParts>
            <movingPart node="scalingPart" referencePoint="referencePoint" referenceFrame="referencePoint" isActiveDirty="true" maxUpdateDistance="100" scaleZ="true"/>
        </movingParts>
        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="0>"/>
        </sounds>
    </cylindered>

    <cultivator isSubsoiler="true" useDeepMode="false">
        <sounds>
            <work template="DEFAULT_PLOW_WORK" linkNode="0>" />
        </sounds>
        <directionNode node="dc401_main_component1" />
        <onlyActiveWhenLowered value="true"/>
    </cultivator>

    <workParticles>
        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="sweepEffectLinkNode01">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedCultivatorSweepArray01.dds" numRows="20" rowLength="18" minFade="0.07" isCultivatorSweepEffect="true" />
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="sweepEffectLinkNode02">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedCultivatorSweepArray01.dds" numRows="20" rowLength="18" minFade="0.07" isCultivatorSweepEffect="true" />
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="sweepEffectLinkNode03">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedCultivatorSweepArray01.dds" numRows="20" rowLength="18" minFade="0.07" isCultivatorSweepEffect="true" />
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="sweepEffectLinkNode04">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedCultivatorSweepArray01.dds" numRows="20" rowLength="18" minFade="0.07" isCultivatorSweepEffect="true" />
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="sweepEffectLinkNode05">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedCultivatorSweepArray01.dds" numRows="20" rowLength="18" minFade="0.07" isCultivatorSweepEffect="true" />
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="sweepEffectLinkNode06">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedCultivatorSweepArray01.dds" numRows="20" rowLength="18" minFade="0.07" isCultivatorSweepEffect="true" />
            </effectNode>
        </effect>

        <particle>
            <node node="smokeEmitterShape"  refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="1.5" />
        </particle>
    </workParticles>

    <ai>
        <areaMarkers leftNode="left" rightNode="right" backNode="back" />
        <collisionTrigger node="aiCollisionNode" width="4.1" height="1.8"/>
        <needsLowering value="true"/>
        <agentAttachment width="4" height="1.7" length="1" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-2" maxX="2" minZ="-0.2" maxZ="0.3" yOffset="0.5" />
    </foliageBending>

    <baseMaterial>
        <material name="dc401_mat" baseNode="dc401_vis">
            <shaderParameter name="colorMat0" value="KUHN_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="dc401_main_component1" node="0>" />
        <i3dMapping id="dc401_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferencePoint" node="0>0|0|0|0" />
        <i3dMapping id="skipNodeHydraulicIn01" node="0>0|0|1|0" />
        <i3dMapping id="skipNodeHydraulicIn02" node="0>0|0|1|1" />
        <i3dMapping id="skipNodeHydraulicIn03" node="0>0|0|1|2" />
        <i3dMapping id="skipNodeHydraulicOut01" node="0>0|0|1|3" />
        <i3dMapping id="skipNodeHydraulicOut02" node="0>0|0|1|4" />
        <i3dMapping id="skipNodeHydraulicOut03" node="0>0|0|1|5" />
        <i3dMapping id="skipNodeElectric" node="0>0|0|1|6" />
        <i3dMapping id="topRightPipeSkipPoint" node="0>0|0|1|7" />
        <i3dMapping id="supportCollision" node="0>0|0|2|0" />
        <i3dMapping id="support" node="0>0|0|2|1" />
        <i3dMapping id="lowerLink" node="0>0|1|0|0" />
        <i3dMapping id="upperLink" node="0>0|1|0|1" />
        <i3dMapping id="translatingPart" node="0>0|1|0|1|0" />
        <i3dMapping id="referenceNode" node="0>0|1|0|1|0|0" />
        <i3dMapping id="scalingPart" node="0>0|1|0|1|0|1" />
        <i3dMapping id="referencePoint" node="0>0|1|0|1|1" />
        <i3dMapping id="workAreaStart" node="0>0|2|0" />
        <i3dMapping id="workAreaWidth" node="0>0|2|1" />
        <i3dMapping id="workAreaHeight" node="0>0|2|2" />
        <i3dMapping id="groundReferenceNode" node="0>0|2|3" />
        <i3dMapping id="smokeEmitterShape" node="0>0|3|0|0" />
        <i3dMapping id="sweepEffectLinkNode01" node="0>0|3|2" />
        <i3dMapping id="sweepEffectLinkNode02" node="0>0|3|3" />
        <i3dMapping id="sweepEffectLinkNode03" node="0>0|3|4" />
        <i3dMapping id="sweepEffectLinkNode04" node="0>0|3|5" />
        <i3dMapping id="sweepEffectLinkNode05" node="0>0|3|6" />
        <i3dMapping id="sweepEffectLinkNode06" node="0>0|3|7" />
        <i3dMapping id="left" node="0>0|4|0|0" />
        <i3dMapping id="right" node="0>0|4|0|1" />
        <i3dMapping id="back" node="0>0|4|0|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|1" />
    </i3dMappings>
</vehicle>
