﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="trailer">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Krampe BBE 500</en>
        <de>Krampe BBE 500</de>
    </name>
	<typeDesc>$l10n_TypeDesc_Tipper</typeDesc>
    <filename>data/vehicles/trailers/krampe/krampeBBE500.i3d</filename>

    <size width="3.5" length="8"/>

    <wheels autoRotateBackSpeed="2.0">
        <wheel driveMode="0" repr="0" radius="0.7" deltaY="0" suspTravel="0.08" spring="20" damper="5" mass="0.15" lateralStiffness="1" />
        <wheel driveMode="0" repr="1" driveNode="1|0" radius="0.7" deltaY="0" suspTravel="0.08" spring="20" damper="5" mass="0.15" lateralStiffness="1" />
    </wheels>
    <brakeForce>0.5</brakeForce>
	<downForce>4</downForce>
    <capacity>17500</capacity>
	<massPerFillLevel value="0.00005" />

	<lightCoronas>
		<lightCorona index="0>6|0" />
	</lightCoronas>

	<brakeLights>
		<brakeLight index="0>6|2" />
	</brakeLights>

    <fillPlanes>
        <fillPlane type="wheat">
            <node index="0>5|5|0">
				<key time="0"   y="0" scale="0.879 0 1"/>
                <key time="0.205" y="0" scale="1 0.205 1"/>
                <key time="1"   y="0" scale="1 1 1"/>
            </node>
			<node index="0>5|6">
				<key time="0" y="0.189" scale="1 0.1 1"/>
				<key time="0.8" y="0.189" scale="1 0.7 1"/>
                <key time="1" y="0.189" scale="1 0.1 1"/>
            </node>
        </fillPlane>
		<fillPlane type="maize">
            <node index="0>5|5|1">
				<key time="0"   y="0" scale="0.879 0 1"/>
                <key time="0.205" y="0" scale="1 0.205 1"/>
                <key time="1"   y="0" scale="1 1 1"/>
            </node>
			<node index="0>5|6">
				<key time="0" y="0.189" scale="1 0.1 1"/>
				<key time="0.8" y="0.189" scale="1 0.7 1"/>
                <key time="1" y="0.189" scale="1 0.1 1"/>
            </node>
        </fillPlane>
		<fillPlane type="rape">
            <node index="0>5|5|2">
				<key time="0"   y="0" scale="0.879 0 1"/>
                <key time="0.205" y="0" scale="1 0.205 1"/>
                <key time="1"   y="0" scale="1 1 1"/>
            </node>
			<node index="0>5|6">
				<key time="0" y="0.189" scale="1 0.1 1"/>
				<key time="0.8" y="0.189" scale="1 0.7 1"/>
                <key time="1" y="0.189" scale="1 0.1 1"/>
            </node>
        </fillPlane>
		<fillPlane type="chaff">
            <node index="0>5|5|3">
				<key time="0"   y="0" scale="0.879 0 1"/>
                <key time="0.205" y="0" scale="1 0.205 1"/>
                <key time="1"   y="0" scale="1 1 1"/>
            </node>
			<node index="0>5|6">
				<key time="0" y="0.189" scale="1 0.1 1"/>
				<key time="0.8" y="0.189" scale="1 0.7 1"/>
                <key time="1" y="0.189" scale="1 0.1 1"/>
            </node>
        </fillPlane>
		<fillPlane type="potato">
            <node index="0>5|5|4">
				<key time="0"   y="0" scale="0.879 0 1"/>
                <key time="0.205" y="0" scale="1 0.205 1"/>
                <key time="1"   y="0" scale="1 1 1"/>
            </node>
			<node index="0>5|6">
				<key time="0" y="0.189" scale="1 0.1 1"/>
				<key time="0.8" y="0.189" scale="1 0.7 1"/>
                <key time="1" y="0.189" scale="1 0.1 1"/>
            </node>
        </fillPlane>
		<fillPlane type="sugarBeet">
            <node index="0>5|5|5">
				<key time="0"   y="0" scale="0.879 0 1"/>
                <key time="0.205" y="0" scale="1 0.205 1"/>
                <key time="1"   y="0" scale="1 1 1"/>
            </node>
			<node index="0>5|6">
				<key time="0" y="0.189" scale="1 0.1 1"/>
				<key time="0.8" y="0.189" scale="1 0.7 1"/>
                <key time="1" y="0.189" scale="1 0.1 1"/>
            </node>
        </fillPlane>
    </fillPlanes>

    <hydraulicSound file="data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="0.9" volume="1.0" />
    <fillSound file="data/maps/sounds/siloFillSound.wav" pitchOffset="1.0" volume="1.5" />
    <attacherJoint index="0>2" jointType="trailer"/>
    <trailerAttacherJoints>
        <trailerAttacherJoint index="0>3" low="false" maxRotLimit="10 80 80" />
    </trailerAttacherJoints>
    <tipReferencePoints>
        <tipReferencePoint index="0>4" width="2.5" />
        <tipReferencePoint index="0>4" width="0.5" />
    </tipReferencePoints>

    <tipAnimations>
        <tipAnimation speedScale="1" animationName="tipAnimationBack" dischargeStartTime="1.3" dischargeEndTime="10" >
            <dischargeParticleSystems>
                <dischargeParticleSystem type="wheat" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBig.i3d" />
                <dischargeParticleSystem type="maize" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBig.i3d" />
                <dischargeParticleSystem type="barley" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBig.i3d" />
                <dischargeParticleSystem type="rape" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBigRape.i3d" />
                <dischargeParticleSystem type="chaff" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBigChaff.i3d" />
				<dischargeParticleSystem type="potato" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBigPotato.i3d" />
				<dischargeParticleSystem type="sugarBeet" node="5|6" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBigSugarBeet.i3d" />
            </dischargeParticleSystems>
        </tipAnimation>
        <tipAnimation speedScale="1" closeSpeedScale="-2" animationName="tipAnimationGrainDoor" dischargeStartTime="0.3" dischargeEndTime="25">
            <dischargeParticleSystems>
                <dischargeParticleSystem type="wheat" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmall.i3d" />
                <dischargeParticleSystem type="maize" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmall.i3d" />
                <dischargeParticleSystem type="barley" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmall.i3d" />
                <dischargeParticleSystem type="rape" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmallRape.i3d" />
                <dischargeParticleSystem type="chaff" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmallChaff.i3d" />
				<dischargeParticleSystem type="potato" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmallPotato.i3d" />
				<dischargeParticleSystem type="sugarBeet" node="5|2|4" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSSmallSugarBeet.i3d" />
            </dischargeParticleSystems>
        </tipAnimation>
    </tipAnimations>

    <fillRootNode index="0>" />
    <exactFillRootNode index="0>8" />
    <fillAutoAimTargetNode index="0>9" />
    <fillMassNode index="0>" />

    <fillTypes fruitTypes="wheat rape maize barley chaff potato sugarBeet"/>

    <movingTools>
        <!-- support -->
        <movingTool index="0>6|4" componentJointIndex="0" anchorActor="0"/>

		<movingTool index="0>5">
			<dependentPart index="0>6|5|0" />
		</movingTool>
		<movingTool index="0>5|3">
            <dependentPart index="0>5|3|0" />
        </movingTool>
		<movingTool index="0>5|2">
            <dependentPart index="0>5|3|0" />
        </movingTool>
		<movingTool index="0>5|2|1">
            <dependentPart index="0>5|2|1|0" />
        </movingTool>
    </movingTools>

    <movingParts>
        <movingPart index="0>5|3|0" referencePoint="0>5|2|3" referenceFrame="0>">
            <translatingPart index="0>5|3|0|0" />
        </movingPart>
		<movingPart index="0>5|2|1|0" referencePoint="0>5|2|2|0|0" referenceFrame="0>5|2|1|1"/>
		<movingPart index="0>6|5|0" referencePoint="0>5|4" referenceFrame="0>6|8">
            <translatingPart index="0>6|5|0|0" />
            <translatingPart index="0>6|5|0|0|0" />
            <translatingPart index="0>6|5|0|0|0|0" />
            <translatingPart index="0>6|5|0|0|0|0|0" />
            <translatingPart index="0>6|5|0|0|0|0|0|0" />
            <translatingPart index="0>6|5|0|0|0|0|0|0|0" />
        </movingPart>
    </movingParts>

    <animations>
		<!-- backtipping -->
		<animation name="tipAnimationBack">
			<part node="0>5|3" startTime="0" endTime="0.9" startRot="0 0 0" endRot="-15 0 0" />
            <part node="0>5|2" startTime="1" endTime="4" startRot="0 0 0" endRot="63 0 0" />
			<part node="0>5" startTime="3" duration="13" startRot="0 0 0" endRot="-51 0 0" />
        </animation>
		<!-- backtipping with opened graindoor -->
		<animation name="tipAnimationGrainDoor">
            <part node="0>5|2|2|0" startTime="0" endTime="0.6" startTrans="0 -0.136 0" endTrans="0 0.21 0"  />
			<part node="0>5|2|1" startTime="0" endTime="0.6" startRot="0 0 0" endRot="0 0 60" />
			<part node="0>5" startTime="3" endTime="20" startRot="0 0 0" endRot="-51 0 0" />
        </animation>
        <!-- move support wheel down/up -->
        <animation name="moveSupport">
			<part node="0>1|1" startTime="0" endTime="0.05" visibility="false" />
			<part node="0>7" startTime="0" endTime="0.05" visibility="true" />
			<part node="0>1|1" startTime="0.05" endTime="0.1" visibility="true" />
			<part node="0>7" startTime="0.05" endTime="0.1" visibility="false" />
            <part node="0>6|4" startTime="0" duration="0.2" startTrans="0.24677 -0.17105 2.02186" endTrans="0.24677 -0.7203 2.02186" />
        </animation>
    </animations>

    <support animationName="moveSupport" />

    <components count="2">
        <component1 centerOfMass="0 0 -1.2" solverIterationCount="15" />
        <component2 centerOfMass="0 0 0" solverIterationCount="15" />
        <joint component1="0" component2="1" index="0>6|4|0" rotLimit="0 0 0" transLimit="0 0 0" />
    </components>

    <schemaOverlay file="data/vehicles/schemas/implementSchema.png" fileSelected="data/vehicles/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0">
        <attacherJoint position="0.5 0" rotation="0" invertX="false" />
    </schemaOverlay>

</vehicle>
