<?xml version="1.0" encoding="utf-8" standalone="no"?>
<vehicle type="tractor">
    <annotation>Copyright (C)thenevsova36, All Rights Reserved. www.lsczech.cz</annotation>

    <storeData>
        <name>50 Super</name>
        <specs>
            <power>50</power>
            <maxSpeed>27</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_tractor</function>
        </functions>
        <image>Textures/storeImages/store.dds</image>
        <price>42000</price>
        <lifetime>900</lifetime>
        <rotation>0</rotation>
        <brand>ZETOR</brand>
        <category>tractorsS</category>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_tractor</typeDesc>
        <filename>Zetor_50_Super.i3d</filename>
        <size width="2.5" length="3.5"/>
        <components>
            <component centerOfMass="0 0.7 0" solverIterationCount="10" mass="2400" />
            <component centerOfMass="0 0 0" solverIterationCount="20" mass="300" />
            <joint component1="1" component2="2" node="1>0" rotLimit="0 0 15" transLimit="0 0 0" maxRotDriveForce="0 0 50" rotDriveRotation="- - -" rotDriveSpring="0 0 8" rotDriveDamping="0 0 8"/>
        </components>
        <schemaOverlay attacherJointPosition="0.5 0">
            <default name="DEFAULT_VEHICLE"/>
            <selected name="DEFAULT_VEHICLE_SELECTED"/>
        </schemaOverlay>
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels autoRotateBackSpeed="1.8">
                    <wheel>
                        <physics rotSpeed="1" restLoad="0.94" repr="1>2|0" driveNode="1>2|0|0|0" radius="0.445" width="0.21" mass="0.20" initialCompression="50" suspTravel="0.09" spring="38" damper="40" tireTrackAtlasIndex="1"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="1" restLoad="0.94" repr="1>2|1" driveNode="1>2|1|0|0" radius="0.445" width="0.21" mass="0.20" initialCompression="50" suspTravel="0.09" spring="38" damper="40" tireTrackAtlasIndex="1"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="1.19" repr="0>11|0|0|0" radius="0.720" width="0.42" mass="0.42" initialCompression="50" suspTravel="0.08" spring="40" damper="40"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="1.19" repr="0>11|1|0|0" radius="0.720" width="0.42" mass="0.42" initialCompression="50" suspTravel="0.08" spring="40" damper="40"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="65" rotMax="42" rotCenterWheel1="3" rotCenterWheel2="4"/>
        </ackermannSteeringConfigurations>
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0" linkNode="8|2" filename="ModelsBody/Body50.i3d"/>
        <!--dynamicallyLoadedPart node="0" linkNode="0>2|1|0|3|0" filename="ModelsShared/HydraulikaSeda.i3d"-->
        <!--dynamicallyLoadedPart node="1" linkNode="0>2|3|0|1|0|0" filename="ModelsShared/HydraulikaSeda.i3d"-->
        <!--dynamicallyLoadedPart node="2" linkNode="0>2|3|0|2|0" filename="ModelsShared/HydraulikaSeda.i3d"-->
        <!--dynamicallyLoadedPart node="3" linkNode="0>2|4|0|0" filename="ModelsShared/HydraulikaSeda.i3d"-->
    </dynamicallyLoadedParts>

    <attachable>
        <airConsumer usage="1000"/>
    </attachable>

    <connectionHoses>
        <target attacherJointIndices="1 2 3" type="airDoubleRed" node="0>3|7|3" socket="air_red"/>
        <target attacherJointIndices="1 2 3" type="hydraulicIn" node="0>3|7|2|0"/>
        <target attacherJointIndices="1 2 3" type="hydraulicIn" node="0>3|7|1|0"/>
        <target attacherJointIndices="1 2 3" type="electric" node="0>3|7|0|0" socket="electric"/>
    </connectionHoses>

    <attacherJoints comboDuration="2">
        <attacherJoint node="0>2|0|0|0" upperRotationOffset="0.82" moveTime="2.5" comboTime="1">
            <distanceToGround lower="0.36" upper="0.99"/>
            <rotationNode node="0>2|0" upperRotation="35 0 0" lowerRotation="-10 0 0"/>
            <rotationNode2 node="0>2|0|0"/>
            <bottomArm rotationNode="0>2|1" translationNode="0>2|1|0" referenceNode="0>2|1|0|0" zScale="-1"/>
            <topArm baseNode="0>2|2" filename="ModelsShared/Treti_bod.i3d" zScale="-1"/>
            <schema position="1 0" rotation="0" invertX="false"/>
        </attacherJoint>
        <attacherJoint node="0>3|0|1" jointType="trailer" lowerRotLimit="20 50 50" upperRotRotationOffset="0" allowsJointLimitMovement="false" comboTime="1">
            <distanceToGround lower="0.44" upper="1.02"/>
            <transNode node="0>3|0" minY="0.85" maxY="1.08"/>
            <schema position="1 0" rotation="0" invertX="false"/>
        </attacherJoint>
        <attacherJoint node="0>3|2" jointType="trailerLow" lowerRotLimit="20 60 50" lowerTransLimit="0 0 0" upperRotRotationOffset="0" allowsJointLimitMovement="false" comboTime="1">
            <schema position="1 0" rotation="0" invertX="false"/>
        </attacherJoint>
        <attacherJoint node="0>3|3" jointType="trailer" lowerRotLimit="20 65 50" lowerTransLimit="0 0 0" upperRotationOffset="0" comboTime="1" allowsJointLimitMovement="false">
            <schema position="0 0" rotation="0" invertX="true"/>
        </attacherJoint>
        <attacherJoint node="0>3|4" jointType="trailerLow" lowerRotLimit="20 65 50" lowerTransLimit="0 0 0" upperRotationOffset="0" comboTime="1" allowsJointLimitMovement="false">
            <schema position="0 0" rotation="0" invertX="true"/>
        </attacherJoint>
        <sounds>
            <attach template="ATTACH_01" linkNode="0>" />
            <hydraulic template="DEFAULT_HYDRAULIC_SOUND" linkNode="0>" />
        </sounds>
    </attacherJoints>

    <powerTakeOffs>
        <output outputNode="0>3|1" attacherJointIndices="3"/>
    </powerTakeOffs>

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

        <defaultLights>
            <defaultLight shaderNode="0>5|5|0" lightTypes="0 3" />
            <defaultLight shaderNode="0>5|5|1" lightTypes="0 3" />
            <defaultLight shaderNode="0>5|5|3|0" lightTypes="0 3" />
            <defaultLight shaderNode="0>5|5|2|0" lightTypes="0 3" />
        </defaultLights>

        <turnLights>
            <turnLightLeft shaderNode="0>5|5|2|2" />
            <turnLightLeft shaderNode="0>5|5|4|1" />
            <turnLightRight shaderNode="0>5|5|3|2" />
            <turnLightRight shaderNode="0>5|5|5|1" />
        </turnLights>

        <brakeLights>
            <brakeLight shaderNode="0>5|5|2|1" />
            <brakeLight shaderNode="0>5|5|3|1" />
        </brakeLights>

    <sounds>
        <switchLight template="SWITCH_01" linkNode="0>" />
        <turnLight template="SWITCH_TURNLIGHT" linkNode="0>" />
    </sounds>

    </lights>

    <enterable>
        <exitPoint node="0>1"/>
        <enterReferenceNode node="0>"/>
        <characterNode node="0>9|0" cameraMinDistance="1.5" spineRotation="-90 0 90">
            <target ikChain="rightFoot" targetNode="0>9|1"/>
            <target ikChain="leftFoot" targetNode="0>9|2"/>
            <target ikChain="rightArm" targetNode="0>4|0|0"/>
            <target ikChain="leftArm" targetNode="0>4|0|1"/>
        </characterNode>
        <cameras>
            <camera node="0|0|0" rotatable="true" rotateNode="0|0" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="3" transMax="35">
                <raycastNode node="0>0|2"/>
                <raycastNode node="0>0|3"/>
            </camera>
            <camera node="0|1" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true"/>
        </cameras>
    </enterable>

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

    <motorConfigurations>
            <motorConfiguration name="50 Super" hp="50" price="0"> 
                <motor torqueScale="0.28" minRpm="800" maxRpm="2200" maxForwardSpeed="27.5" maxBackwardSpeed="6.2" brakeForce="2" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" rotInertia="0.0001" >
                    <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 minForwardGearRatio="25.9" maxForwardGearRatio="250" minBackwardGearRatio="50" maxBackwardGearRatio="250" />
            </motorConfiguration>
     </motorConfigurations>

        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="3" wheelIndex2="4"/>
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>

        <exhaustEffects>
            <exhaustEffect node="0>7" filename="$data/particleSystems/shared/exhaust.i3d" minRpmColor="0 0 0 0.05" maxRpmColor="0.01 0.01 0.01 5" minRpmScale="0.08" maxRpmScale="0.8" xzRotationsOffset="0 0" xzRotationsForward="-250 0" xzRotationsBackward="50 0" xzRotationsLeft="0 100" xzRotationsRight="0 -100"/>
        </exhaustEffects>

        <motorStartDuration>6000</motorStartDuration>

        <sounds externalSoundFile="Sounds/ZT323Sound.xml" />

    </motorized>

    <drivable>
        <steeringWheel node="0>4|0|2" indoorRotation="540" outdoorRotation="50"/>
    </drivable>

    <cylindered>
        <movingTools>
            <movingTool node="0>2|1">
                <dependentPart node="0>2|3"/>
                <dependentPart node="0>2|4"/>
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="0>2|3" referencePoint="0>2|1|0|1" localReferencePoint="0>2|3|0|1" referenceFrame="0>" invertZ="true">
                <dependentPart node="0>2|3|0|1"/>
            </movingPart>
            <movingPart node="0>2|3|0|1" referencePoint="0>2|1|0|1" referenceFrame="0>2|3|0|0" invertZ="true"/>
            <movingPart node="0>2|4" referencePoint="0>2|1|0|2" referenceFrame="0>" scaleZ="true" invertZ="true"/>
        </movingParts>
    <sounds>
         <hydraulic template="DEFAULT_HYDRAULIC_SOUND" linkNode="0>"/>
    </sounds>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unit="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="diesel" capacity="69" >
                    </fillUnit>
                    <fillUnit unit="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="air" capacity="2000" />
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <foliageBending>
        <bendingNode minX="-1.05" maxX="1.05" minZ="0.75" maxZ="2.05"  yOffset="0.6" />
        <bendingNode minX="-1.05" maxX="1.05" minZ="-2.15" maxZ="-0.3" yOffset="0.6" />
        <bendingNode minX="-1.05" maxX="1.05" minZ="-0.3" maxZ="0.75" yOffset="0.6" />
    </foliageBending>

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

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

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

    <ai>
        <collisionTrigger node="0>6"/>
    </ai>

</vehicle>
