<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="kilpi">
    <annotation>Copyright (C) Farmari99, All Rights Reserved.</annotation>

    <storeData>
        <name>895</name>

        <image>store_kilpi.png</image>
        <price>1250</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KILPI</brand>
        <category>baling</category>
        <shopHeight>2.8</shopHeight>
        <shopTranslationOffset>0 0.1 0</shopTranslationOffset>
        <shopRotationOffset>10.44 0 0</shopRotationOffset>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_telehandlerTool</typeDesc>
        <filename>kilpi895.i3d</filename>
        <size width="2" length="2"/>
        <supportsPickUp>false</supportsPickUp>
        <components>
            <component solverIterationCount="30" mass="150"/>
            <component solverIterationCount="15" mass="150"/>
            <joint component1="1" component2="2" node="compJoint" enableCollision="true" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="180 180 180" rotLimitDamping="0 10 0" rotLimitForceLimit="-1 10 -1" transLimitSpring="1000 1000 1000" transLimitDamping="10 10 10"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0">
            <default name="DEFAULT_IMPLEMENT"/>
            <selected name="DEFAULT_IMPLEMENT_SELECTED"/>
        </schemaOverlay>
    </base>

    <attachable>
        <inputAttacherJointConfigurations>
            <inputAttacherJointConfiguration name="$l10n_configuration_inputAttacher3Point" price="0">
				<inputAttacherJoint node="attacherJointImplement" jointType="implement" topReferenceNode="topArmNode" isControllable="true" lowerRotLimitScale="0 0 0" upperRotationOffset="3" lowerRotationOffset="0" needsLowering="false">
					<distanceToGround lower="-0.2" upper="1.7" />
				</inputAttacherJoint>
                <objectChange node="3pPins" visibilityActive="true" visibilityInactive="false"/>
            </inputAttacherJointConfiguration>
            <inputAttacherJointConfiguration name="$l10n_configuration_inputAttacherFrontLoader" price="0">
                <inputAttacherJoint node="attacherJointFL" jointType="frontloader">
					<objectChange node="hose1Detached" visibilityActive="false" visibilityInactive="true"/>
					<objectChange node="hose2Detached" visibilityActive="false" visibilityInactive="true"/>
				</inputAttacherJoint>
                <objectChange node="fl" visibilityActive="true" visibilityInactive="false"/>
            </inputAttacherJointConfiguration>
        </inputAttacherJointConfigurations>
    </attachable>

	<attacherJoints>
		<attacherJointConfigurations>
			<attacherJointConfiguration name="$l10n_configuration_valueDefault" price="0" >
				<objectChange node="bigBagLifter"						visibilityActive="false"/>								
			</attacherJointConfiguration>	
		<attacherJointConfiguration name="$l10n_configuration_valueBagLifter" price="50" >
				<attacherJoint node="bagAttacher" jointType="trailer"  lowerRotLimit="30 30 60" upperRotationOffset="0" allowsJointLimitMovement="false" canTurnOnImplement="false" rootNode="1>">
					<schema position="1 0" rotation="0" invertX="false" />
				</attacherJoint>
				<objectChange node="bigBagLifter"	visibilityActive="true"/>	
				<objectChange node="lifterCol" compoundChildActive="true" compoundChildInactive="false"/>	
				<objectChange node="lifterCol2" compoundChildActive="true" compoundChildInactive="false"/>		
				<objectChange node="lifterCol3" compoundChildActive="true" compoundChildInactive="false"/>	
				<objectChange node="lifterCol4" compoundChildActive="true" compoundChildInactive="false"/>					
			</attacherJointConfiguration>			
		</attacherJointConfigurations>  

        <sounds>
            <attach template="ATTACH_01" />
        </sounds>
    </attacherJoints>
	
    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydOut" length="1.7" diameter="0.02" straighteningFactor="1">
            <objectChange node="hose1Detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydIn" length="1.7" diameter="0.02" straighteningFactor="1">
            <objectChange node="hose2Detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>
	
	<dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hyd1Detached"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hyd2Detached"  filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>
	
	<attacherJointControl maxTiltAngle="25" supportsDamping="true">
        <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="DEFAULT_HYDRAULIC_SOUND" linkNode="0>" />
        </sounds>
    </attacherJointControl>
	
    <baleGrab triggerNode="dynamicMountTrigger" rootNode="0>" jointNode="0>" jointType="TYPE_AUTO_ATTACH_XYZ" forceAcceleration="90" grabRefComponentJointIndex1="0" rotDiffThreshold1="40" isInverted="false"/>

	<!--dynamicMountAttacher node="0>" >
        <mountCollisionMask node="lowerBladeCol2" collisionMask="134225920" />
        <mountCollisionMask node="dynamicMountAttacherBlade" collisionMask="134225920" />
        <mountCollisionMask node="lowerLeftMount" collisionMask="134225920" />
        <mountCollisionMask node="lowerRightMount" collisionMask="134225920" />
    </dynamicMountAttacher-->
	
	<dynamicMountAttacher node="0>">
        <mountCollisionMask node="dynamicMountAttacherBlade" collisionMask="134225920" />
        <mountCollisionMask node="lowerBladeCol2" collisionMask="134225920" />
        <grab openMountType="TYPE_FORK" closedMountType="TYPE_AUTO_ATTACH_XYZ">
            <movingToolActivation node="compJoint" isInverted="false" openFactor="0.6" />
        </grab>
    </dynamicMountAttacher>

	
	<fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unit="$l10n_unit_bale" fillTypes="STRAW DRYGRASS_WINDROW GRASS_WINDROW SILAGE" capacity="1"/>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

	<strawBlower>
        <baleTrigger node="BaleTrigger" />
    </strawBlower>

	<dischargeable requiresTipOcclusionArea="false">
        <dischargeNode node="dischargeNode" emptySpeed="5000" fillUnitIndex="1">
            <info node="infoNode" width="1.5" length="0.5" zOffset="0.4" useRaycastHitPosition="true"/>
            <effects>
                <effectNode effectNode="sliceEffect"  materialType="unloading" materialTypeId="1" fadeTime="1" extraDistance="0.5" uvSpeed="-0.20"/>
            </effects>
        </dischargeNode>
    </dischargeable>

    <cylindered>
        <movingTools>
            <movingTool node="compJoint" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.3" iconName="GRABBER_OPEN_CLOSE"/>
                <rotation rotationAxis="1" rotSpeed="70" rotAcceleration="250"  rotMax="75" rotMin="-32"  detachingRotMinLimit="-10" detachingRotMaxLimit="20"/>
                <componentJoint index="1" anchorActor="0"/>
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="cylinder" referencePoint="hydRef" referenceFrame="0>" isActiveDirty="true">
                <translatingPart node="punch"/>
            </movingPart>
        </movingParts>
        <sounds>
            <hydraulic template="DEFAULT_HYDRAULIC_SOUND" linkNode="0>"/>
        </sounds>
    </cylindered>

	<vehicleTypeConfigurations>
        <vehicleTypeConfiguration name="$l10n_configuration_valueBaleGrab" price="0" vehicleType="kilpi">
			<objectChange node="bladeCover" visibilityActive="true" visibilityInactive="false"/>
			<objectChange node="bladeCoverCol1" compoundChildActive="true" compoundChildInactive="false"/>
			<objectChange node="bladeCoverCol2" compoundChildActive="true" compoundChildInactive="false"/>
        </vehicleTypeConfiguration>
		<vehicleTypeConfiguration name="$l10n_configuration_valueBaleCutter" price="0" vehicleType="kilpiBlade">
			<objectChange node="lowerBlade" visibilityActive="true" visibilityInactive="false"/>
			<objectChange node="lowerBladeCol2" compoundChildActive="true" compoundChildInactive="false"/>
			<objectChange node="dynamicMountTriggerLower" compoundChildActive="true" compoundChildInactive="false"/>
        </vehicleTypeConfiguration>
	</vehicleTypeConfigurations>

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

