<?xml version="1.0" encoding="utf-8" standalone="no"?>
<vehicle type="deutzAgroStarGPuma">
    <annotation>Edit Puma [FBM-Team], All Rights Reserved.</annotation>
    <filename>deutzAgro638.i3d</filename>
    <size width="3.5" length="6.5"/>
    <wheels autoRotateBackSpeed="1.5">
        <wheel rotSpeed="1" repr="0>0|0" driveNode="0>0|0|0" radius="0.67" restLoad="1.6" forcePointRatio="0.2" initialCompression="50" suspTravel="0.2" spring="25" damper="50" hasTireTracks="true" fenderNode="0>0|0|2" mass="0.185" width="0.42" hasParticles="true"/>
        <wheel rotSpeed="1" repr="0>1|0" driveNode="0>1|0|0" radius="0.67" restLoad="1.6" forcePointRatio="0.2" initialCompression="50" suspTravel="0.2" spring="25" damper="50" hasTireTracks="true" fenderNode="0>1|0|2" fenderRotMax="33" mass="0.185" width="0.42" hasParticles="true"/>
        <wheel rotSpeed="0" repr="0>2" radius="0.85" restLoad="1.6" forcePointRatio="0.3" initialCompression="50" suspTravel="0.2" spring="25" damper="50" hasTireTracks="true" mass="0.38" width="0.52" hasParticles="true"/>
        <wheel rotSpeed="0" repr="0>3" radius="0.85" restLoad="1.6" forcePointRatio="0.3" initialCompression="50" suspTravel="0.2" spring="25" damper="50" hasTireTracks="true" mass="0.38" width="0.52" hasParticles="true"/>
    </wheels>
    <ackermannSteering rotSpeed="70" rotMax="42" rotCenterWheel1="2" rotCenterWheel2="3"/>
    <differentials>
        <differential torqueRatio="0.5" maxSpeedRatio="1.4" wheelIndex1="0" wheelIndex2="1"/>
        <!-- front left-right -->
        <differential torqueRatio="0.5" maxSpeedRatio="1.6" wheelIndex1="2" wheelIndex2="3"/>
        <!-- back left-right -->
        <differential torqueRatio="0.5" maxSpeedRatio="1.2" differentialIndex1="0" differentialIndex2="1"/>
        <!-- front-back -->
    </differentials>
    <motor torqueScale="0.869" minRpm="1100" maxRpm="2250" maxBackwardSpeed="15" brakeForce="3.5" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" minForwardGearRatio="19.5" maxForwardGearRatio="130" minBackwardGearRatio="20.7" 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>290</fuelCapacity>
    <fuelUsage>28</fuelUsage>
    <cameras count="2">
        <camera1 index="4|0" rotatable="true" rotateNode="4" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="35">
            <raycastNode index="0>6"/>
            <raycastNode index="0>7"/>
        </camera1>
        <camera2 index="5" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true"/>
    </cameras>
	
	    <lights>
        <low>
            <light                       decoration="0>24|0|0"   lightTypes="0 3" />
            <light realLight="0>24|0|1"                          lightTypes="0" excludedLightTypes="3" /> <!--FrontLights-->
            <light                       decoration="0>24|2|0"   lightTypes="0 1"/> <!--BackLights-->
            <light realLight="0>24|1|0|1" decoration="0>24|1|0|0" lightTypes="1"/> <!--WorklightBack-->
            <light                       decoration="0>24|1|1|0" lightTypes="2"/> <!--WorklightFront-->
            <light realLight="0>24|0|2"                          lightTypes="3"/> <!--HighBeam -->
        </low>
        <high>
            <light                       decoration="0>24|0|0"   lightTypes="0 3" />
            <light realLight="0>24|0|3"                          lightTypes="0" excludedLightTypes="2 3" /> <!--FrontLights-->
            <light realLight="0>24|2|1"   decoration="0>24|2|0"   lightTypes="0 3" /> <!--BackLights-->
            <light realLight="0>24|1|0|2" decoration="0>24|1|0|0" lightTypes="1" /> <!--WorklightBack  -->
            <light realLight="0>24|1|1|1" decoration="0>24|1|1|0" lightTypes="2"  /> <!--WorklightFront -->
            <light realLight="0>24|0|4"                          lightTypes="3" excludedLightTypes="2" /> <!--HighBeam-->
        </high>
        <states>
            <state lightTypes="0" />
            <state lightTypes="0 1" />
            <state lightTypes="0 1 2" />
        </states>
    </lights>

    <brakeLights>
        <brakeLight realLight="0>24|2|1" decoration="0>24|4|0" />
    </brakeLights>
	<beaconLights>
        <beaconLight index="0>37|0|0" speed="0.015" filename="$data/shared/beaconLights/beaconLight02.i3d"/>
    </beaconLights>

    <turnLights>
        <turnLightLeft realLight="0>24|3|0|1" decoration="0>24|3|0|0" />
        <turnLightLeft realLight="0>24|3|0|2" />
        <turnLightRight realLight="0>24|3|1|1" decoration="0>24|3|1|0" />
        <turnLightRight realLight="0>24|3|1|2" />
    </turnLights>
	
    <mirrors>
        <mirror index="0>35|0|0|0"/>
        <mirror index="0>35|0|1|0"/>
        <mirror index="0>37|2|0|0"/>
    </mirrors>
    <indoorHud>
        <speed numbers="0>35|1|2" precision="1"/>
        <fuel animName="fuelDisplay"/>
        <rpm animName="rpmDisplay"/>
    </indoorHud>
    <enterReferenceNode index="0>"/>
    <exitPoint index="0>8"/>
    <attacherJoints comboDuration="2">
        <attacherJoint index="0>12|0|0" rotationNode="0>12" lowerRotation="5 0 0" upperRotation="20 0 0" rotationNode2="0>12|0" lowerRotation2="-5 0 0" upperRotation2="-14 0 0" lowerRotLimit="0 0 20" lowerTransLimit="0 0.5 0" moveTime="2.5" comboTime="1">
            <bottomArm rotationNode="0>13" translationNode="0>13|0" referenceNode="0>13|0|0" zScale="-1"/>
            <topArm rotationNode="0>13" translationNode="0>13|0" referenceNode="0>13|0|0" zScale="-1"/>
            <schema position="1 0" rotation="0" invertX="false"/>
        </attacherJoint>
        <attacherJoint index="0>16|0|0" rotationNode="0>16" lowerRotation="0 0 0" upperRotation="-32 0 0" rotationNode2="16|0" lowerRotation2="0 0 0" upperRotation2="21 0 0" lowerRotLimit="0 0 20" lowerTransLimit="0 0.4 0" moveTime="2.5" comboTime="0">
            <bottomArm rotationNode="0>17" translationNode="17|0" referenceNode="17|0|0" zScale="1"/>
            <topArm rotationNode="0>17" translationNode="17|0" referenceNode="17|0|0" zScale="1"/>
            <schema position="0 0" rotation="0" invertX="true"/>
        </attacherJoint>
        <attacherJoint index="0>20|0" jointType="trailer" allowsJointLimitMovement="false" upperRotationOffset="0" lowerRotLimit="10 50 50" comboTime="1">
            <schema position="1 0" rotation="0" invertX="false"/>
        </attacherJoint>
        <attacherJoint index="0>20|1" jointType="trailerLow" allowsJointLimitMovement="false" upperRotationOffset="0" lowerRotLimit="10 50 50" comboTime="1">
            <schema position="1 0" rotation="0" invertX="false"/>
        </attacherJoint>		        
        <attacherJoint index="0>46|0" jointType="attachableFrontloader" lowerRotLimit="0 0 0" lowerTransLimit="0 0 0" moveTime="2">
            <schema position="0 0" rotation="0" invertX="true"/>
        </attacherJoint>
    </attacherJoints>
	
    <movingTools>
        <movingTool index="0>13">
            <dependentPart index="0>28"/>
        </movingTool>
        <movingTool index="0>17">
            <dependentPart index="0>31"/>
        </movingTool>
    </movingTools>
    <movingParts>
        <!-- vorne -->
        <movingPart index="0>31" referencePoint="0>17|0|1" referenceFrame="0>17|0|1">
            <translatingPart index="0>31|0"/>
        </movingPart>
        <!-- hinten -->
        <movingPart index="0>28" referencePoint="0>13|0|1" localReferencePoint="0>28|0" referenceFrame="0>36">
            <dependentPart index="0>28|0"/>
        </movingPart>
        <!-- attacher joint back bottom cylinder 2b -->
        <movingPart index="0>28|0" referencePoint="0>13|0|1" referenceFrame="0>13|0|1">
            <dependentPart index="0>29"/>
            <dependentPart index="0>30"/>
            <dependentPart index="0>33"/>
            <dependentPart index="0>34"/>
        </movingPart>
        <!-- hydraulic -->
        <movingPart index="0>29" referencePoint="0>28|1" referenceFrame="0>28|1">
            <translatingPart index="0>29|0"/>
        </movingPart>
        <movingPart index="0>30" referencePoint="0>28|2" referenceFrame="0>28|2">
            <translatingPart index="0>30|0"/>
        </movingPart>
        <movingPart index="0>33" referencePoint="0>13|0|2" referenceFrame="0>13|0|2" scaleZ="true"/>
        <movingPart index="0>34" referencePoint="0>13|0|3" referenceFrame="0>13|0|3" scaleZ="true"/>
        <!-- steering -->
        <movingPart index="0>0|0|1" referencePoint="0>32|0" referenceFrame="0>32|0" isActiveDirty="true" playSound="false" scaleZ="false"/>
        <movingPart index="0>1|0|1" referencePoint="0>32|1" referenceFrame="0>32|1" isActiveDirty="true" playSound="false" scaleZ="false"/>
    </movingParts>
    <animations>
        <animation name="fuelDisplay">
            <part node="0>35|1|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 -80"/>
        </animation>
        <animation name="rpmDisplay">
            <part node="0>35|1|1" startTime="0" endTime="0.27" startRot="0 0 0" endRot="0 0 0"/>
            <part node="0>35|1|1" startTime="0.27" endTime="1" startRot="0 0 0" endRot="0 0 -200"/>
        </animation>
        <!-- IC Animation -->
        <animation name="frontKraftheber">
            <part node="0>17|0|2" startTime="0" duration="3" startRot="0 0 0" endRot="-72 0 0"/>
        </animation>
        <animation name="backWindow">
            <part node="0>35|2|1" startTime="0" duration="2" startRot="0 0 0" endRot="60 0 0"/>
        </animation>
        <animation name="frontWindow">
            <part node="0>35|2|0" startTime="0" duration="2" startRot="0 0 0" endRot="-60 0 0"/>
            <part node="0>35|3" startTime="0" duration="2" startRot="-11.701 11.536 46.695" endRot="-58 11.536 46.695"/>
        </animation>
        <animation name="rightWindow">
            <part node="0>35|2|5" startTime="0" duration="2" startRot="0 0 0" endRot="-2.138 -15 0"/>
            <part node="0>35|2|5|2" startTime="0" duration="2" startRot="0 0 0" endRot="0 0 90.161"/>
        </animation>
        <animation name="leftWindow">
            <part node="0>35|2|6" startTime="0" duration="2" startRot="0 0 0" endRot="-2.487 15 0"/>
            <part node="0>35|2|6|2" startTime="0" duration="2" startRot="0 0 0" endRot="0 0 -90.161"/>
        </animation>
        <animation name="rightDoor">
            <part node="0>35|2|2" startTime="0" duration="2" startRot="0 0 0" endRot="-6.532 -45 3.171"/>
        </animation>
        <animation name="leftDoor">
            <part node="0>35|2|3" startTime="0" duration="2" startRot="0 0 0" endRot="-6.532 45 -3.171"/>
        </animation>
        <animation name="rightMirror">
            <part node="0>35|0|1" startTime="0" duration="2" startRot="-97.635 -24.859 1.497" endRot="-94.385 -22.716 1.316"/>
        </animation>
        <animation name="leftMirror">
            <part node="0>35|0|0" startTime="0" duration="2" startRot="-96.59 24.997 0.999" endRot="-90.991 23.648 1.025"/>
        </animation>
        <animation name="lensHood">
            <part node="0>37|2" startTime="0" duration="2" startRot="0 0 0" endRot="-15 0 0"/>
            <part node="0>37|2|0" startTime="0" duration="2" startRot="0 0 0" endRot="-88 0 0"/>
        </animation>
    </animations>
    <animParts>
    </animParts>
    <interactiveComponents>
        <windows>
            <window name="frontKraftheber" mark="0>17|0|3" size="0.1" animName="frontKraftheber" onMessage="ic_component_collapse" offMessage="ic_component_unfold"/>
            <window name="backWindow" mark="0>35|2|1|1" size="0.1" animName="backWindow" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="frontWindow" mark="0>35|2|0|2" size="0.1" animName="frontWindow" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="rightWindow" mark="0>35|2|5|3" size="0.1" animName="rightWindow" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="leftWindow" mark="0>35|2|6|3" size="0.1" animName="leftWindow" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="rightDoor" mark="0>35|2|2|1" size="0.1" animName="rightDoor" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="leftDoor" mark="0>35|2|3|1" size="0.1" animName="leftDoor" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="rightMirror" mark="0>35|4" size="0.1" animName="rightMirror" onMessage="ic_component_turn" offMessage="ic_component_turnback"/>
            <window name="leftMirror" mark="0>35|5" size="0.1" animName="leftMirror" onMessage="ic_component_turn" offMessage="ic_component_turnback"/>
            <window name="lensHood" mark="0>37|2|0|1" size="0.1" animName="lensHood" onMessage="ic_component_open" offMessage="ic_component_close"/>
            <window name="lensHood" mark="0>37|2|0|2" size="0.1" animName="lensHood" onMessage="ic_component_open" offMessage="ic_component_close"/>
        </windows>
    </interactiveComponents>
    <steering index="0>11|0" indoorRotation="540" outdoorRotation="60"/>
    <characterNode index="0>21|0" cameraMinDistance="1.5" filename="$dataS2/character/player/player.xml" spineRotation="180 0 100">
        <target ikChain="rightFoot" targetNode="0>21|1" setDirty="true"/>
        <target ikChain="leftFoot" targetNode="0>21|2" setDirty="true"/>
        <target ikChain="rightArm" targetNode="0>11|0|0" setDirty="true"/>
        <target ikChain="leftArm" targetNode="0>11|0|1" setDirty="true"/>
    </characterNode>
    <ai>
        <trafficCollisionTrigger index="0>22"/>
    </ai>
    <exhaustEffects>
        <!--TODO: adjust xzRotationOffset, xzRotationsForward, xzRotationsBackward, xzRotationsLeft, xzRotationsRight-->
        <exhaustEffect filename="$data/particleSystems/shared/exhaust.i3d" index="0>23" minRpmColor="0.3 0.3 0.3 0.04" maxRpmColor="0 0 0 7" minRpmScale="0.08" maxRpmScale="0.3" xzRotationOffset="0 0" xzRotationsForward="0 0" xzRotationsBackward="0 0" xzRotationsLeft="0 0" xzRotationsRight="0 0"/>
    </exhaustEffects>
    <motorStartDuration>2500</motorStartDuration>
    <attachSound file="$data/sounds/attach.wav" pitchOffset="1"/>
    <motorStartSound file="$data/vehicles/steerable/deutz/deutzAgrostar661_start.wav" pitchOffset="0.65" volume="1"/>
    <motorSound file="$data/vehicles/steerable/deutz/deutzAgrostar661_idle.wav" pitchOffset="0.65" pitchScale="0.012" pitchMax="1.5" volume="1" radius="50" innerRadius="20"/>
    <motorSoundRun file="$data/vehicles/steerable/deutz/deutzAgrostar661_run.wav" pitchOffset="0.65" pitchScale="0.009" pitchMax="1.375" volume="0.9"/>
    <motorSoundRun2 file="$data/vehicles/shared/transmissionOld.wav" pitchOffset="0.75" volume="0.3" pitchMax="1.25" volumeMax="0.7"/>
    <motorStopSound file="$data/vehicles/steerable/deutz/deutzAgrostar661_stop.wav" pitchOffset="1" volume="2.5"/>
    <compressedAirSound file="$data/sounds/technicalAccessories/brakeBig.wav" pitchOffset="1" volume="1.25"/>
    <compressionSound file="$data/sounds/technicalAccessories/brakeBig.wav" pitchOffset="1" volume="1.5"/>
    <hydraulicSound file="$data/sounds/hydraulicUp.wav" pitchOffset="0.55" volume="0.8"/>
    <honkSound file="$data/sounds/horn.wav" volume="1" innerRadius="10" radius="70"/>
    <doorOpener trigger="0>35|10" icIndex="7"/>
    <doorOpener trigger="0>35|11" icIndex="1"/>
    <washable dirtDuration="50" washDuration="1" workMultiplier="4"/>
    <components count="1">
        <component1 centerOfMass="0 0.87 0.35" solverIterationCount="10"/>
    </components>
    <colorNodes>
        <colorNode index="0>35"/>
        <colorNode index="0>35|9"/>
    </colorNodes>
    <schemaOverlay file="$dataS2/menu/schemas/vehicleSchema.png" fileSelected="$dataS2/menu/schemas/vehicleSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0.5 0"/>
    <storeData>
        <name>
            <de>Deutz Agrostar 6.38 </de>
            <en>Deutz Agrostar 6.38 </en>
        </name>
        <functions>
            <function>$l10n_function_tractor</function>
        </functions>
        <specs>
            <power>135</power>
        </specs>
        <image>textur/store_deutzAgroStar638.png</image>
        <price>16400</price>
        <dailyUpkeep>49</dailyUpkeep>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>DEUTZFAHR</brand>
        <category>tractors</category>
    </storeData>
</vehicle>
