﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="windrower" 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>Favorit 254</name>
        <specs>
            <workingWidth>2.5</workingWidth>
            <neededPower>20</neededPower>
        </specs>
        <functions>
            <function>$l10n_function_windrower</function>
        </functions>
        <rotation>0</rotation>
        <image>$data/vehicles/sip/favorit254/store_favorit254.png</image>
        <price>5000</price>
        <lifetime>600</lifetime>
        <brand>SIP</brand>
        <category>windrowers</category>
        <shopTranslationOffset>0 0.02 0</shopTranslationOffset>
        <shopRotationOffset>0.485 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1552128</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>229632</indexBufferMemoryUsage>
        <textureMemoryUsage>1900544</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_windrower</typeDesc>
        <filename>$data/vehicles/sip/favorit254/favorit254.i3d</filename>
        <size width="3.8" length="1.7" widthOffset="-0.2"/>
        <speedLimit value="15" />
        <components>
            <component centerOfMass="0 0.2 -0.1" solverIterationCount="10" mass="200" />
            <component centerOfMass="0 0 0" solverIterationCount="10" mass="90" />
            <joint component1="1" component2="2" node="componentJointAttacher" rotLimit="0 0 0" transLimit="0 0 0" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <designConfigurations title="$l10n_ui_brands">
        <designConfiguration name="SIP Favorit 254" price="0">
            <objectChange node="configSIP_decal"  visibilityActive="true" visibilityInactive="false"/>
            <material name="favorit254_mat" shaderParameter="colorMat0" color="SIP_RED2"/>
            <material name="favorit254_mat" shaderParameter="colorMat3" color="SIP_RED2"/>
            <material name="favorit254_mat" shaderParameter="colorMat4" color="SIP_RED2"/>
        </designConfiguration>
        <designConfiguration name="Sepp Knüsel Vario" price="0">
            <objectChange node="configSepp_decal"  visibilityActive="true" visibilityInactive="false"/>
            <material name="favorit254_mat" shaderParameter="colorMat0" color="SEPPKNUSEL_RED1"/>
            <material name="favorit254_mat" shaderParameter="colorMat1" color="SEPPKNUSEL_RED1"/>
            <material name="favorit254_mat" shaderParameter="colorMat3" color="SEPPKNUSEL_YELLOW1"/>
            <material name="favorit254_mat" shaderParameter="colorMat4" color="SHARED_BLACK1"/>
        </designConfiguration>
    </designConfigurations>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/13x5_00R6.xml" isLeft="false" hasTireTracks="true" hasParticles="true">
                        <physics tipOcclusionAreaGroupId="2" restLoad="0.1" repr="wheel01Axis" driveNode="wheel01" forcePointRatio="0.3" initialCompression="20" suspTravel="0.03" spring="35" damper="50" frictionScale="0.2" rotationDamping="0.0001" brakeFactor="0" versatileYRot="true" yOffset="0.01"/>
                        <tire maxDeformation="0.01"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/13x5_00R6.xml" isLeft="true" hasTireTracks="true" hasParticles="true">
                        <physics tipOcclusionAreaGroupId="2" restLoad="0.1" repr="wheel02Axis" driveNode="wheel02" forcePointRatio="0.3" initialCompression="20" suspTravel="0.03" spring="35" damper="50" frictionScale="0.2" rotationDamping="0.0001" brakeFactor="0" versatileYRot="true" yOffset="0.01"/>
                        <tire maxDeformation="0.01"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0 material="18">SHARED_WHITE1</color0>
            <hub linkNode="wheel01"   filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.1 0.1 0.1" />
            <hub linkNode="wheel02"   filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.1 0.1 0.1" />
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" rootNode="favorit254_attacher_component2" lowerTransLimitScale="0 1 0" lowerRotLimitScale="0 0 0" upperRotationOffset="13" lowerRotationOffset="0">
                <distanceToGround lower="0" upper="0.7" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <lowerAnimation name="lowerAnimation"/>
    </attachable>

    <powerConsumer ptoRpm="400" neededMinPtoPower="5" neededMaxPtoPower="7"/>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" detachNode="ptoDetachNode" aboveAttacher="true" color="SHARED_BLACK2" decalColor="WALTERSCHEID_YELLOW1">
            <objectChange node="ptoHolder" rotationActive="0 0 0" rotationInactive="0 0 90"/>
        </input>
    </powerTakeOffs>

    <groundReferenceNodes>
        <groundReferenceNode node="wheel01"  threshold="0.3" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="windrower" functionName="processWindrowerArea" disableBackwards="false" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <windrower dropWindrowWorkAreaIndex="2" particleSystemIndex="1" />
            <testAreas autoGenerate="true" zOffset="0.5" xOffset="0" length="1.5" numAreas="3" areaWidthScale="0.25"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <workArea type="auxiliary" >
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight" />
        </workArea>
    </workAreas>

    <lights>
        <sharedLight linkNode="reflectorWhiteRound_02" filename="$data/shared/assets/reflectors/lizard/whiteRound_02.xml" />
        <sharedLight linkNode="reflectorWhiteRound_03" filename="$data/shared/assets/reflectors/lizard/whiteRound_02.xml" />
        <sharedLight linkNode="reflectorWhiteRound_04" filename="$data/shared/assets/reflectors/lizard/whiteRound_02.xml" />
        <sharedLight linkNode="reflectorWhiteRound_05" filename="$data/shared/assets/reflectors/lizard/whiteRound_02.xml" />
    </lights>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm" startTime="0" endTime="0.1" startTrans="0 0 0" endTrans="0 -0.26 0"/>

            <sound template="sheetImp02" startTime="0.05" pitchScale="1.4" volumeScale="1.7" linkNode="attacherJoint"/>
        </animation>
        <animation name="lowerAnimation">
            <part componentJointIndex="1" startTime="0" endTime="1" startRotLimit="0 0 0" endRotLimit="0 0 10" />

            <sound template="sheetImp02" startTime="0.2" direction="-1" pitchScale="0.6" volumeScale="2.5" />
            <sound template="sheetImp06" startTime="0.9" direction="1"  pitchScale="1.5" volumeScale="1.6" />
            <sound template="sheetImp02" startTime="0.9" direction="1"  pitchScale="0.8" volumeScale="2" />
        </animation>
        <animation name="swathGuardAnimation" resetOnStart="false">
            <part node="swathGuardRot"   startTime="0" endTime="0.4" startRot="0 0 -90" endRot="0 0 0"/>
            <part node="swathGuardTrans" startTime="0" endTime="0.4" startTrans="0.422 0 0" endTrans="0.1 0 0"/>
            <part node="swathGuardTrans" startTime="0.4" endTime="1" startTrans="0.1 0 0" endTrans="-0.4 0 0"/>

            <part node="dropAreaWidth" startTime="0.3" endTime="0.4" startTrans="-3.3 0 0.231" endTrans="-1.75 0 0.231"/>
            <part node="dropAreaWidth" startTime="0.4" endTime="1.0" startTrans="-1.75 0 0.231" endTrans="-2.25 0 0.231"/>
        </animation>
        <animation name="beltRotation" looping="true">
            <part node="root" startTime="0" endTime="0.999" animationClip="rotateSource" clipStartTime="4633" clipEndTime="0" />
            <part node="root" startTime="0.999" endTime="1" animationClip="rotateSource" clipStartTime="0" clipEndTime="4633" />
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="swathGuardRot" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseSpeedFactor="0.3" iconName="WORKING_WIDTH_TRANSLATE_X" />
                <animation animName="swathGuardAnimation" animSpeed="-0.5" animAcceleration="20" animStartTime="0.52"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="attacherBlock" referencePoint="attacherBlockRef" referenceFrame="attacherBlockRefFrame" isActiveDirty="true" maxUpdateDistance="100"/>
        </movingParts>

        <sounds>
            <actionSound template="hingeMedium" pitchScale="0.7" volumeScale="1.3" linkNode="swathGuardRot" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="swathGuardRot"/>
            <actionSound template="clackVar6"   pitchScale="0.8" volumeScale="1"   linkNode="swathGuardRot" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="swathGuardRot"/>
            <actionSound template="sheetImp01"  pitchScale="0.4" volumeScale="1"   linkNode="swathGuardRot" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="swathGuardRot"/>
            <actionSound template="clackVar6"   pitchScale="0.7" volumeScale="0.9" linkNode="swathGuardRot" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="swathGuardRot"/>
            <actionSound template="sheetImp02"  pitchScale="0.7" volumeScale="2"   linkNode="swathGuardRot" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="swathGuardRot"/>
        </sounds>
    </cylindered>

    <windrower fillTypeCategories="WINDROW">
        <animationNodes>
            <animationNode node="disc01"  rotSpeed="-800" rotAxis="3" />
            <animationNode node="disc02"  rotSpeed="-800" rotAxis="3" />
            <animationNode node="disc03"  rotSpeed="-800" rotAxis="3" />
            <animationNode node="disc04"  rotSpeed="-800" rotAxis="3" />
        </animationNodes>

        <effects>
            <effect workAreaIndex="1">
                <effectNode effectClass="WindrowerMotionPathEffect" effectType="WINDROWER" linkNode="windrowerEffectNode">
                    <motionPathEffect textureFilename="$data/vehicles/sip/favorit254/windrowerEffectArray.dds" numRows="3" rowLength="30" minFade="0.03" isLeft="true" shapeScale="1.5" startFade="0" endFade="1"/>
                </effectNode>
                <effectNode effectNode="smokeEmitterShape" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.3"/>
            </effect>
        </effects>

        <sounds>
            <work template="DEFAULT_TEDDER" linkNode="favorit254_main_component1" fadeIn="0.1" fadeOut="2.5"/>
        </sounds>
    </windrower>

    <turnOnVehicle>
        <turnedOnAnimation name="beltRotation" speedScale="1" turnOnFadeTime="2" turnOffFadeTime="2"/>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="6.8" height="1.2"/>
        <agentAttachment width="2.6" height="1.0" length="1.0" lengthOffset="0.1"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.4" maxX="1.4" minZ="-0.4" maxZ="0.4" yOffset="0.3" />
    </foliageBending>

    <baseMaterial>
        <material name="favorit254_mat" baseNode="favorit254_vis">
            <shaderParameter name="colorMat0" value="SIP_RED2" material="0"/>
            <shaderParameter name="colorMat1" value="SIP_GREY1" material="0"/>
            <shaderParameter name="colorMat2" value="WALTERSCHEID_YELLOW1"/>
            <shaderParameter name="colorMat3" value="SIP_RED2" material="0"/>
            <shaderParameter name="colorMat4" value="SIP_RED2" material="0"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="2" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="favorit254_main_component1" node="0>" />
        <i3dMapping id="favorit254_vis" node="0>0" />
        <i3dMapping id="componentJointAttacher" node="0>0|0|0" />
        <i3dMapping id="attacherBlockRefFrame" node="0>0|0|1" />
        <i3dMapping id="attacherBlock" node="0>0|0|1|0" />
        <i3dMapping id="supportArm" node="0>0|0|2" />
        <i3dMapping id="ptoInputNode" node="0>0|0|3" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|4" />
        <i3dMapping id="ptoHolder" node="0>0|0|5" />
        <i3dMapping id="wheel01Axis" node="0>0|1|0" />
        <i3dMapping id="wheel01" node="0>0|1|0|0" />
        <i3dMapping id="wheel02Axis" node="0>0|1|1" />
        <i3dMapping id="wheel02" node="0>0|1|1|0" />
        <i3dMapping id="reflectorWhiteRound_02" node="0>0|2|0|0" />
        <i3dMapping id="reflectorWhiteRound_03" node="0>0|2|0|1" />
        <i3dMapping id="reflectorWhiteRound_04" node="0>0|2|0|2" />
        <i3dMapping id="reflectorWhiteRound_05" node="0>0|2|0|3" />
        <i3dMapping id="disc01" node="0>0|3|1" />
        <i3dMapping id="disc02" node="0>0|3|2" />
        <i3dMapping id="disc03" node="0>0|3|3" />
        <i3dMapping id="disc04" node="0>0|3|4" />
        <i3dMapping id="swathGuardRot" node="0>0|3|5" />
        <i3dMapping id="swathGuardTrans" node="0>0|3|5|0" />
        <i3dMapping id="workAreaStart" node="0>0|4|0" />
        <i3dMapping id="workAreaWidth" node="0>0|4|1" />
        <i3dMapping id="workAreaHeight" node="0>0|4|2" />
        <i3dMapping id="dropAreaStart" node="0>0|4|3" />
        <i3dMapping id="dropAreaWidth" node="0>0|4|4" />
        <i3dMapping id="dropAreaHeight" node="0>0|4|5" />
        <i3dMapping id="windrowerEffectNode" node="0>0|5|0" />
        <i3dMapping id="smokeEmitterShape" node="0>0|5|1" />
        <i3dMapping id="root" node="0>0|6" />
        <i3dMapping id="beltMoving" node="0>0|7|0" />
        <i3dMapping id="aiMarkerLeft" node="0>0|8|0|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|8|0|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|8|0|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|8|1" />
        <i3dMapping id="configSepp_decal" node="0>0|9|4" />
        <i3dMapping id="configSIP_decal" node="0>0|9|5" />
        <i3dMapping id="favorit254_attacher_component2" node="1>" />
        <i3dMapping id="attacherJoint" node="1>0" />
        <i3dMapping id="topReferenceNode" node="1>1" />
        <i3dMapping id="attacherBlockRef" node="1>2" />
    </i3dMappings>
</vehicle>
