﻿<?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>Rotodent RmaX-300</name>
        <specs>
            <neededPower>120</neededPower>
            <workingWidth>3</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="600" filterSpecMax="600"/>
        </specs>
        <functions>
            <function>$l10n_function_cultivator</function>
        </functions>
        <image>$data/vehicles/alpego/rmax300/store_rmax300.png</image>
        <price>16500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>ALPEGO</brand>
        <category>powerHarrows</category>
        <shopTranslationOffset>0 0 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1275648</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>205824</indexBufferMemoryUsage>
        <textureMemoryUsage>1245184</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_powerHarrow</typeDesc>
        <filename>$data/vehicles/alpego/rmax300/rmax300.i3d</filename>
        <size width="4" length="2.4" lengthOffset="0.1"/>
        <speedLimit value="12" />
        <components>
            <component centerOfMass="0 0.3 0" solverIterationCount="15" mass="1560" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels hasSurfaceSounds="false">
                    <wheel>
                        <physics restLoad="1.1" repr="wheel01" radius="0.2" width="0.2" forcePointRatio="0.15" initialCompression="30" suspTravel="0.05" spring="64" damper="10" mass="0.1" rotationDamping="0.002"/>
                    </wheel>
                    <wheel>
                        <physics restLoad="1.1" repr="wheel02" radius="0.2" width="0.2" forcePointRatio="0.15" initialCompression="30" suspTravel="0.05" spring="64" damper="10" mass="0.1" rotationDamping="0.002"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="roll" radius="0.2" groundReferenceNodeIndex="1"/>
    </speedRotatingParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode"   lowerTransLimitScale="0 1 0" lowerRotationOffset="-2" upperRotationOffset="12" lowerRotLimitScale="0 0 0.3" >
                <distanceToGround lower="0.45" upper="1.0" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" detachNode="ptoDetachNode" inputNode="ptoInputNode" aboveAttacher="true" >
            <objectChange node="ptoDetachArm" rotationActive="0 0 0" rotationInactive="0 0 -90"/>
        </input>
    </powerTakeOffs>

    <powerConsumer ptoRpm="500" neededMinPtoPower="20" neededMaxPtoPower="25" forceNode="rmax300_main_component1" maxForce="10" />

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode"  threshold="0.18" depthNode="depthNode" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cultivator" functionName="processCultivatorArea">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <onlyActiveWhenLowered value="true"/>
        </workArea>
    </workAreas>

    <workParticles>
        <effect workAreaIndex="1" activeDirection="0" needsSetIsTurnedOn="true">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="rotationEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/alpego/rmax300/rotationEffect01Array.dds" numRows="20" rowLength="18" minFade="0.07" speedScale="1"/>
            </effectNode>
        </effect>

        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="rollerEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/alpego/rmax300/rollerEffect01Array.dds" numRows="20" rowLength="18" minFade="0.07" densityScale="0.35"/>
            </effectNode>
        </effect>

        <particle>
            <node node="dustEmitterShape" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="1.0" />
        </particle>
    </workParticles>

    <animations>
        <animation name="moveSupport">
            <part node="supportCol"  startTime="0" endTime="0.2"  startTrans="0 0.3 0"  endTrans="0 0 0"/>

            <sound template="clackVar5" startTime="0.1" volumeScale="1.1" pitchScale="1" linkNode="attacherJoint"/>
            <sound template="clackVar1" startTime="0.1" volumeScale="1.8" pitchScale="1.5" linkNode="attacherJoint"/>

        </animation>
    </animations>

    <cultivator useDeepMode="false">
        <sounds>
            <work template="DEFAULT_CULTIVATOR_WORK" linkNode="0>" />
        </sounds>
        <directionNode node="0>" />
        <onlyActiveWhenLowered value="true"/>
    </cultivator>

    <turnOnVehicle>
        <sounds>
            <start template="STRAWBLOWER_START" />
            <work template="STRAWBLOWER_WORK" />
            <stop template="STRAWBLOWER_STOP" />
        </sounds>
        <animationNodes>
            <animationNode node="tine01" rotSpeed="-2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine02" rotSpeed="2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine03" rotSpeed="-2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine04" rotSpeed="2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine05" rotSpeed="-2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine06" rotSpeed="2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine07" rotSpeed="-2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine08" rotSpeed="2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine09" rotSpeed="-2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine10" rotSpeed="2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine11" rotSpeed="-2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
            <animationNode node="tine12" rotSpeed="2500" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="3"/>
        </animationNodes>
    </turnOnVehicle>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="3.0" height="1.5"/>
        <needsLowering value="true"/>
        <agentAttachment width="3" height="1.5" length="1.85" lengthOffset="0.1"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.5" maxX="1.5" minZ="-0.85" maxZ="0.8" yOffset="0.2" />
    </foliageBending>

    <baseMaterial>
        <material name="rmax300_mat" baseNode="rmax300_vis">
            <shaderParameter name="colorMat0" value="ALPEGO_ORANGE1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="rmax300_main_component1" node="0>" />
        <i3dMapping id="rmax300_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="supportCol" node="0>0|0|3" />
        <i3dMapping id="ptoDetachArm" node="0>0|0|4|0" />
        <i3dMapping id="wheel01" node="0>0|1|0" />
        <i3dMapping id="wheel02" node="0>0|1|1" />
        <i3dMapping id="roll" node="0>0|2|0" />
        <i3dMapping id="tine01" node="0>0|2|1" />
        <i3dMapping id="tine02" node="0>0|2|2" />
        <i3dMapping id="tine03" node="0>0|2|3" />
        <i3dMapping id="tine04" node="0>0|2|4" />
        <i3dMapping id="tine05" node="0>0|2|5" />
        <i3dMapping id="tine06" node="0>0|2|6" />
        <i3dMapping id="tine07" node="0>0|2|7" />
        <i3dMapping id="tine08" node="0>0|2|8" />
        <i3dMapping id="tine09" node="0>0|2|9" />
        <i3dMapping id="tine10" node="0>0|2|10" />
        <i3dMapping id="tine11" node="0>0|2|11" />
        <i3dMapping id="tine12" node="0>0|2|12" />
        <i3dMapping id="groundReferenceNode" node="0>0|3|0" />
        <i3dMapping id="depthNode" node="0>0|3|1" />
        <i3dMapping id="workAreaStart" node="0>0|3|2" />
        <i3dMapping id="workAreaWidth" node="0>0|3|3" />
        <i3dMapping id="workAreaHeight" node="0>0|3|4" />
        <i3dMapping id="aiMarkerLeft" node="0>0|4|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|4|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|4|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|3" />
        <i3dMapping id="dustEmitterShape" node="0>0|5|0" />
        <i3dMapping id="rotationEffect01LinkNode" node="0>0|5|1" />
        <i3dMapping id="rollerEffect01LinkNode" node="0>0|5|2" />
    </i3dMappings>
</vehicle>
