﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="stumpCutter" 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>SF900</name>
        <specs>
            <neededPower>90</neededPower>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="650" filterSpecMax="750"/>
        </specs>
        <functions>
            <function>$l10n_function_stumpCutter</function>
        </functions>
        <image>$data/vehicles/prinoth/sf900/store_sf900.png</image>
        <price>27000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>PRINOTH</brand>
        <category>wood</category>
        <shopTranslationOffset>0 0.148 0</shopTranslationOffset>
        <shopRotationOffset>0.203 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1282048</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>198912</indexBufferMemoryUsage>
        <textureMemoryUsage>2031616</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_stumpCutter</typeDesc>
        <filename>$data/vehicles/prinoth/sf900/sf900.i3d</filename>
        <size width="2.7" length="3.7" lengthOffset="-0.35" />
        <components>
            <component centerOfMass="0 -0.3 0" solverIterationCount="10" mass="1300" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <powerConsumer ptoRpm="540" neededMinPtoPower="35" neededMaxPtoPower="35"/>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotLimitScale="0 0 0" upperRotationOffset="8" lowerRotationOffset="-5" allowsLowering="false" >
                <distanceToGround lower="0.7" upper="0.7"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="pto" detachNode="ptoDetach" aboveAttacher="true" filename="$data/shared/assets/powerTakeOffs/walterscheidWWZ.xml"/>
    </powerTakeOffs>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="1.1" diameter="0.025">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1.1" diameter="0.02">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01_connector"   filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01_connector"   filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm"  startTime="0" endTime="0.25" startTrans="0 0 0" endTrans="0 -0.145 0"/>

            <sound template="foldStopSm02" startTime="0.24"  volumeScale="2.5" pitchScale="1" linkNode="attacherJoint"/>
            <sound template="latchSmall" startTime="0.24"  volumeScale="0.3" pitchScale="1.6" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="armRotX">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="false" mouseSpeedFactor="0.5" iconName="TOP_DOOR_ROTATE" />
                <rotation rotSpeed="15" rotAcceleration="100" rotMax="5" rotMin="-45" rotationAxis="1" startRot="-10"/>
                <powerTakeOffs indices="1" />
                <dependentPart node="xRotHydraulic" />
                <dependentPart node="xRotHydraulicPart" />
            </movingTool>
            <movingTool node="armYRot" >
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="true" mouseSpeedFactor="0.5" iconName="FRONTLOADER_ARM_ROTATE" />
                <rotation rotSpeed="20" rotAcceleration="170" rotMax="35" rotMin="-35" rotationAxis="3" />
                <powerTakeOffs indices="1" />
                <dependentPart node="xRotHydraulic" />
                <dependentPart node="xRotHydraulicPart" />
                <dependentPart node="yRotHydraulic" />
            </movingTool>
            <movingTool node="armCutter" >
                <controls axis="AXIS_FRONTLOADER_ARM2" invertAxis="true" mouseSpeedFactor="0.5" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotSpeed="20" rotAcceleration="170" rotMax="30" rotMin="-5" rotationAxis="1" />
                <powerTakeOffs indices="1" />
                <dependentPart node="armCutterHydraulic" />
            </movingTool>
            <movingTool node="cutter" >
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.3" iconName="CRANE_ARM2_ROTATE_TOOL" />
                <rotation rotSpeed="30" rotAcceleration="170" rotMax="23" rotMin="-15" rotationAxis="1" />
                <dependentPart node="cutterHydraulic" />
            </movingTool>
            <movingTool node="supportArm" >
                <dependentPart node="supportArmPart" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="supportArmPart" referencePoint="supportArmPartRef" referenceFrame="supportArmPartRef" scaleZ="true" />
            <movingPart node="yRotHydraulic" referencePoint="yRotHydraulicRef" referenceFrame="yRotHydraulicRef" playSound="true" >
                <translatingPart node="yRotHydraulicPunch" />
            </movingPart>
            <movingPart node="xRotHydraulicPart" referencePoint="xRotHydraulicRef" referenceFrame="xRotHydraulicRef" limitedAxis="1" />
            <movingPart node="xRotHydraulic" referencePoint="xRotHydraulicRef" referenceFrame="xRotHydraulicRef" playSound="true" >
                <translatingPart node="xRotHydraulicPunch" />
            </movingPart>
            <movingPart node="cutterHydraulic" referencePoint="cutterHydraulicRef" referenceFrame="cutterHydraulicRef" playSound="true" >
                <translatingPart node="cutterHydraulicPunch" />
            </movingPart>
            <movingPart node="armCutterHydraulic" referencePoint="armCutterHydraulicRef" referenceFrame="armCutterHydraulicRef" playSound="true" >
                <translatingPart node="armCutterHydraulicPunch" />
            </movingPart>
        </movingParts>

        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.7" volumeScale="1.2" linkNode="armCutter" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="armCutter" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="defaultHydraulicSound" pitchScale="0.9" volumeScale="1.2" linkNode="cutter"    actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="cutter"    fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="hydraulicLayerTone"    pitchScale="0.7" volumeScale="1.2" linkNode="armRotX"   actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="armRotX"   fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="hydraulicLayerTone"    pitchScale="0.9" volumeScale="1.2" linkNode="armYRot"   actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="armYRot"   fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.5" linkNode="armRotX"   actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armRotX"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="armRotX"   actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armRotX"/>
            <actionSound template="clackVar6"             pitchScale="0.7" volumeScale="1.5" linkNode="armRotX"   actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="armRotX"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="armRotX"   actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="armRotX"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.3" linkNode="armYRot"   actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armYRot"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="armYRot"   actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armYRot"/>
            <actionSound template="clackVar6"             pitchScale="0.7" volumeScale="1.3" linkNode="armYRot"   actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="armYRot"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="armYRot"   actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="armYRot"/>
            <actionSound template="metalClose"            pitchScale="0.8" volumeScale="1"   linkNode="cutter"    actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="cutter"/>
            <actionSound template="cylinderPunch"         pitchScale="2.5" volumeScale="0.3" linkNode="cutter"    actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="cutter"/>
            <actionSound template="sheetImp02"            pitchScale="1"   volumeScale="1.3" linkNode="cutter"    actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="cutter"/>
            <actionSound template="sheetImp02"            pitchScale="1"   volumeScale="1.3" linkNode="cutter"    actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="cutter"/>
            <actionSound template="clackVar6"             pitchScale="1"   volumeScale="0.6" linkNode="cutter"    actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="cutter"/>
            <actionSound template="sheetImp02"            pitchScale="0.8" volumeScale="1.6" linkNode="armCutter" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armCutter"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.4" linkNode="armCutter" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armCutter"/>
            <actionSound template="metalClose"            pitchScale="0.8" volumeScale="0.6" linkNode="armCutter" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="armCutter"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1.3" linkNode="armCutter" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="armCutter"/>
            <actionSound template="sheetImp02"            pitchScale="0.4" volumeScale="1.6" linkNode="armCutter" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="armCutter"/>
        </sounds>
    </cylindered>

    <stumpCutter>
        <cutNode node="cutNode" cutSizeY="1.4" cutSizeZ="2.3" maxCutTime="0.1" maxResetCutTime="0.001"/>
        <effects>
            <effectNode effectClass="ParticleEffect" effectNode="emitterShapeWood" particleType="CRUSHER_WOOD" emitCountScale="10"/>
            <effectNode effectClass="ParticleEffect" effectNode="emitterShapeDust" particleType="CRUSHER_DUST" emitCountScale="2"/>
        </effects>
        <animationNodes>
            <animationNode node="cutterWheel" rotSpeed="1100" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="5"/>
        </animationNodes>
        <sounds>
            <start template="STUMP_CUTTER_START" linkNode="sf900_main_component1" />
            <idle template="STUMP_CUTTER_IDLE" linkNode="sf900_main_component1" />
            <work template="STUMP_CUTTER_WORK" linkNode="sf900_main_component1" />
            <stop template="STUMP_CUTTER_STOP" linkNode="sf900_main_component1" />
        </sounds>
    </stumpCutter>

    <ai>
        <agentAttachment width="2.0" height="1.7" length="3" lengthOffset="-0.3"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1" maxX="1" minZ="0.65" maxZ="0.95" yOffset="0.15" />
        <bendingNode minX="-0.3" maxX="0.3" minZ="-1.8" maxZ="0.1" yOffset="-0.1" node="armCutterHydraulicRef" />
        <bendingNode minX="-0.5" maxX="0.5" minZ="-1.4" maxZ="0.35" yOffset="-1.1" node="armCutter" />
    </foliageBending>

    <baseMaterial>
        <material name="sf900_mat" baseNode="sf900_vis">
            <shaderParameter name="colorMat0" value="PRINOTH_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="sf900_main_component1" node="0>" />
        <i3dMapping id="sf900_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="ptoDetach" node="0>0|0|2|0" />
        <i3dMapping id="supportArmPartRef" node="0>0|0|3" />
        <i3dMapping id="supportArm" node="0>0|0|4" />
        <i3dMapping id="supportArmPart" node="0>0|0|4|1" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|5|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|5|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|5|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|5|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|5|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|5|1|0|0" />
        <i3dMapping id="armRotX" node="0>0|1|0" />
        <i3dMapping id="armYRot" node="0>0|1|0|0|0" />
        <i3dMapping id="armCutter" node="0>0|1|0|0|0|0|0" />
        <i3dMapping id="cutterWheel" node="0>0|1|0|0|0|0|0|0" />
        <i3dMapping id="cutter" node="0>0|1|0|0|0|0|0|1" />
        <i3dMapping id="cutterHydraulicRef" node="0>0|1|0|0|0|0|0|1|0" />
        <i3dMapping id="pto" node="0>0|1|0|0|0|0|0|2" />
        <i3dMapping id="armCutterHydraulicRef" node="0>0|1|0|0|0|0|0|3" />
        <i3dMapping id="cutterHydraulic" node="0>0|1|0|0|0|0|0|4" />
        <i3dMapping id="cutterHydraulicPunch" node="0>0|1|0|0|0|0|0|4|0" />
        <i3dMapping id="cutNodeRot" node="0>0|1|0|0|0|0|0|7" />
        <i3dMapping id="cutNode" node="0>0|1|0|0|0|0|0|7|0" />
        <i3dMapping id="emitterShapeWood" node="0>0|1|0|0|0|0|0|8|0" />
        <i3dMapping id="emitterShapeDust" node="0>0|1|0|0|0|0|0|8|1" />
        <i3dMapping id="armYRotPartRef" node="0>0|1|0|0|0|0|0|12" />
        <i3dMapping id="xRotHydraulicRef" node="0>0|1|0|0|0|1" />
        <i3dMapping id="armCutterHydraulic" node="0>0|1|0|0|0|2" />
        <i3dMapping id="armCutterHydraulicPunch" node="0>0|1|0|0|0|2|0" />
        <i3dMapping id="yRotHydraulic" node="0>0|1|0|0|0|3" />
        <i3dMapping id="yRotHydraulicPunch" node="0>0|1|0|0|0|3|0" />
        <i3dMapping id="yRotHydraulicRef" node="0>0|1|0|1" />
        <i3dMapping id="xRotHydraulicPart" node="0>0|2|0|0" />
        <i3dMapping id="xRotHydraulic" node="0>0|2|0|0|0" />
        <i3dMapping id="xRotHydraulicPunch" node="0>0|2|0|0|0|0" />
        <i3dMapping id="part" node="0>0|2|0|0|0|1" />
    </i3dMappings>
</vehicle>
