Community Forum

Help With Scripting

Forum Overview >> Farming Simulator 2013

CategoryFarming Simulator 2013
Created20.09.2015 07:46


William Miles (WillMiles) 20.09.2015 07:48
Trying to make a trailer with two semi trailer attachers... can get the first one to attach in game, but the second one won't attach.... What do i need to change?

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="RWT">
<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
<filename>RWT.i3d</filename>

<name>
<en>RWT trailer TRI 350 BT</en>
<de>RWT trailer TRI 350 BT</de>
<fr>Remorque semi RoadWest TRI 350 BT</fr>
</name>
<typeDesc>
<en>RWT trailer TRI 350 BT</en>
<de>RWT trailer TRI 350 BT</de>
<fr>Remorque semi RoadWest TRI 350 BT</fr>
</typeDesc>

<size width="4.0" length="12.0" lengthOffset="0" />

<wheels autoRotateBackSpeed="2.0">
<wheel driveMode="0" repr="0>4" radius="0.6" deltaY="0.1" suspTravel="0.14" spring="20" damper="1" mass="0.4" />
<wheel driveMode="0" repr="0>5" radius="0.6" deltaY="0.1" suspTravel="0.14" spring="20" damper="1" mass="0.4" />
<wheel driveMode="0" repr="0>6" radius="0.6" deltaY="0.1" suspTravel="0.14" spring="20" damper="1" mass="0.4" />
<wheel driveMode="0" repr="0>7" radius="0.6" deltaY="0.1" suspTravel="0.14" spring="20" damper="1" mass="0.4" />
<wheel driveMode="0" repr="0>8" radius="0.6" deltaY="0.1" suspTravel="0.14" spring="20" damper="1" mass="0.4" />
<wheel driveMode="0" repr="0>9" radius="0.6" deltaY="0.1" suspTravel="0.14" spring="20" damper="1" mass="0.4" />
</wheels>
<steeringAxleAngleScale startSpeed="20" endSpeed="60" />
<brakeForce>2</brakeForce>
<downForce>4</downForce>
<capacity>40000</capacity>
<massPerFillLevel value="0.00005" />