<i3dMappings>
  <i3dMapping id="kilpi895Main" node="0>" />
  <i3dMapping id="collisions" node="0>0" />
  <i3dMapping id="curveLeft1" node="0>0|0" />
  <i3dMapping id="curveLeft2" node="0>0|1" />
  <i3dMapping id="curveLeft3" node="0>0|2" />
  <i3dMapping id="curveRight1" node="0>0|3" />
  <i3dMapping id="curveRight2" node="0>0|4" />
  <i3dMapping id="curveRight3" node="0>0|5" />
  <i3dMapping id="lowerLeft" node="0>0|6" />
  <i3dMapping id="lowerRight" node="0>0|7" />
  <i3dMapping id="upperLeft" node="0>0|8" />
  <i3dMapping id="upperRight" node="0>0|9" />
  <i3dMapping id="dynamicMountTrigger" node="0>0|10" />
  <i3dMapping id="frame" node="0>1" />
  <i3dMapping id="attachers" node="0>1|0" />
  <i3dMapping id="3pPins" node="0>1|0|0" />
  <i3dMapping id="attacherJointImplement" node="0>1|0|0|0" />
  <i3dMapping id="topArmNode" node="0>1|0|0|1" />
  <i3dMapping id="fl" node="0>1|0|1" />
  <i3dMapping id="attacherJointFL" node="0>1|0|1|0" />
  <i3dMapping id="hoses" node="0>1|0|2" />
  <i3dMapping id="hydIn" node="0>1|0|2|0" />
  <i3dMapping id="hydOut" node="0>1|0|2|1" />
  <i3dMapping id="cylinder" node="0>1|1" />
  <i3dMapping id="cylinderBone" node="0>1|1|0" />
  <i3dMapping id="punch" node="0>1|1|1" />
  <i3dMapping id="hose1Detached" node="0>1|2" />
  <i3dMapping id="hyd1Detached" node="0>1|2|0" />
  <i3dMapping id="hose2Detached" node="0>1|3" />
  <i3dMapping id="hyd2Detached" node="0>1|3|0" />
  <i3dMapping id="lowerBlade" node="0>1|4" />
  <i3dMapping id="dynamicMountTriggerLower" node="0>1|4|0" />
  <i3dMapping id="lowerBladeCol2" node="0>1|4|1" />
  <i3dMapping id="mainBone" node="0>1|5" />
  <i3dMapping id="skinnedHoses" node="0>1|6" />
  <i3dMapping id="particlesBack" node="0>1|7" />
  <i3dMapping id="effectNodesBack" node="0>1|7|0" />
  <i3dMapping id="effectSmokeBack" node="0>1|7|0|0" />
  <i3dMapping id="sliceEffect" node="0>1|7|0|1" />
  <i3dMapping id="particleNodesBack" node="0>1|7|1" />
  <i3dMapping id="effectParticleBack" node="0>1|7|1|0" />
  <i3dMapping id="dischargeNode" node="0>1|7|2" />
  <i3dMapping id="infoNode" node="0>1|7|3" />
  <i3dMapping id="fillUnit" node="0>1|8" />
  <i3dMapping id="BaleTrigger" node="0>1|8|0" />
  <i3dMapping id="decalsFrame" node="0>1|9" />
  <i3dMapping id="compJoint" node="0>2" />
  <i3dMapping id="bladeRoot" node="1>" />
  <i3dMapping id="blade" node="1>0" />
  <i3dMapping id="bigBagLifter" node="1>0|0" />
  <i3dMapping id="bagAttacher" node="1>0|0|0" />
  <i3dMapping id="lifterCol2" node="1>0|0|1" />
  <i3dMapping id="lifterCol3" node="1>0|0|2" />
  <i3dMapping id="lifterCol4" node="1>0|0|3" />
  <i3dMapping id="lifterCol" node="1>0|0|4" />
  <i3dMapping id="bladeBackCol" node="1>0|1" />
  <i3dMapping id="bladeCover" node="1>0|2" />
  <i3dMapping id="bladeCoverCol1" node="1>0|2|0" />
  <i3dMapping id="bladeCoverCol2" node="1>0|2|1" />
  <i3dMapping id="dynamicMountAttacherBlade" node="1>0|3" />
  <i3dMapping id="hydRef" node="1>0|4" />
  <i3dMapping id="decalsBlade" node="1>0|5" />
</i3dMappings>
</vehicle>
