Adding a PTO to front of atriculated tractor....

Your forum for all discussions around Modding.
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Adding a PTO to front of atriculated tractor....

Post by JRock »

Am curious to know if anyone knows if possible to added a front PTO (with connection hoses, etc...) to the front of an articulated tractor??

Have attempted to do this, but the problem is that the PTO and hydraulic hose connections always seem to want to attach to the rear of the tractor instead of the front. This happens no matter if set the attacher joint indexes and/or the attachment nodes properly in the vehicle XML.

There seems to be a needed/specific line of code or specialization to allow the proper connection of a PTO and hydraulic hoses to the front of an articulated tractor?? :hmm:
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

There are no "special items" to consider for an articulated tractor - it is just the same as with any other tractor's front attacher.

I assume you have created all your attach points and corresponding connector items inside the vehicle's I3D file and assigned unique node identifications for the i3dMapping in the vehicle's XML? Did you choose the correct attacherJointIndices - those should be representing the nodes at the front attacher.

Which tractor are you trying to adapt? I've just done some "quick&dirty" test on the basegame Steiger Quadtrac and it is working as expected without issues.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

LS-Lara wrote: Tue Jul 30, 2024 2:25 pm There are no "special items" to consider for an articulated tractor - it is just the same as with any other tractor's front attacher.

I assume you have created all your attach points and corresponding connector items inside the vehicle's I3D file and assigned unique node identifications for the i3dMapping in the vehicle's XML? Did you choose the correct attacherJointIndices - those should be representing the nodes at the front attacher.

Which tractor are you trying to adapt? I've just done some "quick&dirty" test on the basegame Steiger Quadtrac and it is working as expected without issues.
The way have always understood it for attacher joint configs is that the indexes are the order in which the are sequentially.

Image

Now, with what you describe, the approach I've taken would be incorrect in that an articulated tractor has at least two distinct components, that of the front half and then the back half of the tractor. So, with that, do the indexes start back at ONE between the front and back component?
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

JRock wrote: Wed Jul 31, 2024 2:29 am The way have always understood it for attacher joint configs is that the indexes are the order in which the are sequentially.
That is indeed correct, but for the attacherJointIndices that are referenced as targets for the hoses etc. you have to consider each individual attacherJoint node.

So, in your example the pink area actually holds two indexes: "trailerAttacherJointBack" is index 2 and "trailerAttacherJointBackLow" is index 3.

The blue area then continues with index 4 and 5. Those should be referenced to for your hoses connections at the front. Maybe this could already resolve the issue ?

I'm not fully sure ATM how jointConfigurations might interfere with the counting, but they shouldn't at all.
Also, the tractor components / halves have no influence. No matter "where" the attachers are actually located, the indexing is always continuous.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

LS-Lara wrote: Wed Jul 31, 2024 9:16 am
JRock wrote: Wed Jul 31, 2024 2:29 am The way have always understood it for attacher joint configs is that the indexes are the order in which the are sequentially.
That is indeed correct, but for the attacherJointIndices that are referenced as targets for the hoses etc. you have to consider each individual attacherJoint node.

So, in your example the pink area actually holds two indexes: "trailerAttacherJointBack" is index 2 and "trailerAttacherJointBackLow" is index 3.

The blue area then continues with index 4 and 5. Those should be referenced to for your hoses connections at the front. Maybe this could already resolve the issue ?

I'm not fully sure ATM how jointConfigurations might interfere with the counting, but they shouldn't at all.
Also, the tractor components / halves have no influence. No matter "where" the attachers are actually located, the indexing is always continuous.
So, the focus is more on the NODE for an attacher joint is an attacher index, not that EACH <attacherJoint> is ONE index?? I ask this only because if use the same node for an <attacherJoint> in an effort to apply a different attacher TYPE.

With that said, the NODE for the use of "trailerAttacherJointBack" would always be considered the same INDEX ??
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

