﻿<?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>PF 2.24 Plus</name>
        <specs>
            <neededPower>120</neededPower>
        </specs>
        <functions>
            <function>$l10n_function_feeder</function>
        </functions>
        <storePacks>
            <storePack>STARTER_FORAGE</storePack>
        </storePacks>
        <image>$data/vehicles/faresin/pf224/store_pf224.png</image>
        <price>50000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>FARESIN</brand>
        <category>animals</category>
        <shopTranslationOffset>0 0.105 0</shopTranslationOffset>
        <shopRotationOffset>-1.752 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1382400</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>222208</indexBufferMemoryUsage>
        <textureMemoryUsage>2293760</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mixerWagon</typeDesc>
        <filename>$data/vehicles/faresin/pf224/pf224.i3d</filename>
        <size width="3.7" length="8.5" lengthOffset="1"/>
        <components maxMass="20000">
            <component centerOfMass="0 0.6 0.3" solverIterationCount="10" mass="7920" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TRAILER" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/380_55R17.xml" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics tipOcclusionAreaGroupId="1" restLoad="1.9" repr="wheelFrontLeft"  forcePointRatio="0.3" initialCompression="18" suspTravel="0.1" spring="98" damper="25" yOffset="-0.0265" />
                        <wheelChock parkingNode="wheelChock01_01"/>
                        <wheelChock parkingNode="wheelChock01_02" isInverted="true" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/380_55R17.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics tipOcclusionAreaGroupId="1" restLoad="1.9" repr="wheelFrontRight" forcePointRatio="0.3" initialCompression="18" suspTravel="0.1" spring="98" damper="25" yOffset="-0.0265" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/380_55R17.xml" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics tipOcclusionAreaGroupId="1" restLoad="1.9" repr="wheelBackLeft"   forcePointRatio="0.3" initialCompression="18" suspTravel="0.1" spring="98" damper="25" yOffset="0.007" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/380_55R17.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics tipOcclusionAreaGroupId="1" restLoad="1.9" repr="wheelBackRight"  forcePointRatio="0.3" initialCompression="18" suspTravel="0.1" spring="98" damper="25" yOffset="0.007" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0>FARESIN_GREEN1</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelFrontLeft"  filename="$data/shared/wheels/hubs/hub_n8_6.xml" isLeft="true"  scale="0.25 0.25 0.25" />
            <hub linkNode="wheelFrontRight" filename="$data/shared/wheels/hubs/hub_n8_6.xml" isLeft="false" scale="0.25 0.25 0.25" />
            <hub linkNode="wheelBackLeft"   filename="$data/shared/wheels/hubs/hub_n8_6.xml" isLeft="true"  scale="0.25 0.25 0.25" />
            <hub linkNode="wheelBackRight"  filename="$data/shared/wheels/hubs/hub_n8_6.xml" isLeft="false" scale="0.25 0.25 0.25" />
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="trailer" attacherHeight="0.59"/>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <brakeForce force="0.7" maxForce="1.5" maxForceMass="19000"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="1.4" diameter="0.021" straighteningFactor="1.5" >
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1.4" diameter="0.021" straighteningFactor="1.5" >
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="electric" node="hydraulicIn02" length="1.3" diameter="0.021" straighteningFactor="1.5" >
            <objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01_detachedAdapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01_detachedAdapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="hydraulicIn02_detachedAdapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" detachNode="ptoDetachNode" aboveAttacher="true" />
    </powerTakeOffs>

    <powerConsumer ptoRpm="470" neededMinPtoPower="40" neededMaxPtoPower="40" />

    <lights>
        <sharedLight linkNode="redTriangle_01_01"  filename="$data/shared/assets/reflectors/lizard/redTriangle_01.xml" />
        <sharedLight linkNode="redTriangle_01_02"  filename="$data/shared/assets/reflectors/lizard/redTriangle_01.xml" />
        <sharedLight linkNode="rearLight22Red"     filename="$data/shared/assets/lights/lizard/rearLight22Red.xml" />
        <sharedLight linkNode="rearLight22Red1"    filename="$data/shared/assets/lights/lizard/rearLight22Red.xml" />
        <sharedLight linkNode="rearLight22Orange1" filename="$data/shared/assets/lights/lizard/rearLight22Orange_right.xml" />
        <sharedLight linkNode="rearLight22Orange"  filename="$data/shared/assets/lights/lizard/rearLight22Orange_left.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="backLightsHigh1" lightTypes="0"/>
                <light node="licensePlateLightHigh" lightTypes="0"/>
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
                <brakeLight node="backLightsHigh1" />
            </high>
        </realLights>
    </lights>

    <licensePlates>
        <licensePlate node="licensePlateBack" position="BACK" preferedType="ELONGATED" placementArea="0.07 0.27 0.1 0.27"/>
    </licensePlates>

    <animations>
        <animation name="tipLeft">
            <part node="door" startTime="0" endTime="1" startTrans="0 0 0" endTrans="0 0 -0.5"/>
            <part node="flapLeft" startTime="0" endTime="0.5" startRot="0 0 0" endRot="0 0 30"/>
            <part node="flapLeftJoint" startTime="0" endTime="0.5" startRot="0 0 0" endRot="0 0 -30"/>
        </animation>
        <animation name="tipRight">
            <part node="door" startTime="0" endTime="1" startTrans="0 0 0" endTrans="0 0 -0.5"/>
            <part node="flapRight" startTime="0" endTime="0.5" startRot="0 0 0" endRot="0 0 -30"/>
            <part node="flapRightJoint" startTime="0" endTime="0.5" startRot="0 -15.83 0" endRot="1.813 -12.317 39.642"/>
        </animation>
        <animation name="moveSupport">
            <part node="supportArm"    startTime="0" endTime="0.5" startTrans="0 0.055 0" endTrans="0 -0.22 0" />

            <sound template="clackVar1" startTime="0.19" volumeScale="2" pitchScale="1.2" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="door" playSound="true">
                <dependentPart node="hydraulic" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="hydraulic" referencePoint="hydraulicRef" referenceFrame="hydraulicRef">
                <translatingPart node="hydraulicPunch" />
            </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="24000" >
                        <exactFillRootNode node="exactFillRootNode" />
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" maxDelta="0.05" maxAllowedHeapAngle="20" fillUnitIndex="1" maxSubDivEdgeLength="1.5" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <unloadInfos>
            <unloadInfo>
                <node node="unloadNodeFront" width="2" length="4.0" />
            </unloadInfo>
        </unloadInfos>
    </fillVolume>

    <dischargeable>
        <dischargeNode node="dischargeNodeLeft" emptySpeed="1700" fillUnitIndex="1" unloadInfoIndex="1">
            <info width="1.0" length="0.5"/>
            <effects>
                <effectNode effectClass="TypedMotionPathEffect" effectType="MIXERWAGON" linkNode="unloadEffectFrontLeft">
                    <motionPathEffect textureFilename="$data/vehicles/faresin/pf224/unloadEffectFrontLeftArray.dds" numRows="8" rowLength="15" delay="0"/>
                </effectNode>
            </effects>
            <dischargeStateSound template="mixerLoop" fadeIn="1.0" fadeOut="3.0"/>
        </dischargeNode>
        <dischargeNode node="dischargeNodeRight" emptySpeed="1700" fillUnitIndex="1" unloadInfoIndex="1">
            <info width="1.0" length="0.5"/>
            <effects>
                <effectNode effectClass="TypedMotionPathEffect" effectType="MIXERWAGON" linkNode="unloadEffectFrontRight">
                    <motionPathEffect textureFilename="$data/vehicles/faresin/pf224/unloadEffectFrontRightArray.dds" numRows="8" rowLength="15" delay="0"/>
                </effectNode>
            </effects>
            <dischargeStateSound template="mixerLoop" fadeIn="1.0" fadeOut="3.0"/>
        </dischargeNode>
    </dischargeable>

    <trailer>
        <trailerConfigurations>
            <trailerConfiguration name="$l10n_configuration_valueDefault" price="0">
                <trailer>
                    <tipSide name="$l10n_info_tipSideLeft" dischargeNodeIndex="1">
                        <animation name="tipLeft" speedScale="1.0" />
                        <animationNodes>
                            <animationNode node="unloadingBelt" rotSpeed="60"  rotAxis="1" shaderComponentScale="0 -1 0 0" shaderParameterName="offsetUV" />
                        </animationNodes>
                    </tipSide>
                    <tipSide name="$l10n_info_tipSideRight" dischargeNodeIndex="2">
                        <animation name="tipRight" speedScale="1.0" />
                        <animationNodes>
                            <animationNode node="unloadingBelt" rotSpeed="60"  rotAxis="1" shaderComponentScale="0 1 0 0" shaderParameterName="offsetUV" />
                        </animationNodes>
                    </tipSide>
                </trailer>
            </trailerConfiguration>
        </trailerConfigurations>
    </trailer>

    <mixerWagon fillUnitIndex="1" recipe="FORAGE">
        <baleTriggers>
            <baleTrigger node="baleTrigger" pickupSpeed="500"/>
        </baleTriggers>

        <mixAnimationNodes>
            <animationNode node="mixerFront"   rotSpeed="-150" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="2" />
            <animationNode node="mixerBack"    rotSpeed="-150" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="2" />
        </mixAnimationNodes>
    </mixerWagon>

    <turnOnVehicle>
        <sounds>
            <work template="mixerHeaderLoop" linkNode="0>" />
            <start template="mixerHeaderStart" linkNode="0>" />
            <stop template="mixerHeaderStop" linkNode="0>" />
        </sounds>
    </turnOnVehicle>

    <tipOccluder>
        <occlusionArea start="tipOcclusionAreaStart" width="tipOcclusionAreaWidth" height="tipOcclusionAreaHeight" />
    </tipOccluder>

    <ai>
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2 3 4" width="2.6" height="3.5" length="6.5" lengthOffset="0.5"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.2" maxX="1.2" minZ="-2.45" maxZ="3.4" yOffset="0.4" />
        <bendingNode minX="-0.3" maxX="0.3" minZ="3.4" maxZ="4.7" yOffset="0.3" />
    </foliageBending>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <baseMaterial>
        <material name="pf224_mat" baseNode="pf224_lod0">
            <shaderParameter name="colorMat0" value="FARESIN_GREEN1"/>
            <shaderParameter name="colorMat5" value="WALTERSCHEID_YELLOW1"/>
        </material>
    </baseMaterial>

    <i3dMappings>
        <i3dMapping id="pf224_main_component1" node="0>" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|0|1" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|1|0" />
        <i3dMapping id="supportArm" 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="hydraulicIn01_detachedAdapter" 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="hydraulicOut01_detachedAdapter" 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="hydraulicIn02_detachedAdapter" node="0>0|0|3|2|0|0" />
        <i3dMapping id="wheelChock01_01" node="0>0|1|0" />
        <i3dMapping id="wheelChock01_02" node="0>0|1|1" />
        <i3dMapping id="wheelFrontLeft" node="0>0|1|2" />
        <i3dMapping id="wheelFrontRight" node="0>0|1|3" />
        <i3dMapping id="wheelBackLeft" node="0>0|1|4" />
        <i3dMapping id="wheelBackRight" node="0>0|1|5" />
        <i3dMapping id="redTriangle_01_02" node="0>0|2|0|0" />
        <i3dMapping id="redTriangle_01_01" node="0>0|2|0|1" />
        <i3dMapping id="rearLight22Red1" node="0>0|2|0|2" />
        <i3dMapping id="rearLight22Orange1" node="0>0|2|0|3" />
        <i3dMapping id="rearLight22Red" node="0>0|2|0|4" />
        <i3dMapping id="rearLight22Orange" node="0>0|2|0|5" />
        <i3dMapping id="plateNumberLight02_01" node="0>0|2|0|6" />
        <i3dMapping id="plateNumberLight02_02" node="0>0|2|0|7" />
        <i3dMapping id="backLightsHigh1" node="0>0|2|1|0" />
        <i3dMapping id="licensePlateLightHigh" node="0>0|2|1|1" />
        <i3dMapping id="turnLightLeftBack" node="0>0|2|2|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|2|2|1" />
        <i3dMapping id="mixerFront" node="0>0|3|0" />
        <i3dMapping id="mixerBack" node="0>0|3|1" />
        <i3dMapping id="hydraulic" node="0>0|3|2" />
        <i3dMapping id="hydraulicPunch" node="0>0|3|2|0" />
        <i3dMapping id="door" node="0>0|3|3|0" />
        <i3dMapping id="hydraulicRef" node="0>0|3|3|0|1" />
        <i3dMapping id="flapLeft" node="0>0|3|4" />
        <i3dMapping id="flapLeftJoint" node="0>0|3|4|2" />
        <i3dMapping id="flapRight" node="0>0|3|5" />
        <i3dMapping id="flapRightJoint" node="0>0|3|5|2" />
        <i3dMapping id="dischargeNodeLeft" node="0>0|4|0" />
        <i3dMapping id="dischargeNodeRight" node="0>0|4|1" />
        <i3dMapping id="unloadNodeFront" node="0>0|4|2" />
        <i3dMapping id="unloadingBelt" node="0>0|4|3" />
        <i3dMapping id="unloadEffectFrontLeft" node="0>0|5|0" />
        <i3dMapping id="unloadEffectFrontRight" node="0>0|5|1" />
        <i3dMapping id="tipOcclusionAreaStart" node="0>0|6|0" />
        <i3dMapping id="tipOcclusionAreaWidth" node="0>0|6|1" />
        <i3dMapping id="tipOcclusionAreaHeight" node="0>0|6|2" />
        <i3dMapping id="licensePlateBack" node="0>0|7" />
        <i3dMapping id="exactFillRootNode" node="0>0|8|0" />
        <i3dMapping id="baleTrigger" node="0>0|8|1" />
        <i3dMapping id="fillVolume" node="0>0|8|2" />
        <i3dMapping id="pf224_lod0" node="0>0|9|5|0" />
    </i3dMappings>
</vehicle>
