﻿<?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>Rapide 450 Trailed</name>
        <specs>
            <neededPower>200</neededPower>
            <workingWidth>4.5</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="700" filterSpecMax="1300"/>
        </specs>
        <functions>
            <function>$l10n_function_spader</function>
        </functions>
        <image>$data/vehicles/farmax/rapidTrailed/store_rapidTrailed.png</image>
        <price>58000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>FARMAX</brand>
        <category>spaders</category>
        <shopTranslationOffset>0 -0.327 0</shopTranslationOffset>
        <shopRotationOffset>0.337 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1838080</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>298752</indexBufferMemoryUsage>
        <textureMemoryUsage>1638400</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_spader</typeDesc>
        <filename>$data/vehicles/farmax/rapidTrailed/rapidTrailed.i3d</filename>
        <size width="6" length="6.5" lengthOffset="-0.5"/>
        <speedLimit value="8" />
        <components>
            <component centerOfMass="0 0.5 -0.5" solverIterationCount="15" mass="7300" />
        </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="2.3" repr="wheel01" radius="0.5" width="0.2" forcePointRatio="0.3" initialCompression="25" suspTravel="0.1" spring="88" damper="30" mass="0.1"/>
                    </wheel>
                    <wheel>
                        <physics restLoad="2.3" repr="wheel02" radius="0.5" width="0.2" forcePointRatio="0.3" initialCompression="25" suspTravel="0.1" spring="88" damper="30" mass="0.1"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <dynamicallyLoadedWheels>
            <dynamicallyLoadedWheel linkNode="wheel_vis01"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis02"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis03"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis04"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis05"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis06"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis07"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis08"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis09"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis10"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis11"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis12"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis13"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis14"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis15"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="wheel_vis16"  filename="$data/shared/wheels/tires/trelleborg/TM600/280_85R20.xml" isLeft="false"/>
        </dynamicallyLoadedWheels>

        <rimColor material="18">SHARED_WHITE1</rimColor>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="wheelArm01" radius="0.5" wheelIndex="2" />
        <speedRotatingPart node="wheelArm02" radius="0.5" wheelIndex="1" />
    </speedRotatingParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="trailerLow" attacherHeight="0.6"/>
        </inputAttacherJoints>
        <brakeForce force="1"/>
        <support animationName="moveSupport" delayedOnAttach="false" detachAfterAnimation="true"/>
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" />
        <local startNode="localPowerTakeOff01Start" endNode="localPowerTakeOff01End" />
    </powerTakeOffs>

    <powerConsumer ptoRpm="500" neededMinPtoPower="50" neededMaxPtoPower="55" forceNode="rapidTrailed_main_component1" maxForce="32" />

    <lights>
        <sharedLight linkNode="rearLight56_left"  filename="$data/shared/assets/lights/lizard/rearLight56_left.xml" />
        <sharedLight linkNode="rearLight56_right" filename="$data/shared/assets/lights/lizard/rearLight56_right.xml" />
        <sharedLight linkNode="sideMarker06_left_static" filename="$data/shared/assets/lights/lizard/sideMarker06.xml" />
        <sharedLight linkNode="sideMarker06_right_static" filename="$data/shared/assets/lights/lizard/sideMarker06.xml" />

        <realLights>
            <high>
                <light node="backLightsHigh1" lightTypes="0" />
                <brakeLight node="backLightsHigh1" />
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
            </high>
        </realLights>
    </lights>


    <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="tineEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/farmax/rapidTrailed/tineEffect01Array.dds" numRows="20" rowLength="18" density="0.7" shapeScale="1.5" maxShapeScale="1.5"/>
            </effectNode>
        </effect>

        <particle>
            <node node="dustEmitterShape" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="1.0" />
        </particle>
    </workParticles>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="0" turnOnFoldDirection="-1" foldMiddleAnimTime="1">
                    <foldingPart animationName="folding" speedScale="1" />
                </foldingParts>
            </foldingConfiguration>
         </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="moveSupport">
            <part node="supportCol"    startTime="0" endTime="0.1" startTrans="0 0.3 0" endTrans="0 0 0"/>
            <part node="supportArm01"  startTime="0" endTime="0.5" startTrans="0 0 0" endTrans="0 -0.608 0"/>
            <part node="supportArm02"  startTime="0" endTime="0.5" startTrans="0 0 0" endTrans="0 -0.5 0"/>

            <part node="drawbar" requiredAnimation="folding" requiredAnimationRange="0 0" startTime="0" endTime="1" startRot="-20 0 0" endRot="-15 0 0" />
            <part node="backArm" requiredAnimation="folding" requiredAnimationRange="0 0" startTime="0" endTime="1" startRot="25 0 0" endRot="18 0 0" />
            <part node="drawbar" requiredAnimation="folding" requiredAnimationRange="0.0001 1" startTime="0" endTime="1" startRot="0 0 0" endRot="-15 0 0" />
            <part node="backArm" requiredAnimation="folding" requiredAnimationRange="0.0001 1" startTime="0" endTime="1" startRot="0 0 0" endRot="18 0 0" />

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="0.99" volumeScale="1.3" pitchScale="0.7"/>
            <sound template="clackVar6"             startTime="0.49" direction="1"  volumeScale="2.1" pitchScale="0.9" />
            <sound template="clackVar4"             startTime="0.49" direction="1"  volumeScale="1.1" pitchScale="1.6" />
            <sound template="clackVar6"             startTime="0.01" direction="-1" volumeScale="1.2" pitchScale="0.8" />
            <sound template="sheetImp02"            startTime="0.01" direction="-1" volumeScale="2"   pitchScale="1.1" />
        </animation>
        <animation name="folding">
            <part node="drawbar" startTime="0" endTime="1" startRot="-20 0 0" endRot="0 0 0" />
            <part node="backArm" startTime="0" endTime="1" startRot="25 0 0" endRot="0 0 0" />

            <sound template="hydraulicLayerTone" startTime="0.01" endTime="0.99" volumeScale="1.3" pitchScale="0.8"/>
            <sound template="sheetImp02"         startTime="0.01" direction="-1" volumeScale="3.5" pitchScale="0.8" />
            <sound template="foldStartMed02"     startTime="0.01" direction="-1" volumeScale="2.5" pitchScale="0.8" />
            <sound template="clackVar6"          startTime="0.01" direction="-1" volumeScale="1.5" pitchScale="0.7" />
            <sound template="foldStartMed02"     startTime="0.01" direction="1"  volumeScale="1.5" pitchScale="0.7" />
            <sound template="clackVar6"          startTime="0.99" direction="1"  volumeScale="1.5" pitchScale="0.7" />
            <sound template="sheetImp02"         startTime="0.99" direction="1"  volumeScale="1.4" pitchScale="1.7" />
            <sound template="metalClose"         startTime="0.99" direction="1"  volumeScale="1.4" pitchScale="0.5" />
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="backArm" wheelIndices="1 2" playSound="true">
              <dependentPart node="backArmHydraulic" />
            </movingTool>
            <movingTool node="drawbar" playSound="true">
                <inputAttacherJoint value="true" />
                <powerTakeOffs indices="1" localIndices="1"/>
                <dependentPart node="drawbarHydraulic" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="drawbarHydraulic" referencePoint="drawbarHydraulicRef" referenceFrame="drawbarHydraulicRef">
              <translatingPart node="drawbarHydraulicPunch" />
            </movingPart>
            <movingPart node="backArmHydraulic" referencePoint="backArmHydraulicRef" referenceFrame="backArmHydraulicRef">
              <translatingPart node="backArmHydraulicPunch" />
            </movingPart>
        </movingParts>
    </cylindered>

    <cultivator isSubsoiler="true" useDeepMode="true">
        <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="250" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="5" />
        </animationNodes>
    </turnOnVehicle>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="5.0" height="2.3"/>
        <needsLowering value="true"/>
        <allowTurnBackward value="false"/>
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2" width="4.9" height="2.35" length="3.3" lengthOffset="0.8"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-2.5" maxX="2.5" minZ="-2.9" maxZ="0.2" yOffset="0.8" />
        <bendingNode minX="-0.25" maxX="0.25" minZ="0" maxZ="2.1" yOffset="0.95" />
    </foliageBending>

    <baseMaterial>
        <material name="rapidTrailed_mat" baseNode="rapidTrailed_vis">
            <shaderParameter name="colorMat0" value="FARMAX_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="rapidTrailed_main_component1" node="0>" />
        <i3dMapping id="rapidTrailed_vis" node="0>0" />
        <i3dMapping id="supportArm01" node="0>0|0|0" />
        <i3dMapping id="supportArm02" node="0>0|0|1" />
        <i3dMapping id="supportCol" node="0>0|0|2" />
        <i3dMapping id="localPowerTakeOff01Start" node="0>0|0|3" />
        <i3dMapping id="sideMarker06_left_static" node="0>0|1|0|0" />
        <i3dMapping id="sideMarker06_right_static" node="0>0|1|0|1" />
        <i3dMapping id="rearLight56_left" node="0>0|1|0|2" />
        <i3dMapping id="rearLight56_right" node="0>0|1|0|3" />
        <i3dMapping id="backLightsHigh1" node="0>0|1|1|0" />
        <i3dMapping id="turnLightLeftBack" node="0>0|1|2|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|1|2|1" />
        <i3dMapping id="drawbar" node="0>0|2|0" />
        <i3dMapping id="attacherJoint" node="0>0|2|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|2|0|1" />
        <i3dMapping id="localPowerTakeOff01End" node="0>0|2|0|2" />
        <i3dMapping id="drawbarHydraulic" node="0>0|2|0|3" />
        <i3dMapping id="drawbarHydraulicPunch" node="0>0|2|0|3|0" />
        <i3dMapping id="drawbarHydraulicRef" node="0>0|2|1" />
        <i3dMapping id="backArm" node="0>0|2|2" />
        <i3dMapping id="wheel01" node="0>0|2|2|0" />
        <i3dMapping id="wheel02" node="0>0|2|2|1" />
        <i3dMapping id="backArmHydraulicRef" node="0>0|2|2|2" />
        <i3dMapping id="wheelArm01" node="0>0|2|2|4" />
        <i3dMapping id="wheel_vis09" node="0>0|2|2|4|0" />
        <i3dMapping id="wheel_vis10" node="0>0|2|2|4|1" />
        <i3dMapping id="wheel_vis11" node="0>0|2|2|4|2" />
        <i3dMapping id="wheel_vis12" node="0>0|2|2|4|3" />
        <i3dMapping id="wheel_vis13" node="0>0|2|2|4|4" />
        <i3dMapping id="wheel_vis14" node="0>0|2|2|4|5" />
        <i3dMapping id="wheel_vis15" node="0>0|2|2|4|6" />
        <i3dMapping id="wheel_vis16" node="0>0|2|2|4|7" />
        <i3dMapping id="wheelArm02" node="0>0|2|2|5" />
        <i3dMapping id="wheel_vis01" node="0>0|2|2|5|0" />
        <i3dMapping id="wheel_vis02" node="0>0|2|2|5|1" />
        <i3dMapping id="wheel_vis03" node="0>0|2|2|5|2" />
        <i3dMapping id="wheel_vis04" node="0>0|2|2|5|3" />
        <i3dMapping id="wheel_vis05" node="0>0|2|2|5|4" />
        <i3dMapping id="wheel_vis06" node="0>0|2|2|5|5" />
        <i3dMapping id="wheel_vis07" node="0>0|2|2|5|6" />
        <i3dMapping id="wheel_vis08" node="0>0|2|2|5|7" />
        <i3dMapping id="backArmHydraulic" node="0>0|2|3" />
        <i3dMapping id="backArmHydraulicPunch" node="0>0|2|3|0" />
        <i3dMapping id="tine01" node="0>0|2|4" />
        <i3dMapping id="workAreaStart" node="0>0|3|0" />
        <i3dMapping id="workAreaWidth" node="0>0|3|1" />
        <i3dMapping id="workAreaHeight" node="0>0|3|2" />
        <i3dMapping id="groundReferenceNode" node="0>0|3|3" />
        <i3dMapping id="depthNode" 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="tineEffect01LinkNode" node="0>0|5|0" />
        <i3dMapping id="dustEmitterShape" node="0>0|5|1" />
    </i3dMappings>
</vehicle>
