<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="tractor">
    <annotation>Ruslan Kerevey.</annotation>

    <storeData>
        <name>URAL 4320 10</name>
        <specs>
            <power>330</power>
            <maxSpeed>85</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_truck</function>
        </functions>
        <image>store_truckL.png</image>
        <price>45000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>URAL</brand>
        <category>trucks</category>
        <vertexBufferMemoryUsage>3542732</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>1089360</indexBufferMemoryUsage>
        <textureMemoryUsage>28049896</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_truck</typeDesc>
        <filename>truckL.i3d</filename>
        <size width="3.5" length="10" lengthOffset="-1"/>
        <components>
            <component centerOfMass="0 0.68 -0.3" solverIterationCount="10" mass="8364"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0">
            <default name="DEFAULT_VEHICLE"/>
            <selected name="DEFAULT_VEHICLE_SELECTED"/>
        </schemaOverlay>
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels autoRotateBackSpeed="1.7">
                    <wheel filename="implement/315_80R22_5.xml" configId="truck1" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics rotSpeed="1"  restLoad="1.9" repr="axisFrontLeft" driveNode="wheel01"  forcePointRatio="0.5" initialCompression="50" suspTravel="0.3" spring="35" damper="20" frictionScale="1.5" />
                    </wheel>
                    <wheel filename="implement/315_80R22_6.xml" configId="truck1" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics rotSpeed="1"  restLoad="1.9" repr="axisFrontRight" driveNode="wheel02" forcePointRatio="0.5" initialCompression="50" suspTravel="0.3" spring="35" damper="20" frictionScale="1.5" />
                    </wheel>
                    <wheel filename="implement/315_80R22_5.xml" configId="truck1" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics rotSpeed="0"  restLoad="1.5" repr="wheel03" forcePointRatio="0.5" initialCompression="12" suspTravel="0.4"  spring="17" damper="40" frictionScale="1.5" />
                    </wheel>
                    <wheel filename="implement/315_80R22_6.xml" configId="truck1" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics rotSpeed="0"  restLoad="1.5" repr="wheel04" forcePointRatio="0.5" initialCompression="12" suspTravel="0.4"  spring="17" damper="40" frictionScale="1.5" />
                    </wheel>
                    <wheel filename="implement/315_80R22_5.xml" configId="truck1" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics rotSpeed="0"  restLoad="1.5" repr="wheel05" forcePointRatio="0.5" initialCompression="12" suspTravel="0.4"  spring="17" damper="40" frictionScale="1.5" />
                    </wheel>
                    <wheel filename="implement/315_80R22_6.xml" configId="truck1" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics rotSpeed="0"  restLoad="1.5" repr="wheel06" forcePointRatio="0.5" initialCompression="12" suspTravel="0.4"  spring="17" damper="40" frictionScale="1.5" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="40" rotMax="45" rotCenterWheel1="3" rotCenterWheel2="4" />
        </ackermannSteeringConfigurations>

        <rimColor material="8">0.98 0.98 0.98</rimColor>
    </wheels>

    <lights>
        <states>
            <state lightTypes="0"/>
            <state lightTypes="0 1"/>
            <state lightTypes="0 1 2"/>
		</states>
        <realLights>
            <low>
                <light node="0>0|1|0" lightTypes="0"/>
                <light node="0>0|1|1" lightTypes="1"/>
                <light node="0>0|1|2" lightTypes="2"/>
				<turnLightRight node="0>0|1|3"/>
				<turnLightLeft node="0>0|1|4"/>
				<brakeLight node="0>0|1|5"/>	
				<reverseLight node="0>0|1|6"/>	
            </low>
            <high>
                <light node="0>0|1|0" lightTypes="0"/>
                 <light node="0>0|1|1" lightTypes="1"/>
                 <light node="0>0|1|2" lightTypes="2"/>
				 <turnLightRight node="0>0|1|3"/>
				 <turnLightLeft node="0>0|1|4"/>
				 <brakeLight node="0>0|1|5"/>
                 <reverseLight node="0>0|1|6"/>				 
            </high>
        </realLights>
	</lights>

    <speedRotatingParts>
        <speedRotatingPart node="cardan01" radius="0.1"/>
        <speedRotatingPart node="cardan02" radius="0.1"/>
        <speedRotatingPart node="cardan03" radius="-0.1"/>
        <speedRotatingPart node="cardan04" radius="0.1"/>
    </speedRotatingParts>

    <enterable isTabbable="true" >
        <enterReferenceNode node="exitPoint" />
        <exitPoint node="exitPoint" />

        <cameras>
            <camera node="outdoorCamera1" rotatable="true" rotateNode="outdoorCameraTarget" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="6" transMax="40" translation="0 0 11" rotation="-19 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" shadowFocusBox="shadowFocusBox" />
        </cameras>

        <characterNode node="playerSkin" cameraMinDistance="1.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="playerRightFootTargetGas"   referenceNode="gasPedal" directionReferenceNode="playerRightFootTargetGasRef"/>
            <state node="playerRightFootTargetBrake" referenceNode="brakePedal" />
        </characterTargetNodeModifier>

        <mirrors>
            <mirror node="mirrorsDecal01" prio="1" />
            <mirror node="mirrorsDecal02" prio="2" />
            <mirror node="mirrorsDecal03" prio="1" />
            <mirror node="mirrorsDecal04" prio="2" />
        </mirrors>
    </enterable>

    <motorized>
        <consumerConfigurations>
            <consumerConfiguration>
                <consumer fillUnitIndex="1" usage="186"  fillType="diesel" /> <!-- usage is per hour at max load and max rpm -->
                <consumer fillUnitIndex="2" usage="300" fillType="air" permanentConsumption="false" refillLitersPerSecond="350" refillCapacityPercentage="0.5" /> <!-- usage per second at full brake power -->
            </consumerConfiguration>
        </consumerConfigurations>

        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="3" wheelIndex2="4" /> <!-- back 1-2 -->
                    <differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="5" wheelIndex2="6" /> <!-- back 3-4 -->
                    <differential torqueRatio="0.5" maxSpeedRatio="1.2" differentialIndex1="1" differentialIndex2="2" /> <!-- back -->
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>

        <motorConfigurations>
            <motorConfiguration name="Roadrunner" hp="620" price="0">
                <motor torqueScale="2.97" minRpm="850" maxRpm="2200" maxForwardSpeed="83" maxBackwardSpeed="15" brakeForce="5" lowBrakeForceScale="0.22" rotInertia="0.015">
                    <torque rpm="850" torque="0.9"/>
                    <torque rpm="1000" torque="1"/>
                    <torque rpm="1450" torque="1"/>
                    <torque rpm="1900" torque="0.75"/>
                    <torque rpm="2200" torque="0.63"/>
                    <torque rpm="2500" torque="0.2"/>
                </motor>
                <transmission minForwardGearRatio="10" maxForwardGearRatio="200" minBackwardGearRatio="40" maxBackwardGearRatio="200" />
            </motorConfiguration>
        </motorConfigurations>

        <animationNodes>
            <animationNode node="coolerPart" rotSpeed="800" rotAxis="3" turnOnFadeTime="5" turnOffFadeTime="10" />
        </animationNodes>

        <exhaustEffects>
            <exhaustEffect node="exhaustParticle01" filename="$data/particleSystems/shared/exhaust.i3d" minRpmColor="0 0 0 1" maxRpmColor="0.01 0.01 0.01 5" minRpmScale="0.1" maxRpmScale="0.55" xzRotationsOffset="40 0" xzRotationsForward="0 0" xzRotationsBackward="100 0" xzRotationsLeft="0 -100" xzRotationsRight="0 100" />
            <exhaustEffect node="exhaustParticle02" filename="$data/particleSystems/shared/exhaust.i3d" minRpmColor="0 0 0 1" maxRpmColor="0.01 0.01 0.01 5" minRpmScale="0.1" maxRpmScale="0.55" xzRotationsOffset="40 0" xzRotationsForward="0 0" xzRotationsBackward="100 0" xzRotationsLeft="0 -100" xzRotationsRight="0 100" />
        </exhaustEffects>

        <sounds externalSoundFile="lizard_truck.xml" />

        <dashboards>
            <dashboard displayType="ANIMATION" valueType="motorTemperature" animName="tempDisplay"  minValueAnim="0" maxValueAnim="250" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ANIMATION" valueType="rpm" animName="rpmDisplay"  minValueAnim="0" maxValueAnim="4000" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ANIMATION" valueType="speed" animName="speedDisplay"  minValueAnim="0" maxValueAnim="160" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ANIMATION" valueType="motorTemperature" animName="axleTempDisplay"  minValueAnim="0" maxValueAnim="300" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ANIMATION" valueType="motorTemperature" animName="exhausTempDisplay"  minValueAnim="0" maxValueAnim="200" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ANIMATION" valueType="rpm" animName="turboDisplay"  minValueAnim="1800" maxValueAnim="2000" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </motorized>

    <drivable>
        <sounds>
            <waterSplash template="WATER_SPLASH_01" linkNode="0>" />
        </sounds>

        <steeringWheel node="steeringWheel" indoorRotation="360" outdoorRotation="30" />

        <dashboards>
            <dashboard displayType="ROT" valueType="decelerationAxis" node="brakePedal" minRot="0 180 0" maxRot="-30 180 0" doInterpolation="true" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ROT" valueType="accelerationAxis" node="gasPedal" minRot="0 180 0" maxRot="-30 180 0" doInterpolation="true" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </drivable>

    <wipers>
        <wiper animName="wiperFrontAnimation" >
            <state animSpeed="0.75" animPause="2.0" />
            <state animSpeed="0.75" animPause="0.0" />
            <state animSpeed="1.10" animPause="0.0" />
        </wiper>
    </wipers>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unit="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="diesel" capacity="880">
                        <dashboard displayType="ANIMATION" valueType="fillLevel" animName="fuelDisplay" groups="MOTOR_ACTIVE"/>
                    </fillUnit>
                    <fillUnit unit="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="air" capacity="5000"/>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <attacherJoints comboDuration="2">
        <attacherJointConfigurations>
            <attacherJointConfiguration>
                <attacherJoint node="attacherJointSemiTrailer" jointType="semitrailer" allowsJointLimitMovement="false" allowsLowering="false" lowerRotLimit="12 125 12">
                    <schema position="1 0" rotation="0" invertX="false" />
                    <attachSound template="TRUCK_ATTACH_01" linkNode="0>" />
                </attacherJoint>
            </attacherJointConfiguration>
        </attacherJointConfigurations>

        <sounds>
            <attach template="ATTACH_01" linkNode="0>" />
            <hydraulic template="DEFAULT_HYDRAULIC_SOUND" linkNode="0>" />
        </sounds>
    </attacherJoints>

    <honk>
        <sound template="HONK_LIZARD_TRUCK" linkNode="0>" />
    </honk>

    <dashboard>
        <groups>
            <group name="MOTOR_STARTING" isMotorStarting="true"/>
            <group name="MOTOR_ACTIVE"   isMotorStarting="true" isMotorRunning="true"/>
        </groups>
    </dashboard>

    <animations>
        <animation name="wiperFrontAnimation">
            <part node="wiper01"  startTime="0.0" endTime="0.5" startRot="0 0 0" endRot="0 0 55" />
            <part node="wiper02"  startTime="0.0" endTime="0.5" startRot="0 0 0" endRot="0 3.5 55" />
        </animation>
        <animation name="speedDisplay">
            <part node="speedNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 211" />
        </animation>
        <animation name="rpmDisplay">
            <part node="rpmNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 240" />
        </animation>
        <animation name="fuelDisplay">
            <part node="fuelNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 180" />
        </animation>
        <animation name="tempDisplay">
            <part node="tempNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 180" />
        </animation>
        <animation name="axleTempDisplay">
            <part node="axleTempNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 180" />
        </animation>
        <animation name="exhausTempDisplay">
            <part node="exhausTempNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 180" />
        </animation>
        <animation name="turboDisplay">
            <part node="turboNeedle" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 180" />
        </animation>
    </animations>

    <cylindered>
        <movingParts>
            <movingPart node="steeringBarLeftHydraulic" referencePoint="steeringBarLeftHydraulicRef" referenceFrame="steeringBarLeftHydraulicRef" isActiveDirty="true">
                <translatingPart node="steeringBarLeftHydraulicPunch" />
            </movingPart>
            <movingPart node="steeringBarRightHydraulic" referencePoint="steeringBarRightHydraulicRef" referenceFrame="steeringBarRightHydraulicRef" isActiveDirty="true">
                <translatingPart node="steeringBarRightHydraulicPunch" />
            </movingPart>
            <movingPart node="steeringBar" referencePoint="steeringBarRef" referenceFrame="steeringBarRef" isActiveDirty="true"/>
        </movingParts>
        <sounds>
            <hydraulic template="DEFAULT_HYDRAULIC_SOUND"/>
        </sounds>
    </cylindered>

    <suspensions>
        <suspension node="seat"              weight="150" minTranslation="-0.05 -0.15 0.0" maxTranslation="0.05 0.15 0.0" suspensionParametersX="20 4" suspensionParametersY="5 1" suspensionParametersZ="20 4" />
        <suspension useCharacterTorso="true" weight="90" minRotation="0 -5 -5" maxRotation="0 5 5" suspensionParametersY="7 1" suspensionParametersZ="7 1" />
    </suspensions>

    <ai>
        <collisionTrigger node="aiCollisionTrigger" />
    </ai>

    <foliageBending>
        <bendingNode minX="-1.35" maxX="1.35" minZ="-5.4" maxZ="3.6" yOffset="0.6" />
    </foliageBending>

    <!-- <baseMaterial>
        <material name="truckL_mat" baseNode="truckL_vis">
            <shaderParameter name="colorMat0" value="SHARED_GREY2"/>
        </material>
    </baseMaterial>

    <baseMaterialConfigurations price="4000" useDefaultColors="true" defaultColorIndex="16">
        <material name="truckL_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations> -->

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="truckL_main_component1" node="0>" />
        <!-- <i3dMapping id="truckL_vis" node="0>0" /> -->
        <i3dMapping id="axisFrontLeft" node="0>0|0|0" />
        <i3dMapping id="wheel01" node="0>0|0|0|0" />
        <i3dMapping id="steering" node="0>0|4|0|0" />
        <i3dMapping id="steeringBarLeftHydraulicRef" node="0>0|0|0|2" />
        <i3dMapping id="axisFrontRight" node="0>0|0|1" />
        <i3dMapping id="wheel02" node="0>0|0|1|0" />
        <i3dMapping id="steeringBarRef" node="0>0|0|1|1" />
        <i3dMapping id="steeringBarRightHydraulicRef" node="0>0|0|1|2" />
        <i3dMapping id="wheel03" node="0>0|0|2" />
        <i3dMapping id="wheel04" node="0>0|0|3" />
        <i3dMapping id="wheel05" node="0>0|0|4" />
        <i3dMapping id="wheel06" node="0>0|0|5" />
        <i3dMapping id="lights" node="0>0|1" />
        <i3dMapping id="turnlightStaticRight" node="0>0|1|0|0" />
        <i3dMapping id="turnlightStaticLeft" node="0>0|1|0|1" />
        <i3dMapping id="reverseLightStatic" node="0>0|1|0|2" />
        <i3dMapping id="backlightStatic" node="0>0|1|0|3" />
        <i3dMapping id="frontlightStatic" node="0>0|1|0|4" />
        <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="turnLightLeftBack" node="0>0|1|2|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|1|2|1" />
        <i3dMapping id="turnLightLeftFront" node="0>0|1|2|2" />
        <i3dMapping id="turnLightRightFront" node="0>0|1|2|3" />
        <i3dMapping id="backLightsHigh1" node="0>0|1|3|0" />
        <i3dMapping id="reverseLight" node="0>0|1|4|0" />
        <i3dMapping id="dekolightStatic" node="0>0|1|5|2" />
        <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="exitPoint" node="0>0|3" />
        <i3dMapping id="steeringWheel" node="0>0|4|0|0" />
        <i3dMapping id="playerLeftHandTarget" node="0>0|4|0|0|1" />
        <i3dMapping id="playerRightHandTarget" node="0>0|4|0|0|2" />
        <i3dMapping id="coolerPart" node="0>0|5" />
        <i3dMapping id="steeringBarLeftHydraulic" node="0>0|6|0" />
        <i3dMapping id="steeringBarLeftHydraulicPunch" node="0>0|6|0|0" />
        <i3dMapping id="steeringBarRightHydraulic" node="0>0|6|1" />
        <i3dMapping id="steeringBarRightHydraulicPunch" node="0>0|6|1|0" />
        <i3dMapping id="cardan01" node="0>0|7|0|0" />
        <i3dMapping id="cardan02" node="0>0|7|1|0" />
        <i3dMapping id="cardan03" node="0>0|7|2|0" />
        <i3dMapping id="cardan04" node="0>0|7|3|0" />
        <i3dMapping id="seat" node="0>0|8|0" />
        <i3dMapping id="playerSkin" node="0>0|8|0|1|0" />
        <i3dMapping id="turboNeedle" node="0>0|8|1|0|0" />
        <i3dMapping id="exhausTempNeedle" node="0>0|8|1|1|0" />
        <i3dMapping id="axleTempNeedle" node="0>0|8|1|2|0" />
        <i3dMapping id="tempNeedle" node="0>0|8|1|3|0" />
        <i3dMapping id="fuelNeedle" node="0>0|8|1|4|0" />
        <i3dMapping id="speedNeedle" node="0>0|8|1|5|0" />
        <i3dMapping id="rpmNeedle" node="0>0|8|1|6|0" />
        <i3dMapping id="interiorLightDecal" node="0>0|8|1|7" />
        <i3dMapping id="playerRightFootTargetGasRef" node="0>0|8|2" />
        <i3dMapping id="playerRightFootTargetGas" node="0>0|8|3" />
        <i3dMapping id="playerLeftFootTarget" node="0>0|8|4" />
        <i3dMapping id="playerRightFootTarget" node="0>0|8|5" />
        <i3dMapping id="gasPedal" node="0>0|8|6" />
        <i3dMapping id="brakePedal" node="0>0|8|7" />
        <i3dMapping id="playerRightFootTargetBrake" node="0>0|8|7|0" />
        <i3dMapping id="wiper01" node="0>0|8|8|0" />
        <i3dMapping id="wiper02" node="0>0|8|9|0" />
        <i3dMapping id="attacherJointSemiTrailer" node="0>0|9|0" />
        <i3dMapping id="aiCollisionTrigger" node="0>0|10|0" />
        <i3dMapping id="mirrorsDecal01" node="0>0|11|0" />
        <i3dMapping id="mirrorsDecal02" node="0>0|11|1" />
        <i3dMapping id="mirrorsDecal03" node="0>0|11|2" />
        <i3dMapping id="mirrorsDecal04" node="0>0|11|3" />
        <i3dMapping id="exhaustParticle01" node="0>0|12|0" />
        <i3dMapping id="exhaustParticle02" node="0>0|12|1" />
    </i3dMappings>
</vehicle>
