<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="handToolWindrower" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <storeData>
        <name>$l10n_shopItem_handBaler_windrower</name>
        <specs>
            <power>10</power>
            <maxSpeed>8</maxSpeed>
            <workingWidth>1.0</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_windrower</function>
        </functions>
        <image>store_FS25_handBalerWindrower.dds</image>
        <price>50</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>LIZARD</brand>
        <category>windrowers</category>
        <vertexBufferMemoryUsage>11520</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>3584</indexBufferMemoryUsage>
        <textureMemoryUsage>917504</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>
    <base>
        <typeDesc>$l10n_typeDesc_windrower</typeDesc>
        <filename>FS25_HandBaler_Windrower.i3d</filename>
        <size width="1.3" length="1.71" height="1.06" lengthOffset="0.48" heightOffset="0.1"/>
        <speedLimit value="8"/>
        <supportsRadio>false</supportsRadio>
        <supportsPickUp>true</supportsPickUp>
        <components>
            <component centerOfMass="0 0.1 0" solverIterationCount="10" mass="100"/>
            <component centerOfMass="0 0 0" solverIterationCount="10" mass="1"/>
            <joint component1="1" component2="2" node="player" rotLimit="0 0 0" transLimit="0 0 0"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="VEHICLE"/>
    </base>
    <baseColorConfigurations defaultColorMaterialTemplateName="wood2" useDefaultColors="true" price="0">
        <baseColorConfiguration name="$l10n_treeType_oak" color="0.956 0.658 0.305" isDefault="false"/>
        <baseColorConfiguration name="$l10n_treeType_maple" color="1.000 0.521 0.191" isDefault="false"/>
        <baseColorConfiguration name="$l10n_treeType_cherry" color="0.558 0.198 0.032" isDefault="true"/>
        <baseColorConfiguration name="$l10n_treeType_mahogany" color="0.397 0.091 0.030" isDefault="false"/>
        <baseColorConfiguration name="$l10n_treeType_locust" color="0.171 0.051 0.017" isDefault="false"/>
        <material materialSlotName="wood_mat"/>
    </baseColorConfigurations>
    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="LIZARD" saveId="LIZARD_DEFAULT">
                <wheels autoRotateBackSpeed="5" hasSurfaceSounds="false" isCareWheelConfiguration="true">
                    <wheel hasTireTracks="false" hasParticles="false" isLeft="true">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.1" mass="0.02" repr="fakeWheelLeft_rot" driveNode="fakeWheelLeft" width="0.2" radius="0.21" useReprDirection="true" forcePointRatio="1" initialCompression="0.0" suspTravel="0.1" spring="25" damper="50" brakeFactor="1"/>
                    </wheel>
                    <wheel hasTireTracks="false" hasParticles="false" isLeft="false">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.1" mass="0.02" repr="fakeWheelRight_rot" driveNode="fakeWheelRight" width="0.2" radius="0.21" useReprDirection="true" forcePointRatio="1" initialCompression="0.0" suspTravel="0.1" spring="25" damper="50" brakeFactor="1"/>
                    </wheel>
                    <wheel hasTireTracks="false" hasParticles="false" isLeft="false">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.1" mass="0.02" repr="fakeWheelFront_rot" driveNode="fakeWheelFront" width="0.2" radius="0.21" useReprDirection="true" forcePointRatio="1" initialCompression="0.0" suspTravel="0.1" spring="25" damper="50" brakeFactor="1"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="40" rotMax="70" rotCenterWheels="1 2 3"/>
        </ackermannSteeringConfigurations>
    </wheels>
    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" onlyActiveWhenLowered="false" threshold="0.5"/>
    </groundReferenceNodes>
    <workAreas>
        <workArea type="windrower" functionName="processWindrowerArea" disableBackwards="false">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight"/>
            <groundReferenceNode index="1"/>
            <windrower dropWindrowWorkAreaIndex="2"/>
            <testAreas autoGenerate="true" zOffset="0.5" xOffset="0" length="1.5" numAreas="4" areaWidthScale="0.25"/>
            <onlyActiveWhenLowered value="false"/>
        </workArea>
        <workArea type="auxiliary">
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight"/>
        </workArea>
    </workAreas>
    <powerConsumer ptoRpm="350" neededMaxPtoPower="0"/>
    <enterable isTabbable="true" >
        <enterReferenceNode node="exitPoint" interactionRadius="3.0"/>
        <exitPoint node="exitPoint" />

        <nicknameRenderNode node="player" offset="0 0.5 0"/>

        <cameras>
            <camera node="outdoorCamera" rotatable="true" rotateNode="outdoorCameraTarget" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="1" transMax="40" translation="0 0 7" rotation="-20 180 0" >
                <raycastNode node="cameraRaycastNode1"/>
                <raycastNode node="cameraRaycastNode2"/>
            </camera>
        </cameras>

        <characterNode node="skeleton" cameraMinDistance="0.75" useAnimation="true" />
        <enterAnimation name="enterAnimation"/>
    </enterable>

    <pushHandTool>
        <raycast node1="playerRaycast1" node2="playerRaycast2" playerNode="playerNode" positionSmoothnessFactor="0.65" positionSmoothnessFactorSteering="0"/>
        <wheels back="1 2" front="3"/>

        <ikChains>
            <target ikChain="rightArm"  targetNode="playerRightHandTargetHand" poseId="narrowFingers"/>
            <target ikChain="leftArm"   targetNode="playerLeftHandTargetHand" poseId="narrowFingers"/>
        </ikChains>

        <customChainLimits>
            <customChainLimit chainId="leftArm" nodeIndex="1" minRx="-50" maxRx="50" minRy="-80" maxRy="80" minRz="-75" maxRz="10" localLimits="true"/>
            <customChainLimit chainId="leftArm" nodeIndex="2" minRx="-25" maxRx="25" minRy="-144" maxRy="-25" minRz="-10" maxRz="10" localLimits="true"/>

            <customChainLimit chainId="rightArm" nodeIndex="1" minRx="-50" maxRx="50" minRy="-80" maxRy="80" minRz="-75" maxRz="10" localLimits="true"/>
            <customChainLimit chainId="rightArm" nodeIndex="2" minRx="-25" maxRx="25" minRy="-144" maxRy="-25" minRz="-10" maxRz="10" localLimits="true"/>
        </customChainLimits>

        <playerConditionalAnimation>
            <item id="idle" entryTransitionDuration="0.25" exitTransitionDuration="0.25" >
                <clips>
                    <clip clipName="idle1Source" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="absSmoothedForwardVelocity" lower="0.2" />
                    </conditionGroup>
                </conditions>
            </item>
            <item id="walk" entryTransitionDuration="0.25" exitTransitionDuration="0.25" >
                <clips speedScaleType="distance" speedScaleParameter="2.25">
                    <clip clipName="walkFwd1Source" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="smoothedForwardVelocity" between="0.2, 100"/>
                    </conditionGroup>
                </conditions>
            </item>
            <item id="walkBack" entryTransitionDuration="0.5" exitTransitionDuration="0.25" >
                <clips speedScaleType="distance" speedScaleParameter="2.25">
                    <clip clipName="walkBwdLoopSource" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="smoothedForwardVelocity" between="-100, -0.2" />
                    </conditionGroup>
                </conditions>
            </item>
        </playerConditionalAnimation>
    </pushHandTool>
    <motorized>
        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0.5" maxSpeedRatio="1.6" wheelIndex1="1" wheelIndex2="2" /> 
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>

        <motorConfigurations>
            <motorConfiguration  hp="10" price="0">
                <motor torqueScale="0.044" minRpm="850" maxRpm="2200" maxForwardSpeed="8" maxBackwardSpeed="5" brakeForce="0.05" lowBrakeForceScale="0.22" accelerationLimit="4" dampingRateScale="0.2">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
                </motor>
                <transmission minForwardGearRatio="5" maxForwardGearRatio="300" minBackwardGearRatio="32" maxBackwardGearRatio="300" name="$l10n_info_transmission_cvt" />
            </motorConfiguration>
        </motorConfigurations>

        <motorStartDuration>500</motorStartDuration>
        
        <dashboards>
            <dashboard displayType="ANIMATION" valueType="speedDir" animName="playerPosCorrection" />
        </dashboards>
    </motorized>
    <turnOnVehicle turnOffIfNotAllowed="true">
        <turnedOnAnimation name="turnedOnAnim" turnOnFadeTime=".1" turnOffFadeTime=".1"/>
    </turnOnVehicle>
    <tensionBeltObject>
        <meshNodes>
            <meshNode node="beltCol"/>
        </meshNodes>
    </tensionBeltObject>
    <windrower fillTypeCategories="WINDROW">
        <effects>
            <effect workAreaIndex="1" dropAreaIndex="2">
                <effectNode effectClass="WindrowerMotionPathEffect" effectType="WINDROWER" linkNode="pickupEffectNode">
                    <motionPathEffect textureFilename="effects/windrowEffectArray.dds" numRows="3" rowLength="30" isLeft="false" isPickup="true" speedScale="1" shapeScale="1.0" maxShapeScale="1.2"/>
                </effectNode>
                <sounds>
                    <work template="woodchipFill" volumeScale="3.5" pitchScale="1.2"/>
                </sounds>
            </effect>
        </effects>
    </windrower>
    <animations>
        <animation name="enterAnimation">
            <!-- simulate picking up the pitchfork -->
            <part node="pitchfork_rot" startTime="0" endTime=".2" startRot="-45 0 -90" endRot="20 70 10" startTrans="0 .06 -0.09" endTrans="0 1.2 .3"/>
            <!-- move/scale collisions dependent on whether or not the player is using the tool-->
            <part node="enterAnimCollision" startTime="0" endTime=".2" startScale="1 1 1" endScale="1 2 1"/>
            <part node="beltCol" startime="0" endTime=".2" startTrans="0 0 0" endTrans="0 .2 0" startScale="1 1 1" endScale=".1 .1 .1"/>
        </animation>
        <animation name="turnedOnAnim" looping="true">
            <!-- Swivel the pitchfork left and right while the machine is turned on, but only while the player has 'entered' the pitchfork -->
            <part node="pitchfork_rot" startTime="0" endTime=".25" startRot="20 70 10" endRot="20 110 10" startTrans="0 1.2 .3" endTrans=".1 1.2 .3" requiredAnimation="enterAnimation" requiredAnimationRange="1 1"/>
            <part node="pitchfork_rot" startTime=".25" endTime=".5" startRot="20 110 10" endRot="20 70 10" startTrans=".1 1.2 .3" endTrans="0 1.2 .3" requiredAnimation="enterAnimation" requiredAnimationRange="1 1"/>
            <part node="pitchfork_rot" startTime=".5" endTime="1" startRot="20 70 10" endRot="47 31 -17" startTrans="0 1.2 .3" endTrans="0 1.4 .3" requiredAnimation="enterAnimation" requiredAnimationRange="1 1"/>
            <part node="pitchfork_rot" startTime="1" endTime="1.25" startRot="47 31 -17" endRot="20 70 10" startTrans="0 1.4 .3" endTrans="0 1.2 .3" requiredAnimation="enterAnimation" requiredAnimationRange="1 1"/>
        </animation>
        <animation name="playerPosCorrection" isKeyframe="true">
            <!-- This animation moves the player back a little when moving forwards as otherwise the body would move into the pitchfork -->
            <!-- startTime="0": Player is moving backwards at max speed -->
            <!-- startTime="1": Player is stationary -->
            <!-- startTime="2": Player is moving forwards at max speed -->
            <part node="player" startTime="0" endTime="1" startTrans="0 0 0" endTrans="0 0 0" />
            <part node="player" startTime="1" endTime="2" startTrans="0 0 0" endTrans="0 0 -.15" />
        </animation>
    </animations>
    <licensePlates>
        <!-- testrunner wants this, not sure why -->
    </licensePlates>
    <foliageBending>
        <bendingNode minX="-0.35" maxX="0.35" minZ="-1.1" maxZ="1.1" yOffset="0.2" />
    </foliageBending>
    <ai agentType="drivable" supportsAIJobs="false" />
    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>
    <i3dMappings>
        <i3dMapping id="pitchfork_main_component1" node="0>" />
        <i3dMapping id="beltCol" node="0>0" />
        <i3dMapping id="cameraRaycastNode1" node="0>1|0" />
        <i3dMapping id="cameraRaycastNode2" node="0>1|1" />
        <i3dMapping id="cameraRaycastNode3" node="0>1|2" />
        <i3dMapping id="outdoorCameraTarget" node="0>1|3" />
        <i3dMapping id="outdoorCamera" node="0>1|3|0" />
        <i3dMapping id="dropAreaHeight" node="0>2|0" />
        <i3dMapping id="dropAreaStart" node="0>2|1" />
        <i3dMapping id="dropAreaWidth" node="0>2|2" />
        <i3dMapping id="pickupEffectNode" node="0>3|0" />
        <i3dMapping id="exitPoint" node="0>4" />
        <i3dMapping id="fakeWheelFront_rot" node="0>5" />
        <i3dMapping id="fakeWheelFront" node="0>5|0" />
        <i3dMapping id="fakeWheelsBack_rot" node="0>6" />
        <i3dMapping id="fakeWheelLeft_rot" node="0>6|0" />
        <i3dMapping id="fakeWheelLeft" node="0>6|0|0" />
        <i3dMapping id="fakeWheelRight_rot" node="0>6|1" />
        <i3dMapping id="fakeWheelRight" node="0>6|1|0" />
        <i3dMapping id="pitchfork_swivel" node="0>7" />
        <i3dMapping id="pitchfork_rot" node="0>7|0" />
        <i3dMapping id="playerLeftHandTargetHand" node="0>7|0|0|0" />
        <i3dMapping id="playerRightHandTargetHand" node="0>7|0|0|1" />
        <i3dMapping id="pitchfork" node="0>7|0|1" />
        <i3dMapping id="player" node="0>8" />
        <i3dMapping id="playerRoot" node="0>8|0" />
        <i3dMapping id="enterAnimCollision" node="0>8|0|0" />
        <i3dMapping id="playerNode" node="0>8|0|1" />
        <i3dMapping id="skeleton" node="0>8|0|1|0" />
        <i3dMapping id="playerRaycast1" node="0>8|0|2" />
        <i3dMapping id="playerRaycast2" node="0>8|0|3" />
        <i3dMapping id="workAreaHeight" node="0>9|0" />
        <i3dMapping id="workAreaStart" node="0>9|1" />
        <i3dMapping id="workAreaWidth" node="0>9|2" />
        <i3dMapping id="groundReferenceNode" node="1>0" />
    </i3dMappings>
</vehicle>