<fillPlanes>
<fillPlane type="maize">
<node index="2|3|0">
<key time="0" x="0.00201" y="-2.38566" rotation="-0.0170624 0 0" scale="0.2 0.01 0.97"/>
<key time="0.2" x="0.00201" y="-2.30455" rotation="-0.0105424 0 0" scale="0.8 0.1 0.975"/>
<key time="0.3" x="0.00201" y="-2.17496" rotation="-0.0105424 0 0" scale="0.8 0.2 0.975"/>
<key time="0.5" x="0.00201" y="-1.86806" rotation="-0.0080374 0 0" scale="0.91 0.4 0.985"/>
<key time="0.9" y="-1.25523" rotation="0 0 0" scale="1 0.9 0.99"/>
<key time="1" y="-1.18973" rotation="0 0 0" scale="1 1 1"/>
</node>
</fillPlane>
<fillPlane type="rape">
<node index="2|3|1">
<key time="0" x="0.00201" y="-2.38566" rotation="-0.0170624 0 0" scale="0.2 0.01 0.97"/>
<key time="0.2" x="0.00201" y="-2.30455" rotation="-0.0105424 0 0" scale="0.8 0.1 0.975"/>
<key time="0.3" x="0.00201" y="-2.17496" rotation="-0.0105424 0 0" scale="0.8 0.2 0.975"/>
<key time="0.5" x="0.00201" y="-1.86806" rotation="-0.0080374 0 0" scale="0.91 0.4 0.985"/>
<key time="0.9" y="-1.25523" rotation="0 0 0" scale="1 0.9 0.99"/>
<key time="1" y="-1.18973" rotation="0 0 0" scale="1 1 1"/>
</node>
</fillPlane>
<fillPlane type="sugarbeet">
<node index="2|3|2">
<key time="0" x="0.00201" y="-2.38566" rotation="-0.0170624 0 0" scale="0.2 0.01 0.97"/>
<key time="0.2" x="0.00201" y="-2.30455" rotation="-0.0105424 0 0" scale="0.8 0.1 0.975"/>
<key time="0.3" x="0.00201" y="-2.17496" rotation="-0.0105424 0 0" scale="0.8 0.2 0.975"/>
<key time="0.5" x="0.00201" y="-1.86806" rotation="-0.0080374 0 0" scale="0.91 0.4 0.985"/>
<key time="0.9" y="-1.25523" rotation="0 0 0" scale="1 0.9 0.99"/>
<key time="1" y="-1.18973" rotation="0 0 0" scale="1 1 1"/>
</node>
</fillPlane>
<fillPlane type="potato">
<node index="2|3|3">
<key time="0" x="0.00201" y="-2.38566" rotation="-0.0170624 0 0" scale="0.2 0.01 0.97"/>
<key time="0.2" x="0.00201" y="-2.30455" rotation="-0.0105424 0 0" scale="0.8 0.1 0.975"/>
<key time="0.3" x="0.00201" y="-2.17496" rotation="-0.0105424 0 0" scale="0.8 0.2 0.975"/>
<key time="0.5" x="0.00201" y="-1.86806" rotation="-0.0080374 0 0" scale="0.91 0.4 0.985"/>
<key time="0.9" y="-1.25523" rotation="0 0 0" scale="1 0.9 0.99"/>
<key time="1" y="-1.18973" rotation="0 0 0" scale="1 1 1"/>
</node>
</fillPlane>
<fillPlane type="barley">
<node index="2|3|4">
<key time="0" x="0.00201" y="-2.38566" rotation="-0.0170624 0 0" scale="0.2 0.01 0.97"/>
<key time="0.2" x="0.00201" y="-2.30455" rotation="-0.0105424 0 0" scale="0.8 0.1 0.975"/>
<key time="0.3" x="0.00201" y="-2.17496" rotation="-0.0105424 0 0" scale="0.8 0.2 0.975"/>
<key time="0.5" x="0.00201" y="-1.86806" rotation="-0.0080374 0 0" scale="0.91 0.4 0.985"/>
<key time="0.9" y="-1.25523" rotation="0 0 0" scale="1 0.9 0.99"/>
<key time="1" y="-1.18973" rotation="0 0 0" scale="1 1 1"/>
</node>
</fillPlane>
<fillPlane type="wheat">
<node index="2|3|4">
<key time="0" x="0.00201" y="-2.38566" rotation="-0.0170624 0 0" scale="0.2 0.01 0.97"/>
<key time="0.2" x="0.00201" y="-2.30455" rotation="-0.0105424 0 0" scale="0.8 0.1 0.975"/>
<key time="0.3" x="0.00201" y="-2.17496" rotation="-0.0105424 0 0" scale="0.8 0.2 0.975"/>
<key time="0.5" x="0.00201" y="-1.86806" rotation="-0.0080374 0 0" scale="0.91 0.4 0.985"/>
<key time="0.9" y="-1.25523" rotation="0 0 0" scale="1 0.9 0.99"/>
<key time="1" y="-1.18973" rotation="0 0 0" scale="1 1 1"/>
</node>
</fillPlane>
</fillPlanes>

<tipReferencePoints>
<tipReferencePoint index="0>16" width="3" />
</tipReferencePoints>

<tipAnimations>
<tipAnimation speedScale="1" animationName="tipAnimationback" dischargeStartTime="1.5" dischargeEndTime="13" >
<dischargeParticleSystems>
<dischargeParticleSystem type="wheat" node="0>2|4" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDPSBig.i3d" />
<dischargeParticleSystem type="maize" node="0>2|4" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDPSBig.i3d" />
<dischargeParticleSystem type="barley" node="0>2|4" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDPSBig.i3d" />
<dischargeParticleSystem type="rape" node="0>2|4" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDPSBigRape.i3d" />
<dischargeParticleSystem type="potato" node="0>2|4" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDPSBigPotato.i3d" />
<dischargeParticleSystem type="sugarBeet" node="0>2|4" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDPSBigSugarBeet.i3d" />
</dischargeParticleSystems>
</tipAnimation>
</tipAnimations>

