Community Forum

Attachable not working

Forum Overview >> Farming Simulator 22

CategoryFarming Simulator 22
Created05.09.2023 20:06


Nicola Trombini (Chappie) 05.09.2023 20:06
I'm trying to learn FS22 modding and so far I've made a simple wagon with my own 3d model, I've already loaded some wheels from the game and added collisions with my own collision mesh, but I can't figure out how to make the wagon attachable to a tractor or to some other vehicle.
Looking around in the game files I've found out about the <attachable> tag, and in the .xml of my vehicle I've added the following lines
<attachable>
<inputAttacherJoints>
<inputAttacherJoint node="0>2" jointType="trailer" attacherHeight="0.4" />
</inputAttacherJoints>
<brakeForce force="0.2"/>
</attachable>
Where the node "0>2" refers to a transform group in the .i3d file in the frontal position of the cart, where I'd want the attachment to be. I've tried changing the attacherHeight parameter, moving the transform group closer or further from the cart but nothing seems to work, as the icon for the attachable doesn't even show up when I get close with a vehicle
Any help?

David Zadnik (DzInLa) 05.09.2023 22:45
Your xml script appears to be ok.

Open your i3d file and check the actual index path in the GIANTS Editor of node "0>2" and if it is at the end of your hitch.

Are you using an in-game tractor or pickup truck to test you wagon?

Nicola Trombini (Chappie) 06.09.2023 02:13
I've checked and the index Is correct, i haven't actually made a hitch for the model as I was trying to test things out before making any definite vehicle for the game. I guessed that the problem could've been that the transformGroup referenced in the attachable tag was either too far from the rest of the mesh or too close, but regardless of its distance It doesn't seem to work, and no warning signs appear in the log file about the attachable tag or the joint.
I tested the wagon with the default pickup and tractors in erlengrat, and i could attach the other trailers in the shop as i liked, even ones coming from other mods

David Zadnik (DzInLa) 06.09.2023 20:08
What I do is add a dummy mesh arrows to show the transform orientation and location. Try rotating the joint transform 180 deg Z in Blender or 180 deg Y in the Giants Editor.
It will not connect to certain angles based on what is in the XML.

Nicola Trombini (Chappie) 09.09.2023 12:00
I solved the issue! In the end the problem was that the transform group referencing the attach position was not rotated by 90 degrees on the y axis as it should, so the game did not recognize it as a valid point for the attachment.
Thanks a lot for all of your help!


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