JRock wrote: Thu Aug 01, 2024 4:52 am So, the focus is more on the NODE for an attacher joint is an attacher index, not that EACH <attacherJoint> is ONE index?? I ask this only because if use the same node for an <attacherJoint> in an effort to apply a different attacher TYPE.

With that said, the NODE for the use of "trailerAttacherJointBack" would always be considered the same INDEX ??
No, no ... my wording seems to be a bit misleading here.
With "node" I was trying to reference to the "XML node" itself (should rather call this "element" instead), not the "node"-attribute inside the "attacherJoint" tag.

Everything is exactly just as simple as you have imagined before: the indexes are counted in top-down sequence for each "attacherJoint" element, irrespective of attributes and enclosed elements.

Any block like this

Code: Select all

<attacherJoint ... >
    <some />
    <more />
    <child />
    <elements />
</attacherJoint>
will generate a new index.

So, if you re-use the same mapping node as an attribute in another attacherJoint element, it will be a new index.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

If the attacher indexes are indeed reliant upon EACH <attacherJoint></attacherJoint> entry in sequence, then I am not sure what else would be causing the PTO and connection hoses on the front to only want to want to connect to the rear/back indexes?? No matter if I am to follow that logic and apply it to the vehicle XML it insists on always connecting to the back. The other attaching points work just fine on the front, just the doggone PTO and hoses
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

Double-check all your assignments you applied for attacherJointIndices and nodes in the <connectionHoses> and <powerTakeOffs> sections.

Can you post the relevant sections corresponding to your above example or attach the complete XML?
Is this for a custom vehicle or some adaptation of an existing basegame one?
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

Here is the attacherjoints in question:

Image

It is particularly the attacherJointFront entry that has the problem with not wanting to attach the PTO and hoses to the front, but rather the back.
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

Now, this is a different (and way more complex!) setup than the one previously posted, isn't it?
The image in post #3 has been overwritten with this new one also.

You have only shown the attacherJoints, but we need to check that the parameters assigned in the <connectionHoses> and <powerTakeOffs> sections are correctly corresponding to the indexes.

Maybe you should consider downsizing your example to a more simple one and verify the general function, before adding more configurations.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

LS-Lara wrote: Tue Aug 06, 2024 1:19 pm Now, this is a different (and way more complex!) setup than the one previously posted, isn't it?
The image in post #3 has been overwritten with this new one also.

You have only shown the attacherJoints, but we need to check that the parameters assigned in the <connectionHoses> and <powerTakeOffs> sections are correctly corresponding to the indexes.

Maybe you should consider downsizing your example to a more simple one and verify the general function, before adding more configurations.
So what I had simply done was to put some test <attacherJoints> in to understand how the indexes work. No matter what I do or what configuration, the front PTO or connection hoses always want to connect to the back....so confusing Regardless of the two posts have shown an example of, neither one works correctly when apply what should be the appropriate attacher joint indexes
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

Adding more complexity is not really a good idea in resolving the issue.

You still haven't given us any information on how you implemented the attacherJoint index in the <connectionHoses> and <powerTakeOffs> sections. So, without a full picture, nobody can assist properly.

Also, including attacherJointConfigurations is another step ahead of standard setup. Looking at how Giants handles this, you may need to consider defining powerTakeOffConfigurations and connectionHoseConfigurations as well.

For a simple working template, you should take a basegame tractor without configurations, duplicate the back attacher to the front and adapt the XML accordingly.

Quick and dirty example of CASE Steiger Quadtrac works without any issues for me and pto/hoses/cables attach correctly to the front:

I3D file
Duplicated "attacherJoints" TG at 1>0|3, inserted at 0>0|12 and deleted stuff for hydraulic hoses 2-6. TG rotate Y = 180 and translate Z = 1.4.
There will be no visuals for the lifting arms, but that doesn't matter for the simple purpose of connection testing.
XML mapping

Code: Select all