<lightCoronas>
<lightCorona index="0>11" />
</lightCoronas>

<brakeLights>
<brakeLight index="0>12" />
</brakeLights>

<lightsaddon lightsStayOn="false">
<light type="dirLeft" index="0>13|1" />
<light type="dirRight" index="0>13|0" />
<light type="reverse" index="0>18" />
<flashers soundfile="blinktick.wav" lowPitch="0.6" highPitch="0.8" volume="0.6" autoreturn="true" tolerance="0.9"/>
<toggleSound pitch="0.5"/>
</lightsaddon>

<foldingParts>
<foldingPart componentJointIndex="0" anchorActor="0" animationClip="bacheSource" rootNode="0>2|2|0" speedScale="1" />
</foldingParts>

<movingTools>
<!-- support -->
<movingTool index="0>1" componentJointIndex="0" anchorActor="0"/>

<!-- cylinder with tipper -->
<movingTool index="0>2">
<dependentPart index="0>3" />
</movingTool>

</movingTools>

<animations>
<!-- move support wheel down/up -->
<animation name="moveSupport">
<part node="1" startTime="0" duration="0.6" startTrans="0.06093 0.89099 1.17314" endTrans="0.06093 0.40209 1.17314" />
</animation>

<animation name="tipAnimationback">
<part node="0>2" startTime="0" endTime="5.166" startRot="0 0 0" endRot="-32 0 0" />
<part node="0>2|1" startTime="0" endTime="1.0417" startRot="0 0 0" endRot="18.33192 0 0" />
<part node="0>2|1" startTime="1.0417" endTime="2.0833" startRot="18.33192 0 0" endRot="23.95054 0 0" />
<part node="0>2|1" startTime="2.0833" endTime="3.125" startRot="23.95054 0 0" endRot="29.07754 0 0" />
<part node="0>2|1" startTime="3.125" endTime="5.166" startRot="29.07754 0 0" endRot="34.4891 0 0" />
</animation>
</animations>

<support animationName="moveSupport" />

<movingParts>
<movingPart index="0>3" referencePoint="0>2|5" referenceFrame="0>2|5">
<translatingPart index="0>3|0" />
<translatingPart index="0>3|0|0" />
<translatingPart index="0>3|0|0|0" />
<translatingPart index="0>3|0|0|0|0" />
</movingPart>
</movingParts>

<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>14" jointType="semitrailer"/>
<attacherJoint index="0>15" allowsJointLimitMovement="false" allowsLowering="false" maxRotLimit="12 175 12" jointType="semitrailer" enableCollision="true" />

<fillRootNode index="0>" />
<exactFillRootNode index="0>10" />
<fillAutoAimTargetNode index="0>17" />
<fillMassNode index="0>" />

<fillTypes fruitTypes="wheat rape maize barley potato sugarBeet"/>

<components count="2">
<component1 centerOfMass="0 0 0" solverIterationCount="12" />
<component2 centerOfMass="0 0 0" solverIterationCount="12" />
<joint component1="0" component2="1" index="0>1" 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"/>

--->

<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>


Emil Drefers (giants.edrefers) 21.09.2015 08:16
Hi,

for attacherJoints its is very important to make sure that their orientation is correct.

As always, please have a look at the default vehicles.
e.g. the kroeger HKD 302, this is a trailer which can attach an other trailer too.

Take a close look at the
<attacherJoints>
<attacherJoint index="0>4" .... />
</attacherJoints>
attributes and I'm pretty sure you will figure out how it is done correctly.

Cheers,
Emil


Note: Log in to post. Create a new account here.