Community Forum

I hate modding, and <chicken pot pie/>... help with pto please

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created17.01.2021 06:21

Fuman 17.01.2021 06:21
The pto attachment of the implement will not connect to the truck....

This is from the trucks xml:
<output attacherJointIndices="2 3 " outputNode="ptoBack" />

From what I have gathered so far: powerTakeOffs is a specialization... and since my vehicle is of type "carfillable", it inherits this functionality from a parent. Hence it doesn't have to be declared in the modDesc.... I think....

And I know that the ptoBack is my node for the pto in the i3d....

But reading the lua doc for powerTakeOffs specialization proved too be a pointless endeavor....
I still don't know what "attacherJointIndices" are, AND what effect 2 and 3 have on them....??

Thoughts please ?

Bilbo Beutlin (BBeutlin) 17.01.2021 14:07
That's really so simple, alone from notation self-explanatory.
You have some attachers
<attacherJoint> this is index 1
<attacherJoint> this is index 2
<attacherJoint> this is index 3
And the string 'attacherJointIndices' lists these indices.

Fuman 17.01.2021 19:47
Hey Bilbo, do you have a cell phone?
Did you know there is more computing power in your cell phone than there was in the original Space Shuttle.
Do you know how to fly the Space Shuttle? Yeah, I can't either.

So now that we have determined that "simple" is subjective, I would like to ask about the values 2 and 3 in the powerTakeOffs declaration. Is it just nomenclature for the indices themselves, i.e, index 2 and index 3 ?
And if that be the case, why not index 4 and index 9 ?
Going one step deeper, despite the "randomly(?)" chosen name, I have to ask... what about them?
I can see where it appears that I am identifying a set of attacherJointIndices, but what would lead me to a conclusion where I stood back, rubbed my chin and said "Ah yes, you are most certainly the number 2 index, and thou art the number 3 index"......

Note that 2 and 3 were used in the xml of the original in game truck for its hitch.. That same hitch is now working in the mod, except that the pto will not attach...

There isn't a soul alive on this planet that can talk longer and in greater depth than I myself, about how stupid I am.... but today, I would like to laugh, make friends, fellowship with my fellow man, and find obvious answers to simple questions....

Be my hero....


Fuman 17.01.2021 22:58
So, for shitzNgiggles I went ahead and read the description of the function "attachPowerTakeOff" in the Lua Doc.... unfortunately, it didn't help at all.

I also loaded into Giants Editor the in-game Man-tgs-1850 semi and gave the model and the xml a good once over, hoping to maybe understand how Giants were using <powerTakeOffs>.

Funny thing is that even though I see the code in the xml by Giants software to make the pto axels spin, and for the hydraulic, air and power lines to connect, if you actually look at the truck in game, none of those things actually work..... I know, doesn't inspire much confidence does it ?
If they can't make their stuff work, then maybe asking for documentation may not be the best course of action... you may get what you ask for...

As such I'm no closer to understanding what the numbers mean in this statement:
<output attacherJointIndices="2 3 " outputNode="ptoBack" />

I have looked at different xml's, some by modders, some by Giants, but none of them give a clue to the significance of the numerical values....
Some say "2 3", others "1 2", and I think I may have seen a "1 4" somewhere along the way.

I wonder...... how about this: attacherJointIndices="5 9" eh... eh.... yeah! That might just do the trick.. right? right?

Why you ask? Well, here's the explanation:

For attacherJointIndices, we use 5 because [explanation inserted by Bilbo], and so that should make perfect sense to you right?
But also, we have the 9 because [explanation inserted by Bilbo]. And there you go! So now, you hopefully have a better understanding of what the values represent, what that means to you, and how they are used in the software.

Alright then! Cheerz!!


Bilbo Beutlin (BBeutlin) 17.01.2021 23:35
OMG - what's so difficult? If you have a list in xml eg.
<child name="winnie" ..
<child name="pooh" ..
<child name="foo" ..
<child name="bar" ..
these get auto-indexed continously beginning by 1 - in this example upto 4.

For more than one values FS uses often strings to concatenate the values, eg.
<myChilds childIndices="2 4" ..
These are "pooh" and "bar".
Could you follow me?

Translated to attachers attacherJointIndices="2 3" means the 2nd and 3rd attacher.
And related to PTO's this means the PTO is active on 2nd and 3rd attacher.

Hope you have got some insight into the universum of indices. *g*

Fuman 18.01.2021 00:15

Being a Java guy, my indices start at zero, but that's neither here nor there..

So it's a List<String> of indices, and is no more or less than the "address" of where "an attacher designated area" is located, and that in this case, it also where the physical pto output shaft may be found....

Bravo! Or as you would say "OMG"!

However, for example, this particular mod has "one" physical pto output shaft as can be seen in the model...
Why then, does it warrant not one, but two indices for its existence? Namely, the fabled "2 3"... And keep in mind, this is Giants code, not mine.

p.s, Hey Bilbo, what have I got in my pocket? Come on now.... it can't be too difficult to "just know"..... can it?

Your friend,

Bilbo Beutlin (BBeutlin) 18.01.2021 00:45
>> Why then, does it warrant not one, but two indices for its existence?
Quite obviously because this PTO is used on TWO attachers. For usual tractors this is mostly the "trailer" and "trailerLow" attacher which use the same PTO.

Fuman 18.01.2021 00:50
Hey Bilbo, it was 5....
I had the number 5 in my pocket....

And I didn't see anywhere else in the xml where the address 5 was being used for an attacherJoint, so I used it.....

<output attacherJointIndices="5 " outputNode="ptoBack" />

And it worked! Fantastic! or OMG!

Kidding aside, I have read your posts elsewhere in this forum, and I can only imagine how it must be for you, answering the same questions, over and over and over. And yet, you continue to light the path for those of us that are just learning to see.... hats off to you B. And Thank you.


Fuman 18.01.2021 01:00
Oh snap!
Trailer high and Trailer low you say....

That makes perfect sense.... but since it seems that I can't use 2 and 3 as they may be in use elsewhere in the xml, and that 5 did actually work, is it then fair to say that I can do:
<output attacherJointIndices="5 6" outputNode="ptoBack" />

assuming that 6 is available, much like 5 was, then in effect, I have reserved those two addresses for the pto output (high and low)...


Bilbo Beutlin (BBeutlin) 18.01.2021 01:09
But you are already aware that there must be 6 <attacherJoint> (at least) so that there are no errors?

Fuman 18.01.2021 01:18
Um, I think you are saying that I can only use attacherJointIndices="5 6", IF and only IF, I first create an <attacherJoint> that can be associated with the 6......


You know, if that is a true statement, then I have no idea why the pto works at all because there is no such <attacherJoint> declaration for it....Only the ones for trailer, trailerLow, the hydro, the air, the 5th wheel.... etc etc....

The only thing pto related in this Giants xml is the <powerTakeOffs>...

Oh crap, now the fog of doubt is beginning too move back in.... bleh : (


Bilbo Beutlin (BBeutlin) 18.01.2021 01:24
Well, I'm quite sure your rig would not explode immediately *g* .. but you would get an error in log like "attacher joint (6) not referenced".

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