<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="baleGrab" 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>RBZ</name>
        <specs>
            <combination filterCategory="frontLoaders" />
            <combination filterCategory="frontLoaderVehicles" />
        </specs>
        <functions>
			<function>$l10n_function_frontloaderBaleFork</function>
        </functions>
        <image>RBZ/store_rbz.png</image>
        <price>1420</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
		<shopTranslationOffset>0 0.05 0</shopTranslationOffset>
        <brand>PERZL</brand>
        <category>frontLoaderTools</category>
        <vertexBufferMemoryUsage>248064</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>58880</indexBufferMemoryUsage>
        <textureMemoryUsage>917504</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>RBZ/RBZ.i3d</filename>
        <size width="1.4" length="1.4"/>
        <components>
            <component centerOfMass="0 0 -0.5" solverIterationCount="20" mass="125" />
			<component centerOfMass="0 0 0.4" solverIterationCount="20" mass="25" />
			<component centerOfMass="0 0 0.4" solverIterationCount="20" mass="25" />
			<joint component1="1" component2="2" node="grabLeftJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 180 0" rotLimitDamping="0 10 0" rotLimitForceLimit="-1 10 -1" />
			<joint component1="1" component2="3" node="grabRightJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 180 0" rotLimitDamping="0 10 0" rotLimitForceLimit="-1 10 -1" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>
	
	<designConfigurations>
        <designConfiguration name="$l10n_configurationValue_oldDesign" >
		    <objectChange node="decalOld_grabLeft" visibilityActive="true" visibilityInactive="false" />
			<objectChange node="decalOld_grabRight" visibilityActive="true" visibilityInactive="false" />
		</designConfiguration>
        <designConfiguration name="$l10n_configurationValue_newDesign">
			<objectChange node="decalNew_grabLeft" visibilityActive="true" visibilityInactive="false" />
			<objectChange node="decalNew_grabRight" visibilityActive="true" visibilityInactive="false" />
		</designConfiguration>
    </designConfigurations>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="frontloader" />
        </inputAttacherJoints>
    </attachable>
	
	<connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn" adapterNode="hydraulicIn_detached"  length="0.4" diameter="0.015" straighteningFactor="2.5">
           <objectChange node="hydraulicIn_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut" adapterNode="hydraulicOut_detached"  length="0.4" diameter="0.015" straighteningFactor="2.5">
            <objectChange node="hydraulicOut_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>
	
	<baleGrab triggerNode="dynamicMountTrigger" rootNode="0>" jointNode="dynamicMountTrigger" jointType="TYPE_AUTO_ATTACH_XYZ" forceAcceleration="35" grabRefComponentJointIndex1="0" grabRefComponentJointIndex2="1" rotDiffThreshold1="4" rotDiffThreshold2="-4" />
	
	<cylindered>
		<movingTools>
            <movingTool node="grabLeftJoint" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseSpeedFactor="0.3" iconName="GRABBER_OPEN_CLOSE" />
                <rotation rotationAxis="2" rotSpeed="35" rotAcceleration="250" rotMax="45" rotMin="0" />
                <componentJoint index="1" anchorActor="0" />
                <dependentMovingTool node="grabRightJoint" speedScale="-1" />
            </movingTool>
            <movingTool node="grabRightJoint" playSound="true">
                <rotation rotationAxis="2" rotSpeed="35" rotAcceleration="250" rotMax="0" rotMin="-45" />
                <componentJoint index="2" anchorActor="0" />
            </movingTool>
        </movingTools>
		
		<movingParts>
            <movingPart node="grabLeft" referencePoint="grabLeftRef" referenceFrame="grabLeftJoint" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="100" />
			<movingPart node="grabRight" referencePoint="grabRightRef" referenceFrame="grabRightJoint" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="100">
                <dependentPart node="grabHydraulic" />
				<dependentPart node="springLeft" />
				<dependentPart node="springRight" />
            </movingPart>
            <movingPart node="grabHydraulic" referencePoint="grabHydraulic_ref" referenceFrame="grabHydraulic_refFrame" >
                <translatingPart node="grabHydraulic_punch" />
            </movingPart>
			
			<movingPart node="springLeft" referencePoint="springLeft_ref" referenceFrame="springLeft_refFrame" scaleZ="true" />
			<movingPart node="springRight" referencePoint="springRight_ref" referenceFrame="springRight_refFrame" scaleZ="true" />
        </movingParts>
		<sounds>
			<actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="1.5"   linkNode="attacherJoint"      actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"     nodes="grabLeftJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="1.1" linkNode="attacherJoint"      actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="grabLeftJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.1" linkNode="attacherJoint"      actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="grabLeftJoint"/>
		</sounds>	
	</cylindered>

    <ai>
        <agentAttachment width="1.4" height="0.9" length="1.4" lengthOffset="0"/>
    </ai>

    <baseMaterial>
        <material name="perzlFrontloadertools_mat" baseNode="RBZ_vis">
            <shaderParameter name="colorMat0" value="PERZL_YELLOW"/>
			<shaderParameter name="colorMat1" value="PERZL_RED"/>
        </material>
    </baseMaterial>

    <foliageBending>
        <bendingNode minX="-0.7" maxX="0.7" minZ="-0.7" maxZ="0.6" yOffset="0" />
    </foliageBending>

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

	<i3dMappings>
    <i3dMapping id="RBZ_main_component1" node="0>"/>
    <i3dMapping id="RBZ_vis" node="0>0"/>
    <i3dMapping id="attacherJoint" node="0>0|0|0"/>
    <i3dMapping id="hydraulicIn" node="0>0|0|1|0"/>
    <i3dMapping id="hydraulicIn_detached" node="0>0|0|1|0|0"/>
    <i3dMapping id="hydraulicOut" node="0>0|0|1|1"/>
    <i3dMapping id="hydraulicOut_detached" node="0>0|0|1|1|0"/>
    <i3dMapping id="dynamicMountTrigger" node="0>0|2"/>
    <i3dMapping id="grabLeftJoint" node="0>0|3"/>
    <i3dMapping id="grabRightJoint" node="0>0|4"/>
    <i3dMapping id="grabLeft" node="0>0|5|0"/>
    <i3dMapping id="decalNew_grabLeft" node="0>0|5|0|0"/>
    <i3dMapping id="decalOld_grabLeft" node="0>0|5|0|1"/>
    <i3dMapping id="grabHydraulic_ref" node="0>0|5|0|2"/>
    <i3dMapping id="springLeft_ref" node="0>0|5|0|3"/>
    <i3dMapping id="grabRight" node="0>0|5|1"/>
    <i3dMapping id="decalNew_grabRight" node="0>0|5|1|0"/>
    <i3dMapping id="decalOld_grabRight" node="0>0|5|1|1"/>
    <i3dMapping id="grabHydraulic_refFrame" node="0>0|5|1|2"/>
    <i3dMapping id="grabHydraulic" node="0>0|5|1|2|0"/>
    <i3dMapping id="grabHydraulic_punch" node="0>0|5|1|2|0|0"/>
    <i3dMapping id="springRight_ref" node="0>0|5|1|3"/>
    <i3dMapping id="springLeft_refFrame" node="0>0|5|2"/>
    <i3dMapping id="springLeft" node="0>0|5|2|0"/>
    <i3dMapping id="springRight_refFrame" node="0>0|5|3"/>
    <i3dMapping id="springRight" node="0>0|5|3|0"/>
    <i3dMapping id="RBZ_grabLeft_component2" node="1>"/>
    <i3dMapping id="grabLeftRef" node="1>0"/>
    <i3dMapping id="RBZ_grabRight_component3" node="2>"/>
    <i3dMapping id="grabRightRef" node="2>0"/>
	</i3dMappings>
</vehicle>
