<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="attachableFrontloader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) PeterJ, All Rights Reserved.</annotation>

    <storeData>
        <name>875</name>
        <specs>
            <combination xmlFilename="MF200series3cyl.xml"/>
            <combination xmlFilename="MF240versions.xml"/>
            <combination xmlFilename="MFweightBox.xml"/>
            <combination filterCategory="frontLoaderTools" />
        </specs>
        <functions>
            <function>$l10n_function_frontloader</function>
        </functions>
        <image>store_MF875.png</image>
        <price>3800</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>MASSEYFERGUSON</brand>
        <category>frontLoaders</category>
        <vertexBufferMemoryUsage>339968</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>65280</indexBufferMemoryUsage>
        <textureMemoryUsage>655360</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloader</typeDesc>
		<filename>MF875.i3d</filename>
        <size width="2.5" length="3" lengthOffset="-0.25" />
        <components>
            <component centerOfMass="0 0.4 0.25" solverIterationCount="10" mass="450" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="FRONTLOADER" />
        <mapHotspot type="TOOL" />
    </base>

    <attacherJoints>
        <attacherJoint jointType="frontloader" node="attacherJointTools" nodeVisual="attacherJointTools_visuals" allowsJointLimitMovement="false" allowsLowering="false" rotLimitSpring="7500 7500 7500" rotLimitDamping="1 1 1" transLimitSpring="7500 7500 7500" transLimitDamping="1 1 1" >
            <schema position="1 0" rotation="0" invertX="false" />
        </attacherJoint>
        <sounds>
            <attach template="ATTACH_01" linkNode="MF875_main_component1" />
        </sounds>
    </attacherJoints>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" hardAttach="true" jointType="attachableFrontloader" >
				<subType name="MF875Loader"/>
			</inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="attachAnimations" />
    </attachable>
	
    <connectionHoses>
		<localHose>
            <hose type="hydraulicIn" node="mainRamHydLeft" length="0.3" diameter="0.02" minCenterPointAngle="90" straighteningFactor="2" isWorldSpaceHose="false" isTwoPointHose="true"/>
            <target type="none" node="hydraulicHoseLeft" straighteningFactor="1"/>
        </localHose>
		<localHose>
            <hose type="hydraulicIn" node="mainRamHydRight" length="0.4" diameter="0.02" minCenterPointAngle="90" straighteningFactor="2" isWorldSpaceHose="false" isTwoPointHose="true"/>
            <target type="none" node="hydraulicHoseRight" straighteningFactor="1"/>
        </localHose>
		<localHose>
            <hose type="hydraulicIn" node="toolRamHoseLeft" length="0.5" diameter="0.02" minCenterPointAngle="90" straighteningFactor="2" isWorldSpaceHose="false" isTwoPointHose="true"/>
            <target type="none" node="hydraulicHoseLeft1" straighteningFactor="1"/>
        </localHose>
		<localHose>
            <hose type="hydraulicIn" node="toolRamHoseLeft2" length="0.8" diameter="0.02" minCenterPointAngle="90" straighteningFactor="2" isWorldSpaceHose="false" isTwoPointHose="true"/>
            <target type="none" node="hydraulicHoseLeft2" straighteningFactor="1"/>
        </localHose>
        <localHose>
            <hose type="hydraulicIn" node="toolRamHoseRight" length="0.4" diameter="0.02" minCenterPointAngle="90" straighteningFactor="2" isWorldSpaceHose="false" isTwoPointHose="true"/>
            <target type="none" node="hydraulicHoseRight1" straighteningFactor="1"/>
        </localHose>
		<localHose>
            <hose type="hydraulicIn" node="toolRamHoseRight2" length="0.8" diameter="0.02" minCenterPointAngle="90" straighteningFactor="2" isWorldSpaceHose="false" isTwoPointHose="true"/>
            <target type="none" node="hydraulicHoseRight2" straighteningFactor="1"/>
        </localHose>	
    </connectionHoses>
	
    <animations>
        <animation name="attachAnimations">
            <part node="MF875stand" startTime="0" endTime="0.4" startTrans="0 0.45 0" endTrans="0 0 0" />
            <part node="standCol" startTime="0" endTime="0.1" startTrans="0 0.5 0" endTrans="0 0 0" />
            <part node="attachedHoses" startTime="0" endTime="0.05" visibility="true" />
            <part node="attachedHoses" startTime="0.05" endTime="0.5" visibility="false" />
            <part node="detachedHoses" startTime="0" endTime="0.05" visibility="false" />
            <part node="detachedHoses" startTime="0.05" endTime="0.4" visibility="true" />
        </animation>
    </animations>
	
    <cylindered>
        <movingTools>
			<!-- physics -->
			<movingTool node="armDummy" delayedNode="MF875mainArm">
				<controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="1.0" iconName="FRONTLOADER_ARM_ROTATE" />
				<attacherJoint jointIndices="1" />
				<rotation rotSpeed="20" rotAcceleration="190" rotMax="4" rotMin="-87" startRot="2" detachingRotMinLimit="0" />
			</movingTool>
			<movingTool node="attacherDummy" delayedNode="attacherRot">
				<controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="true" mouseSpeedFactor="0.6" iconName="FRONTLOADER_ARM_ROTATE_TOOL" />
				<attacherJoint jointIndices="1" />
				<rotation rotSpeed="33" rotAcceleration="300" rotMax="110" rotMin="-60" startRot="-35" />
			</movingTool>
			
			<movingTool node="MF875mainArm">
				<dependentPart node="attachedHosesMoveRef" />
				<dependentPart node="armHydraulic" />
			</movingTool>

			<movingTool node="attacherRot">
				<dependentPart node="attacherMainWing" />
			</movingTool>
		</movingTools>

		<movingParts>
			<!-- frontloader stuff -->
			<movingPart node="armHydraulic" referencePoint="armHydraulicRef" referenceFrame="armHydraulicRamRefFrame">
				<translatingPart node="armHydraulicPunch" />
			</movingPart>
			<movingPart node="hydraulicFront" referencePoint="hydraulicFrontRef" referenceFrame="hydraulicFrontAngleRefFrame">
				<translatingPart node="hydraulicFrontPunch" />
			</movingPart>
			<movingPart node="attacherMainWing" localReferencePoint="attacherWing" referencePoint="wingPartRef" referenceFrame="wingFrontRefFrame" >
				<dependentPart node="hydraulicFront" />
				<dependentPart node="attacherWing" />
			</movingPart>
			<movingPart node="attacherWing" referencePoint="wingPartRef" referenceFrame="wingPartRefFrame" />			
			<!-- pipes -->
			<movingPart node="attachedHosesMoveRef" referenceFrame="MF875mainArm" moveToReferenceFrame="true" playSound="false"/>
		</movingParts>
       
		<sounds>
            <actionSound template="hydraulicLayerTone2"   pitchScale="1.5" volumeScale="1.2" linkNode="armHydraulic"   actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="armHydraulic" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="hydraulicLayerTone"    pitchScale="0.7" volumeScale="1.2" linkNode="armHydraulic"   actionNames="TRANSLATING_POS" nodes="armHydraulic" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="hydraulicLayerTone2"   pitchScale="2.5" volumeScale="0.4" linkNode="hydraulicFront" actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="hydraulicFront" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="defaultHydraulicSound" pitchScale="1.1" volumeScale="0.8" linkNode="hydraulicFront" actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="hydraulicFront" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="metalLowVar2"  pitchScale="1.0" volumeScale="3"   linkNode="armDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="armDummy"/>
            <actionSound template="cylinderPunch" pitchScale="1.5" volumeScale="0.4" linkNode="armDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="armDummy"/>
            <actionSound template="metalClose"    pitchScale="2.5" volumeScale="0.2" linkNode="armDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="armDummy"/>
            <actionSound template="clackVar6"     pitchScale="1.0" volumeScale="1.0" linkNode="armDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="armDummy"/>

            <actionSound template="metalLowVar2"  pitchScale="1.3" volumeScale="2.0" linkNode="armDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="armDummy"/>
            <actionSound template="cylinderPunch" pitchScale="1.8" volumeScale="0.2" linkNode="armDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="armDummy"/>
            <actionSound template="metalClose"    pitchScale="2.8" volumeScale="0.1" linkNode="armDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="armDummy"/>
            <actionSound template="clackVar6"     pitchScale="1.8" volumeScale="0.5" linkNode="armDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="armDummy"/>
        </sounds>
    </cylindered>

    
	<baseMaterial>
        <material name="MF875_mat" baseNode="MF875mainArm">
            <shaderParameter name="colorMat0" value="0.4936 0.001 0.002 1"/>
            <shaderParameter name="colorMat2" value="0.015 0.015 0.015 0"/>
        </material>
    </baseMaterial>

    <!--baseMaterialConfigurations>
        <baseMaterialConfiguration color="MASSEYFERGUSON_RED" name="$l10n_colour_MFred" />
        <baseMaterialConfiguration color="NEWHOLLAND_YELLOW1" name="$l10n_colour_MFyellow" />
        <material name="MF875_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations-->
	
	<designConfigurations>
        <designConfiguration name="Design01" price="0" >
			<objectChange node="MF875decals01" visibilityInactive="false" />
		</designConfiguration>
        <designConfiguration name="Design02" price="0" >
			<objectChange node="MF875decals02" visibilityInactive="false" />
		</designConfiguration>
	</designConfigurations>
	
    <ai>
        <agentAttachment width="1.3" height="1.6" length="2.3" lengthOffset="-0.15"/>
    </ai>

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

    <foliageBending>
        <bendingNode minX="-0.62" maxX="0.62" minY="-0.5" maxY="-0.2" minZ="-0.3" maxZ="1.38" node="hydraulicFrontAngleRefFrame" />
    </foliageBending>

    <i3dMappings>
        <i3dMapping id="MF875_main_component1" node="0>" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="armHydraulicRef" node="0>0|1" />
        <i3dMapping id="MF875stand" node="0>0|2|0" />
        <i3dMapping id="standCol" node="0>0|2|1" />
        <i3dMapping id="detachedHoses" node="0>0|3|0" />
        <i3dMapping id="attachedHoses" node="0>0|3|1" />
        <i3dMapping id="attachedHosesMoveRef" node="0>0|3|2|0" />
        <i3dMapping id="MF875mainArm" node="0>1" />
        <i3dMapping id="armHydraulic" node="0>1|0" />
        <i3dMapping id="armHydraulicPunch" node="0>1|0|0" />		
        <i3dMapping id="mainRamHydLeft" node="0>1|0|1" />
        <i3dMapping id="mainRamHydRight" node="0>1|0|2" />		
        <i3dMapping id="hydraulicFront" node="0>1|1" />
        <i3dMapping id="hydraulicFrontPunch" node="0>1|1|0" />
        <i3dMapping id="toolRamHoseLeft" node="0>1|1|1" />
        <i3dMapping id="toolRamHoseLeft2" node="0>1|1|2" />
        <i3dMapping id="toolRamHoseRight" node="0>1|1|3" />
        <i3dMapping id="toolRamHoseRight2" node="0>1|1|4" />
        <i3dMapping id="attacherMainWing" node="0>1|2" />
        <i3dMapping id="attacherWing" node="0>1|2|0" />
        <i3dMapping id="hydraulicFrontRef" node="0>1|2|1" />
        <i3dMapping id="wingPartRefFrame" node="0>1|2|2" />
        <i3dMapping id="attacherRot" node="0>1|3|0" />
        <i3dMapping id="wingPartRef" node="0>1|3|0|0" />
        <i3dMapping id="wingFrontRefFrame" node="0>1|3|0|1" />
        <i3dMapping id="attacherJointTools_visuals" node="0>1|3|0|2" />
        <i3dMapping id="hydraulicFrontAngleRefFrame" node="0>1|4" />
        <i3dMapping id="hydraulicHoseRef" node="0>1|5" />
        <i3dMapping id="armHydraulicRamRefFrame" node="0>1|6" />
        <i3dMapping id="hydraulicHoseLeft" node="0>1|7|0" />
        <i3dMapping id="hydraulicHoseRight" node="0>1|7|1" />
        <i3dMapping id="hydraulicHoseLeft1" node="0>1|7|2" />
        <i3dMapping id="hydraulicHoseLeft2" node="0>1|7|3" />
        <i3dMapping id="hydraulicHoseRight1" node="0>1|7|4" />
        <i3dMapping id="hydraulicHoseRight2" node="0>1|7|5" />
        <i3dMapping id="MF875decals01" node="0>1|9" />
        <i3dMapping id="MF875decals02" node="0>1|10" />
		<i3dMapping id="armDummy" node="0>2" />
        <i3dMapping id="attacherDummy" node="0>2|0|0" />
        <i3dMapping id="attacherJointTools" node="0>2|0|0|0" />	
    </i3dMappings>
	
</vehicle>
