﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="mixerWagon" 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>RA 142</name>
        <specs>
            <neededPower>90</neededPower>
        </specs>
        <functions>
            <function>$l10n_function_feeder</function>
        </functions>
        <image>$data/vehicles/kuhn/ra142/store_ra142.png</image>
        <price>29500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KUHN</brand>
        <category>animals</category>
        <shopTranslationOffset>0 0.014 0</shopTranslationOffset>
        <shopRotationOffset>-0.938 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>905216</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>159232</indexBufferMemoryUsage>
        <textureMemoryUsage>1048576</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mixerWagon</typeDesc>
        <filename>$data/vehicles/kuhn/ra142/ra142.i3d</filename>
        <size width="3.5" length="6.3" lengthOffset="0.35" />
        <components maxMass="10800">
            <component centerOfMass="0 0.6 -0.3" solverIterationCount="10" mass="4920" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TRAILER" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/vredestein/endurion/400_70R18.xml" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics restLoad="2.4" repr="wheelLeft"  forcePointRatio="0.35" initialCompression="25" suspTravel="0.15" spring="62" damper="50" />
                        <wheelChock parkingNode="wheelChock01" />
                        <wheelChock parkingNode="wheelChock02" isInverted="true" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/vredestein/endurion/400_70R18.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics restLoad="2.4" repr="wheelRight" forcePointRatio="0.35" initialCompression="25" suspTravel="0.15" spring="62" damper="50" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0>KUHN_RED1</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelLeft"  filename="$data/shared/wheels/hubs/hub_n10_5.xml" isLeft="true"  scale="0.285 0.285 0.285" />
            <hub linkNode="wheelRight" filename="$data/shared/wheels/hubs/hub_n10_5.xml" isLeft="false" scale="0.285 0.285 0.285" />
        </hubs>
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0" linkNode="chockSupport01" filename="$data/shared/assets/wheelChocks/wheelChockSupport01.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="chockSupport02" filename="$data/shared/assets/wheelChocks/wheelChockSupport01.i3d"/>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01Adapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01Adapter" filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn02Adapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut02Adapter" filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="trailer" attacherHeight="0.55" />
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <brakeForce force="0.9" maxForce="1.6" maxForceMass="10500"/>
    </attachable>

    <licensePlates>
        <licensePlate node="licensePlateBack" position="BACK" preferedType="ELONGATED" placementArea="0.08 0.28 0.08 0.28"/>
    </licensePlates>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="1.3" diameter="0.02" straighteningFactor="1.5">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1.3" diameter="0.02" straighteningFactor="1.5">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn02"  length="1.3" diameter="0.02" straighteningFactor="1.5">
            <objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut02" length="1.3" diameter="0.02" straighteningFactor="1.5">
            <objectChange node="hydraulicOut02_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" detachNode="ptoDetachNode" inputNode="ptoInputNode" aboveAttacher="true" color="SHARED_BLACK1" decalColor="WALTERSCHEID_YELLOW1"/>
    </powerTakeOffs>

    <powerConsumer ptoRpm="470" neededMaxPtoPower="30"/>

    <lights>
        <sharedLight linkNode="yellowRound_01_1" filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
        <sharedLight linkNode="yellowRound_01_2" filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
        <sharedLight linkNode="bigTriangle_1"    filename="$data/shared/assets/reflectors/lizard/bigTriangle.xml" />
        <sharedLight linkNode="rearLightCircleOrange_01_left"  filename="$data/shared/assets/lights/lizard/rearLight21Orange_left.xml" />
        <sharedLight linkNode="rearLightCircleOrange_01_right" filename="$data/shared/assets/lights/lizard/rearLight21Orange_right.xml" />
        <sharedLight linkNode="rearLightCircleRed_01_1"        filename="$data/shared/assets/lights/lizard/rearLight21Red.xml" />
        <sharedLight linkNode="rearLightCircleRed_01_2"        filename="$data/shared/assets/lights/lizard/rearLight21Red.xml" />
        <sharedLight linkNode="plateNumberLight02_01" filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />
        <sharedLight linkNode="plateNumberLight02_02" filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />

        <realLights>
            <high>
                <light node="backLightsHigh" lightTypes="0" />
                <light node="licensePlateLightHigh" lightTypes="0" />
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
                <brakeLight node="backLightsHigh" />
            </high>
        </realLights>
    </lights>

    <animations>
        <animation name="dischargeAnim">
            <part node="bottomDoor"        startTime="0"   endTime="1.5" startRot="-120 0 0" endRot="0 0 0"/>
            <part node="topDoor"           startTime="1.5" endTime="3"   startTrans="0 -0.430 0" endTrans="0 -0.05 0"/>
            <part node="dischargeNodeLeft" startTime="2.8" endTime="3"   startTipSideEmptyFactor="0" endTipSideEmptyFactor="1" />

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="1.5"  volumeScale="1.3" pitchScale="1.4"  linkNode="topDoor"/>
            <sound template="defaultHydraulicSound" startTime="1.5"  endTime="2.99" volumeScale="1.3" pitchScale="1.1"  linkNode="topDoor"/>
            <sound template="metalOpen"             startTime="0.01" direction="1"  volumeScale="1.6" pitchScale="1.7"  linkNode="topDoor"/>
            <sound template="metalClose"            startTime="1.5"  direction="1"  volumeScale="1.6" pitchScale="1.7"  linkNode="topDoor"/>
            <sound template="clackVar6"             startTime="1.5"  direction="1"  volumeScale="1.6" pitchScale="1"    linkNode="topDoor"/>
            <sound template="slideOpen"             startTime="1.5"  direction="1"  volumeScale="2"   pitchScale="1.7"  linkNode="topDoor"/>
            <sound template="clackVar6"             startTime="2.99" direction="1"  volumeScale="0.8" pitchScale="0.9"  linkNode="topDoor"/>
            <sound template="sheetImp02"            startTime="2.99" direction="1"  volumeScale="2"   pitchScale="0.8"  linkNode="topDoor"/>
            <sound template="clackVar4"             startTime="2.99" direction="-1" volumeScale="0.8" pitchScale="1.6"  linkNode="topDoor"/>
            <sound template="clackVar6"             startTime="1.5"  direction="-1" volumeScale="1.2" pitchScale="0.8"  linkNode="topDoor"/>
            <sound template="sheetImp02"            startTime="1.5"  direction="-1" volumeScale="1.8" pitchScale="0.8"  linkNode="topDoor"/>
            <sound template="clackVar4"             startTime="0.01" direction="-1" volumeScale="1.2" pitchScale="2"    linkNode="topDoor"/>
            <sound template="metalClose"            startTime="0.01" direction="-1" volumeScale="1.2" pitchScale="1"    linkNode="topDoor"/>
            <sound template="clackVar6"             startTime="0.01" direction="-1" volumeScale="1.2" pitchScale="0.8"  linkNode="topDoor"/>
            <sound template="hingeMedium"           startTime="1.6"  endTime="2.8"  direction="1"     volumeScale="1.2" pitchScale="0.6" linkNode="topDoor"/>
        </animation>

        <animation name="moveSupport">
            <part node="supportArm"   startTime="0" endTime="0.6" startTrans="0 0.25 0" endTrans="0 -0.055 0" />
            <part node="supportCrank" startTime="0" endTime="0.6" startRot="0 0 0" endRot="720 0 0" />

            <sound template="clackVar6" startTime="0.01" direction="-1" volumeScale="1.2" pitchScale="1.2" linkNode="attacherJoint"/>
            <sound template="clackVar5" startTime="0.5"  direction="1"  volumeScale="1"   pitchScale="1.2" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
       <movingTools>
            <movingTool node="topDoor">
                <dependentPart node="topDoorArm" />
            </movingTool>
            <movingTool node="bottomDoor">
                <dependentPart node="hydraulicBottomDoor" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="topDoorArm" localReferencePoint="topDoorArmPart" referencePoint="topDoorArmRef" referenceFrame="topDoorArmRefFrame">
                <dependentPart node="topDoorArmPart" />
                <dependentPart node="hydraulicTopDoorArm" />
            </movingPart>
            <movingPart node="topDoorArmPart" referencePoint="topDoorArmRef" referenceFrame="topDoorArmRef" />
            <movingPart node="hydraulicTopDoorArm" referencePoint="hydraulicTopDoorArmRef" referenceFrame="hydraulicTopDoorArmRefFrame">
                <translatingPart node="hydraulicTopDoorArmPunch" />
            </movingPart>

            <movingPart node="hydraulicBottomDoor" referencePoint="hydraulicBottomDoorRef" referenceFrame="hydraulicBottomDoorRefFrame">
                <translatingPart node="hydraulicBottomDoorPunch" />
            </movingPart>
        </movingParts>

        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="0>"/>
        </sounds>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration name="$l10n_configuration_valueDefault" price="0" >
                <fillUnits>
                    <fillUnit shopDisplayUnit="CUBICMETER" fillTypeCategories="MIXERWAGON" capacity="11900" >
                        <exactFillRootNode node="exactFillRootNode" />
                        <dashboard displayType="TEXT" valueType="fillLevel" node="numbersFillLevel" textColor="0.03 0.03 0.03 1" textSize="0.04" textMask="00000" font="DIGIT" emissiveScale="1" textAlignment="RIGHT"/>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" maxDelta="0.23" maxAllowedHeapAngle="18" fillUnitIndex="1" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <unloadInfos>
            <unloadInfo>
                <node node="unloadInfoFront" width="2" length="4.0" />
                <node node="unloadInfoBack" width="2" length="1.0" minHeight="1.2" priority="2" />
            </unloadInfo>
        </unloadInfos>
    </fillVolume>

    <trailer>
        <trailerConfigurations>
            <trailerConfiguration name="$l10n_configuration_valueDefault" price="0">
                <trailer>
                    <tipSide name="$l10n_info_tipSideBack" dischargeNodeIndex="1">
                        <animation name="dischargeAnim" speedScale="1.0" />
                    </tipSide>
                </trailer>
            </trailerConfiguration>
        </trailerConfigurations>
    </trailer>

    <dischargeable>
        <dischargeNode node="dischargeNodeLeft" emptySpeed="400" fillUnitIndex="1" unloadInfoIndex="1">
            <info width="1.0" length="0.5" zOffset="0.4" />
            <effects>
                <effectNode effectClass="TypedMotionPathEffect" effectType="MIXERWAGON" linkNode="unloadEffectFrontLeft">
                    <motionPathEffect textureFilename="$data/vehicles/kuhn/ra142/unloadEffectFrontLeftArray.dds" numRows="8" rowLength="15" delay="0"/>
                </effectNode>
            </effects>
        </dischargeNode>
    </dischargeable>

    <mixerWagon fillUnitIndex="1" recipe="FORAGE">
        <baleTriggers>
            <baleTrigger node="baleTrigger" pickupSpeed="500"/>
        </baleTriggers>

        <mixAnimationNodes>
            <animationNode node="mainDrum"   rotSpeed="25" rotAxis="3" turnOnFadeTime="1" turnOffFadeTime="1" />
            <animationNode node="drumTop"    rotSpeed="250" rotAxis="3" turnOnFadeTime="1" turnOffFadeTime="1" />
            <animationNode node="drumBottom" rotSpeed="250" rotAxis="3" turnOnFadeTime="1" turnOffFadeTime="1" />
        </mixAnimationNodes>
    </mixerWagon>

    <turnOnVehicle>
        <sounds>
            <work template="SILAGE_MIX_LOOP_01" linkNode="0>" />
            <start template="SILAGE_MIX_START_01" linkNode="0>" />
            <stop template="SILAGE_MIX_STOP_01" linkNode="0>" />
        </sounds>
    </turnOnVehicle>

    <tipOccluder>
        <occlusionArea start="tipOcclusionArea1Start" width="tipOcclusionArea1Width" height="tipOcclusionArea1Height" />
    </tipOccluder>

    <ai>
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2" width="2.6" height="3" length="4.8" lengthOffset="0.3"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.25" maxX="1.25" minZ="-2.65" maxZ="2.1" yOffset="0.6" />
        <bendingNode minX="-0.4" maxX="0.4" minZ="2" maxZ="3.15" yOffset="0.4" />
    </foliageBending>

    <baseMaterial>
        <material name="ra142_mat" baseNode="ra142_vis">
            <shaderParameter name="colorMat0" value="KUHN_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="ra142_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|0|1" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|2" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|3|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|3|0|0" />
        <i3dMapping id="hydraulicIn01Adapter" node="0>0|0|3|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|3|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|3|1|0" />
        <i3dMapping id="hydraulicOut01Adapter" node="0>0|0|3|1|0|0" />
        <i3dMapping id="hydraulicIn02" node="0>0|0|3|2" />
        <i3dMapping id="hydraulicIn02_detached" node="0>0|0|3|2|0" />
        <i3dMapping id="hydraulicIn02Adapter" node="0>0|0|3|2|0|0" />
        <i3dMapping id="hydraulicOut02" node="0>0|0|3|3" />
        <i3dMapping id="hydraulicOut02_detached" node="0>0|0|3|3|0" />
        <i3dMapping id="hydraulicOut02Adapter" node="0>0|0|3|3|0|0" />
        <i3dMapping id="chockSupport01" node="0>0|0|4|0" />
        <i3dMapping id="chockSupport02" node="0>0|0|4|1" />
        <i3dMapping id="wheelChock01" node="0>0|0|4|2" />
        <i3dMapping id="wheelChock02" node="0>0|0|4|3" />
        <i3dMapping id="wheelLeft" node="0>0|1|0" />
        <i3dMapping id="wheelRight" node="0>0|1|1" />
        <i3dMapping id="supportCrank" node="0>0|2|0|0" />
        <i3dMapping id="supportArm" node="0>0|2|1" />
        <i3dMapping id="rearLightCircleOrange_01_left" node="0>0|3|0|0" />
        <i3dMapping id="rearLightCircleOrange_01_right" node="0>0|3|0|1" />
        <i3dMapping id="rearLightCircleRed_01_1" node="0>0|3|0|2" />
        <i3dMapping id="rearLightCircleRed_01_2" node="0>0|3|0|3" />
        <i3dMapping id="bigTriangle_1" node="0>0|3|0|4" />
        <i3dMapping id="yellowRound_01_1" node="0>0|3|0|5" />
        <i3dMapping id="yellowRound_01_2" node="0>0|3|0|6" />
        <i3dMapping id="plateNumberLight02_01" node="0>0|3|0|7" />
        <i3dMapping id="plateNumberLight02_02" node="0>0|3|0|8" />
        <i3dMapping id="backLightsHigh" node="0>0|3|1" />
        <i3dMapping id="licensePlateLightHigh" node="0>0|3|2" />
        <i3dMapping id="turnLightLeftBack" node="0>0|3|3" />
        <i3dMapping id="turnLightRightBack" node="0>0|3|4" />
        <i3dMapping id="mainDrum" node="0>0|4|0" />
        <i3dMapping id="drumTop" node="0>0|4|1" />
        <i3dMapping id="drumBottom" node="0>0|4|2" />
        <i3dMapping id="bottomDoor" node="0>0|5|0" />
        <i3dMapping id="hydraulicBottomDoorRef" node="0>0|5|0|0" />
        <i3dMapping id="topDoor" node="0>0|5|1" />
        <i3dMapping id="topDoorArmRef" node="0>0|5|1|0" />
        <i3dMapping id="topDoorArm" node="0>0|5|2" />
        <i3dMapping id="topDoorArmPart" node="0>0|5|2|0" />
        <i3dMapping id="hydraulicTopDoorArmRef" node="0>0|5|2|1" />
        <i3dMapping id="hydraulicTopDoorArm" node="0>0|5|3" />
        <i3dMapping id="hydraulicTopDoorArmPunch" node="0>0|5|3|0" />
        <i3dMapping id="hydraulicBottomDoor" node="0>0|5|4" />
        <i3dMapping id="hydraulicBottomDoorPunch" node="0>0|5|4|0" />
        <i3dMapping id="topDoorArmRefFrame" node="0>0|5|5" />
        <i3dMapping id="hydraulicBottomDoorRefFrame" node="0>0|5|6" />
        <i3dMapping id="hydraulicTopDoorArmRefFrame" node="0>0|5|7" />
        <i3dMapping id="exactFillRootNode" node="0>0|7" />
        <i3dMapping id="baleTrigger" node="0>0|8" />
        <i3dMapping id="fillVolume" node="0>0|9|0" />
        <i3dMapping id="unloadInfoFront" node="0>0|9|1" />
        <i3dMapping id="unloadInfoBack" node="0>0|9|2" />
        <i3dMapping id="dischargeNodeLeft" node="0>0|10" />
        <i3dMapping id="tipOcclusionArea1Start" node="0>0|11|0" />
        <i3dMapping id="tipOcclusionArea1Width" node="0>0|11|1" />
        <i3dMapping id="tipOcclusionArea1Height" node="0>0|11|2" />
        <i3dMapping id="numbersFillLevel" node="0>0|12" />
        <i3dMapping id="licensePlateBack" node="0>0|13" />
        <i3dMapping id="unloadEffectFrontLeft" node="0>0|14|0" />
    </i3dMappings>
</vehicle>
