﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="forageWagon">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Bergmann Carex 38S</en>
        <de>Bergmann Carex 38S</de>
    </name>
    <typeDesc>$l10n_TypeDesc_ForageWagon</typeDesc>
    <filename>data/vehicles/trailers/bergmann/bergmannCarex38S.i3d</filename>

    <size width="3.5" length="12.5"/>

    <powerConsumer ptoRpm="500" neededPtoPower="40"/>
    <speedLimit value="25" />

    <wheels autoRotateBackSpeed="1.0">
        <wheel  restLoad="2.5" repr="0>0" driveNode="0>0|0" radius="0.675" width="0.71" initialCompression="20" suspTravel="0.15" spring="40" damper="20" mass="0.25" />
        <wheel  restLoad="2.5" repr="0>1"                   radius="0.675" width="0.71" initialCompression="20" suspTravel="0.15" spring="40" damper="20" mass="0.25" />
        <wheel  restLoad="2.5" repr="0>2" driveNode="0>2|0" radius="0.675" width="0.71" initialCompression="20" suspTravel="0.15" spring="40" damper="20" mass="0.25" hasTyreTracks="true" tyreTrackAtlasIndex="3" steeringAxleScale="-0.7" steeringAxleRotMax="25" steeringAxleRotMin="-25" />
        <wheel  restLoad="2.5" repr="0>3" driveNode="0>3|0" radius="0.675" width="0.71" initialCompression="20" suspTravel="0.15" spring="40" damper="20" mass="0.25" hasTyreTracks="true" tyreTrackAtlasIndex="3" steeringAxleScale="-0.7" steeringAxleRotMax="25" steeringAxleRotMin="-25" />
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="2|0" linkNode="0>0|0"  filename="$data/vehicles/wheels/trelleborg/trelleborgT404_710_45_26_5.i3d" />
        <dynamicallyLoadedPart node="2|1" linkNode="0>1"   filename="$data/vehicles/wheels/trelleborg/trelleborgT404_710_45_26_5.i3d" />
        <dynamicallyLoadedPart node="2|0" linkNode="0>2|0" filename="$data/vehicles/wheels/trelleborg/trelleborgT404_710_45_26_5.i3d" />
        <dynamicallyLoadedPart node="2|1" linkNode="0>3|0" filename="$data/vehicles/wheels/trelleborg/trelleborgT404_710_45_26_5.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="0>4|4|0|0" filename="$data/vehicles/wheels/trelleborg/trelleborgT510_18X8_50_8.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="0>4|4|0|1" filename="$data/vehicles/wheels/trelleborg/trelleborgT510_18X8_50_8.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>0|1|0" filename="$data/vehicles/shared/wheelChock01.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>0|1|1" filename="$data/vehicles/shared/wheelChock01.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>4|17|0" filename="$data/vehicles/shared/wheelChock01.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>4|17|1" filename="$data/vehicles/shared/wheelChock01.i3d" />
    </dynamicallyLoadedParts>

    <brakeForce>3</brakeForce>

    <steeringAxleAngleScale startSpeed="5" endSpeed="90" />

    <lightCoronas>
        <lightCorona index="0>4|6|2" />
    </lightCoronas>

    <brakeLights>
        <brakeLight index="0>4|6|3" />
    </brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>4|6|4|0" />
        <turnSignalRight index="0>4|6|4|1" />
    </turnSignals>

    <workAreas>
        <workArea startIndex="0>9" widthIndex="0>10" heightIndex="0>11" type="forageWagon" />
    </workAreas>

    <groundReferenceNodes>
        <groundReferenceNode index="0>4|4|0" threshold="1" />
    </groundReferenceNodes>

    <fillVolumes>
        <fillVolume index="0>4|13|0" maxAllowedHeapAngle="40" scrollSpeedDischarge="0 0 0.4" scrollSpeedLoad="0 0 0.1" />
    </fillVolumes>

    <fillVolumeHeights>
        <fillVolumeHeight fillVolumeId="1">
            <refNode index="0>14|0" />
            <refNode index="0>14|1" />
            <node index="0>8" baseScale="1.7 1 1" transAxis="0 0 0" scaleAxis="0 1 0"/>
        </fillVolumeHeight>
    </fillVolumeHeights>

    <fillVolumeLoadInfo index="0>13" width="1.4" length="1.0" />

    <capacity>38000</capacity>

    <forageWgnSound file="$data/vehicles/trailers/forageWagon.wav" pitchOffset="1" volume="1.0" />
    <cylinderedHydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="1.0" volume="1.0" />
    <fillSound file="$data/maps/sounds/siloFillSound.wav" pitchOffset="1.0" volume="1.5" />

    <inputAttacherJoints>
        <inputAttacherJoint index="0>4|0|0" jointType="trailerLow" indexPTO="0>4|16" />
    </inputAttacherJoints>

    <fillRootNode index="0>" />
    <exactFillRootNode index="0>6" />
    <fillAutoAimTargetNode index="0>7" />
    <fillMassNode index="0>" />

    <tipReferencePoints>
        <tipReferencePoint index="0>5" width="2.5" />
    </tipReferencePoints>

    <tipAnimations>
        <tipAnimation speedScale="1" animationName="tipAnimationBack" dischargeStartTime="1.0" dischargeEndTime="25" >
            <dischargeParticleSystems>
                <dischargeParticleSystem type="chaff"           node="0>8" psRootNode="0|0" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/unloadingBackParticles.i3d" />
                <dischargeParticleSystem type="grass_windrow"   node="0>8" psRootNode="0|6" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/unloadingBackParticles.i3d" />
                <dischargeParticleSystem type="wheat_windrow"   node="0>8" psRootNode="0|5" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/unloadingBackParticles.i3d" />
                <dischargeParticleSystem type="barley_windrow"  node="0>8" psRootNode="0|5" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/unloadingBackParticles.i3d" />
            </dischargeParticleSystems>
            <fillVolumeDischargeInfo index="0>12" width="1.4" length="1.0" alsoUseLoadInfoForDischarge="true" loadInfoFillFactor="0.98" loadInfoSizeScale="3 3" />
            <fillVolumeHeight index="1"/>
        </tipAnimation>
    </tipAnimations>

    <fillTypes fruitTypes="chaff grass_windrow wheat_windrow barley_windrow"/>

    <mouseControls>
        <mouseControl iconFilename="$dataS2/menu/moveControls/topDoor.png" axis="AXIS_FRONTLOADER_ARM" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/drawbar.png" axis="AXIS_FRONTLOADER_TOOL" />
    </mouseControls>

    <movingTools>
        <movingTool index="0>4|12|0" rotSpeed="20" rotAcceleration="160" rotMax="100" rotMin="0" axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="2" rotationAxis="1" >
            <dependentPart index="0>4|12|1" />
        </movingTool>
        <movingTool index="0>4|12|0|0" rotSpeed="20" rotAcceleration="160" rotMax="50" rotMin="0" axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="0.6" rotationAxis="1" >
            <dependentPart index="0>4|12|0|1" />
        </movingTool>

        <movingTool index="0>4|0" inputAttacherJoint="true" rotSpeed="10" rotAcceleration="100" rotMax="20" rotMin="0" axis="AXIS_FRONTLOADER_TOOL" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="false" speedFactor="0.3" rotationAxis="1" >
            <dependentPart index="0>4|1" />
            <dependentPart index="0>4|2|0" />
        </movingTool>

        <movingTool index="0>4|6" >
            <dependentPart index="0>4|7" />
        </movingTool>

        <movingTool index="0>4|4">
            <dependentPart index="0>4|2|0" />
        </movingTool>

        <movingTool index="0>4|2" >
            <dependentPart index="0>4|2|0" />
            <dependentPart index="0>4|5" />
        </movingTool>
    </movingTools>

    <movingParts>
        <!-- chaffLid hydraulics-->
        <movingPart index="0>4|12|1" referencePoint="0>4|12|0|2" referenceFrame="0>4|12|4">
            <translatingPart index="0>4|12|1|0" />
            <dependentPart index="0>4|12|2" />
            <dependentPart index="0>4|12|3" />
        </movingPart>
        <movingPart index="0>4|12|2" referencePoint="0>4|12|1|1" referenceFrame="0>4|12|1|1" scaleZ="true" />
        <movingPart index="0>4|12|3" referencePoint="0>4|12|1|2" referenceFrame="0>4|12|1|2" scaleZ="true" />
        <movingPart index="0>4|12|0|1" referencePoint="0>4|12|0|0|0" referenceFrame="0>4|12|0|0|0">
            <translatingPart index="0>4|12|0|1|0" />
        </movingPart>
        <movingPart index="0>4|7" referencePoint="0>4|6|0" referenceFrame="0>4|15">
            <translatingPart index="0>4|7|0" />
        </movingPart>
        <movingPart index="0>4|1" referencePoint="0>4|0|1" referenceFrame="0>">
            <translatingPart index="0>4|1|0" />
        </movingPart>

        <movingPart index="0>4|5" localReferencePoint="0>4|5|0" referencePoint="0>4|4|1" referenceFrame="0>4|14">
            <dependentPart index="0>4|5|0" />
        </movingPart>
        <movingPart index="0>4|5|0" referencePoint="0>4|4|1" referenceFrame="0>4|4|1" scaleZ="true" />

        <movingPart index="0>2|1" referencePoint="0>3|1" referenceFrame="0>3|1" scaleZ="true" playSound="false" isActiveDirty="true" >
            <dependentPart index="0>4|10" />
        </movingPart>
        <movingPart index="0>4|10" referencePoint="0>3|2" referenceFrame="0>3|2" playSound="false" >
            <translatingPart index="0>4|10|0" />
        </movingPart>

        <movingPart index="0>4|2|0" referencePoint="0>4|0|2" referenceFrame="0>4|0|2" >
            <dependentPart index="0>4|2|0|0" />
        </movingPart>
        <movingPart index="0>4|2|0|0" referencePoint="0>4|0|2" referenceFrame="0>4|0|2" scaleZ="true" />
    </movingParts>

    <animations>
        <!-- move support wheel down/up-->
        <animation name="moveSupport">
            <part node="0>0|1" startTime="0" endTime="0.05" visibility="false" />
            <part node="0>4|17" startTime="0" endTime="0.05" visibility="true" />
            <part node="0>0|1" startTime="0.05" endTime="0.1" visibility="true" />
            <part node="0>4|17" startTime="0.05" endTime="0.1" visibility="false" />
            <part node="0>4|8" startTime="0" duration="1" startTrans="0.37614 1.73009 3.56136" endTrans="0.37614 0.79307 3.56136" />
        </animation>

        <!-- backtipping -->
        <animation name="tipAnimationBack">
            <part node="0>4|6" startTime="0" endTime="2" startRot="0 0 0" endRot="90 0 0" />
        </animation>

        <!-- rotate pickup down/up -->
        <animation name="rotatePickup">
            <part node="0>4|2" startTime="0" duration="1.5" startRot="-36 0 0" endRot="0 0 0" />
            <part node="0>4|4" startTime="0" duration="1.5" startRot="-30 0 0" endRot="0 0 0" />
        </animation>
    </animations>

    <pickupAnimation name="rotatePickup" lowerSpeed="2" liftSpeed="-1" isDefaultLowered="false" />
    <support animationName="moveSupport" />

    <tipRotationNodes>
        <tipRotationNode index="0>4|11|0" rotSpeed="880"  type="trailer" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
        <tipRotationNode index="0>4|11|1" rotSpeed="-880" type="trailer" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
        <tipRotationNode index="0>4|11|2" rotSpeed="880"  type="trailer" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
    </tipRotationNodes>

    <tipScrollerNodes>
        <tipScrollerNode index="0>4|9" shaderParameterName="offsetUV" scrollSpeed="0.1" shaderParameterComponent="1" turnOnFadeTime="1" turnOffFadeTime="1" />
    </tipScrollerNodes>

    <turnedOnTipScrollerSpeedFactor value="0.5"/>

    <turnedOnRotationNodes>
        <turnedOnRotationNode index="0>4|11|3" rotSpeed="-1200" type="forageWagon" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
    </turnedOnRotationNodes>

    <speedRotatingParts>
        <speedRotatingPart index="0>4|4|0" radius="0.2" refNodeIndex="0" onlyActiveWhenLowered="true" />
        <speedRotatingPart index="0>4|2|1" radius="0.4" refNodeIndex="0" onlyActiveWhenLowered="true" rotateOnlyIfFillLevelIncreased="true" />
    </speedRotatingParts>

    <washable dirtDuration="90" washDuration="1" workMultiplier="4" />

    <driveGroundParticleSystems>
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="1" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="2" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="3" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="4" />
    </driveGroundParticleSystems>

    <components count="1">
        <component1 centerOfMass="0 0.7 -1.2" solverIterationCount="10" />
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" fileTurnedOn="$dataS2/menu/schemas/implementSchemaTurnedOn.png" fileSelectedTurnedOn="$dataS2/menu/schemas/implementSchemaSelectedTurnedOn.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>
