﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="turnOnCultivator" 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>HK 25</name>
        <specs>
            <neededPower>100</neededPower>
            <workingWidth>3</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="600" filterSpecMax="650"/>
        </specs>
        <functions>
            <function>$l10n_function_cultivator</function>
        </functions>
        <image>$data/vehicles/nordsten/hk25/store_hk25.png</image>
        <price>14500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>NORDSTEN</brand>
        <category>powerHarrows</category>
        <shopTranslationOffset>0 0.034 0</shopTranslationOffset>
        <shopRotationOffset>4.933 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>756224</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>115712</indexBufferMemoryUsage>
        <textureMemoryUsage>1638400</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_powerHarrow</typeDesc>
        <filename>$data/vehicles/nordsten/hk25/hk25.i3d</filename>
        <size width="3.5" length="2" lengthOffset="0.4"/>
        <speedLimit value="12" />
        <components>
            <component centerOfMass="0 0.45 0.5" solverIterationCount="15" mass="935" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.6" repr="wheel01" radius="0.23" width="0.2" forcePointRatio="0.35" initialCompression="10" suspTravel="0.29" spring="5" damper="1" yOffset="-0.05"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.6" repr="wheel02" radius="0.23" width="0.2" forcePointRatio="0.35" initialCompression="10" suspTravel="0.29" spring="5" damper="1" yOffset="-0.05"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="roller" radius="0.22" groundReferenceNodeIndex="1"/>
    </speedRotatingParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerTransLimitScale="0 1 0" upperRotationOffset="12" lowerRotLimitScale="0 0 0.3" forcedAttachingDirection="-1">
                <distanceToGround lower="0.4" upper="0.8" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" detachNode="ptoDetachNode"/>
    </powerTakeOffs>

    <powerConsumer ptoRpm="470" neededMaxPtoPower="40" forceNode="ns3030_main_component1" maxForce="5" />

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" forceFactor="1" threshold="0.2" depthNode="depthNode" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cultivator" functionName="processCultivatorArea">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight"/>
            <groundReferenceNode index="1"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>
    </workAreas>

    <cultivator useDeepMode="false">
        <sounds>
            <work template="DEFAULT_CULTIVATOR_WORK" linkNode="0>" />
        </sounds>
        <directionNode node="0>" />
        <onlyActiveWhenLowered value="true"/>
    </cultivator>

    <animations>
        <animation name="moveSupport">
            <part node="supportCollision" startTime="0" endTime="0.4" startTrans="0 0.3 0" endTrans="0 0.05 0" />

            <sound template="clackVar5" startTime="0.09" volumeScale="1.1" pitchScale="1" linkNode="attacherJoint"/>
            <sound template="clackVar1" startTime="0.09" volumeScale="1.8" pitchScale="1.5" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingParts>
            <movingPart node="rollerArm" referencePoint="rollerArmRef" referenceFrame="rollerArmRefFrame" isActiveDirty="true" maxUpdateDistance="100" limitedAxis="1"/>
        </movingParts>
        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="0>"/>
        </sounds>
    </cylindered>

    <workParticles>
        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="rollerEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/nordsten/ns3030/rollerEffect01Array.dds" numRows="20" rowLength="18" minFade="0.07" densityScale="0.35"/>
            </effectNode>
        </effect>

        <effect workAreaIndex="1" activeDirection="0" needsSetIsTurnedOn="true">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="rotationEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/nordsten/ns3030/rotationEffect01Array.dds" numRows="20" rowLength="18" minFade="0.07" speedScale="1"/>
            </effectNode>
        </effect>

        <particle>
            <node node="dustEmitterShape" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="1.0" />
        </particle>
    </workParticles>

    <turnOnVehicle>
        <sounds>
            <start template="STRAWBLOWER_START" />
            <work template="STRAWBLOWER_WORK" />
            <stop template="STRAWBLOWER_STOP" />
        </sounds>

        <animationNodes>
            <animationNode node="rotatingPart01" rotSpeed="-2500" rotAxis="2" />
            <animationNode node="rotatingPart02" rotSpeed="2500"  rotAxis="2" />
            <animationNode node="rotatingPart03" rotSpeed="-2500" rotAxis="2" />
            <animationNode node="rotatingPart04" rotSpeed="2500"  rotAxis="2" />
            <animationNode node="rotatingPart05" rotSpeed="-2500" rotAxis="2" />
            <animationNode node="rotatingPart06" rotSpeed="2500"  rotAxis="2" />
            <animationNode node="rotatingPart07" rotSpeed="-2500" rotAxis="2" />
            <animationNode node="rotatingPart08" rotSpeed="2500"  rotAxis="2" />
            <animationNode node="rotatingPart09" rotSpeed="-2500" rotAxis="2" />
            <animationNode node="rotatingPart10" rotSpeed="2500"  rotAxis="2" />
            <animationNode node="rotatingPart11" rotSpeed="-2500" rotAxis="2" />
            <animationNode node="rotatingPart12" rotSpeed="2500"  rotAxis="2" />
        </animationNodes>
    </turnOnVehicle>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack"/>
        <collisionTrigger node="aiCollisionNode" width="3.1" height="1.1"/>
        <needsLowering value="true"/>
        <agentAttachment width="3" height="1.5" length="1.5" lengthOffset="0.35"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.55" maxX="1.55" minZ="-0.4" maxZ="1.1" yOffset="0.2" />
    </foliageBending>

    <baseMaterial>
        <material name="ns3030_mat" baseNode="ns3030_vis">
            <shaderParameter name="colorMat0" value="NORDSTEN_ORANGE1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="ns3030_main_component1" node="0>" />
        <i3dMapping id="ns3030_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="ptoInputNode" node="0>0|0|2|0" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|2|1" />
        <i3dMapping id="supportCollision" node="0>0|0|3|0" />
        <i3dMapping id="wheel01" node="0>0|1|0" />
        <i3dMapping id="rollerArmRef" node="0>0|1|0|0" />
        <i3dMapping id="wheel02" node="0>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="depthNode" node="0>0|2|3" />
        <i3dMapping id="groundReferenceNode" node="0>0|2|4" />
        <i3dMapping id="rotationEffect01LinkNode" node="0>0|3|0" />
        <i3dMapping id="dustEmitterShape" node="0>0|3|1" />
        <i3dMapping id="rollerArmRefFrame" node="0>0|4|0" />
        <i3dMapping id="rollerArm" node="0>0|4|0|0" />
        <i3dMapping id="roller" node="0>0|4|0|0|0|0" />
        <i3dMapping id="rollerEffect01LinkNode" node="0>0|4|0|0|1|0" />
        <i3dMapping id="rotatingPart01" node="0>0|4|1|0" />
        <i3dMapping id="rotatingPart02" node="0>0|4|1|1" />
        <i3dMapping id="rotatingPart03" node="0>0|4|1|2" />
        <i3dMapping id="rotatingPart04" node="0>0|4|1|3" />
        <i3dMapping id="rotatingPart05" node="0>0|4|1|4" />
        <i3dMapping id="rotatingPart06" node="0>0|4|1|5" />
        <i3dMapping id="rotatingPart07" node="0>0|4|1|6" />
        <i3dMapping id="rotatingPart08" node="0>0|4|1|7" />
        <i3dMapping id="rotatingPart09" node="0>0|4|1|8" />
        <i3dMapping id="rotatingPart10" node="0>0|4|1|9" />
        <i3dMapping id="rotatingPart11" node="0>0|4|1|10" />
        <i3dMapping id="rotatingPart12" node="0>0|4|1|11" />
        <i3dMapping id="aiMarkerLeft" node="0>0|6|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|6|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|6|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|6|3" />
        <i3dMapping id="sizeMarkerRight" node="0>0|6|4" />
        <i3dMapping id="sizeMarkerBack" node="0>0|6|5" />
        <i3dMapping id="aiCollisionNode" node="0>0|6|6" />
    </i3dMappings>
</vehicle>