<!-- FRONT -->
<i3dMapping id="attacherJointBackRot_FRONT" node="0>0|12|0" />
<i3dMapping id="attacherJointBackRot2_FRONT" node="0>0|12|0|0" />
<i3dMapping id="attacherJointBack_FRONT" node="0>0|12|0|0|0" />
<i3dMapping id="attacherJointBackArmBottom_FRONT" node="0>0|12|1" />
<i3dMapping id="attacherJointBackArmBottomTrans_FRONT" node="0>0|12|1|0" />
<i3dMapping id="referencePointBackBottom_FRONT" node="0>0|12|1|0|0" />
<i3dMapping id="attacherJointBackArmBottomRef_FRONT" node="0>0|12|1|0|1" />
<i3dMapping id="trailerAttacherJointLow_FRONT" node="0>0|12|2" />
<i3dMapping id="ptoBack_FRONT" node="0>0|12|3" />
<i3dMapping id="hydraulicIn01_cover_FRONT" node="0>0|12|4|0" />
<i3dMapping id="hydraulicOut01_cover_FRONT" node="0>0|12|4|1" />
<i3dMapping id="airDoubleControl_FRONT" node="0>0|12|4|2" />
<i3dMapping id="airDoubleStorage_FRONT" node="0>0|12|4|3" />
<i3dMapping id="backElectric_FRONT" node="0>0|12|4|4" />
<i3dMapping id="hydraulicIn01_FRONT" node="0>0|12|4|5" />
<i3dMapping id="hydraulicOut01_FRONT" node="0>0|12|4|6" />
XML attacher joints

Code: Select all

<!-- FRONT -->
<attacherJoint node="attacherJointBack_FRONT" rootNode="steiger4Quadtrac_main_component1" lowerRotationOffset="0.2579" upperRotationOffset="0.2579" moveTime="2.5" comboTime="1">
    <distanceToGround lower="0.32" upper="1.16" />
    <rotationNode node="attacherJointBackRot_FRONT" lowerRotation="-11 0 0" upperRotation="32 0 0"/>
    <rotationNode2 node="attacherJointBackRot2_FRONT" />
    <bottomArm rotationNode="attacherJointBackArmBottom_FRONT" translationNode="attacherJointBackArmBottomTrans_FRONT" referenceNode="referencePointBackBottom_FRONT" zScale="-1" startRotation="32.039 0 0"/>
    <schema position="1 0" rotation="0" invertX="true" />
</attacherJoint>
<attacherJoint node="trailerAttacherJointLow_FRONT" rootNode="steiger4Quadtrac_main_component1" jointType="trailerLow" lowerRotLimit="25 60 50" upperRotationOffset="0" allowsJointLimitMovement="false" comboTime="1" >
    <schema position="1 0" rotation="0" invertX="true" />
    <objectChange node="attacherJointBackArmBottom_FRONT" rotationActive="35 0 0"  rotationInactive="20 0 0" />
</attacherJoint>
<attacherJoint node="trailerAttacherJointLow_FRONT" rootNode="steiger4Quadtrac_main_component1" jointType="trailer" lowerRotLimit="25 60 50" upperRotationOffset="0" allowsJointLimitMovement="false" comboTime="1" >
    <schema position="1 0" rotation="0" invertX="true" />
    <objectChange node="attacherJointBackArmBottom_FRONT" rotationActive="35 0 0"  rotationInactive="20 0 0" />
</attacherJoint>
XML connection hoses

Code: Select all

<!-- FRONT -->
<target attacherJointIndices="4 5 6" type="hydraulicIn" node="hydraulicIn01_FRONT">
    <objectChange node="hydraulicIn01_cover_FRONT" rotationActive="0 0 100" rotationInactive="0 0 0"/>
</target>
<target attacherJointIndices="4 5 6" type="hydraulicOut" node="hydraulicOut01_FRONT">
    <objectChange node="hydraulicOut01_cover_FRONT" rotationActive="0 0 -100" rotationInactive="0 0 0"/>
</target>

