﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="cultivator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>Joker 4 CT</name>
        <specs>
            <neededPower>140</neededPower>
            <workingWidth>4</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="800" filterSpecMax="900"/>
        </specs>
        <functions>
            <function>$l10n_function_discHarrow</function>
        </functions>
        <image>$data/vehicles/horsch/joker4CT/store_joker4CT.png</image>
        <price>25000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>HORSCH</brand>
        <category>discHarrows</category>
        <shopFoldingState>0</shopFoldingState>
        <shopTranslationOffset>0 -0.022 0</shopTranslationOffset>
        <shopRotationOffset>1 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1669376</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>264960</indexBufferMemoryUsage>
        <textureMemoryUsage>2490368</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_discHarrow</typeDesc>
        <filename>$data/vehicles/horsch/joker4CT/joker4CT.i3d</filename>
        <size width="5" length="3.2"/>
        <speedLimit value="18" />
        <components>
            <component centerOfMass="0 0.35 0.3" solverIterationCount="15" mass="1800" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels>
                    <wheel>
                        <physics rotSpeed="0" restLoad="1.0" repr="armLeftWheel"  radius="0.26" width="0.5" forcePointRatio="0.7" initialCompression="17" suspTravel="0.35" spring="15" damper="10"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="1.0" repr="armRightWheel" radius="0.26" width="0.5" forcePointRatio="0.7" initialCompression="17" suspTravel="0.35" spring="15" damper="10"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="armLeftRoll"  radius="0.26" wheelIndex="1"/>
        <speedRotatingPart node="armRightRoll" radius="0.26" wheelIndex="2"/>
        <speedRotatingPart shaderNode="centerDiscs" groundReferenceNodeIndex="1" radius="-0.28"/>
        <speedRotatingPart shaderNode="armLeftDiscs" groundReferenceNodeIndex="1" radius="-0.28"/>
        <speedRotatingPart shaderNode="armRightDiscs" groundReferenceNodeIndex="1" radius="-0.28"/>
    </speedRotatingParts>

    <attachable allowFoldingWhileLowered="false">
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerTransLimitScale="0 1 0" lowerRotationOffset="-2" upperRotationOffset="12" lowerRotLimitScale="0 0 0.3" forcedAttachingDirection="-1">
                <distanceToGround lower="0.45" upper="0.95" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="1" diameter="0.015" straighteningFactor="1">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1" diameter="0.015" straighteningFactor="1">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn02"  length="1" diameter="0.015" straighteningFactor="1">
            <objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" length="1" diameter="0.008" straighteningFactor="1">
            <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01_connector"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01_connector" filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn02_connector"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="electric_connector"       filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <lights>
        <sharedLight linkNode="rearLight03_02"        filename="$data/shared/assets/lights/lizard/rearLight03_left.xml"/>
        <sharedLight linkNode="rearLight03_01"        filename="$data/shared/assets/lights/lizard/rearLight03_right.xml"/>

        <sharedLight linkNode="yellowRectangle_01_01" filename="$data/shared/assets/reflectors/lizard/yellowRectangle_01.xml"/>
        <sharedLight linkNode="yellowRectangle_01_02" filename="$data/shared/assets/reflectors/lizard/yellowRectangle_01.xml"/>
        <sharedLight linkNode="redRound_02_01"        filename="$data/shared/assets/reflectors/lizard/redRound_02.xml"/>
        <sharedLight linkNode="redRound_02_02"        filename="$data/shared/assets/reflectors/lizard/redRound_02.xml"/>

        <realLights>
            <high>
                <light          node="backLightsHigh" lightTypes="0"/>
                <brakeLight     node="backLightsHigh"/>
                <turnLightLeft  node="turnLightLeft"/>
                <turnLightRight node="turnLightRight"/>
            </high>
        </realLights>
    </lights>

    <powerConsumer forceNode="joker4CT_main_component1" maxForce="15" />

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" forceFactor="1" threshold="0.2" depthNode="depthNode">
            <folding minLimit="0" maxLimit="0"/>
        </groundReferenceNode>
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cultivator" functionName="processCultivatorArea">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight"/>
            <groundReferenceNode index="1"/>
            <onlyActiveWhenLowered value="true"/>
            <folding minLimit="0" maxLimit="0"/>
        </workArea>
    </workAreas>

    <workParticles>
        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="discEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/horsch/joker4CT/discEffect01Array.dds" numRows="60" rowLength="18" minFade="0.07"/>
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="rollerEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/horsch/joker4CT/rollerEffect01Array.dds" numRows="20" rowLength="18" minFade="0.07" density="0.75" densityScale="0.35"/>
            </effectNode>
        </effect>

        <particle>
            <node node="effectParticleSmokeEmit" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="2.5"/>
        </particle>
    </workParticles>

    <cultivator useDeepMode="false">
        <sounds>
            <work template="DEFAULT_CULTIVATOR_WORK" linkNode="0>" />
        </sounds>
        <directionNode node="0>" />
        <onlyActiveWhenLowered value="true"/>
    </cultivator>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="0" turnOnFoldDirection="-1" turnOnFoldMinLimit="0" turnOnFoldMaxLimit="0">
                    <foldingPart animationName="folding" speedScale="1" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="moveSupport">
            <part node="supportCol"   startTime="0" endTime="0.5" startTrans="0 0.655 0.294" endTrans="0 0.215 0.294" />
            <part node="armLeftPart"  startTime="0" endTime="0.5" startRot="0 0 0" endRot="-5.5 0 0" />
            <part node="armRightPart" startTime="0" endTime="0.5" startRot="0 0 0" endRot="-5.5 0 0" />

            <sound template="clackVar6" startTime="0.49" direction="-1" volumeScale="1" pitchScale="0.7" />
        </animation>

        <animation name="folding">
            <part node="armLeft"        startTime="0.0" endTime="6.0" startRot="0 0 0" endRot="0 0 90" />
            <part node="helpLeftJoint"  startTime="0.0" endTime="6.0" startTrans="-0.082 0 -0.334" endTrans="0.022 0.216 -0.334" startRot="0 0 0" endRot="9.826 -0.437 -78.264" />

            <part node="armRight"       startTime="0.5" endTime="6.5" startRot="0 0 0" endRot="0 0 -90" />
            <part node="helpRightJoint" startTime="0.5" endTime="6.5" startTrans="0.022 0.065 -0.338" endTrans="-0.096 0.198 -0.319" startRot="0 0 0" endRot="0 0 78.225" />

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="5.99" volumeScale="0.6" pitchScale="1.1" />
            <sound template="defaultHydraulicSound" startTime="0.5"  endTime="6.49" volumeScale="0.6" pitchScale="0.9" />
            <sound template="sheetImp02"            startTime="6.49" direction="-1" volumeScale="1.6" pitchScale="0.8" />
            <sound template="clackVar6"             startTime="6.49" direction="-1" volumeScale="0.8" pitchScale="0.7" />
            <sound template="clackVar4"             startTime="6"    direction="-1" volumeScale="1.1" pitchScale="0.7" />
            <sound template="foldStartMed02"        startTime="6"    direction="-1" volumeScale="1.6" pitchScale="0.7" />
            <sound template="clackVar6"             startTime="0.5"  direction="-1" volumeScale="0.9" pitchScale="0.7" />
            <sound template="sheetImp02"            startTime="0.5"  direction="-1" volumeScale="2.1" pitchScale="0.7" />
            <sound template="foldStartMed02"        startTime="0.1"  direction="-1" volumeScale="2.2" pitchScale="0.7" />
            <sound template="sheetImp02"            startTime="0.01" direction="1"  volumeScale="2.2" pitchScale="0.7" />
            <sound template="foldStartMed02"        startTime="0.5"  direction="1"  volumeScale="1.5" pitchScale="0.7" />
            <sound template="clackVar4"             startTime="6"    direction="1"  volumeScale="1.3" pitchScale="0.7" />
            <sound template="foldStartMed02"        startTime="6"    direction="1"  volumeScale="1.2" pitchScale="0.8" />
            <sound template="sheetImp02"            startTime="6.49" direction="1"  volumeScale="2.3" pitchScale="0.8" />
            <sound template="clackVar6"             startTime="6.49" direction="1"  volumeScale="1"   pitchScale="0.7" />
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="armLeft" playSound="true" wheelIndices="1">
                <dependentPart node="armLeftHydraulic" />
            </movingTool>
            <movingTool node="armRight" playSound="true" wheelIndices="2">
                <dependentPart node="armRightHydraulic" />
            </movingTool>

            <movingTool node="armLeftPart" playSound="true" wheelIndices="1">
                <dependentPart node="armLeftPartHydraulic" />
            </movingTool>
            <movingTool node="armRightPart" playSound="true" wheelIndices="2">
                <dependentPart node="armRightPartHydraulic" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="armLeftHydraulic" referencePoint="armLeftHydraulicRef" referenceFrame="armLeftHydraulicRef">
                <translatingPart node="armLeftHydraulicPunch" />
            </movingPart>
            <movingPart node="armRightHydraulic" referencePoint="armRightHydraulicRef" referenceFrame="armRightHydraulicRef">
                <translatingPart node="armRightHydraulicPunch" />
            </movingPart>

            <movingPart node="armLeftPartHydraulic" referencePoint="armLeftPartHydraulicRef" referenceFrame="armLeftPartHydraulicRef">
                <translatingPart node="armLeftPartHydraulicPunch" />
            </movingPart>
            <movingPart node="armRightPartHydraulic" referencePoint="armRightPartHydraulicRef" referenceFrame="armRightPartHydraulicRef">
                <translatingPart node="armRightPartHydraulicPunch" />
                <dependentPart node="armRightAlign01" />
            </movingPart>
            <movingPart node="armRightAlign01" referencePoint="armRightAlign02Ref" localReferencePoint="armRightAlign02" referenceFrame="armRightAlign01RefFrame">
                <dependentPart node="armRightAlign02" />
            </movingPart>
            <movingPart node="armRightAlign02" referencePoint="armRightAlign02Ref" referenceFrame="armRightAlign02Ref"/>
        </movingParts>
    </cylindered>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="4.5" height="1.6"/>
        <needsLowering value="true"/>
        <agentAttachment width="2.8" height="2.5" length="2.8" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-2.1" maxX="2.1" minZ="-0.95" maxZ="1.3" yOffset="0.4" />
    </foliageBending>

    <baseMaterial>
        <material name="joker4CT_mat" baseNode="joker4CT_vis">
            <shaderParameter name="colorMat0" value="HORSCH_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="joker4CT_main_component1" node="0>" />
        <i3dMapping id="joker4CT_vis" node="0>0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|0" />
        <i3dMapping id="attacherJoint" node="0>0|0|1" />
        <i3dMapping id="supportCol" node="0>0|0|2|0" />
        <i3dMapping id="electric" node="0>0|0|3|0" />
        <i3dMapping id="electric_detached" node="0>0|0|3|0|0" />
        <i3dMapping id="electric_connector" node="0>0|0|3|0|0|0" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|3|1" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|3|1|0" />
        <i3dMapping id="hydraulicIn02_connector" node="0>0|0|3|1|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|3|2" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|3|2|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|3|2|0|0" />
        <i3dMapping id="hydraulicIn02" node="0>0|0|3|3" />
        <i3dMapping id="hydraulicIn02_detached" node="0>0|0|3|3|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|3|3|0|0" />
        <i3dMapping id="rearLight03_01" node="0>0|1|0|0" />
        <i3dMapping id="rearLight03_02" node="0>0|1|0|1" />
        <i3dMapping id="yellowRectangle_01_01" node="0>0|1|0|2" />
        <i3dMapping id="yellowRectangle_01_02" node="0>0|1|0|3" />
        <i3dMapping id="redRound_02_01" node="0>0|1|0|4" />
        <i3dMapping id="redRound_02_02" node="0>0|1|0|5" />
        <i3dMapping id="backLightsHigh" node="0>0|1|1|0" />
        <i3dMapping id="turnLightLeft" node="0>0|1|2|0" />
        <i3dMapping id="turnLightRight" node="0>0|1|2|1" />
        <i3dMapping id="armLeft" node="0>0|2|0" />
        <i3dMapping id="armLeftPart" node="0>0|2|0|0" />
        <i3dMapping id="armLeftWheel" node="0>0|2|0|0|0" />
        <i3dMapping id="armLeftPartHydraulicRef" node="0>0|2|0|0|1" />
        <i3dMapping id="armLeftRoll" node="0>0|2|0|0|2" />
        <i3dMapping id="armLeftPartHydraulic" node="0>0|2|0|1" />
        <i3dMapping id="armLeftPartHydraulicPunch" node="0>0|2|0|1|0" />
        <i3dMapping id="armLeftDiscs" node="0>0|2|0|2" />
        <i3dMapping id="armLeftHydraulicRef" node="0>0|2|0|3" />
        <i3dMapping id="helpLeftJoint" node="0>0|2|0|8" />
        <i3dMapping id="armLeftHydraulic" node="0>0|2|1" />
        <i3dMapping id="armLeftHydraulicPunch" node="0>0|2|1|0" />
        <i3dMapping id="armRight" node="0>0|2|2" />
        <i3dMapping id="armRightPart" node="0>0|2|2|0" />
        <i3dMapping id="armRightPartHydraulicRef" node="0>0|2|2|0|0" />
        <i3dMapping id="armRightWheel" node="0>0|2|2|0|1" />
        <i3dMapping id="armRightRoll" node="0>0|2|2|0|2" />
        <i3dMapping id="armRightPartHydraulic" node="0>0|2|2|1" />
        <i3dMapping id="armRightPartHydraulicPunch" node="0>0|2|2|1|0" />
        <i3dMapping id="armRightAlign02Ref" node="0>0|2|2|1|0|0" />
        <i3dMapping id="armRightAlign01RefFrame" node="0>0|2|2|2" />
        <i3dMapping id="armRightAlign01" node="0>0|2|2|2|0" />
        <i3dMapping id="armRightAlign02" node="0>0|2|2|2|0|0" />
        <i3dMapping id="armRightDiscs" node="0>0|2|2|3" />
        <i3dMapping id="armRightHydraulicRef" node="0>0|2|2|4" />
        <i3dMapping id="helpRightJoint" node="0>0|2|2|9" />
        <i3dMapping id="armRightHydraulic" node="0>0|2|3" />
        <i3dMapping id="armRightHydraulicPunch" node="0>0|2|3|0" />
        <i3dMapping id="centerDiscs" node="0>0|2|4" />
        <i3dMapping id="workAreaStart" node="0>0|3|0" />
        <i3dMapping id="workAreaWidth" node="0>0|3|1" />
        <i3dMapping id="workAreaHeight" node="0>0|3|2" />
        <i3dMapping id="groundReferenceNode" node="0>0|3|3" />
        <i3dMapping id="depthNode" node="0>0|3|4" />
        <i3dMapping id="aiMarkerLeft" node="0>0|4|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|4|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|4|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|3" />
        <i3dMapping id="rollerEffect01LinkNode" node="0>0|5|0" />
        <i3dMapping id="discEffect01LinkNode" node="0>0|5|1" />
        <i3dMapping id="effectParticleSmokeEmit" node="0>0|5|2" />
    </i3dMappings>
</vehicle>
