﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="roller" 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>Meadow Roller Vario</name>
        <specs>
            <neededPower>80</neededPower>
            <workingWidth>4.0</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_grasslandCare</function>
        </functions>
        <image>$data/vehicles/duevelsdorf/meadowRollerVario/store_meadowRollerVario.png</image>
        <price>16500</price>
        <lifetime>600</lifetime>
        <rotation>270</rotation>
        <brand>DUEVELSDORF</brand>
        <category>grasslandCare</category>
        <shopTranslationOffset>0 0.092 0</shopTranslationOffset>
        <shopRotationOffset>90.013 0.85 -89.973</shopRotationOffset>
        <vertexBufferMemoryUsage>491520</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>105216</indexBufferMemoryUsage>
        <textureMemoryUsage>1114112</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_roller</typeDesc>
        <filename>$data/vehicles/duevelsdorf/meadowRollerVario/meadowRollerVario.i3d</filename>
        <size width="6" length="3" widthOffset="0.5" />
        <speedLimit value="12" />
        <components>
            <component centerOfMass="0 0.6 0" solverIterationCount="10" mass="3364" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <sounds volumeFactor="0.7" />
        <mapHotspot type="TOOL_TRAILED" />
    </base>

    <wheels>
        <wheelConfigurations>
             <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                 <wheels>
                     <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="true"  hasTireTracks="true" hasParticles="true" >
                         <physics restLoad="1.5" repr="wheelLeft"  forcePointRatio="0.5" initialCompression="50" suspTravel="0.14" spring="21" damper="30" rotationDamping="0.001" useReprDirection="true" yOffset="0.02" />
                     </wheel>
                     <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                         <physics restLoad="1.5" repr="wheelRight" forcePointRatio="0.5" initialCompression="50" suspTravel="0.14" spring="21" damper="30" rotationDamping="0.001" useReprDirection="true" yOffset="0.02" />
                     </wheel>
                     <wheel isLeft="false" hasParticles="true" >
                         <physics restLoad="1.9" repr="wheelDrumLeft"  radius="0.6" mass="0.2" width="2" forcePointRatio="0.5" initialCompression="50" suspTravel="0.05" spring="66" damper="30" rotationDamping="0.001"/>
                     </wheel>
                     <wheel isLeft="false" hasParticles="true" >
                         <physics restLoad="1.9" repr="wheelDrumRight" radius="0.6" mass="0.2" width="2" forcePointRatio="0.5" initialCompression="50" suspTravel="0.05" spring="66" damper="30" rotationDamping="0.001"/>
                     </wheel>
                 </wheels>
             </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0>DUEVELSDORF_GREEN1</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelLeft"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true" scale="0.12 0.17 0.17" />
            <hub linkNode="wheelRight" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.12 0.17 0.17" />
        </hubs>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="drum" radius="0.6" wheelIndex="3" />
    </speedRotatingParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJointTransport" jointType="trailer" attacherHeight="1.08" />
            <inputAttacherJoint node="attacherJointWork"      jointType="trailer" attacherHeight="0.82" foldMinLimit="0.99" foldMaxLimit="1"/>
        </inputAttacherJoints>
        <support animationName="moveSupport"/>
        <brakeForce force="0.5"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" adapterNode="electric_connector" length="0.6" diameter="0.008" straighteningFactor="0.5">
            <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01" adapterNode="hydraulicIn01_connector" length="0.6" diameter="0.02" straighteningFactor="0.5">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" adapterNode="hydraulicOut01_connector" length="0.6" diameter="0.02" straighteningFactor="0.5">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
            <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn02" adapterNode="hydraulicIn02_connector" length="0.6" diameter="0.02" straighteningFactor="0.5">
            <objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut02" adapterNode="hydraulicOut02_connector" length="0.6" diameter="0.02" straighteningFactor="0.5">
            <objectChange node="hydraulicOut02_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn03" adapterNode="hydraulicIn03_connector" length="0.6" diameter="0.02" straighteningFactor="0.5">
            <objectChange node="hydraulicIn03_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut03" adapterNode="hydraulicOut03_connector" length="0.6" diameter="0.02" straighteningFactor="0.5">
            <objectChange node="hydraulicOut03_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
    </connectionHoses>

    <lights>
        <sharedLight linkNode="rear2ChamberLight_01_left"  filename="$data/shared/assets/lights/lizard/rearLight36_left.xml" />
        <sharedLight linkNode="rear2ChamberLight_01_right" filename="$data/shared/assets/lights/lizard/rearLight36_right.xml" />

        <realLights>
            <high>
                <light node="backLightsHigh1" lightTypes="0" />
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
                <brakeLight node="backLightsHigh1" />
            </high>
        </realLights>
    </lights>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" threshold="0.3" onlyActiveWhenLowered="false"/>
    </groundReferenceNodes>

    <workAreas>
        <workArea type="roller" functionName="processRollerArea" disableBackwards="false" needsSetIsTurnedOn="false">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <folding minLimit="0.9" maxLimit="1" />
            <onlyActiveWhenLowered value="false"/>
        </workArea>
    </workAreas>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts>
                    <foldingPart animationName="foldWheels" speedScale="1" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="foldWheels">
            <part node="drawbar" startTime="0.0" endTime="2.0" startRot="0 0 0"  endRot="90 0 0" />
            <part node="axis"    startTime="0.01" endTime="1.99" startRot="0 0 0"  endRot="87 0 0" />
            <part node="axisRot" startTime="0.01" endTime="1.99" startRot="0 0 0"  endRot="-87 0 0" />
            <part node="axisLockTransport" startTime="0.0" endTime="0.01" visibility="true" />
            <part node="axisLockTransport" startTime="0.01" endTime="0.02" visibility="false" />
            <part node="axisLockWork" startTime="1.98" endTime="1.99" visibility="false" />
            <part node="axisLockWork" startTime="1.99" endTime="2.0" visibility="true" />
            <part node="drawbarLockTransport" startTime="0.0" endTime="0.01" visibility="true" />
            <part node="drawbarLockTransport" startTime="0.01" endTime="0.02" visibility="false" />
            <part node="drawbarLockWork" startTime="1.98" endTime="1.99" visibility="false" />
            <part node="drawbarLockWork" startTime="1.99" endTime="2.0" visibility="true" />

            <sound template="clackVar6"      startTime="0.01"                volumeScale="1.3" pitchScale="1.1" />
            <sound template="cylinderPunch"  startTime="0.01" direction="-1" volumeScale="0.3" pitchScale="1.6" />
            <sound template="thudVar1"       startTime="1.5"  direction="1"  volumeScale="1.7" pitchScale="0.6" />
            <sound template="foldStartMed02" startTime="1.9"  direction="1"  volumeScale="1.7" pitchScale="1" />
            <sound template="thudVar1"       startTime="1.4"  direction="-1" volumeScale="0.9" pitchScale="0.9" />
            <sound template="thudVar1"       startTime="0.01" direction="-1" volumeScale="0.9" pitchScale="1.3" />
        </animation>
        <animation name="moveSupport">
            <part node="supportArm"     startTime="0" endTime="0.5" startTrans="0 0.2 0" endTrans="0 0 0" />
            <part node="supportArmPart" startTime="0" endTime="0.5" startTrans="0 0.2 0" endTrans="0 -0.2 0" />
            <part node="supportRot"     startTime="0" endTime="0.5" startRot="0 1080 0" endRot="0 0 0" />

            <part node="supportArmUnfolded" startTime="0" endTime="0.5" requiredAnimation="foldWheels" requiredAnimationRange="0 0.99" startTrans="-0.1 1.15 -0.252" endTrans="-0.1 1.15 -0.252" />
            <part node="supportArmUnfolded" startTime="0" endTime="0.5" requiredAnimation="foldWheels" requiredAnimationRange="0.99 1" startTrans="-0.1 1.15 -0.252" endTrans="-0.1 1.15 0.43" />

            <sound template="clackVar5"  startTime="0.01" direction="-1" volumeScale="0.9" pitchScale="1.6" linkNode="attacherJoint"/>
            <sound template="latchSmall" startTime="0.49" direction="-1" volumeScale="0.2" pitchScale="1.2" linkNode="attacherJoint"/>
            <sound template="clackVar1"  startTime="0.4"  direction="1"  volumeScale="1.2" pitchScale="1.6" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="axis" wheelIndices="1 2" playSound="true">
                <dependentPart node="hydraulicAxis" />
            </movingTool>
            <movingTool node="drawbar" playSound="true">
                <dependentPart node="hydraulicDrawbar" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="hydraulicAxis" referencePoint="hydraulicAxisRef" referenceFrame="0>">
                <translatingPart node="hydraulicAxisPunch" />
            </movingPart>
            <movingPart node="hydraulicDrawbar" referencePoint="hydraulicDrawbarRef" referenceFrame="0>">
                <translatingPart node="hydraulicDrawbarPunch" />
            </movingPart>
        </movingParts>

        <sounds>
            <hydraulic template="defaultHydraulicSound" />
        </sounds>
    </cylindered>

    <roller onlyActiveWhenLowered="false" isGrassRoller="true">
        <sounds>
            <work template="MEADOW_ROLLER_WORK" />
        </sounds>
    </roller>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack"/>
        <allowTurnBackward value="false"/>
        <collisionTrigger node="aiCollisionNode" width="6" height="2"/>
        <agentAttachment jointNode="attacherJointTransport" rotCenterWheelIndices="1 2" width="1.8" height="3" length="4.5" lengthOffset="0.5"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-2.1" maxX="2.1" minZ="-0.8" maxZ="0.8" yOffset="0.6" />
    </foliageBending>

    <baseMaterial>
        <material name="duevelsdorfMRVario_mat" baseNode="meadowRoller">
            <shaderParameter name="colorMat0" value="DUEVELSDORF_GREEN1"/>
            <shaderParameter name="colorMat2" value="DUEVELSDORF_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="meadowRoller" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="drawbar" node="0>0|0|0|0" />
        <i3dMapping id="attacherJointWork" node="0>0|0|0|0|0" />
        <i3dMapping id="supportArmUnfolded" node="0>0|0|0|0|1" />
        <i3dMapping id="hydraulicDrawbarRef" node="0>0|0|0|0|2" />
        <i3dMapping id="attacherJointTransport" node="0>0|0|0|1" />
        <i3dMapping id="drawbarLockTransport" node="0>0|0|0|2" />
        <i3dMapping id="drawbarLockWork" node="0>0|0|0|3" />
        <i3dMapping id="supportArm" node="0>0|0|1|0" />
        <i3dMapping id="supportArmPart" node="0>0|0|1|0|0" />
        <i3dMapping id="supportRot" node="0>0|0|1|1" />
        <i3dMapping id="axis" node="0>0|1|0|0" />
        <i3dMapping id="axisRot" node="0>0|1|0|0|0" />
        <i3dMapping id="wheelLeft" node="0>0|1|0|0|0|0" />
        <i3dMapping id="wheelRight" node="0>0|1|0|0|0|1" />
        <i3dMapping id="hydraulicAxisRef" node="0>0|1|0|0|1" />
        <i3dMapping id="wheelDrumLeft" node="0>0|1|1" />
        <i3dMapping id="wheelDrumRight" node="0>0|1|2" />
        <i3dMapping id="axisLockTransport" node="0>0|1|3" />
        <i3dMapping id="axisLockWork" node="0>0|1|4" />
        <i3dMapping id="rear2ChamberLight_01_left" node="0>0|2|0|0" />
        <i3dMapping id="rear2ChamberLight_01_right" node="0>0|2|0|1" />
        <i3dMapping id="backLightsHigh1" node="0>0|2|1|0" />
        <i3dMapping id="turnLightLeftBack" node="0>0|2|2|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|2|2|1" />
        <i3dMapping id="hydraulicAxis" node="0>0|3|0" />
        <i3dMapping id="hydraulicAxisPunch" node="0>0|3|0|0" />
        <i3dMapping id="hydraulicDrawbar" node="0>0|3|1" />
        <i3dMapping id="hydraulicDrawbarPunch" node="0>0|3|1|0" />
        <i3dMapping id="drum" node="0>0|3|2" />
        <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="groundReferenceNode" node="0>0|4|3" />
        <i3dMapping id="aiMarkerLeft" node="0>0|5|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|5|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|5|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|5|3" />
        <i3dMapping id="hydraulicIn01" node="0>0|6|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|6|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|6|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|6|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|6|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|6|1|0|0" />
        <i3dMapping id="hydraulicIn02" node="0>0|6|2" />
        <i3dMapping id="hydraulicIn02_detached" node="0>0|6|2|0" />
        <i3dMapping id="hydraulicIn02_connector" node="0>0|6|2|0|0" />
        <i3dMapping id="hydraulicOut02" node="0>0|6|3" />
        <i3dMapping id="hydraulicOut02_detached" node="0>0|6|3|0" />
        <i3dMapping id="hydraulicOut02_connector" node="0>0|6|3|0|0" />
        <i3dMapping id="hydraulicIn03" node="0>0|6|4" />
        <i3dMapping id="hydraulicIn03_detached" node="0>0|6|4|0" />
        <i3dMapping id="hydraulicIn03_connector" node="0>0|6|4|0|0" />
        <i3dMapping id="hydraulicOut03" node="0>0|6|5" />
        <i3dMapping id="hydraulicOut03_detached" node="0>0|6|5|0" />
        <i3dMapping id="hydraulicOut03_connector" node="0>0|6|5|0|0" />
        <i3dMapping id="electric" node="0>0|6|6" />
        <i3dMapping id="electric_detached" node="0>0|6|6|0" />
        <i3dMapping id="electric_connector" node="0>0|6|6|0|0" />
    </i3dMappings>
</vehicle>
