<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="mtz82">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>MTZ 82</name>
        <specs>
            <power>105</power>
            <maxSpeed>40</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_tractor</function>
        </functions>
        <image>store/store_mtz82.png</image>
        <price>7500</price>
        <dailyUpkeep>15</dailyUpkeep>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>BELARUS</brand>
        <category>tractors</category>
        <fieldJob sizeCategory="1" typeCategory="tractor" hasFrontAndBackHydraulics="false" />
        <vertexBufferMemoryUsage>2369636</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>348978</indexBufferMemoryUsage>
        <textureMemoryUsage>32287960</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <typeDesc>$l10n_typeDesc_tractor</typeDesc>
    <filename>MTZ82.i3d</filename>

    <size width="2.5" length="4.5"/>

    <wheelConfigurations>
        <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
            <wheels autoRotateBackSpeed="1.7">
                <wheel rotSpeed="1" restLoad="1.3" repr="1>0|0|0" driveNode="1>0|0|0|0|0" forcePointRatio="0.2" filename="wheels2.xml"    isLeft="true"  initialCompression="20" suspTravel="0.16" spring="28" damper="50" hasTireTracks="true" hasParticles="true" />
                <wheel rotSpeed="1" restLoad="1.3" repr="1>0|1|0" driveNode="1>0|1|0|0|0" forcePointRatio="0.2" filename="wheels2.xml"    isLeft="false" initialCompression="20" suspTravel="0.16" spring="28" damper="50" hasTireTracks="true" hasParticles="true" />
                <wheel rotSpeed="0" restLoad="1.2" repr="0>0|0"                           forcePointRatio="0.3" filename="wheels.xml" isLeft="true"  initialCompression="20" suspTravel="0.16" spring="25" damper="50" hasTireTracks="true" hasParticles="true" />
                <wheel rotSpeed="0" restLoad="1.2" repr="0>0|1"                           forcePointRatio="0.3" filename="wheels.xml" isLeft="false" initialCompression="20" suspTravel="0.16" spring="25" damper="50" hasTireTracks="true" hasParticles="true" />
            </wheels>
        </wheelConfiguration>
    </wheelConfigurations>

    <ackermannSteering rotSpeed="65" rotMax="33" rotCenterWheel1="2" rotCenterWheel2="3" />

    <differentials>
        <differential torqueRatio="0.5"  maxSpeedRatio="1.8" wheelIndex1="0" wheelIndex2="1" /> <!-- front left-right -->
        <differential torqueRatio="0.5"  maxSpeedRatio="1.8" wheelIndex1="2" wheelIndex2="3" /> <!-- back left-right -->
        <differential torqueRatio="0.55" maxSpeedRatio="1.8" differentialIndex1="0" differentialIndex2="1" /> <!-- front-back -->
    </differentials>

    <motorConfigurations>
        <motorConfiguration name="5610" hp="105" price="0">
            <motor torqueScale="0.445" minRpm="1000" maxRpm="2200" maxForwardSpeed="43" maxBackwardSpeed="15" brakeForce="4.5" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" rotInertia="0.0012" minForwardGearRatio="14.5" maxForwardGearRatio="300" minBackwardGearRatio="40" maxBackwardGearRatio="300">
                <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>
        </motorConfiguration>
    </motorConfigurations>

    <fuelCapacity>156</fuelCapacity>

    <cameras count="2">
        <camera1 index="0>1|0|0" rotatable="true" rotateNode="0>1|0" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="35" >
            <raycastNode index="0>1|2"/>
            <raycastNode index="0>1|3"/>
            <raycastNode index="0>1|4"/>
        </camera1>
        <camera2 index="0>1|1" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" />
    </cameras>

    <lights>
        <low>
            <light                       decoration="0>12|5|2|0"   lightTypes="0 3" />
            <light realLight="0>12|5|2|3"                          lightTypes="0" excludedLightTypes="3" /> <!--FrontLights-->
            <light                       decoration="0>2|2|0"   lightTypes="0 1"/> <!--BackLights-->
            <light realLight="0>2|1|0|1" decoration="0>2|1|0|0" lightTypes="1"/> <!--WorklightBack-->
            <light                       decoration="0>2|1|1|0" lightTypes="2"/> <!--WorklightFront-->
			<light realLight="0>12|5|2|1"                          lightTypes="3"/> <!--HighBeam -->
        </low>
        <high>
            <light                       decoration="0>12|5|2|0"   lightTypes="0 3" />
            <light realLight="0>12|5|2|4"                          lightTypes="0" excludedLightTypes="2 3" /> <!--FrontLights-->
            <light realLight="0>2|2|1"   decoration="0>2|2|0"   lightTypes="0 3" /> <!--BackLights-->
            <light realLight="0>2|1|0|2" decoration="0>2|1|0|0" lightTypes="1" /> <!--WorklightBack  -->
            <light realLight="0>2|1|1|1" decoration="0>2|1|1|0" lightTypes="2"  /> <!--WorklightFront -->
			<light realLight="0>12|5|2|2"                          lightTypes="3" excludedLightTypes="2" /> <!--HighBeam-->
			
        </high>
        <states>
            <state lightTypes="0" />
            <state lightTypes="0 1" />
            <state lightTypes="0 1 2" />
        </states>
    </lights>

    <turnLights>
        <turnLightLeft realLight="0>12|5|3|0|1" decoration="0>12|5|3|0|0" />
        <turnLightLeft realLight="0>12|5|3|0|2" />
        <turnLightRight realLight="0>12|5|3|1|1" decoration="0>12|5|3|1|0" />
        <turnLightRight realLight="0>12|5|3|1|2" />
    </turnLights>

    <mirrors>
        <mirror index="0>10|0" prio="1" />
        <mirror index="0>10|1" prio="2" />
        <mirror index="0>10|2" prio="1" />
    </mirrors>

    <enterReferenceNode index="0>"/>
    <exitPoint index="0>3"/>

    <attacherJoints comboDuration="2">
		  <attacherJoint index="0>5|0|0|0" rotationNode="0>5|0" rotationNode2="0>5|0|0" upperRotation="32 0 0" lowerRotation="-15 0 0" upperDistanceToGround="1.13" lowerDistanceToGround="0.34" upperRotationOffset="0.91" moveTime="2.5" ptoOutputNode="0>5|5" comboTime="1">
            <bottomArm rotationNode="0>5|1" translationNode="0>5|1|0" referenceNode="0>5|1|0|0" zScale="-1" />
            <topArm rotationNode="0>5|2" translationNode="0>5|2|0" referenceNode="0>5|2|0|0" zScale="-1" />
            <schema position="1 0" rotation="0" invertX="false" />
            <objectChange node="0>5|1|0|3" visibilityActive="false" visibilityInactive="true" />
        </attacherJoint>

        <!-- trailer attacher -->
        <attacherJoint index="0>5|1|0|3|0" jointType="trailer"    lowerRotLimit="10 50 50" upperRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>5|5" comboTime="1" >
            <schema position="1 0" rotation="0" invertX="false" />
            <objectChange node="0>5|1|0|2" visibilityActive="false"  visibilityInactive="true" />
        </attacherJoint>
        <attacherJoint index="0>5|1|0|3|0" jointType="trailerLow"    lowerRotLimit="10 50 50" upperRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>5|5" comboTime="1" >
            <schema position="1 0" rotation="0" invertX="false" />
            <objectChange node="0>5|1|0|2" visibilityActive="false"  visibilityInactive="true" />
        </attacherJoint>
        <attacherJoint index="0>5|6" jointType="trailer" lowerRotLimit="0 0 0" upperRotRotationOffset="0" allowsJointLimitMovement="false" comboTime="0">
            <schema position="0 0" rotation="0" invertX="true" />
        </attacherJoint>
    </attacherJoints>

    <movingTools>
        <!-- attacher joint back bottom-->
        <movingTool index="0>5|1">
            <dependentPart index="0>5|4" />
            <dependentPart index="0>5|3" />
        </movingTool>

        <!-- main arm -->
        <movingTool index="0>5|1" foldMinLimit="0.0" foldMaxLimit="0.01">
            <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="false" mouseSpeedFactor="0.7" />
            <attacherJoint jointIndices="0 1 2" />
            <rotation rotSpeed="20" rotAcceleration="100" rotMax="15" rotMin="-14" rotationAxis="1"/>
            <dependentPart index="0>5|4" />
            <dependentPart index="0>5|3" />
        </movingTool>
    </movingTools>

    <movingParts>
        <!-- back -->
        <movingPart index="0>5|4" referencePoint="0>5|1|0|1" localReferencePoint="0>5|4|1" referenceFrame="0>5|0" >
            <dependentPart index="0>5|4|1" />
        </movingPart>
        <movingPart index="0>5|4|1" referencePoint="0>5|1|0|1" referenceFrame="0>5|1|0|1" >
            <dependentPart index="0>5|3" />
        </movingPart>
        <movingPart index="0>5|3" referencePoint="0>5|4|0" referenceFrame="0>5|4|0" >
            <translatingPart index="0>5|3|0" />
        </movingPart>

        <!-- steering -->
	<movingPart index="1>0|0|0|2|0" referencePoint="1>0|1|0|1" referenceFrame="1>0|1|0|1" isActiveDirty="true" >
            <translatingPart index="1>0|0|0|2|0|0" />
        </movingPart>
	<movingPart index="1>1" referencePoint="1>0|0|0|1" referenceFrame="1>0|0|0|1" isActiveDirty="true" >
            <translatingPart index="1>1|0" />
        </movingPart>
        <movingPart index="0>12|7|11" referencePoint="0>12|6|0" referenceFrame="0>12|6|0" isActiveDirty="true" >
            <translatingPart index="0>12|7|11|0" />
        </movingPart>
        <movingPart index="0>12|2|0" referencePoint="0>12|7|9" referenceFrame="0>12|7|9" isActiveDirty="true" >
            <translatingPart index="0>12|2|0|0" />
        </movingPart>
        <movingPart index="0>12|2|1" referencePoint="0>12|7|10" referenceFrame="0>12|7|10" isActiveDirty="true" >
            <translatingPart index="0>12|2|1|0" />
        </movingPart>
		
		
		<movingPart index="0>12|1|4|0" referencePoint="0>12|0|1|0|54" referenceFrame="0>" scaleZ="false" playSound="false" isActiveDirty="true">
            <translatingPart index="0>12|1|4|0|0" />
        </movingPart>
		<movingPart index="0>12|1|4|1" referencePoint="0>12|0|1|0|55" referenceFrame="0>" scaleZ="false" playSound="false" isActiveDirty="true">
            <translatingPart index="0>12|1|4|1|0" />
        </movingPart>
		  <!-- Cilindriukas1 -->
		<movingPart index="0>12|1|5" referencePoint="0>12|0|1|0|62" referenceFrame="0>" scaleZ="false" playSound="false" isActiveDirty="true">
            <translatingPart index="0>12|1|5|0" />
        </movingPart>
        <!-- Cilindriukas2 -->
		<movingPart index="0>12|1|6" referencePoint="0>12|0|1|0|63" referenceFrame="0>" scaleZ="false" playSound="false" isActiveDirty="true">
            <translatingPart index="0>12|1|6|0" />
        </movingPart>
    </movingParts>

    <animations>
        <animation name="rightDoor">
            <part node="0>12|3" startTime="1" endTime="2" startRot="0.225 0 -0.808" endRot="0 180 0"/>
        </animation>
        <animation name="leftDoor">
            <part node="0>12|2" startTime="1" endTime="2" startRot="-0.052 -0.093 0.036" endRot="0 -180 0"/>
        </animation>
        <animation name="backWindow">
            <part node="0>12|1" startTime="0" endTime="2" startRot="0 0 0" endRot="45 0 0"/>
        </animation>
        <animation name="Kapot">
            <part node="0>12|0|1|0|9" startTime="0" endTime="0.5" startTrans="-0.107 0.021 0.345" endTrans="-0.355 0.13 0.345"/>
            <part node="0>12|0|1|0|9" startTime="0.5" endTime="0.8" startTrans="-0.355 0.13 0.345" endTrans="-0.355 -0.731 0.345"/>
			<part node="0>12|0|1|0|9" startTime="0.5" endTime="0.8" startTrans="-0.355 -0.731 0.345" endTrans="-0.107 0.021 0.345"/>
            <part node="0>12|5" startTime="2" endTime="3" startRot="0 0 0" endRot="50 0 0"/>
        </animation>
        <animation name="avtopoezd">
            <part node="0>2|0|0" startTime="0" endTime="0.01" visibility="false" />
            <part node="0>2|0|0" startTime="0.01" endTime="0.02" visibility="true" />
            <part node="0>12|0|1|0|45|0" startTime="0" endTime="1" startRot="0 0 0" endRot="-30 0 0"/>
        </animation>
        <animation name="Hatch">
            <part node="0>12|4|0" startTime="0" endTime="2" startRot="0 0 0" endRot="-5 0 0"/>
        </animation>
    </animations>

    <interactiveComponents>
        <windows>
            <window name="rightDoor"   mark="0>12|3|3" size="0.2" animName="rightDoor" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="leftDoor"    mark="0>12|2|3" size="0.2" animName="leftDoor" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="backWindow"  mark="0>12|1|3" size="0.2" animName="backWindow" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="Kapot"       mark="0>14|4" size="0.0" animName="Kapot" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="avtopoezd"   mark="0>14|6" size="0.2" animName="avtopoezd" onMessage="ic_button_on" offMessage="ic_button_off"/>
            <window name="Hatch"       mark="0>14|7" size="0.2" animName="Hatch" onMessage="ic_component_open" offMessage="ic_component_close"/>
        </windows> 
    </interactiveComponents>
	

    <steering index="0>4|0" indoorRotation="540" outdoorRotation="50" />

    <characterNode index="0>6|0" cameraMinDistance="1.5" filename="$dataS2/character/player/player.xml" spineRotation="180 0 95" >
        <target ikChain="rightFoot" targetNode="0>6|1" />
        <target ikChain="leftFoot"  targetNode="0>6|2" />
        <target ikChain="rightArm"  targetNode="0>4|0|0" setDirty="true"/>
        <target ikChain="leftArm"   targetNode="0>4|0|1" setDirty="true" />
    </characterNode>

    <ai>
        <trafficCollisionTrigger index="0>7|0" />
    </ai>

    <exhaustEffects>
        <exhaustEffect index="0>8" filename="$data/particleSystems/shared/exhaust.i3d" minRpmColor="0.0 0.0 0.0 0.01" maxRpmColor="0.0 0.0 0.0 7" minRpmScale="0.08" maxRpmScale="0.6" xzRotationsOffset="0 0" xzRotationsForward="-100 0" xzRotationsBackward="100 0" xzRotationsLeft="0 -100" xzRotationsRight="0 100" />
    </exhaustEffects>

    <motorStartDuration>2500</motorStartDuration>
    <motorStartSound file="Sound/MTZ1025START.wav"       pitchOffset="0.77" volume="0.80" indoorVolumeFactor="0.40" indoorLowpassGain="0.75" />
    <motorStopSound file="Sound/MTZ1025STOP.wav"             pitchOffset="0.90" volume="0.80" indoorVolumeFactor="0.40" indoorLowpassGain="0.75" />
    <motorSound file="Sound/MTZ1025IDLE.wav"              pitchOffset="0.77" volume="0.80" indoorVolumeFactor="0.40" indoorLowpassGain="0.75" volumeMin="0.40" volumeMinSpeed="15" pitchMax="1.70"/>

    <motorSoundRun file="Sound/MTZ1025RUN.wav"          pitchOffset="0.60" volume="0.90" indoorVolumeFactor="0.40" indoorLowpassGain="0.75" pitchMax="1.16" />
    <motorSoundLoad file="$data/vehicles/steerable/masseyFerguson/MF5600_load.wav"   pitchOffset="0.59" volume="1.00" indoorVolumeFactor="0.40" indoorLowpassGain="0.65" pitchMax="1.32" minimalVolumeFactor="0.0" />

    <gearboxSound file="$data/sounds/transmission/transmissionCVT_X.wav"             pitchOffset="0.75" volume="0.13"  indoorVolumeFactor="0.60" indoorLowpassGain="0.80" pitchMax="1.16" volumeMax="0.48" reverseVolumeMax="0.6"  />
    <retarderSound file="$data/sounds/transmission/retarderET2015.wav"               pitchOffset="0.80" volume="0.15"  indoorVolumeFactor="0.72" indoorLowpassGain="0.60" pitchMax="1.70" volumeMax="0.19"  minSpeed="1"   />

    <attachSound file="$data/sounds/attach.wav"                                      pitchOffset="1.20" volume="1.10"  indoorVolumeFactor="0.75" indoorLowpassGain="0.75"/>
    <honkSound file="$data/sounds/horn.wav"                                          pitchOffset="1.00" volume="1.50"  indoorVolumeFactor="0.60" indoorLowpassGain="0.75" radius="70" innerRadius="10" />

    <speedRotatingParts>
        <speedRotatingPart index="0>12|0|1|0|46|0|0|0" wheelIndex="0" wheelScale="2" />
        <speedRotatingPart index="0>12|0|1|0|46|0|1|0" wheelIndex="0" wheelScale="2" />
        <speedRotatingPart index="0>12|0|1|0|46|0|2|0" wheelIndex="0" wheelScale="2" />
        <speedRotatingPart index="0>12|0|1|0|46|1|0|0" wheelIndex="0" wheelScale="2" />
        <speedRotatingPart index="0>12|0|1|0|46|1|1|0" wheelIndex="0" wheelScale="2" />
		<speedRotatingPart index="0>12|0|1|0|46|1|2|0" wheelIndex="0" wheelScale="2" />
    </speedRotatingParts>


    <turnedOnRotationNodes>
        <turnedOnRotationNode index="0>12|0|0"  type="motor" rotSpeed="580"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="1" />
    </turnedOnRotationNodes>

    <washable dirtDuration="50" washDuration="1" workMultiplier="4" />

    <components count="2">
        <component1 centerOfMass="0 0.71 0" solverIterationCount="10" />
        <component2 centerOfMass="0 0 0" solverIterationCount="20" />
        <joint component1="0" component2="1" index="0>0|2" rotLimit="0 0 5" transLimit="0 0 0" maxRotDriveForce="0 0 50" rotDriveRotation="- - 0" rotDriveSpring="0 0 15" rotDriveDamping="0 0 10" breakable="false"/>
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/vehicleSchema.png" fileSelected="$dataS2/menu/schemas/vehicleSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0.5 0" />
</vehicle>
