<?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) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>FZ 380GTA</name>
		
        <specs>
			<neededPower>60</neededPower>
            <combination xmlFilename="xml/fendt380gta.xml" />
        </specs>
		
        <functions>
            <function>$l10n_function_frontloader</function>
        </functions>
		
        <image>store/store_gtaFrontloader.png</image>
        <price>7200</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>FENDT</brand>
        <category>fendtPackTool</category>
		
        <shopHeight>2.5</shopHeight>
        <shopTranslationOffset>0 0.139 0</shopTranslationOffset>
        <shopRotationOffset>4.821 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1259520</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>208384</indexBufferMemoryUsage>
        <textureMemoryUsage>1114112</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontLoader</typeDesc>
        <filename>i3D/gtaFrontloader.i3d</filename>
        <size width="2.5" length="3" lengthOffset="1.1"/>
        <components>
            <component centerOfMass="0 0 0" solverIterationCount="10" mass="950" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="FRONTLOADER" />
		<mapHotspot type="TOOL" />
    </base>

    <attacherJoints>
        <attacherJoint jointType="frontloader" node="attacherJointTools" nodeVisual="attacherJointToolsVisuals" allowsJointLimitMovement="false" allowsLowering="false" rotLimitSpring="7500 7500 7500" rotLimitDamping="5 5 5" transLimitSpring="7500 7500 7500" transLimitDamping="5 5 5" >
            <schema position="1 0" rotation="0" invertX="false" />
        </attacherJoint>
		
        <sounds>
            <attach template="ATTACH_01" />
        </sounds>
    </attacherJoints>
	
	<attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" hardAttach="true" jointType="attachableFrontloaderGTA">
				<objectChange node="attachedHoses" visibilityActive="true" visibilityInactive="false"/>
				<objectChange node="detachedHoses" visibilityActive="false" visibilityInactive="true"/>
			</inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
		<target attacherJointIndices="1" type="hydraulicIn"  node="hydraulic01In"  socket="hydraulic04"/>
		<target attacherJointIndices="1" type="hydraulicOut" node="hydraulic01Out" socket="hydraulic03"/>
    </connectionHoses>

    <animations>
        <animation name="moveSupport">
            <part node="supportBars" startTime="0" endTime="0.01" visibility="false" />
			<part node="supportBars" startTime="0.01" endTime="0.05" visibility="true" />
			<part node="frameAttacherBolt" startTime="0" endTime="0" visibility="true" />
            <part node="frameAttacherBolt" startTime="0.01" endTime="0" visibility="false" />
			<part node="barsCollisions" startTime="0" endTime="0.01" startRot="-53 0 0" endRot="0 0 0"/>
			<part node="detachCollision" startTime="0" endTime="0.01" startTrans="0 1.10 0" endTrans="0 0.092 0"/>
			
            <sound template="clackVar5" startTime="0.01" direction="0" volumeScale="0.7" pitchScale="2.8" linkNode="supportBars"/>
            <sound template="clackVar1" startTime="0.19" direction="0" volumeScale="0.7" pitchScale="2"   linkNode="supportBars"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="mainArmDummy" delayedNode="mainArm">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="0.8" iconName="FRONTLOADER_ARM_ROTATE" />
                <attacherJoint jointIndices="1" />
                <rotation rotSpeed="20" rotAcceleration="150" rotMax="0" rotMin="-75" startRot="0" detachingRotMinLimit="-10" />
                <dependentPart node="attacherRotDummy" />
                <dependentMovingTool node="attacherDummy" minRotLimits="0 0" maxRotLimits="135 65" />
            </movingTool>
            <movingTool node="attacherDummy" delayedNode="attacher">
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="true" mouseSpeedFactor="0.6" iconName="FRONTLOADER_ARM_ROTATE_TOOL" />
                <attacherJoint jointIndices="1" />
                <rotation rotSpeed="50" rotAcceleration="300" rotMax="80" rotMin="0" startRot="0" syncMaxRotLimits="true" />
            </movingTool>
			
            <movingTool node="mainArm" playSound="true">
                <dependentPart node="mainHydraulic" />
                <dependentPart node="hydraulicMainArm2" />
                <dependentPart node="attacherRot" />
                <dependentPart node="mainArmPart01" />
            </movingTool>
            <movingTool node="attacher" playSound="true">
                <dependentPart node="wing" />
                <dependentPart node="mainArmPart01" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="mainHydraulic" referencePoint="mainHydraulicRef" referenceFrame="mainArm" >
                <translatingPart node="mainHydraulicPunch" />
            </movingPart>
            <movingPart node="attacherRotDummy" referenceFrame="gtaFrontloader_main_components1">
                <attacherJoint jointIndices="1" />
            </movingPart>
            <movingPart node="attacherRot" referenceFrame="gtaFrontloader_main_components1">
                <attacherJoint jointIndices="1" />
                <dependentPart node="wing" />
                <dependentPart node="mainArmPart01" />
            </movingPart>
            <movingPart node="wing" localReferencePoint="wingPart" referencePoint="wingRef" referenceFrame="wingRefFrame" >
                <dependentPart node="wingPart" />
            </movingPart>
            <movingPart node="wingPart" referencePoint="wingRef" referenceFrame="wingPartRefFrame" />
            <movingPart node="hydraulicMainArm2" referencePoint="hydraulicMainArm2Ref" referenceFrame="mainArm" >
                <translatingPart node="hydraulicMainArm2Punch" />
            </movingPart>
            <movingPart node="mainArmPart01" localReferencePoint="mainArmPart02" referencePoint="mainArmPart02Ref" referenceFrame="mainArmPart01RefFrame">
                <dependentPart node="mainArmPart02" />
            </movingPart>
            <movingPart node="mainArmPart02" referencePoint="mainArmPart02Ref" referenceFrame="mainArmPart02RefFrame">
                <dependentPart node="hydraulicMainArm2" />
            </movingPart>
        </movingParts>

        <sounds>
            <actionSound template="hydraulicLayerTone2"   pitchScale="1.5" volumeScale="1.2" linkNode="mainHydraulic"   actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="mainHydraulic" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="hydraulicLayerTone"    pitchScale="0.7" volumeScale="1.2" linkNode="mainHydraulic"   actionNames="TRANSLATING_POS" nodes="mainHydraulic" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="hydraulicLayerTone2"   pitchScale="2.5" volumeScale="0.4" linkNode="hydraulicMainArm2" actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="hydraulicMainArm2" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="defaultHydraulicSound" pitchScale="1.1" volumeScale="0.8" linkNode="hydraulicMainArm2" actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="hydraulicMainArm2" fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="metalLowVar2"  pitchScale="1.0" volumeScale="3"   linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="cylinderPunch" pitchScale="1.5" volumeScale="0.4" linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="metalClose"    pitchScale="2.5" volumeScale="0.2" linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="clackVar6"     pitchScale="1.0" volumeScale="1.0" linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_POS_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="metalLowVar2"  pitchScale="1.3" volumeScale="2.0"   linkNode="mainArmDummy" actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="cylinderPunch" pitchScale="1.8" volumeScale="0.2" linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="metalClose"    pitchScale="2.8" volumeScale="0.1" linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="mainArmDummy"/>
            <actionSound template="clackVar6"     pitchScale="1.8" volumeScale="0.5" linkNode="mainArmDummy"   actionNames="TOOL_MOVE_END_NEG_LIMIT" nodes="mainArmDummy"/>
        </sounds>
    </cylindered>

    <ai>
        <agentAttachment width="1.3" height="2.2" length="3" lengthOffset="0.35"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.65" maxX="0.65" minZ="-0.65" maxZ="1.6" yOffset="0.2" node="bendingNode" />
    </foliageBending>

    <baseMaterial>
        <material name="gtaFrontloader_mat" baseNode="mainFrame_vis">
            <shaderParameter name="colorMat0" value="FENDT_OLDGREEN1"/>
        </material>
    </baseMaterial>

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

    <i3dMappings>
        <i3dMapping id="gtaFrontloader_main_components1" node="0>" />
        <i3dMapping id="mainFrame_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="movingParts" node="0>0|1" />
        <i3dMapping id="mainArmDummy" node="0>0|1|0" />
        <i3dMapping id="attacherRotDummy" node="0>0|1|0|0" />
        <i3dMapping id="attacherDummy" node="0>0|1|0|0|0" />
        <i3dMapping id="attacherJointTools" node="0>0|1|0|0|0|0" />
        <i3dMapping id="mainArm" node="0>0|1|1" />
        <i3dMapping id="attacherRot" node="0>0|1|1|0" />
        <i3dMapping id="attacher" node="0>0|1|1|0|0" />
        <i3dMapping id="attacherJointToolsVisuals" node="0>0|1|1|0|0|0" />
        <i3dMapping id="wingRef" node="0>0|1|1|0|0|1" />
        <i3dMapping id="mainHydraulic" node="0>0|1|1|1" />
        <i3dMapping id="mainHydraulicPunch" node="0>0|1|1|1|0" />
        <i3dMapping id="wing" node="0>0|1|1|2" />
        <i3dMapping id="wingPart" node="0>0|1|1|2|0" />
        <i3dMapping id="hydraulicMainArm2Ref" node="0>0|1|1|2|1" />
        <i3dMapping id="wingPartRefFrame" node="0>0|1|1|2|2" />
        <i3dMapping id="wingRefFrame" node="0>0|1|1|3" />
        <i3dMapping id="mainArmPart02Ref" node="0>0|1|1|4" />
        <i3dMapping id="bendingNode" node="0>0|1|1|5" />
        <i3dMapping id="mainArmPart02RefFrame" node="0>0|1|1|6" />
        <i3dMapping id="detachedHoses" node="0>0|1|1|7|0" />
        <i3dMapping id="hydraulic01In" node="0>0|1|1|7|1|0" />
        <i3dMapping id="hydraulic01Out" node="0>0|1|1|7|1|1" />
        <i3dMapping id="mainArmPart01" node="0>0|1|2" />
        <i3dMapping id="mainArmPart02" node="0>0|1|2|0" />
        <i3dMapping id="hydraulicMainArm2" node="0>0|1|2|0|0" />
        <i3dMapping id="hydraulicMainArm2Punch" node="0>0|1|2|0|0|0" />
        <i3dMapping id="mainArmPart01RefFrame" node="0>0|1|3" />
        <i3dMapping id="mainHydraulicRef" node="0>0|1|4" />
        <i3dMapping id="support" node="0>0|2" />
        <i3dMapping id="supportBars" node="0>0|2|0" />
		<i3dMapping id="barsCollisions" node="0>0|2|1" />
		<i3dMapping id="detachCollision" node="0>0|2|2" />
		<i3dMapping id="frameAttacherBolt" node="0>0|2|3" />
        <i3dMapping id="attachedHoses" node="0>1|1" />
    </i3dMappings>
</vehicle>