﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="treePlanter" 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>PL-75</name>
        <specs>
            <neededPower>120</neededPower>
            <workingWidth>1</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="1100" filterSpecMax="1100"/>
            <combination xmlFilename="$data/objects/pallets/treeSaplingPallet/treeSaplingPallet.xml"/>
            <combination xmlFilename="$data/objects/pallets/palletPoplar/palletPoplar.xml"/>
            <capacity unitTextOverride="$l10n_unit_pieces">1</capacity>
            <fillTypes>TREESAPLINGS POPLAR</fillTypes>
        </specs>
        <functions>
            <function>$l10n_function_forestryPlanter</function>
        </functions>
        <storePacks>
            <storePack>STARTER_POPLAR</storePack>
        </storePacks>
        <image>$data/vehicles/damcon/pl75/store_pl75.png</image>
        <price>26000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>DAMCON</brand>
        <category>wood</category>
        <shopTranslationOffset>0 0.009 0</shopTranslationOffset>
        <shopRotationOffset>0.533 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>506368</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>92928</indexBufferMemoryUsage>
        <textureMemoryUsage>1835008</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_treePlanter</typeDesc>
        <filename>$data/vehicles/damcon/pl75/pl75.i3d</filename>
        <size width="2.8" length="5.8" lengthOffset="0.45" />
        <speedLimit value="8" />
        <components>
            <component centerOfMass="0 0.5 0.5" solverIterationCount="10" mass="1420" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <powerConsumer ptoRpm="470" neededMinPtoPower="65" neededMaxPtoPower="75" />

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T421/280_60R15_5.xml" isLeft="true" hasTireTracks="true" hasParticles="true">
                        <physics restLoad="0.4" repr="wheelFrontLeft"  forcePointRatio="0.23" initialCompression="25" radius="0.29" width="0.24" mass="0.02" suspTravel="0.1" spring="15" damper="10" rotationDamping="0.0005" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T421/280_60R15_5.xml" isLeft="false" hasTireTracks="true" hasParticles="true">
                        <physics restLoad="0.4" repr="wheelFrontRight" forcePointRatio="0.23" initialCompression="25" radius="0.29" width="0.24" mass="0.02" suspTravel="0.1" spring="15" damper="10" rotationDamping="0.0005" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T421/280_60R15_5.xml" isLeft="true" hasTireTracks="true" hasParticles="true">
                        <physics restLoad="0.3" repr="wheelBackRight"  forcePointRatio="0.23" initialCompression="25" radius="0.29" width="0.24" mass="0.02" suspTravel="0.1" spring="10" damper="10" rotationDamping="0.0005" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T421/280_60R15_5.xml" isLeft="false" hasTireTracks="true" hasParticles="true">
                        <physics restLoad="0.3" repr="wheelBackLeft"   forcePointRatio="0.23" initialCompression="25" radius="0.29" width="0.24" mass="0.02" suspTravel="0.1" spring="10" damper="10" rotationDamping="0.0005" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor>DAMCON_RED1</rimColor>

        <hubs>
            <color0>SHARED_DA_METAL_BLACK</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelFrontLeft"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.1 0.2 0.2" />
            <hub linkNode="wheelFrontRight" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.1 0.2 0.2" />
            <hub linkNode="wheelBackLeft"   filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.1 0.15 0.15" >
                <color0>DAMCON_RED1</color0>
            </hub>
            <hub linkNode="wheelBackRight"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true" scale="0.1 0.15 0.15" >
                <color0>DAMCON_RED1</color0>
            </hub>
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" upperRotationOffset="0" lowerRotationOffset="20" allowsLowering="true">
                <distanceToGround lower="0.4" upper="1.0" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <brakeForce force="0.05"/>
    </attachable>

    <lights>
        <sharedLight linkNode="sideMarker01"  filename="$data/shared/assets/lights/lizard/rearLight26Orange.xml" />
        <sharedLight linkNode="sideMarker02"  filename="$data/shared/assets/lights/lizard/rearLight26Orange.xml" />
        <sharedLight linkNode="sideMarker03"  filename="$data/shared/assets/lights/lizard/rearLight26Orange.xml" />
        <sharedLight linkNode="sideMarker04"  filename="$data/shared/assets/lights/lizard/rearLight26Orange.xml" />
    </lights>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" detachNode="ptoDetachNode" inputNode="ptoInputNode" aboveAttacher="true">
            <objectChange node="ptoHolder" rotationActive="0 0 0" rotationInactive="-40 0 0"/>
        </input>
    </powerTakeOffs>

    <groundReferenceNodes>
        <groundReferenceNode node="treeNode" threshold="0.1" depthNode="depthNode" />
    </groundReferenceNodes>

    <workParticles>
        <particleAnimation>
            <node node="soil" refNodeIndex="1" materialType="SOIL" maxDepth="-0.01" />
        </particleAnimation>

        <particle>
            <node node="soilEmitter" refNodeIndex="1" particleType="SOIL" />
            <node node="smokeEmitter" refNodeIndex="1" particleType="SOIL_SMOKE" />
        </particle>
    </workParticles>

    <animations>
        <animation name="moveSupport">
            <part node="wheelAxis" startTime="0" duration="0.6" startTrans="0 0.525 0.723" endTrans="0 0.155 0.723" />

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="0.59" volumeScale="1"   pitchScale="0.8"/>
            <sound template="clackVar6"             startTime="0.01" direction="-1" volumeScale="1.2" pitchScale="0.8"/>
            <sound template="sheetImp02"            startTime="0.01" direction="-1" volumeScale="1.6" pitchScale="0.8"/>
            <sound template="clackVar6"             startTime="0.59" direction="1"  volumeScale="1.2" pitchScale="1"/>
            <sound template="clackVar4"             startTime="0.59" direction="1"  volumeScale="0.8" pitchScale="1.6"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="wheelAxis" wheelIndices="1 2 3 4" />
        </movingTools>
        <sounds>
            <hydraulic template="defaultHydraulicSound"/>
        </sounds>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_pieces" fillTypes="TREESAPLINGS POPLAR" capacity="0" updateMass="false" />
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <treePlanter node="treeNode" minDistance="10" palletTrigger="palletTrigger" refNodeIndex="1" saplingPalletGrabNode="treeSaplingAttacher" saplingPalletMountNode="treeSaplingAttacher">
        <sounds>
            <work template="DEFAULT_PLOW_WORK" volumeScale="1.5" linkNode="pl75" />
        </sounds>
        <animationNodes>
            <animationNode node="rotor" rotAxis="1" rotSpeed="800" turnOnFadeTime="1" turnOffFadeTime="2" />
        </animationNodes>
    </treePlanter>

    <turnOnVehicle>
        <sounds>
            <start template="STUMP_CUTTER_START" linkNode="pl75"/>
            <work  template="STUMP_CUTTER_IDLE"  linkNode="pl75"/>
            <stop  template="STUMP_CUTTER_STOP"  linkNode="pl75"/>
        </sounds>
    </turnOnVehicle>

    <ai>
        <areaMarkers leftNode="areaMarkerLeft" rightNode="areaMarkerRight" backNode="areaMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="2.4" height="2.3"/>
        <needsLowering value="true"/>
        <agentAttachment width="2.4" height="1.7" length="4.7" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.25" maxX="1.25" minZ="-2.35" maxZ="2.2" yOffset="0.7" />
    </foliageBending>

    <baseMaterial>
        <material name="pl75_mat" baseNode="damcon_vis">
            <shaderParameter name="colorMat0" value="DAMCON_YELLOW1" material="0"/>
            <shaderParameter name="colorMat1" value="DAMCON_RED1" material="0"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="pl75" node="0>" />
        <i3dMapping id="damcon_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|0|1" />
        <i3dMapping id="ptoHolder" node="0>0|0|2" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|3" />
        <i3dMapping id="topReferenceNode" node="0>0|0|4" />
        <i3dMapping id="sideMarker01" node="0>0|1|0" />
        <i3dMapping id="sideMarker02" node="0>0|1|1" />
        <i3dMapping id="sideMarker03" node="0>0|1|2" />
        <i3dMapping id="sideMarker04" node="0>0|1|3" />
        <i3dMapping id="rotor" node="0>0|2|0" />
        <i3dMapping id="wheelAxis" node="0>0|2|1" />
        <i3dMapping id="wheelFrontLeft" node="0>0|2|1|0|0" />
        <i3dMapping id="wheelFrontRight" node="0>0|2|1|0|1" />
        <i3dMapping id="wheelBackRight" node="0>0|2|1|1|0" />
        <i3dMapping id="wheelBackLeft" node="0>0|2|1|2|0" />
        <i3dMapping id="treeNode" node="0>0|3|0" />
        <i3dMapping id="treeSaplingAttacher" node="0>0|3|1" />
        <i3dMapping id="palletTrigger" node="0>0|3|2" />
        <i3dMapping id="areaMarkerLeft" node="0>0|5|0|0" />
        <i3dMapping id="areaMarkerRight" node="0>0|5|0|1" />
        <i3dMapping id="areaMarkerBack" node="0>0|5|0|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|5|1|0" />
        <i3dMapping id="sizeMarkerRight" node="0>0|5|1|1" />
        <i3dMapping id="sizeMarkerBack" node="0>0|5|1|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|5|2" />
        <i3dMapping id="soil" node="0>0|6|0|0" />
        <i3dMapping id="soilEmitter" node="0>0|6|0|1" />
        <i3dMapping id="smokeEmitter" node="0>0|6|0|2" />
        <i3dMapping id="depthNode" node="0>0|6|1" />
        <i3dMapping id="containerHydraulic" node="0>0|7|3" />
    </i3dMappings>
</vehicle>
