<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="logGrab" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation> Made By FS Miner For FS25</annotation>
    <storeData>
        <name>
		<en>G 345</en>
		</name>
		
        <specs>
        </specs>
        <functions>
            <function>$l10n_function_forestryTransport</function>
        </functions>
        <storePacks>
            <storePack>FSM_CREATIONS_EXCAVATORS</storePack>
        </storePacks>
        <image>store_g345.dds</image>
        <price>20000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
		<shopTranslationOffset>0 0.1 0</shopTranslationOffset>
        <TranslationOffset>0 0.1 0</TranslationOffset>
        <brand>CaterpillarNG</brand>
         <category>forestryExcavatorTools</category>   
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_wheelLoaderTool</typeDesc>
        <filename>g345.i3d</filename>
        <size width="3.0" length="3.0" />
        
		<components>
            <component centerOfMass="0 1.12 0"  solverIterationCount="25" mass="600" /> 
            <component centerOfMass="0 0.831 0" solverIterationCount="25" mass="900" />
            <component centerOfMass="0 0 0"     solverIterationCount="50" mass="200" />
            <component centerOfMass="0 0 0"     solverIterationCount="50" mass="200" />

            <joint component1="1" component2="2" node="clawRotJoint" nodeActor1="clawRotJointActor1" enableCollision="true" rotLimitSpring="0 0 0" rotLimitDamping="0 -1 -1"   rotLimit="0 1 1" rotMinLimit="0 -1 -1" maxRotDriveForce="0.5 0.5 0.5" rotDriveVelocity="0 0 0" transLimitSpring="6000 6000 6000" transLimitDamping="100 100 100" />
            <joint component1="2" component2="3" node="clawLeftJoint"  enableCollision="false" rotLimit="0 0 0" transLimit="0 0 0" rotLimitDamping="30 0 0" rotLimitForceLimit="150 -1 -1" />
            <joint component1="2" component2="4" node="clawRightJoint" enableCollision="false" rotLimit="0 0 0" transLimit="0 0 0" rotLimitDamping="30 0 0" rotLimitForceLimit="150 -1 -1" />
            <collisionPair component1="3" component2="4" enabled="false" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />       
    </base>
    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoin"  jointType="349Bucket" />
        </inputAttacherJoints>
    </attachable>
	
    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicOut"  node="hydraulicOut01"  length="2.2" diameter="0.04" straighteningFactor="1.2"/>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn01" length="2.2" diameter="0.04" straighteningFactor="1.2"/>
    </connectionHoses>	

   
	
	<logGrab>
       <grab jointNode="1>" jointRoot="1>" lockAllAxis="true">
			<trigger node="logGrabTrigger" />
			<claw componentJointIndex="2" axis="2" rotationOffsetThreshold="10" rotationOffsetInverted="false" rotationOffsetTime="500">
				<movingTool node="clawLeftJoint" direction="-1" closeDirection="1"/>
            </claw>
            <claw componentJointIndex="3" axis="2" rotationOffsetThreshold="10" rotationOffsetInverted="true" rotationOffsetTime="500">
                <movingTool node="clawRightJoint" direction="1" closeDirection="-1"/>
            </claw>
            <treeDetection node="grabTreeDetectionNode" sizeY="1.7" sizeZ="1.1"/>
        </grab>
    </logGrab>

