﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="tractor" 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>Z-25K</name>
        <specs>
            <power>24</power>
            <maxSpeed>20</maxSpeed>
            <combination xmlFilename="$data/vehicles/boeckmann/bigMasterWesternWCF/bigMasterWesternWCF.xml"/>
            <combination xmlFilename="$data/vehicles/boeckmann/mhal4320/mhal4320.xml"/>
            <combination xmlFilename="$data/vehicles/boeckmann/kk301827H/kk301827H.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_tractor</function>
        </functions>
        <image>$data/vehicles/zetor/z25k/store_z25k.png</image>
        <price>9500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>ZETOR</brand>
        <category>tractorsS</category>
        <shopTranslationOffset>0 0.042 0</shopTranslationOffset>
        <shopRotationOffset>0.421 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>2489600</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>876288</indexBufferMemoryUsage>
        <textureMemoryUsage>1638400</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>746330</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_tractor</typeDesc>
        <filename>$data/vehicles/zetor/z25k/z25k.i3d</filename>
        <sounds filename="$data/vehicles/zetor/z25k/sounds/z25k.xml"/>
        <size width="2.5" length="3.5" height="2.5" lengthOffset="-0.3"/>
        <components>
            <component centerOfMass="0 0.8 -0.2" solverIterationCount="20" mass="731" />
            <component centerOfMass="0 0 0"  solverIterationCount="28" mass="725" />
            <joint component1="1" component2="2" node="frontAxisJoint" rotLimit="0 0 14" rotLimitSpring="0 0 4000" rotLimitDamping="0 0 3" maxRotDriveForce="0 0 3" rotDriveRotation="0 0 0" rotDriveSpring="0 0 3" rotDriveDamping="0 0 3" breakable="false"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="VEHICLE" />
        <mapHotspot type="TRACTOR" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="TRELLEBORG" saveId="TRELLEBORG_DEFAULT">
                <wheels autoRotateBackSpeed="2.3">
                    <wheel filename="$data/shared/wheels/tires/bkt/TF8181/6_50__16.xml" isLeft="true" hasTireTracks="true" hasParticles="true">
                        <physics rotSpeed="1" restLoad="0.6" repr="axisFrontLeft"  driveNode="wheelFrontLeft"  forcePointRatio="0.2" initialCompression="50" suspTravel="0.07" spring="15" damper="25" yOffset="0.017" brakeFactor="0"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/bkt/TF8181/6_50__16.xml" isLeft="false" hasTireTracks="true" hasParticles="true">
                        <physics rotSpeed="1" restLoad="0.6" repr="axisFrontRight" driveNode="wheelFrontRight" forcePointRatio="0.2" initialCompression="50" suspTravel="0.07" spring="15" damper="25" yOffset="0.017" brakeFactor="0"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/bkt/TR135/12_4__38.xml" isLeft="true" hasTireTracks="true" hasParticles="true">
                        <physics rotSpeed="0" restLoad="0.5" repr="wheelBackLeft"  forcePointRatio="0.2" initialCompression="20" suspTravel="0.07" spring="15" damper="25" yOffset="0.032"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/bkt/TR135/12_4__38.xml" isLeft="false" hasTireTracks="true" hasParticles="true">
                        <physics rotSpeed="0" restLoad="0.5" repr="wheelBackRight" forcePointRatio="0.2" initialCompression="20" suspTravel="0.07" spring="15" damper="25" yOffset="0.032"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor>ZETOR_RED1</rimColor>

        <hubs>
            <color0>ZETOR_GREEN2</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelFrontLeft"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.08 0.15 0.15" />
            <hub linkNode="wheelFrontRight" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.08 0.15 0.15" />
        </hubs>

        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="40" rotMax="45" rotCenterWheel1="3" rotCenterWheel2="4" />
        </ackermannSteeringConfigurations>
    </wheels>

    <lights>
        <states>
            <state lightTypes="0" />
        </states>

        <realLights>
            <low>
                <light node="frontLightLow"       lightTypes="0" excludedLightTypes="3" />
                <light node="highBeamLow"         lightTypes="3" />
            </low>
            <high>
                <light node="frontLightHigh"      lightTypes="0" excludedLightTypes="3" />
                <light node="backLightsHigh"      lightTypes="0"/>
                <light node="highBeamHigh"        lightTypes="3"/>
                <brakeLight node="backLightsHigh" />
            </high>
        </realLights>

        <defaultLights>
            <defaultLight shaderNode="frontlightStatic01"      lightTypes="0 3" />
            <defaultLight shaderNode="frontlightStatic01Glass" lightTypes="0 3" />
            <defaultLight shaderNode="backLightsGlass_static"  lightTypes="0" />
        </defaultLights>

        <brakeLights>
            <brakeLight shaderNode="backLightsGlass_static"/>
        </brakeLights>
    </lights>

    <attacherJoints comboDuration="2">
        <attacherJoint node="attacherJointBack" upperRotationOffset="0.42" lowerRotationOffset="0.42" moveTime="2.5" comboTime="1">
            <distanceToGround lower="0.28" upper="0.85" />
            <rotationNode node="attacherJointBackRot" lowerRotation="-20 0 0" upperRotation="25 0 0" />
            <rotationNode2 node="attacherJointBackRot2" />
            <bottomArm rotationNode="attacherJointBackArmBottom" translationNode="bottomLink" referenceNode="referencePointBackBottom" zScale="-1" startRotation="-20 0 0" />
            <topArm baseNode="attacherJointBackArmTop" filename="$data/shared/assets/upperLinks/walterscheid01.i3d" zScale="-1" color="ZETOR_GREEN2"/>
            <schema position="1 0" rotation="0" invertX="false" />
        </attacherJoint>
        <attacherJoint node="trailerAttacherJointBack" jointType="trailer" lowerRotLimit="25 60 50" allowsJointLimitMovement="false" comboTime="1">
            <schema position="1 0" rotation="0" invertX="false" />
        </attacherJoint>
        <attacherJoint node="trailerAttacherJointFront" jointType="trailer" lowerRotLimit="25 65 50" lowerTransLimit="0 0 0" allowsJointLimitMovement="false" comboTime="0">
            <schema position="1 0" rotation="0" invertX="true" />
        </attacherJoint>
    </attacherJoints>

    <powerTakeOffs>
        <output attacherJointIndices="1 2" outputNode="ptoBack" />
    </powerTakeOffs>

    <enterable isTabbable="true" >
        <enterReferenceNode node="z25k_main_component1" />
        <exitPoint node="exitPoint" />

        <cameras>
            <camera node="outdoorCamera1" rotatable="true" rotateNode="outdoorCameraTarget" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="3" transMax="40" translation="0 0 3.8" rotation="-23.5 180 0" >
                <raycastNode node="cameraRaycastNode1"/>
                <raycastNode node="cameraRaycastNode2"/>
                <raycastNode node="cameraRaycastNode3"/>
            </camera>
            <camera node="indoorCamera1" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" useOutdoorSounds="true" shadowFocusBox="shadowFocusBox" />
        </cameras>

        <characterNode node="playerSkin" cameraMinDistance="0.5" spineRotation="-90 0 90" >
            <target ikChain="rightFoot" targetNode="playerRightFootTarget" />
            <target ikChain="leftFoot"  targetNode="playerLeftFootTarget" />
            <target ikChain="rightArm"  targetNode="playerRightHandTarget" />
            <target ikChain="leftArm"   targetNode="playerLeftHandTarget" />
        </characterNode>

        <characterTargetNodeModifier node="playerRightFootTarget" transitionTime="0.1" >
            <state node="playerRightFootTargetBrake" referenceNode="pedalBrake" />
        </characterTargetNodeModifier>

        <characterTargetNodeModifier node="playerLeftFootTarget" transitionTime="0.1" >
            <state node="playerLeftFootTargetClutch"   referenceNode="pedalClutch"  />
        </characterTargetNodeModifier>
    </enterable>

    <motorized>
      <consumerConfigurations>
          <consumerConfiguration>
              <consumer fillUnitIndex="1" usage="7.2" fillType="diesel" /> <!-- usage is per hour at max load and max rpm -->
          </consumerConfiguration>
      </consumerConfigurations>

        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0.5" maxSpeedRatio="1.9" wheelIndex1="3" wheelIndex2="4" />
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>

        <motorConfigurations>
            <motorConfiguration name="Z-25K" hp="25" price="0">
                <motor torqueScale="0.103" minRpm="850" maxRpm="2200" maxForwardSpeed="22" maxBackwardSpeed="8" brakeForce="1.5" lowBrakeForceScale="0.1" dampingRateScale="0.1">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
                </motor>
                <transmission autoGearChangeTime="0.5" gearChangeTime="0.4" name="$l10n_info_transmission_manual">
                    <directionChange useGear="true" reverseGearIndex="1" changeTime="0.5"/>
                    <groups type="DEFAULT" changeTime="0.5">
                        <group ratio="0.3658"  name="L" />
                        <group ratio="1"       name="S" />
                    </groups>

                    <forwardGear maxSpeed="12.2" />
                    <forwardGear maxSpeed="16.2" />
                    <forwardGear maxSpeed="25.0" />

                    <backwardGear maxSpeed="8.4" />
                </transmission>
            </motorConfiguration>
        </motorConfigurations>

        <gearLevers>
            <gearLever node="gearLever" centerAxis="3" changeTime="0.3" handsOnDelay="0.25">
                <state gear="-1" xRot="4" zRot="-4" />
                <state gear="0" xRot="0" zRot="0" />
                <state gear="1" xRot="-4" zRot="-4" />
                <state gear="2" xRot="4" zRot="4" />
                <state gear="3" xRot="-4" zRot="4" />
            </gearLever>
        </gearLevers>

        <exhaustEffects>
            <exhaustEffect node="exhaustParticle" filename="$data/effects/exhaust/exhaust.i3d" minRpmColor="0 0 0 1" maxRpmColor="0.01 0.01 0.01 5" minRpmScale="0.1" maxRpmScale="0.55" />
        </exhaustEffects>

        <animationNodes>
            <animationNode node="fan" rotSpeed="1400" rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="4"/>
        </animationNodes>

        <motorStartDuration>4000</motorStartDuration>

        <dashboards>
            <dashboard displayType="ROT" valueType="clutchPedal" node="pedalClutch"   minRot="0 0 0" maxRot="18 0 0" doInterpolation="true" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ANIMATION" valueType="motorTemperature" animName="loadingBarTemperature" minValueAnim="20" maxValueAnim="120" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </motorized>

    <drivable>
        <steeringWheel node="steeringWheel" indoorRotation="540" outdoorRotation="30" />

        <dashboards>
            <dashboard displayType="ROT" valueType="decelerationAxis" node="pedalBrake" minRot="0 0 0" maxRot="8 0 0" doInterpolation="true" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </drivable>

    <animations>
        <animation name="loadingBarTemperature">
            <part node="tempNeedle" startTime="0.0" endTime="1.0" startRot="0 0 0" endRot="0 0 -277"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="attacherJointBackArmBottom">
                <dependentPart node="mainArm" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="steeringBar" referencePoint="steeringBarRef" referenceFrame="steeringBarRef" isActiveDirty="true" maxUpdateDistance="40" scaleZ="true"/>
            <movingPart node="mainArm" localReferencePoint="mainArmPart" referencePoint="mainArmRef" referenceFrame="mainArmRefFrame" >
                <dependentPart node="mainArmPart" />
            </movingPart>
            <movingPart node="mainArmPart" referencePoint="mainArmRef" referenceFrame="mainArmRef" />
            <movingPart node="steeringBarArm01" localReferencePoint="steeringBarArm02" referencePoint="steeringBarArm02Ref" referenceFrame="steeringBarArm01RefFrame" isActiveDirty="true" maxUpdateDistance="40" limitedAxis="1">
                <dependentPart node="steeringBarArm02" />
            </movingPart>
            <movingPart node="steeringBarArm02" referencePoint="steeringBarArm02Ref" referenceFrame="steeringBarArm02Ref"/>

            <movingPart node="pedalBrakeSpring" referencePoint="pedalBrakeSpringRef" referenceFrame="pedalBrakeSpringRef" isActiveDirty="true" maxUpdateDistance="10" scaleZ="true"/>
            <movingPart node="pedalClutchSpring01" referencePoint="pedalClutchSpring01Ref" referenceFrame="pedalClutchSpring01Ref" isActiveDirty="true" maxUpdateDistance="10" scaleZ="true"/>
            <movingPart node="pedalClutchSpring02" referencePoint="pedalClutchSpring02Ref" referenceFrame="pedalClutchSpring02Ref" isActiveDirty="true" maxUpdateDistance="10" scaleZ="true"/>

            <movingPart node="pedalClutchPart01" localReferencePoint="pedalClutchPart02" referencePoint="pedalClutchPart02Ref" referenceFrame="pedalClutchPart01RefFrame" isActiveDirty="true" maxUpdateDistance="40" limitedAxis="1">
                <dependentPart node="pedalClutchPart02" />
            </movingPart>
            <movingPart node="pedalClutchPart02" referencePoint="pedalClutchPart02Ref" referenceFrame="pedalClutchPart02Ref"/>

        </movingParts>
    </cylindered>

    <suspensions>
        <suspension useCharacterTorso="true" weight="90" minRotation="0 -5 -5" maxRotation="0 5 5" suspensionParametersY="7 1" suspensionParametersZ="7 1" />
    </suspensions>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="diesel" capacity="53" />
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <dashboard>
        <groups>
            <group name="MOTOR_STARTING" isMotorStarting="true"/>
            <group name="MOTOR_ACTIVE"   isMotorStarting="true" isMotorRunning="true"/>
        </groups>
    </dashboard>

    <ai>
        <agent width="1.85" length="3.15" height="2.35" lengthOffset="0.75" frontOffset="1.9" />
        <collisionTrigger node="aiCollisionNode" width="2.0" height="2.4"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.8" maxX="0.8" minZ="-0.3" maxZ="1.25" yOffset="0.4" />
        <bendingNode minX="-0.92" maxX="0.92" minZ="-1.9" maxZ="-0.3" yOffset="0.4" />
    </foliageBending>

    <baseMaterial>
        <material name="z25k_mat" baseNode="z25k_vis">
            <shaderParameter name="colorMat0" value="ZETOR_GREEN2"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="z25k_main_component1" node="0>" />
        <i3dMapping id="z25k_vis" node="0>0" />
        <i3dMapping id="wheelBackLeft" node="0>0|0|0" />
        <i3dMapping id="wheelBackRight" node="0>0|0|1" />
        <i3dMapping id="frontlightStatic01" node="0>0|1|0|1" />
        <i3dMapping id="frontlightStatic01Glass" node="0>0|1|0|2" />
        <i3dMapping id="backLightsGlass_static" node="0>0|1|0|3" />
        <i3dMapping id="frontLightLow" node="0>0|1|1|0" />
        <i3dMapping id="highBeamLow" node="0>0|1|1|1" />
        <i3dMapping id="frontLightHigh" node="0>0|1|1|2" />
        <i3dMapping id="highBeamHigh" node="0>0|1|1|3" />
        <i3dMapping id="backLightsHigh" node="0>0|1|2|0" />
        <i3dMapping id="outdoorCameraTarget" node="0>0|2|0" />
        <i3dMapping id="outdoorCamera1" node="0>0|2|0|0" />
        <i3dMapping id="indoorCamera1" node="0>0|2|1" />
        <i3dMapping id="cameraRaycastNode1" node="0>0|2|2" />
        <i3dMapping id="cameraRaycastNode2" node="0>0|2|3" />
        <i3dMapping id="cameraRaycastNode3" node="0>0|2|4" />
        <i3dMapping id="shadowFocusBox" node="0>0|2|5" />
        <i3dMapping id="attacherJointBackRot" node="0>0|3|0|0" />
        <i3dMapping id="attacherJointBackRot2" node="0>0|3|0|0|0" />
        <i3dMapping id="attacherJointBack" node="0>0|3|0|0|0|0" />
        <i3dMapping id="attacherJointBackArmBottom" node="0>0|3|0|1" />
        <i3dMapping id="bottomLink" node="0>0|3|0|1|0" />
        <i3dMapping id="referencePointBackBottom" node="0>0|3|0|1|0|0" />
        <i3dMapping id="mainArmRef" node="0>0|3|0|1|0|1" />
        <i3dMapping id="attacherJointBackArmTop" node="0>0|3|0|2" />
        <i3dMapping id="trailerAttacherJointFront" node="0>0|3|1|0" />
        <i3dMapping id="trailerAttacherJointBack" node="0>0|3|1|1" />
        <i3dMapping id="ptoBack" node="0>0|3|2|0" />
        <i3dMapping id="exitPoint" node="0>0|4" />
        <i3dMapping id="exhaustParticle" node="0>0|5" />
        <i3dMapping id="frontAxisJoint" node="0>0|6" />
        <i3dMapping id="steeringBarArm01RefFrame" node="0>0|7|0" />
        <i3dMapping id="steeringBarArm01" node="0>0|7|0|0" />
        <i3dMapping id="steeringBarArm02" node="0>0|7|0|0|0" />
        <i3dMapping id="mainArmRefFrame" node="0>0|7|1" />
        <i3dMapping id="mainArm" node="0>0|7|1|0" />
        <i3dMapping id="mainArmPart" node="0>0|7|1|0|0" />
        <i3dMapping id="pedalBrakeSpring" node="0>0|7|2" />
        <i3dMapping id="pedalClutchSpring01" node="0>0|7|3" />
        <i3dMapping id="pedalClutchSpring02" node="0>0|7|4" />
        <i3dMapping id="pedalClutchPart01RefFrame" node="0>0|7|5" />
        <i3dMapping id="pedalClutchPart01" node="0>0|7|5|0" />
        <i3dMapping id="pedalClutchPart02" node="0>0|7|5|0|0" />
        <i3dMapping id="fan" node="0>0|7|6" />
        <i3dMapping id="steeringWheel" node="0>0|8|0|0" />
        <i3dMapping id="playerLeftHandTarget" node="0>0|8|0|0|0" />
        <i3dMapping id="playerRightHandTarget" node="0>0|8|0|0|1" />
        <i3dMapping id="tempNeedle" node="0>0|8|1|0|0" />
        <i3dMapping id="pedalBrake" node="0>0|8|2|0" />
        <i3dMapping id="pedalBrakeSpringRef" node="0>0|8|2|0|0" />
        <i3dMapping id="playerRightFootTargetBrake" node="0>0|8|2|0|1" />
        <i3dMapping id="pedalClutch" node="0>0|8|2|1" />
        <i3dMapping id="pedalClutchSpring01Ref" node="0>0|8|2|1|0" />
        <i3dMapping id="pedalClutchSpring02Ref" node="0>0|8|2|1|1" />
        <i3dMapping id="pedalClutchPart02Ref" node="0>0|8|2|1|2" />
        <i3dMapping id="playerLeftFootTargetClutch" node="0>0|8|2|1|3" />
        <i3dMapping id="gearLever" node="0>0|8|2|2" />
        <i3dMapping id="playerSkin" node="0>0|8|3|0" />
        <i3dMapping id="playerLeftFootTarget" node="0>0|8|3|1" />
        <i3dMapping id="playerRightFootTarget" node="0>0|8|3|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|9|0" />
        <i3dMapping id="z25k_axis_component2" node="1>" />
        <i3dMapping id="axisFrontLeft" node="1>0|0|0" />
        <i3dMapping id="wheelFrontLeft" node="1>0|0|0|0|0" />
        <i3dMapping id="steeringBar" node="1>0|0|0|1" />
        <i3dMapping id="steeringBarArm02Ref" node="1>0|0|0|2" />
        <i3dMapping id="axisFrontRight" node="1>0|1|0" />
        <i3dMapping id="wheelFrontRight" node="1>0|1|0|0|0" />
        <i3dMapping id="steeringBarRef" node="1>0|1|0|1" />
    </i3dMappings>
</vehicle>
