<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="dynamicMountAttacherTrailer" 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 params="$l10n_storeItem_headerTrailer">Topliner 4090 %s</name>
        <specs>
            <combination xmlFilename="$data/vehicles/deutzFahr/topLiner4090/topLiner4090.xml"/>
            <combination xmlFilename="$data/vehicles/deutzFahr/header4090/header4090.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_cutterTrailer</function>
        </functions>
        <storePacks>
            <storePack>STARTER_GRAINS</storePack>
        </storePacks>
        <image>$data/vehicles/deutzFahr/header4090Trailer/store_header4090Trailer.png</image>
        <price>1000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>DEUTZFAHR</brand>
        <category>cutterTrailers</category>
        <shopTranslationOffset>0 0.09 0</shopTranslationOffset>
        <shopRotationOffset>-0.149 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>437760</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>87552</indexBufferMemoryUsage>
        <textureMemoryUsage>1769472</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_cutterTrailer</typeDesc>
        <filename>$data/vehicles/deutzFahr/header4090Trailer/header4090Trailer.i3d</filename>
        <size width="4" length="12" lengthOffset="1.3" height="4.1" />
        <components>
          <component centerOfMass="0 0.6 1"  solverIterationCount="20" mass="1500"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL_TRAILED" />
    </base>

     <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics tipOcclusionAreaGroupId="1" restLoad="1.1" repr="wheelBackLeft"  useReprDirection="true" forcePointRatio="0.3" initialCompression="20" suspTravel="0.12" spring="27" damper="15" frictionScale="1.5" mass="0.4" yOffset="0.03"/>
                        <wheelChock filename="$data/shared/assets/wheelChocks/wheelChock02.i3d" parkingNode="wheelChock01"/>
                        <wheelChock filename="$data/shared/assets/wheelChocks/wheelChock02.i3d" parkingNode="wheelChock02" isInverted="true" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics tipOcclusionAreaGroupId="1" restLoad="1.1" repr="wheelBackRight" useReprDirection="true" forcePointRatio="0.3" initialCompression="20" suspTravel="0.12" spring="27" damper="15" frictionScale="1.5" mass="0.4" yOffset="0.03"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0>DEUTZ_GREEN6</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelBackLeft"   filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.1 0.165 0.165" />
            <hub linkNode="wheelBackRight"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.1 0.165 0.165" />
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="trailer" attacherHeight="0.95"/>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <brakeForce force="0.4"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric"  node="electricIn01"  length="0.9" diameter="0.01" straighteningFactor="1.5">
           <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0" linkNode="chockSupport_01" filename="$data/shared/assets/wheelChocks/wheelChockSupport01.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="chockSupport_02" filename="$data/shared/assets/wheelChocks/wheelChockSupport01.i3d"/>
    </dynamicallyLoadedParts>

    <lights>
        <sharedLight linkNode="yellowTriangle_02" filename="$data/shared/assets/reflectors/lizard/redTriangle_02.xml" />
        <sharedLight linkNode="yellowTriangle_03" filename="$data/shared/assets/reflectors/lizard/redTriangle_02.xml" />
        <sharedLight linkNode="yellowTriangle_04" filename="$data/shared/assets/reflectors/lizard/redTriangle_02.xml" />
        <sharedLight linkNode="yellowTriangle_05" filename="$data/shared/assets/reflectors/lizard/redTriangle_02.xml" />
        <sharedLight linkNode="yellowRound_02"    filename="$data/shared/assets/reflectors/lizard/yellowRound_02.xml" />
        <sharedLight linkNode="yellowRound_03"    filename="$data/shared/assets/reflectors/lizard/yellowRound_02.xml" />
        <sharedLight linkNode="yellowRound_04"    filename="$data/shared/assets/reflectors/lizard/yellowRound_02.xml" />
        <sharedLight linkNode="yellowRound_05"    filename="$data/shared/assets/reflectors/lizard/yellowRound_02.xml" />
        <sharedLight linkNode="yellowRound_06"    filename="$data/shared/assets/reflectors/lizard/yellowRound_02.xml" />
        <sharedLight linkNode="yellowRound_07"    filename="$data/shared/assets/reflectors/lizard/yellowRound_02.xml" />

        <sharedLight linkNode="plateNumberLights02_01" filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />

        <realLights>
            <high>
                <light node="backLightsHigh1" lightTypes="0" />
                <light node="licensePlateLightHigh" lightTypes="0" />
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
                <brakeLight node="backLightsHigh1" />
            </high>
        </realLights>

        <defaultLights>
            <defaultLight shaderNode="backlight_static" lightTypes="0" />
        </defaultLights>

        <turnLights>
            <turnLightLeft  shaderNode="turnlightLeft_static"/>
            <turnLightRight shaderNode="turnlightRight_static"/>
        </turnLights>

        <brakeLights>
            <brakeLight shaderNode="brakelight_static"/>
        </brakeLights>
    </lights>

    <licensePlates defaultPlacement="NONE">
        <licensePlate node="licensePlateBack" position="BACK" preferedType="SQUARISH" placementArea="0.1 0.26 0.2 0.26">
            <objectChange node="plateNumberLights02_01" visibilityActive="true" visibilityInactive="false" />
        </licensePlate>
    </licensePlates>

    <dynamicMountAttacher triggerNode="dynamicMountTrigger" rootNode="header4090Trailer_main_component1" jointNode="cutterJointNode" forceAcceleration="500" mountType="TYPE_AUTO_ATTACH_XZ" transferMass="true">
        <lockPosition xmlFilename="vehicles/deutzFahr/header4090/header4090.xml" jointNode="cutterJointNodeHeader4090" />
    </dynamicMountAttacher>

    <animations>
        <animation name="moveSupport">
            <part node="supportArmCrank" startTime="0.25" endTime="0.5" startRot="0 0 0" endRot="0 372 0"/>
            <part node="supportArm"      startTime="0.25" endTime="0.5" startTrans="0 0.142 0" endTrans="0 -0.08 0"/>
            <part node="supportArmCol"   startTime="0.25" endTime="0.5" startTrans="0 0.495 0" endTrans="0 -0.08 0"/>
            <part node="supportArmPart"  startTime="0.25" endTime="0.5" startRot="-145 0 0" endRot="0 0 0"/>

            <sound template="clackVar1" startTime="0.2"  direction="1"  volumeScale="2" pitchScale="1"   fadeIn="0.1" fadeOut="0.2" linkNode="attacherJoint"/>
            <sound template="clackVar1" startTime="0.25" direction="-1" volumeScale="2" pitchScale="1.5" fadeIn="0.1" fadeOut="0.2" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="supportArmPart" playSound="false">
                <dependentPart node="supportArmSpring" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="supportArmSpring" referencePoint="supportArmSpringRef" referenceFrame="supportArmSpringRefFrame" scaleZ="true"/>
        </movingParts>

        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="header4090Trailer_main_component1"/>
        </sounds>
    </cylindered>

    <ai>
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2" width="2.8" height="2.2" length="11" lengthOffset="1.2"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.9" maxX="0.9" minZ="-4.35" maxZ="2.5" yOffset="0.4" />
        <bendingNode minX="-1.35" maxX="1.35" minZ="-0.35" maxZ="0.65" yOffset="0.4" />
        <bendingNode minX="-0.2" maxX="0.2" minZ="2.5" maxZ="6.8" yOffset="0.4" />
    </foliageBending>

    <baseMaterial>
        <material name="header4090Trailer_vmask_mat" baseNode="header4090Trailer_vis">
            <shaderParameter name="colorMat0" value="DEUTZ_GREEN6"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="header4090Trailer_main_component1" node="0>" />
        <i3dMapping id="header4090Trailer_vis" node="0>0" />
        <i3dMapping id="wheelBackLeft" node="0>0|0|0" />
        <i3dMapping id="wheelBackRight" node="0>0|0|1" />
        <i3dMapping id="wheelChock01" node="0>0|0|2" />
        <i3dMapping id="chockSupport_01" node="0>0|0|3" />
        <i3dMapping id="wheelChock02" node="0>0|0|4" />
        <i3dMapping id="chockSupport_02" node="0>0|0|5" />
        <i3dMapping id="yellowTriangle_02" node="0>0|1|0|0" />
        <i3dMapping id="yellowTriangle_03" node="0>0|1|0|1" />
        <i3dMapping id="yellowTriangle_04" node="0>0|1|0|2" />
        <i3dMapping id="yellowTriangle_05" node="0>0|1|0|3" />
        <i3dMapping id="yellowRound_02" node="0>0|1|0|4" />
        <i3dMapping id="yellowRound_03" node="0>0|1|0|5" />
        <i3dMapping id="yellowRound_04" node="0>0|1|0|6" />
        <i3dMapping id="yellowRound_05" node="0>0|1|0|7" />
        <i3dMapping id="yellowRound_06" node="0>0|1|0|8" />
        <i3dMapping id="yellowRound_07" node="0>0|1|0|9" />
        <i3dMapping id="plateNumberLights02_01" node="0>0|1|0|10" />
        <i3dMapping id="licensePlateLightHigh" node="0>0|1|0|10|0" />
        <i3dMapping id="backlight_static" node="0>0|1|1|0" />
        <i3dMapping id="brakelight_static" node="0>0|1|1|1" />
        <i3dMapping id="turnlightLeft_static" node="0>0|1|1|2" />
        <i3dMapping id="turnlightRight_static" node="0>0|1|1|3" />
        <i3dMapping id="backLightsHigh1" node="0>0|1|2|0" />
        <i3dMapping id="turnLightLeftBack" node="0>0|1|3|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|1|3|1" />
        <i3dMapping id="attacherJoint" node="0>0|2|0" />
        <i3dMapping id="supportArmCol" node="0>0|2|1" />
        <i3dMapping id="supportArm" node="0>0|2|2" />
        <i3dMapping id="supportArmPart" node="0>0|2|2|0" />
        <i3dMapping id="supportArmSpringRef" node="0>0|2|2|0|0" />
        <i3dMapping id="supportArmSpring" node="0>0|2|2|1" />
        <i3dMapping id="supportArmSpringRefFrame" node="0>0|2|2|2" />
        <i3dMapping id="supportArmCrank" node="0>0|2|3" />
        <i3dMapping id="cutterJointNodeHeader4090" node="0>0|2|4" />
        <i3dMapping id="cutterJointNode" node="0>0|2|5" />
        <i3dMapping id="electricIn01" node="0>0|2|6|0" />
        <i3dMapping id="electric_detached" node="0>0|2|6|1" />
        <i3dMapping id="licensePlateBack" node="0>0|2|7" />
        <i3dMapping id="dynamicMountTrigger" node="0>0|3" />
    </i3dMappings>
</vehicle>
