<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="packer">
	<annotation>Giants</annotation>
    <name>Packer</name>
	<typeDesc>$l10n_TypeDesc_Cultivator</typeDesc>
    <filename>cultipacker.i3d</filename>

    <size width="12" length="9"/>

    <speedLimit value="27" />
	<powerConsumer neededPtoPower="0" forceNode="0>" maxForce="5" />
	
	<wheels autoRotateBackSpeed="2.0">
		<wheel restLoad="0.75" repr="0>0|2|0" radius="0.4" deltaY="0.2" initialCompression="1" suspTravel="0.1" spring="100" damper="20" mass="0.2" frictionScale="2" lateralStiffness="3" hasTyreTracks="true" />
		<wheel restLoad="0.75" repr="0>0|2|1" radius="0.4" deltaY="0.2" initialCompression="1" suspTravel="0.1" spring="100" damper="20" mass="0.2" frictionScale="2" lateralStiffness="3" hasTyreTracks="true" />
		<wheel restLoad="0.75" repr="0>0|0" width="5" radius="0.25" initialCompression="10" suspTravel="0.02" spring="100" damper="50" mass="0.5" frictionScale="2" hasTyreTracks="false" />
		<wheel restLoad="0.75" repr="0>0|1" width="5" radius="0.25" initialCompression="10" suspTravel="0.02" spring="100" damper="50" mass="0.5" frictionScale="2" hasTyreTracks="false" />
	</wheels>
	
	<brakeForce>0.1</brakeForce>
	<downForce>0.5</downForce> 
	
	<lightCoronas>
        <lightCorona index="0>15" />
	</lightCoronas>

    <brakeLights>
        <brakeLight index="0>17" />
	</brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>16|0" />
		<turnSignalRight index="0>16|1" />
    </turnSignals>
	
	<speedRotatingParts>
		<speedRotatingPart index="1>0|0" radius="0.2" foldMinLimit="0" foldMaxLimit="0.1" />
        <speedRotatingPart index="2>0|0" radius="0.2" foldMinLimit="0" foldMaxLimit="0.1" />
        <speedRotatingPart index="3>0|0" radius="0.2" foldMinLimit="0" foldMaxLimit="0.1" />
        <speedRotatingPart index="4>0|0" radius="0.2" foldMinLimit="0" foldMaxLimit="0.1" />
	</speedRotatingParts>
		
	<workAreas>
		<workArea startIndex="0>6" widthIndex="0>7" heightIndex="0>8" type="cultivator" chargeValue="1" foldMinLimit="0" foldMaxLimit="0.2" refNodeIndex="0"/>
		<workArea startIndex="1>2" widthIndex="1>3" heightIndex="1>4" type="cultivator" chargeValue="1" foldMinLimit="0" foldMaxLimit="0.2" refNodeIndex="0"/>
        <workArea startIndex="2>2" widthIndex="2>3" heightIndex="2>4" type="cultivator" chargeValue="1" foldMinLimit="0" foldMaxLimit="0.2" refNodeIndex="0"/>
        <workArea startIndex="3>1" widthIndex="3>2" heightIndex="3>3" type="cultivator" chargeValue="1" foldMinLimit="0" foldMaxLimit="0.2" refNodeIndex="0"/>
        <workArea startIndex="4>1" widthIndex="4>2" heightIndex="4>3" type="cultivator" chargeValue="1" foldMinLimit="0" foldMaxLimit="0.2" refNodeIndex="0"/>
        <workArea startIndex="0>6" widthIndex="0>7" heightIndex="0>8" type="sprayer" disableBackwards="false"/>
		<workArea startIndex="1>2" widthIndex="1>3" heightIndex="1>4" type="sprayer" disableBackwards="false"/>
        <workArea startIndex="2>2" widthIndex="2>3" heightIndex="2>4" type="sprayer" disableBackwards="false"/>
        <workArea startIndex="3>1" widthIndex="3>2" heightIndex="3>3" type="sprayer" disableBackwards="false"/>
        <workArea startIndex="4>1" widthIndex="4>2" heightIndex="4>3" type="sprayer" disableBackwards="false"/>
    </workAreas>

	<groundReferenceNodes>
        <groundReferenceNode index="0>1" threshold="0.2" depthNode="0>2"/>
    </groundReferenceNodes>
	
	<sprayUsages>
        <sprayUsage fillType="fertilizer" litersPerSecond="1" />
    </sprayUsages>
    
	<cultivatorSound file="$data/vehicles/tools/cultivatorSound.wav" pitchOffset="1" volume="1"/>
    <cylinderedHydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="0.8" volume="0.4" />
	
	<inputAttacherJoints>
		<inputattacherJoint index="5>5" jointType="trailerLow" rootNode="5>" />
	</inputAttacherJoints>

	<isDefaultLowered value="false"/>
    <needsLowering value="true" />
    <allowsLowering value="true" />
	<onlyActiveWhenLowered value="false" />
	
	<groundParticleAnimations>
        <groundParticle file="particles/packer.i3d" >
            <node index="0>14" particleIndex="0" refNodeIndex="0" />
			<node index="0>14" particleIndex="1" refNodeIndex="0" />
		</groundParticle>
    </groundParticleAnimations>
	
	<driveGroundParticleSystems>
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="1" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="2" />
	</driveGroundParticleSystems>	
		
    <aiLeftMarker index="0>11" />
    <aiRightMarker index="0>12" />
    <aiBackMarker index="0>13" />

    <aiForceTurnNoBackward value="true" />
	
	<aiTrafficCollisionTrigger index="0>10" /> 
	
    <foldingParts startMoveDirection="1" foldMiddleAnimTime="0.15">
        <foldingPart animationName="folding" speedScale="1" />
		<foldingPart componentJointIndex="0" anchorActor="0" animationName="flex" speedScale="1" />
        <foldingPart componentJointIndex="1" anchorActor="0" animationName="flex" speedScale="1" />
		<foldingPart componentJointIndex="2" anchorActor="0" animationName="flex" speedScale="1" />
		<foldingPart componentJointIndex="3" anchorActor="0" animationName="flex" speedScale="1" />
	</foldingParts>

    <animations>
        <animation name="folding">		
			<part node="0>0|2" startTime="0" duration="1" startRot="100 0 0" endRot="0 0 0"/>
			<part node="0>3" startTime="0" duration="10" startRot="0 0 0" endRot="0 0 100"/>
			<part node="0>4" startTime="0" duration="10" startRot="0 0 0" endRot="0 0 -100"/>	
		</animation>
		<animation name="flex">
		    <part componentJointIndex="0" startTime="0" endTime="6.5" startRotLimit="0 0 20" endRotLimit="0 0 0"/>
			<part componentJointIndex="1" startTime="0" endTime="6.5" startRotLimit="0 0 20" endRotLimit="0 0 0"/>
			<part componentJointIndex="2" startTime="0" endTime="6.5" startRotLimit="0 0 20" endRotLimit="0 0 0"/>
			<part componentJointIndex="3" startTime="0" endTime="6.5" startRotLimit="0 0 20" endRotLimit="0 0 0"/>
        </animation>
		<animation name="moveSupport">     
			<part node="5>3|0" startTime="0" duration="0.5" startRot="90 0 -180" endRot="90 0 0" />
			<part node="5>3|1" startTime="0" duration="0.5" startTrans="-0.077 0 -0.042" endTrans="-0.077 0 -0.32" />
			<part node="5>3" startTime="0" duration="0.5" startRot="0 0 180" endRot="90 0 180" />
		</animation>
	</animations>
    	
	<support animationName="moveSupport" />	
	
	<movingTools>
        <movingTool index="0>3" componentJointIndex="0" anchorActor="0">
			<dependentPart index="0>0|16" />
        </movingTool>
		<movingTool index="0>4" componentJointIndex="1" anchorActor="0">
			<dependentPart index="0>0|17" />
        </movingTool>
		<movingTool index="0>0|2" wheelIndices="1 2">	
			<dependentPart index="0>0|5" />
		</movingTool>
		<movingTool index="0>18" componentJointIndex="4" anchorActor="0" isDelayed="true" attacherJointIndices="0" transSpeed="1" transAcceleration="6" transMax="2" transMin="-0.598" translationAxis="3" axis="AXIS_CRANE_TOOL2" invertAxis="true" invertMouseAxis="true" speedFactor="1" >
			<dependentPart index="0>0|21" />
		</movingTool>
	</movingTools>

    <movingParts>
        <movingPart index="0>0|5" referencePoint="0>0|2|2" referenceFrame="0>0|2|2" >
            <translatingPart index="0>0|5|0" /> 
        </movingPart>
		<movingPart index="0>0|16" referencePoint="1>5" referenceFrame="1" >
            <translatingPart index="0>0|16|0" /> 
        </movingPart>
		<movingPart index="0>0|17" referencePoint="2>5" referenceFrame="2>" >
            <translatingPart index="0>0|17|0" /> 
        </movingPart>
	</movingParts>
	
	<mouseControls>
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/arm2_trans.png" mouseButton="RIGHT" mouseAxis="X"  axis="AXIS_CRANE_TOOL2" />
	</mouseControls>

    <components count="6">
		<component1 centerOfMass="-0.00 1.03 0.11" solverIterationCount="200" />
		<component2 centerOfMass="-0.05 0.64 -1.21" solverIterationCount="200" />
		<component3 centerOfMass="0.05 0.64 -1.22" solverIterationCount="200" />
		<component4 centerOfMass="-0.02 0.64 -1.21" solverIterationCount="200" />
		<component5 centerOfMass="0.02 0.64 -1.21" solverIterationCount="200" />
		<component6 centerOfMass="0.02 0.89 2.43" solverIterationCount="200" />
		<joint component1="0" component2="1" index="0>3" rotLimit="0 0 0" transLimit="0 0 0" /> 
        <joint component1="0" component2="2" index="0>4" rotLimit="0 0 0" transLimit="0 0 0" /> 
		<joint component1="1" component2="3" index="1>1" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="2" component2="4" index="2>1" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="0" component2="5" index="0>18" rotLimit="0 0 0" transLimit="0 0 0" breakable="false" /> 
    </components>
	
   <washable dirtDuration="50" washDuration="1" workMultiplier="5" />
	
    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>