<target attacherJointIndices="4 5 6" type="electric" node="backElectric_FRONT" socket="electric"/>
<target attacherJointIndices="4 5 6" type="airDoubleRed" node="airDoubleStorage_FRONT" socket="air_red"/>
<target attacherJointIndices="4 5 6" type="airDoubleYellow" node="airDoubleControl_FRONT" socket="air_yellow"/>
XML power take offs

Code: Select all

<!-- FRONT -->
<output attacherJointIndices="4 5 6" outputNode="ptoBack_FRONT" />
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

What is confirmed to work on the back attacherJoints with the last example I shared are these indexes:

Code: Select all

<connectionHoses> 
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="airDoubleRed" node="airDoubleStorage">
            <objectChange node="airDoubleStorageVis" rotationActive="130 0 0" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="airDoubleYellow" node="airDoubleControl">
            <objectChange node="airDoubleControlVis" rotationActive="130 0 0" rotationInactive="0 0 0"/>
        </target>

        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="electric" node="backElectric"/>

        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicIn" node="hydraulic01_in">
            <objectChange node="hydraulic01_in_cover" rotationActive="0 0 -90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicOut" node="hydraulic01_out">
            <objectChange node="hydraulic01_out_cover" rotationActive="0 0 90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicIn" node="hydraulic02_in">
            <objectChange node="hydraulic02_in_cover" rotationActive="0 0 -90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicOut" node="hydraulic02_out">
            <objectChange node="hydraulic02_out_cover" rotationActive="0 0 90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicIn" node="hydraulic03_in">
            <objectChange node="hydraulic03_in_cover" rotationActive="0 0 -90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicOut" node="hydraulic03_out">
            <objectChange node="hydraulic03_out_cover" rotationActive="0 0 90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicIn" node="hydraulic04_in">
            <objectChange node="hydraulic04_in_cover" rotationActive="0 0 -90" rotationInactive="0 0 0"/>
        </target>
        <target attacherJointIndices="1 2 5 6 7 8 9 10 11" type="hydraulicOut" node="hydraulic04_out">
            <objectChange node="hydraulic04_out_cover" rotationActive="0 0 90" rotationInactive="0 0 0"/>
        </target>			
</connectionHoses>

Code: Select all

<powerTakeOffs>
        <output attacherJointIndices="1 2 5 6" outputNode="ptoBack"/>		
</powerTakeOffs>
So, with all this functional for the back attacherJoints would stand to reason that the next sequential attacher index for the front connections should be 12, no? That being the case, this still doesn't seem to allow the PTO and hose connections to go to the front attacherJoints.
User avatar
LS-Lara
Posts: 490
Joined: Sun Aug 04, 2019 4:57 pm

Re: Adding a PTO to front of atriculated tractor....

Post by LS-Lara »

Which ones are the attacherJoints at the front at all ? Only the very last one at the bottom ?
That one should probably be index #1.
By some testing I noticed that apparently the single attacherJoints are considered in advance of those included inside configurations.
This would also explain, why your PTO and hoses attach to the back.

If that still doesn't resolve the issue, try to attach the full XML so we can have a look at the complete code context.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
User avatar
JRock
Posts: 73
Joined: Fri Jul 28, 2017 11:17 am
Contact:

Re: Adding a PTO to front of atriculated tractor....

Post by JRock »

LS-Lara wrote: Thu Aug 08, 2024 5:20 pm Which ones are the attacherJoints at the front at all ? Only the very last one at the bottom ?
That one should probably be index #1.
By some testing I noticed that apparently the single attacherJoints are considered in advance of those included inside configurations.
This would also explain, why your PTO and hoses attach to the back.

If that still doesn't resolve the issue, try to attach the full XML so we can have a look at the complete code context.
Yes, the attacherJoints at the very bottom are indeed the ones for the front. I have tried to put that as index#1 also as #4, #7, and #12 as of last and in all cases the front PTO and hose connections will only connect to the back.

Simply just not understanding how the attacher indexes are being read :hmm:
Post Reply