<cylindered>
        <movingTools>
            <movingTool node="clawRotJointActor1" playSound="true" >
                <controls axis="AXIS_FRONTLOADER_TOOL3" invertAxis="false" mouseSpeedFactor="1.0" iconName="GRABBER_ROTATE_Y" />
                <rotation rotSpeed="50" rotAcceleration="640" rotationAxis="2" />
				<componentJoint index="1" anchorActor="1" />
            </movingTool>
            <movingTool node="clawLeftJoint" playSound="true" >
                <controls axis="AXIS_FRONTLOADER_TOOL4" invertAxis="true" mouseSpeedFactor="1.0" iconName="GRABBER_OPEN_CLOSE" />
                <rotation rotSpeed="80" rotAcceleration="640" rotMax="75" rotMin="0" startRot="12.8" rotationAxis="1" />
                <componentJoint index="2" anchorActor="0" />
				<!-- <dependentPart node="clawLeft" /> -->
				 <dependentPart node="clawTube" /> 
                <dependentMovingTool node="clawRightJoint" speedScale="1" />
            </movingTool>
            <movingTool node="clawRightJoint" >
                <rotation rotSpeed="-80" rotAcceleration="640" rotMax="-12.8" rotMin="-75" startRot="-12.8" rotationAxis="1" />
                <componentJoint index="3" anchorActor="0" />
				<!-- <dependentPart node="clawRight" /> -->
            </movingTool>
        </movingTools>

        <movingParts>				
           <!--  <movingPart node="clawLeft" referencePoint="clawLeftRef" referenceFrame="clawLeftRefFrame" limitedAxis="3" isActiveDirty="true" maxUpdateDistance="125">
            </movingPart> 
            <movingPart node="clawRight" referencePoint="clawRightRef" referenceFrame="clawRightRefFrame" limitedAxis="3" isActiveDirty="true" maxUpdateDistance="125">
                <dependentPart node="clawArm"/>
                <dependentPart node="hydraulic"/>
            </movingPart>-->
            <movingPart node="clawPart" referencePoint="clawPartRef" referenceFrame="clawPartRef" scaleZ="true" isActiveDirty="true" maxUpdateDistance="125"/>
            <movingPart node="clawTube" referencePoint="clawTubeRef" referenceFrame="clawTubeRef" >
                <translatingPart node="clawTube1" />
            </movingPart> 

        </movingParts>
		
		<sounds>
            <actionSound template="hydraulicOpen05" pitchScale="0.6" volumeScale="1.0" linkNode="clawRotJointActor1"   actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"                     nodes="clawRotJointActor1"   fadeIn="0.1" fadeOut="0.1" />
            <actionSound template="hydraulicOpen03" pitchScale="0.6" volumeScale="1.0" linkNode="clawLeftJoint"        actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"                     nodes="clawLeftJoint"        fadeIn="0.1" fadeOut="0.1" />
            <actionSound template="sheetImp02"            pitchScale="0.8" volumeScale="1.0" linkNode="clawLeftJoint"        actionNames="TOOL_MOVE_END_POS_LIMIT"                         nodes="clawLeftJoint" />
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.0" linkNode="clawLeftJoint"        actionNames="TOOL_MOVE_END_POS_LIMIT"                         nodes="clawLeftJoint" />
            <actionSound template="foldStartMed02"        pitchScale="0.5" volumeScale="1.0" linkNode="clawLeftJoint"        actionNames="TOOL_MOVE_END_NEG_LIMIT"                         nodes="clawLeftJoint" />
        </sounds>
		
	</cylindered>

    <ai>
        <agentAttachment width="2.4" height="2.1" length="2.4" heightOffset="0"/>
    </ai>
	
	<foliageBending>
        <bendingNode minX="-0.6" maxX="0.6" minZ="-0.4" maxZ="0.4" yOffset="0.7" node="1>" />
    </foliageBending>
	
    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>
	
	<!-- <baseMaterial>
        <material name="grabber" baseNode="1>0">
            <shaderParameter name="colorMat0" material="0" value="0.7 0.37 0"/>
        </material>
		
    </baseMaterial>

	<designMaterial3Configurations price="0" useDefaultColors="true" title="Grabber Color" defaultColorIndex="0">
	    <designMaterial3Configuration name="CAT BLACK"        color="0 0 0" 	   material="0" />
        <designMaterial3Configuration name="CAT"              color="0.753 0.337 0.018"   material="6" /> 
        <designMaterial3Configuration name="CAT WHITE"        color="0.674 0.674 0.674"   material="6" /> 
        <designMaterial3Configuration name="CAT WHITE REARL"  color="0.674 0.674 0.674"   material="16"/> 
		<material name="grabber" shaderParameter="colorMat0" />
    </designMaterial3Configurations>  -->

<i3dMappings>
  <i3dMapping id="mainCompGrabber" node="0>" />
  <i3dMapping id="attachable" node="0>0" />
  <i3dMapping id="attacherJoin" node="0>0|0" />
  <i3dMapping id="hydraulicIn01" node="0>0|1" />
  <i3dMapping id="hydraulicOut01" node="0>0|2" />
  <i3dMapping id="body1" node="0>1" />
  <i3dMapping id="clawRotJoint" node="0>2" />
  <i3dMapping id="mainCompGrabberRot" node="1>" />
  <i3dMapping id="body1.004" node="1>0" />
  <i3dMapping id="body1.005" node="1>1" />
  <i3dMapping id="clawLeftJoint" node="1>2" />
  <i3dMapping id="clawLeftRefFrame" node="1>3" />
  <i3dMapping id="clawRightJoint" node="1>4" />
  <i3dMapping id="clawRightRefFrame" node="1>5" />
  <i3dMapping id="clawRotJointActor1" node="1>6" />
  <i3dMapping id="logGrabTrigger" node="1>7" />
  <i3dMapping id="mainCompGrabLeft" node="2>" />
  <i3dMapping id="aCol.003" node="2>0" />
  <i3dMapping id="aCol.004" node="2>1" />
  <i3dMapping id="clawLeft" node="2>2" />
  <i3dMapping id="clawPart" node="2>3" />
  <i3dMapping id="clawTubeRef" node="2>4" />
  <i3dMapping id="clawLeftRef" node="2>5" />
  <i3dMapping id="mainCompGrabRight" node="3>" />
  <i3dMapping id="aCol" node="3>0" />
  <i3dMapping id="aCol.002" node="3>1" />
  <i3dMapping id="clawPartRef" node="3>2" />
  <i3dMapping id="clawRight" node="3>3" />
  <i3dMapping id="clawTube" node="3>4" />
  <i3dMapping id="clawTube1" node="3>4|0" />
  <i3dMapping id="clawRightRef" node="3>5" />
		<i3dMapping id="grabTreeDetectionNode"          	node="1>8" />
</i3dMappings>

</vehicle>
