<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="MTZ1221">
  <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
  <name>
    <en>MTZ-1221</en>
    <de>MTZ-1221</de>
    <ru>МТЗ-1221</ru>
  </name>
  <filename>MTZ_1221.i3d</filename>
  <wheels autoRotateBackSpeed="1.5" >
    <wheel rotSpeed="1" restLoad="1.3" repr="1>1|0" driveNode="1>1|0|0" radius="0.64" width="0.38" initialCompression="25" suspTravel="0.06" spring="80" damper="50" frictionScale="1.5" mass="0.21" fenderNode="1>1|0|3|0" fenderRotMin="-35" hasTyreTracks="true" />
    <wheel rotSpeed="1" restLoad="1.3" repr="1>2|0" driveNode="1>2|0|0" radius="0.64" width="0.38" initialCompression="25" suspTravel="0.06" spring="80" damper="50" frictionScale="1.5" mass="0.21" fenderNode="1>2|0|3|0" fenderRotMax="35" hasTyreTracks="true" />
    <wheel rotSpeed="0" restLoad="1.5" repr="0>0" radius="0.835" width="0.52" initialCompression="25" suspTravel="0.06" spring="80" damper="60" frictionScale="1.5" mass="0.39" hasTyreTracks="true" twinWheelPosition="-0.471 0.826 -1.141" />
    <wheel rotSpeed="0" restLoad="1.5" repr="0>1" radius="0.835" width="0.52" initialCompression="25" suspTravel="0.06" spring="80" damper="60" frictionScale="1.5" mass="0.39" hasTyreTracks="true" twinWheelPosition="0.471 0.826 -1.141" />
  </wheels>
  <ackermannSteering rotSpeed="50" rotMax="32" rotCenterWheel1="2" rotCenterWheel2="3" />
  <differentials>
    <differential torqueRatio="0.5" maxSpeedRatio="1.4" wheelIndex1="0" wheelIndex2="1" />
    <differential torqueRatio="0.5" maxSpeedRatio="1.6" wheelIndex1="2" wheelIndex2="3" />
    <differential torqueRatio="0.5" maxSpeedRatio="1.5" differentialIndex1="0" differentialIndex2="1" />
  </differentials>
  <motor torqueScale="0.651" minRpm="1000" maxRpm="2200" maxBackwardSpeed="15" brakeForce="2.5" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" minForwardGearRatio="19.7" maxForwardGearRatio="130" minBackwardGearRatio="50" maxBackwardGearRatio="130">
    <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>
  <fuelCapacity>160</fuelCapacity>
  <fuelUsage>30</fuelUsage>

  <speedRotatingParts>
    <speedRotatingPart index="0>31|0" wheelIndex="2" wheelScale="2" />
    <speedRotatingPart index="0>30|0" wheelIndex="2" wheelScale="2" />
    <speedRotatingPart index="0>29|0|0|0|0" wheelIndex="2" wheelScale="2" />
  </speedRotatingParts>
    <mirrors>
        <mirror index="0>23" />
    </mirrors>
  <cameras count="2">
    <camera1 index="3|0" rotatable="true" rotateNode="3" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4.5" transMax="35">
      <raycastNode index="0>5" />
      <raycastNode index="0>6" />
    </camera1>
    <camera2 index="4" rotatable="true" limit="true" useWorldXZRotation="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" />
  </cameras>
  <lights>
    <light realLight="0>16|0|0" decoration="0>16|0|1" lightType="0" />
    <light decoration="0>26|1" lightType="0" />
  </lights>
    <rotators>
    <rotatorPart index="0>28" rotatorAxis="3" rotatorSpeed="3.8" rotatorRpmDepend="true" />
  </rotators>
  <lightsaddon lightsStayOn="false">
  	      <light type="work" index="0>12|1|0|5" inputName="serga" helptext="serga" showHelp="true" stayOn="true" />
	<light type="work" index="0>12|1|0|4" inputName="ydlin" helptext="ydlin" showHelp="true" stayOn="true" />
    	    <light type="work" index="0>0|1" inputName="Sparkapered" helptext="Sparkapered" stayOn="true"/>
        <light type="work" index="0>1|1" inputName="Sparkapered" stayOn="true"/>
    <light type="work" index="0>16|1|1" real="0>16|1|0" inputName="frontwork" helptext="frontwork" stayOn="true" />
    <light type="work" index="0>16|2|1" real="0>16|2|0" inputName="rearwork" helptext="rearwork" stayOn="true" />
    <light type="work" index="0>16|5" inputName="rearwork1" helptext="rearwork1" stayOn="true" />
    <light type="work" index="0>27" inputName="migalka" helptext="migalka" showHelp="true" stayOn="true" />  
	<light type="work" index="0>25" inputName="ves" helptext="ves" showHelp="true" stayOn="true" />
    <light type="work" index="0>21"  real="0>22" inputName="FL" helptext="FL" showHelp="true" stayOn="true" />
  </lightsaddon>
  <beaconLights>
    <beaconLight index="0>27|0" speed="0.015" filename="$data/vehicles/shared/beaconLight02.i3d" />
  </beaconLights>
  <brakeLights>
    <brakeLight index="0>16|3" />
  </brakeLights>
  <turnSignals>
    <turnSignalLeft index="0>16|4|0" />
    <turnSignalRight index="0>16|4|1" />
  </turnSignals>
  <indoorHud>
      <time numbers="0>14|2" precision="2" />
    <fuel animName="fuelDisplay" />
    <speed animName="speedDisplay" />
  </indoorHud>
  <animParts>
    <animPart index="0>26" id="kapot" showHelp="true" autoReturn="false" rotMin="0 0 0" rotMax="70 0 0" moveTime="3" />
  </animParts>
     <speedDisplayEntries>
	    <displayEntry displayEntry="second" control_0="0>14|1|0|0" control_1="0>14|1|0|1" control_2="0>14|1|0|2" control_3="0>14|1|0|3" control_4="0>14|1|0|4" control_5="0>14|1|0|5" control_6="0>14|1|0|6" control_7="0>14|1|0|7" control_8="0>14|1|0|8" control_9="0>14|1|0|9" />
	    <displayEntry displayEntry="first" control_0="0>14|1|2|0" control_1="0>14|1|2|1" control_2="0>14|1|2|2" control_3="0>14|1|2|3" control_4="0>14|1|2|4" control_5="0>14|1|2|5" control_6="0>14|1|2|6" control_7="0>14|1|2|7" control_8="0>14|1|2|8" control_9="0>14|1|2|9" />
	    <displayEntry displayEntry="comma_first" control_0="0>14|1|3|0" control_1="0>14|1|3|1" control_2="0>14|1|3|2" control_3="0>14|1|3|3" control_4="0>14|1|3|4" control_5="0>14|1|3|5" control_6="0>14|1|3|6" control_7="0>14|1|3|7" control_8="0>14|1|3|8" control_9="0>14|1|3|9" />
	</speedDisplayEntries>
  <steering index="0>8|0" indoorRotation="540" outdoorRotation="40" />
  <characterNode index="0>9|0" cameraMinDistance="2.0" filename="$dataS2/character/player/player.i3d" characterMesh="1" characterGloves="2" characterSkin="0" spineNode="0|0" leftArmIKChainId="leftArm" rightArmIKChainId="rightArm" spineRotation="180 0 104">
    <ikChains>
      <ikChain id="rightFoot" target="0>9|1" targetOffset="0 0.1 0" alignToTarget="true" isDirtyOnLoad="true">
        <node index="0|1" />
        <node index="0|1|0" minRx="0" maxRx="0" minRy="-30" maxRy="30" minRz="0" maxRz="90" />
        <node index="0|1|0|0" minRx="0" maxRx="0" minRy="0" maxRy="0" minRz="-100" maxRz="-7" />
        <node index="0|1|0|0|0" />
      </ikChain>
      <ikChain id="leftFoot" target="0>9|2" targetOffset="0 0.1 0" alignToTarget="true" isDirtyOnLoad="true">
        <node index="0|2" />
        <node index="0|2|0" minRx="0" maxRx="0" minRy="-30" maxRy="30" minRz="0" maxRz="90" />
        <node index="0|2|0|0" minRx="0" maxRx="0" minRy="0" maxRy="0" minRz="-100" maxRz="-7" />
        <node index="0|2|0|0|0" />
      </ikChain>
      <ikChain id="rightArm" target="0>8|0|0" targetOffset="0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true">
        <node index="0|0|0|1" />
        <node index="0|0|0|1|0" minRx="-20" maxRx="20" minRy="-20" maxRy="20" minRz="-80" maxRz="80" />
        <node index="0|0|0|1|0|0" minRx="-10" maxRx="10" minRy="0" maxRy="0" minRz="7" maxRz="130" />
        <node index="0|0|0|1|0|0|0" />
        <rotationNode index="0|0|0|1|0|0|0|0" rotation="0 0 -60" />
        <rotationNode index="0|0|0|1|0|0|0|0|0" rotation="0 0 -60" />
        <rotationNode index="0|0|0|1|0|0|0|1" rotation="-90 20 -40" />
        <rotationNode index="0|0|0|1|0|0|0|1|0" rotation="0 0 -40" />
      </ikChain>
      <ikChain id="leftArm" target="0>8|0|1" targetOffset="-0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true">
        <node index="0|0|0|2" />
        <node index="0|0|0|2|0" minRx="-20" maxRx="20" minRy="-20" maxRy="20" minRz="-80" maxRz="80" />
        <node index="0|0|0|2|0|0" minRx="-10" maxRx="10" minRy="0" maxRy="0" minRz="7" maxRz="130" />
        <node index="0|0|0|2|0|0|0" />
        <rotationNode index="0|0|0|2|0|0|0|0" rotation="0 0 -60" />
        <rotationNode index="0|0|0|2|0|0|0|0|0" rotation="0 0 -60" />
        <rotationNode index="0|0|0|2|0|0|0|1" rotation="-90 20 -40" />
        <rotationNode index="0|0|0|2|0|0|0|1|0" rotation="0 0 -40" />
      </ikChain>
    </ikChains>
  </characterNode>
  <enterReferenceNode index="0>" />
  <exitPoint index="0>7" />
  <aiTrafficCollisionTrigger index="0>10" />
  <exhaustEffects>
    <exhaustEffect index="0>11" filename="$data/vehicles/particleAnimations/shared/exhaust.i3d" minRpmColor="0.9 0.9 0.9 0.05" maxRpmColor="0.9 0.9 0.9 0.2" minRpmScale="0.05" maxRpmScale="0.4" forwardXRotations="-250 0 250" forwardZRotations="0 0 0" steerXRotations="0 0 0" steerZRotations="120 0 -50" />
  </exhaustEffects>
  <animations>
    <animation name="leftDoor">
      <part node="0>24|15" startTime="0" endTime="2" startRot="-3 0 5" endRot="-3 40 5" />
    </animation>
    <animation name="rightDoor">
      <part node="0>24|16" startTime="0" endTime="2" startRot="-3 0 -5" endRot="-3 -40 -5" />
    </animation>
    <animation name="rightWindow">
      <part node="0>24|18" startTime="0" endTime="1.5" startRot="0 0 0" endRot="0 0 -11" />
      <part node="0>24|20" startTime="0" endTime="1.5" startRot="0 0 -21" endRot="0 0 160" />
      <part node="0>24|20|0" startTime="0.3" endTime="1.5" startRot="0 0 0" endRot="0 0 -163" />
    </animation>
    <animation name="leftWindow">
      <part node="0>24|17" startTime="0" endTime="1.5" startRot="0 0 0" endRot="0 0 11" />
      <part node="0>24|19" startTime="0" endTime="1.5" startRot="0 0 21" endRot="0 0 -160" />
      <part node="0>24|19|0" startTime="0.3" endTime="1.5" startRot="0 0 0" endRot="0 0 163" />
    </animation>
    <animation name="backWindow">
      <part node="0>24|14|49" startTime="0" endTime="2" startRot="0 0 0" endRot="25 0 0" />
    </animation>
    <animation name="fuelDisplay">
      <part node="0>14|0|0" startTime="0" endTime="1" startRot="0 0 13.5" endRot="0 0 -84" />
    </animation>
    <animation name="speedDisplay">
      <part node="0>14|0|2" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 -200" />  
	  <part node="0>14|0|1" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 -235" /> 
	  <part node="0>14|0|4" startTime="0" endTime="1" startRot="0 0 40" endRot="0 0 -100" />
    </animation>
  </animations>
  <interactiveComponents>
    <windows>
      <window name="rightDoor" mark="0>24|16|0|0" size="0.2" animName="rightDoor" onMessage="ic_component_open" offMessage="ic_component_close" />
      <window name="leftDoor" mark="0>24|15|0|0" size="0.2" animName="leftDoor" onMessage="ic_component_open" offMessage="ic_component_close" />
      <window name="rightWindow" mark="0>24|18|3" size="0.2" animName="rightWindow" onMessage="ic_component_open" offMessage="ic_component_close" />
      <window name="leftWindow" mark="0>24|17|2" size="0.2" animName="leftWindow" onMessage="ic_component_open" offMessage="ic_component_close" />
      <window name="backWindow" mark="0>24|14|49|4" size="0.2" animName="backWindow" onMessage="ic_component_open" offMessage="ic_component_close" />
    </windows>
  </interactiveComponents>
  <attacherJoints>
    <attacherJoint index="0>12|0|0|0" rotationNode="0>12|0" minRot="21 0 0" minRot2="-7 0 0" maxRot="2 0 0" rotationNode2="0>12|0|0" maxRot2="-2 0 0" maxTransLimit="0 0.5 0" maxRotLimit="0 0 20" moveTime="2.5" ptoOutputNode="0>12|6" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d">
      <bottomArm rotationNode="0>12|1" translationNode="0>12|1|0" referenceNode="0>12|1|0|0" zScale="-0.1" />
      <topArm rotationNode="0>12|2" translationNode="0>12|2|0" referenceNode="0>12|2|0|0" zScale="-0.1" />
    </attacherJoint>
	  <attacherJoint jointType="frontloader" index="21|0|1|1" allowsJointLimitMovement="false" allowsLowering="false" rotLimitSpring="100 100 100" rotLimitDamping="100 100 100" transLimitSpring="100 100 100" transLimitDamping="100 100 100"/>
 
    <attacherJoint index="0>12|5|0" transNode="0>12|5" transMinYHeight="0.557" transMaxYHeight="0.928" jointType="trailer" maxRotLimit="10 50 50" minRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>12|6" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d" />
    <attacherJoint index="0>12|5|0" transNode="0>12|5" transMinYHeight="0.557" transMaxYHeight="0.928" jointType="trailerLow" maxRotLimit="10 50 50" minRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>12|6" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d" />

  </attacherJoints>
 	<mouseControls>
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/frontloader_arm.png" axis="AXIS_FRONTLOADER_ARM" />
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/frontloader_tool.png" axis="AXIS_FRONTLOADER_TOOL" />
    </mouseControls>
	
  <movingTools>
    <!-- attacher joint back bottom-->
    <movingTool index="0>12|1">
      <!-- cylinder 1 -->
      <dependentPart index="0>12|3" />
      <!-- cylinder 2 -->
      <dependentPart index="0>12|4" />
    </movingTool>
		<movingTool index="0>21|0" inputAttacherJoint="true" attacherJointIndices="0 1 2 3 4 5 6 7 8 9 10" componentJointIndex="5" rotSpeed="45" rotAcceleration="280" rotMax="8" rotMin="-75" axis="AXIS_FRONTLOADER_ARM" invertAxis="true" invertMouseAxis="true" speedFactor="0.3">
            <dependentPart index="0>21|1" />
            <dependentPart index="0>21|0|2" />
            <dependentMovingTool index="0>21|0|1" rotSpeedScale="-1"/>
        </movingTool>
        <movingTool index="0>21|0|1" attacherJointIndices="0 1 2 3 4 5 6 7 8 9 10" componentJointIndex="6" anchorActor="0" rotSpeed="70" rotAcceleration="300" rotMax="130" rotMin="-15" axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" invertMouseAxis="false" speedFactor="0.3" rotSpeed2="-45" rotAcceleration2="280" axis2="AXIS_FRONTLOADER_ARM" invertAxis2="true" invertMouseAxis2="true" speedFactor2="0.3">
            <dependentPart index="0>21|0|0" />
        </movingTool>
  </movingTools>
  <movingParts>
    <!-- attacher joint back bottom cylinder 1 -->
    <movingPart index="0>12|3" referencePoint="0>12|4|1" referenceFrame="0>" invertZ="true">
      <translatingPart index="0>12|3|0" />
    </movingPart>
    <!-- attacher joint back bottom cylinder 2 -->
    <movingPart index="0>12|4" referencePoint="0>12|1|0|1" localReferencePoint="0>12|4|2" referenceFrame="0>" invertZ="true">
      <dependentPart index="0>12|4|2" />
    </movingPart>
    <!-- attacher joint back bottom cylinder 2b -->
    <movingPart index="0>12|4|2" referencePoint="0>12|1|0|1" referenceFrame="0>12|4|0" invertZ="true"></movingPart>
    <!-- steering bar -->
    <movingPart index="1>2|0|1" referencePoint="1>1|0|1" referenceFrame="1>" playSound="false" isActiveDirty="true" scaleZ="false"></movingPart>
    <movingPart index="1>3" referencePoint="1>2|0|2" referenceFrame="1>" playSound="false" isActiveDirty="true" scaleZ="false">
      <translatingPart index="1>3|0" />
    </movingPart>
    <movingPart index="1>4" referencePoint="1>1|0|2" referenceFrame="1>" playSound="false" isActiveDirty="true" scaleZ="false">
      <translatingPart index="1>4|0" />
    </movingPart>
			 <!-- arm cylinder -->
        <movingPart index="0>21|1" referencePoint="0>21|0|3" referenceFrame="0>21|0">
            <translatingPart index="0>21|1|0" />
        </movingPart>

        <!-- main hinge -->
        <movingPart index="0>21|0|0" referencePoint="0>21|0|1|0" localReferencePoint="0>21|0|0|0" referenceFrame="0>21|0|1|0">
            <dependentPart index="0>21|0|0|0" />
            <dependentPart index="0>21|0|2|0" />
        </movingPart>
        <!-- front top hinge -->
        <movingPart index="0>21|0|0|0" referencePoint="0>21|0|1|0" referenceFrame="0>21|0|1" scaleZ="true">
        </movingPart>

        <!-- tool cylinder -->
        <movingPart index="0>21|0|2|0" referencePoint="0>21|0|0|1" referenceFrame="0>21|0">
            <translatingPart index="0>21|0|2|0|0" />
        </movingPart>
		
        <movingPart index="0>21|0|2" referencePoint="0>21|2" localReferencePoint="0>21|0|2|1" referenceFrame="0>21|2">
            <dependentPart index="0>21|0|2|1" />
            <dependentPart index="0>21|0|2|0" />
        </movingPart>
        <movingPart index="0>21|0|2|1" referencePoint="0>21|2" referenceFrame="0>21">
        </movingPart>
		<!-- steering1 -->
		<movingPart index="0>22|0|0" referencePoint="0>21|0|5|3" referenceFrame="0>" isActiveDirty="true" playSound="false" scaleZ="true">
        </movingPart>
		<!-- steering2 -->
		<movingPart index="0>22|0|1" referencePoint="0>21|0|5|4" referenceFrame="0>" isActiveDirty="true" playSound="false" scaleZ="true">
        </movingPart>
		<!-- steering3 -->
		<movingPart index="0>21|0|5|2" referencePoint="0>21|1|2" referenceFrame="0>" isActiveDirty="true" playSound="false" scaleZ="true">
        </movingPart>
		<!-- steering4 -->
		<movingPart index="0>21|0|5|0" referencePoint="0>21|0|2|0|2" referenceFrame="0>" isActiveDirty="true" playSound="false" scaleZ="true">
        </movingPart>
		<!-- steering5 -->
		<movingPart index="0>21|0|5|1" referencePoint="0>21|0|2|0|1" referenceFrame="0>" isActiveDirty="true" playSound="false" scaleZ="true">
        </movingPart>
  </movingParts>
  <motorStartDuration>1400</motorStartDuration>
  <attachSound file="sounds/DON1500B_attach_cutter.wav" pitchOffset="1" />
  <motorStartSound file="sounds/d260_start_loop.ogg" pitchOffset="1" volume="1.5" />
  <motorSound file="sounds/d260_idle_loop.ogg" pitchOffset="1" pitchScale="0.03" pitchMax="1.65" volume="1.5" />
  <motorSoundRun file="sounds/engineRun.wav" pitchOffset="0.5" pitchScale="0.02" pitchMax="1.05" volume="1.0" />
  <motorStopSound file="sounds/d260_stop_loop.ogg" pitchOffset="0.785" volume="1.15" />
  <compressedAirSound file="$data/vehicles/shared/brakeBig.wav" pitchOffset="1" volume="1.25" />
  <compressionSound file="$data/vehicles/shared/brakeBig.wav" pitchOffset="1" volume="1.5" />
  <hydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="0.55" volume="0.8" />
  <honkSound file="$data/vehicles/shared/horn.wav" volume="1" radius="70" innerRadius="10" />
  <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" />
    <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="3" offset="0.471 0 0" isTwinWheelPS="true" />
    <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="4" offset="-0.471 0 0" isTwinWheelPS="true" />
  </driveGroundParticleSystems>
  <washable dirtDuration="50" washDuration="1" workMultiplier="4" />
  <components count="2">
    <component1 centerOfMass="0 1 0" solverIterationCount="4" />
    <component2 centerOfMass="0 0 0" solverIterationCount="4" />
    <joint component1="0" component2="1" index="0>13" rotLimit="0 0 5" transLimit="0 0 0" 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">
    <attacherJoint position="1 0" rotation="0" invertX="false" />
    <attacherJoint position="1 0" rotation="0" invertX="false" />
    <attacherJoint position="1 0" rotation="0" invertX="false" />
    <attacherJoint position="0 0" rotation="0" invertX="true" />
  </schemaOverlay>
</vehicle>