<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="perzlRZ180" 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>RZ 180</name>
        <specs>
            <combination filterCategory="frontLoaders" />
            <combination filterCategory="frontLoaderVehicles" />
        </specs>
        <functions>
			<function>$l10n_function_frontloaderLogFork</function>
        </functions>
        <image>RZ180/store_rz180.png</image>
        <price>3860</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
		<shopTranslationOffset>0 0.01 0</shopTranslationOffset>
        <brand>PERZL</brand>
        <category>frontLoaderTools</category>
        <vertexBufferMemoryUsage>590848</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>114944</indexBufferMemoryUsage>
        <textureMemoryUsage>917504</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>RZ180/RZ180.i3d</filename>
        <size width="2" length="1.6"/>
        <components>
            <component centerOfMass="0 0 -0.2" solverIterationCount="25" mass="130" />
			<component centerOfMass="0 0 0" solverIterationCount="20" mass="90" />
			<component centerOfMass="0 0 0" solverIterationCount="15" mass="50" />
			<component centerOfMass="0 0 0" solverIterationCount="15" mass="60" />
			
			<joint component1="1" component2="2" node="clawJoint" nodeActor1="clawRotJointActor" zRotationNode="clawJointZRot" enableCollision="true" rotLimit="0 60 60" rotLimitDamping="0 500 500" transLimit="0 0 0" rotDriveVelocity="0 0 0" maxRotDriveForce="0 0.1 0.1" transLimitSpring="500 500 500" transLimitDamping="2 2 2" />
			<joint component1="2" component2="3" node="clawLeftJoint" enableCollision="false" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 0 300" rotLimitDamping="0 0 30" rotLimitForceLimit="-1 -1 30" />
            <joint component1="2" component2="4" node="clawRightJoint" enableCollision="false" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 0 300" rotLimitDamping="0 0 30" rotLimitForceLimit="-1 -1 30" />
			<collisionPair component1="3" component2="4" enabled="false" />
		</components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>
	
	<designConfigurations>
        <designConfiguration name="$l10n_configurationValue_oldDesign" >
		    <objectChange node="decalOld" visibilityActive="true" visibilityInactive="false" />
			<objectChange node="decalsOld" visibilityActive="true" visibilityInactive="false" />
		</designConfiguration>
        <designConfiguration name="$l10n_configurationValue_newDesign">
			<objectChange node="decalNew" visibilityActive="true" visibilityInactive="false" />
			<objectChange node="decalsNew" visibilityActive="true" visibilityInactive="false" />
		</designConfiguration>
    </designConfigurations>
	
	<configurationSets title="$l10n_configuration_hydraulicSystem" >
        <configurationSet name="$l10n_configuration_valueDefault" isDefault="true">
            <configuration name="inputAttacherJoint"    index="1" />
        </configurationSet>
		<configurationSet name="$l10n_configurationValue_electricSwitch" >
            <configuration name="inputAttacherJoint"    index="2" />
        </configurationSet>
    </configurationSets>

    <attachable>
        <inputAttacherJointConfigurations>
            <inputAttacherJointConfiguration connectionHoseConfigId="1">
                <inputAttacherJoint node="attacherJoint" topReferenceNode="topReferenceNode" jointType="implement" isControllable="true" needsLowering="false" lowerRotLimitScale="0 0 0" upperRotLimitScale="0 0 0" lowerTransLimitScale="0 0 0" upperTransLimitScale="0 0 0" upperRotationOffset="0" >
					<distanceToGround lower="0" upper="0.9" />
				</inputAttacherJoint>
				<inputAttacherJoint node="attacherJointFrontloader" jointType="frontloader" />
				
				<objectChange node="hydraulicIn01_detached" visibilityActive="true" visibilityInactive="false" />
				<objectChange node="hydraulicOut01_detached" visibilityActive="true" visibilityInactive="false" />
				<objectChange node="hydraulicIn02_detached" visibilityActive="true" visibilityInactive="false" />
				<objectChange node="hydraulicOut02_detached" visibilityActive="true" visibilityInactive="false" />
            </inputAttacherJointConfiguration>
			<inputAttacherJointConfiguration connectionHoseConfigId="2" price="390" >
				<inputAttacherJoint node="attacherJoint" topReferenceNode="topReferenceNode" jointType="implement" isControllable="true" needsLowering="false" lowerRotLimitScale="0 0 0" upperRotLimitScale="0 0 0" lowerTransLimitScale="0 0 0" upperTransLimitScale="0 0 0" upperRotationOffset="0" >
					<distanceToGround lower="0" upper="0.9" />
				</inputAttacherJoint>
				<inputAttacherJoint node="attacherJointFrontloader" jointType="frontloader" />
				
				<objectChange node="hydraulicIn03_detached" visibilityActive="true" visibilityInactive="false" />
				<objectChange node="hydraulicOut03_detached" visibilityActive="true" visibilityInactive="false" />
				<objectChange node="switch" visibilityActive="true" visibilityInactive="false" />
            </inputAttacherJointConfiguration>
        </inputAttacherJointConfigurations>
		<support animationName="supportAnimation" />
    </attachable>
	
	<connectionHoses>
        <connectionHoseConfigurations>
            <connectionHoseConfiguration><!-- default -->
		        <hose inputAttacherJointIndices="1 2" type="hydraulicIn"  node="hydraulicIn01" adapterNode="hydraulicIn01_detached"  length="1.1" diameter="0.016" straighteningFactor="3">
					<objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
				</hose>
				<hose inputAttacherJointIndices="1 2" type="hydraulicOut" node="hydraulicOut01" adapterNode="hydraulicOut01_detached"  length="1.1" diameter="0.016" straighteningFactor="3">
					<objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
				</hose>
				<hose inputAttacherJointIndices="1 2" type="hydraulicIn"  node="hydraulicIn02" adapterNode="hydraulicIn02_detached"  length="1.1" diameter="0.016" straighteningFactor="3">
					<objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true"/>
				</hose>
				<hose inputAttacherJointIndices="1 2" type="hydraulicOut" node="hydraulicOut02" adapterNode="hydraulicOut02_detached"  length="1.1" diameter="0.016" straighteningFactor="3">
					<objectChange node="hydraulicOut02_detached" visibilityActive="false" visibilityInactive="true"/>
				</hose>
            </connectionHoseConfiguration>
			<connectionHoseConfiguration><!-- electricSwitch -->
		        <hose inputAttacherJointIndices="1 2" type="hydraulicIn"  node="hydraulicIn03" adapterNode="hydraulicIn03_detached"  length="0.5" diameter="0.016" straighteningFactor="1">
					<objectChange node="hydraulicIn03_detached" visibilityActive="false" visibilityInactive="true"/>
				</hose>
				<hose inputAttacherJointIndices="1 2" type="hydraulicOut" node="hydraulicOut03" adapterNode="hydraulicOut03_detached"  length="0.5" diameter="0.016" straighteningFactor="1">
					<objectChange node="hydraulicOut03_detached" visibilityActive="false" visibilityInactive="true"/>
				</hose>
            </connectionHoseConfiguration>
        </connectionHoseConfigurations>
    </connectionHoses>
	
	<attacherJointControl maxTiltAngle="40" >
		<control controlFunction="controlAttacherJointHeight" controlAxis="AXIS_HYDRAULICATTACHER1" invertControlAxis="true" mouseSpeedFactor="0.3" iconName="IMPLEMENT_ATTACHER_TRANS"/>
		<control controlFunction="controlAttacherJointTilt"   controlAxis="AXIS_HYDRAULICATTACHER2" invertControlAxis="true" mouseSpeedFactor="0.3" iconName="IMPLEMENT_ATTACHER_ROTX"/>
    
		<sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="0>" volumeScale="1" />
        </sounds>
	</attacherJointControl>
	
	<logGrab jointNode="1>" jointRoot="1>" lockAllAxis="true" >
        <trigger node="logGrabTrigger" />
        <grab componentJoint="2" axis="2" rotationOffsetThreshold="10" rotationOffsetTime="1000"/>
		<grab componentJoint="3" axis="2" rotationOffsetThreshold="10" rotationOffsetTime="1000"/>
    </logGrab>
	
	<animations>
		<animation name="supportAnimation" >
			<part node="supportArms"   	startTime="0" endTime="0.8" startTrans="0 0.23 -0.362" endTrans="0 0 -0.362" />
			
			<part componentJointIndex="1"      startTime="0" endTime="0.1" startRotMinLimit="0 -60 -60" startRotMaxLimit="0 60 27" endRotMinLimit="0 -60 -15" endRotMaxLimit="0 60 -15" />
			
			<sound template="clackVar6" startTime="-0.0" volumeScale="1" pitchScale="1.2"/>
			<sound template="clackVar6" startTime="0.8" volumeScale="1" pitchScale="1.2"/>
		</animation>
	</animations>
	
	<cylindered>
		<movingTools>
			<!-- claw rotation -->
			<movingTool node="clawRotJoint" playSound="true">
                <controls axis="AXIS_CRANE_TOOL2" mouseSpeedFactor="0.5" iconName="GRABBER_ROTATE_Y" />
                <rotation rotationAxis="2" rotSpeed="60" rotAcceleration="250" />
				<componentJoint index="1" anchorActor="1" />
            </movingTool>
            <!-- claw left -->
			<movingTool node="clawLeftJoint" playSound="true">
                <controls axis="AXIS_CRANE_TOOL" invertAxis="false" mouseSpeedFactor="0.3" iconName="GRABBER_OPEN_CLOSE" />
                <rotation rotationAxis="3" rotSpeed="65" rotAcceleration="250" rotMax="0" rotMin="-120" />
                <componentJoint index="3" anchorActor="0" />
                <dependentMovingTool node="clawRightJoint" speedScale="1" />
            </movingTool>
            <!-- claw right -->
			<movingTool node="clawRightJoint" playSound="true">
                <rotation rotationAxis="3" rotSpeed="-65" rotAcceleration="250" rotMax="120" rotMin="0" />
                <componentJoint index="2" anchorActor="0" />
            </movingTool>
        </movingTools>
		
		<movingParts>
            <movingPart node="clawPart1" referencePoint="clawJoint_refPoint" referenceFrame="clawPart1_refFrame" limitedAxis="1" isActiveDirty="true" maxUpdateDistance="100" >
			    <dependentPart node="clawPart2"/>
            </movingPart>
			<movingPart node="clawPart2" referencePoint="clawJoint_refPoint" referenceFrame="clawPart2_refFrame" limitedAxis="2" >
			    <dependentPart node="claw"/>
            </movingPart>
			
			<movingPart node="claw" referencePoint="claw_refPoint" referenceFrame="claw_refPoint" >
			    <dependentPart node="clawLeft"/>
			    <dependentPart node="clawRight"/>
            </movingPart>
			
			<movingPart node="clawLeft" referencePoint="clawLeft_refPoint" referenceFrame="clawLeft_refFrame" limitedAxis="1" />
			<movingPart node="clawRight" referencePoint="clawRight_refPoint" referenceFrame="clawRight_refFrame" limitedAxis="1" >
				<dependentPart node="clawLinkage" />
				<dependentPart node="clawHydraulic" />
			</movingPart>
			
			<movingPart node="clawLinkage" referencePoint="clawLinkage_refPoint" referenceFrame="clawLinkage_refFrame" limitedAxis="1" scaleZ="true" />
			
            <movingPart node="clawHydraulic" referencePoint="clawHydraulic_refPoint" referenceFrame="clawHydraulic_refFrame" >
                <translatingPart node="clawHydraulic_punch" />
            </movingPart>
        </movingParts>
		
		<sounds>
			<actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="1.5"   linkNode="claw"      actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"     nodes="clawLeftJoint"/>
			<actionSound template="defaultHydraulicSound" pitchScale="0.3" volumeScale="1.9"   linkNode="clawRotJoint"      actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"     nodes="clawRotJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="1.1" linkNode="claw"      actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="clawLeftJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.1" linkNode="claw"      actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="clawLeftJoint"/>
		</sounds>
	</cylindered>

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

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

    <foliageBending>
        <bendingNode minX="-0.5" maxX="0.5" minZ="-0.5" maxZ="-0.3" yOffset="0.3" />
    </foliageBending>

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

	<i3dMappings>
    <i3dMapping id="rz180_vis" node="0>1"/>
    <i3dMapping id="attacherJoint" node="0>1|0|0"/>
    <i3dMapping id="topReferenceNode" node="0>1|0|0|0"/>
    <i3dMapping id="attacherJointFrontloader" node="0>1|0|1"/>
    <i3dMapping id="hydraulicIn01" node="0>1|0|2|0"/>
    <i3dMapping id="hydraulicIn01_detached" node="0>1|0|2|0|0"/>
    <i3dMapping id="hydraulicIn02" node="0>1|0|2|1"/>
    <i3dMapping id="hydraulicIn02_detached" node="0>1|0|2|1|0"/>
    <i3dMapping id="hydraulicIn03" node="0>1|0|2|2"/>
    <i3dMapping id="hydraulicIn03_detached" node="0>1|0|2|2|0"/>
    <i3dMapping id="hydraulicOut01" node="0>1|0|2|3"/>
    <i3dMapping id="hydraulicOut01_detached" node="0>1|0|2|3|0"/>
    <i3dMapping id="hydraulicOut02" node="0>1|0|2|4"/>
    <i3dMapping id="hydraulicOut02_detached" node="0>1|0|2|4|0"/>
    <i3dMapping id="hydraulicOut03" node="0>1|0|2|5"/>
    <i3dMapping id="hydraulicOut03_detached" node="0>1|0|2|5|0"/>
    <i3dMapping id="switch" node="0>1|0|2|6"/>
    <i3dMapping id="supportArms" node="0>1|0|3"/>
    <i3dMapping id="clawJoint" node="0>1|1"/>
    <i3dMapping id="clawJointZRot" node="0>1|1|0"/>
    <i3dMapping id="clawPart1" node="0>1|2"/>
    <i3dMapping id="clawPart2" node="0>1|2|0"/>
    <i3dMapping id="clawPart1_refFrame" node="0>1|2|0|0"/>
    <i3dMapping id="claw_refFrame" node="0>1|2|0|3"/>
    <i3dMapping id="claw" node="0>1|2|0|3|0"/>
    <i3dMapping id="clawHydraulic_refFrame" node="0>1|2|0|3|0|0"/>
    <i3dMapping id="clawHydraulic" node="0>1|2|0|3|0|0|0"/>
    <i3dMapping id="clawHydraulic_punch" node="0>1|2|0|3|0|0|0|1"/>
    <i3dMapping id="clawLeft_refFrame" node="0>1|2|0|3|0|1"/>
    <i3dMapping id="clawLeft" node="0>1|2|0|3|0|1|0"/>
    <i3dMapping id="clawHydraulic_refPoint" node="0>1|2|0|3|0|1|0|0"/>
    <i3dMapping id="clawLinkage_refFrame" node="0>1|2|0|3|0|1|0|1"/>
    <i3dMapping id="clawLinkage" node="0>1|2|0|3|0|1|0|1|0"/>
    <i3dMapping id="clawRight_refFrame" node="0>1|2|0|3|0|2"/>
    <i3dMapping id="clawRight" node="0>1|2|0|3|0|2|0"/>
    <i3dMapping id="clawLinkage_refPoint" node="0>1|2|0|3|0|2|0|0"/>
    <i3dMapping id="decalNew" node="0>1|2|0|3|0|4"/>
    <i3dMapping id="decalOld" node="0>1|2|0|3|0|5"/>
    <i3dMapping id="clawPart2_refFrame" node="0>1|2|1"/>
    <i3dMapping id="decalsNew" node="0>1|3|1"/>
    <i3dMapping id="decalsOld" node="0>1|3|2"/>
    <i3dMapping id="clawJoint_refPoint" node="1>0"/>
    <i3dMapping id="clawLeftJoint" node="1>1"/>
    <i3dMapping id="clawRightJoint" node="1>2"/>
    <i3dMapping id="clawRotJoint" node="1>3"/>
    <i3dMapping id="clawRotJointActor" node="1>3|0"/>
    <i3dMapping id="claw_refPoint" node="1>4"/>
    <i3dMapping id="logGrabTrigger" node="1>5"/>
    <i3dMapping id="clawLeft_refPoint" node="2>4"/>
    <i3dMapping id="clawRight_refPoint" node="3>4"/>
	</i3dMappings>
</vehicle>
