This is an old revision of the document!

Adding HoseRef to Any Tractor

Game Version:
Programs required:

Modding Index | Vehicle Tutorials

Welcome to this Short Tutorial on adding Hose ref to any Tractor of your Choosing.

First i would like to Thank Xentro For this Script, it adds a whole other level of realism to the game..

So Lets Get to it..

Step 1: Preparations Extract your Tractor Zip.. ill not Explain how its Very Basic Knowledge Grab the Script: you can find it Here : now in the is Zip you will need the HydraulicRef.lua Copy this to your Tractor Folder, if your Folder has a Scripts folder make it Easy and place it in there.

Step 2: ModDesc Open up your Tractor Mod Desc and in the specializations Section add the Following:

<specialization name=“HydraulicRef” className=“HydraulicRef” filename=“Where you PUT the Script/HydraulicRef.lua”/> [/code]

If your Mod Desc does not have the specializations section you can add:

<specializations>        <specialization name=“HydraulicRef” className=“HydraulicRef” filename=“Where you PUT the Script/HydraulicRef.lua”/> </specializations> [/code] Change The File Path to suit Your needs..

Now add the Following to the vehicle Type, Just make it the last one before Closing this Section, again this is Basic Modding Knowledge..

 <specialization name="HydraulicRef" />

Save your ModDesc were Done with that Now

Step 3: Giants Editor Preparations Open your Tractor and Create 3 Empty Nodes (Create Menu –> Empty Transform Group ) you can just make one then Ctrl-D to Duplicate it..

Naming Nodes is Not Important But Keeps the i3d Clean and Understandable, you can skip this Naming Section if you so wish. Name The First Node: HydraulicRef Name The Second Node: Hydraulics Name the Third Node: Electric

Place the Second and Third Nodes in to The First Nodes. (ill refer to them by the Names above for Future References) you scene-graph will be [list] [li]HydraulicRef[/li] [li][list][li]Hydraulics[/li][/list][/li] [li][list][li]Electric[/li][/list][/li] [/list]

Now some tractor are Different, so make as many Hydraulic Nodes as you need i used 6.. Name them Hyd1 through to Hyd 6 Place all the Hyd# Nodes into Hydraulics Transform. Create One Node for Electric.. and Move it into the Electric Transform Were almost Done here.. You made it This Far

Step 4: Positioning The Nodes Node Hydraulic Ref Does need to part of the Main Component, so Ctrl-x Select the Main Component, Ctrl V.. if your Tractor is like the Stieger, where Front and rear are Separate add it to the Rear Component.

Align the Z Axis Forward, Like in the Images, So The Blue Arrow, only For the Hyd# Transform and Electric Hydraulic Ref can be Left, we dont move this.. [img width=512][/img] Hydraulics Should be Move To the rear roughly where the Hoses shall attach. [img width=512][/img] Repeat for Electric. [img width=512][/img] Now position the Nodes, Hyd# and Electric to exact position where you would like the Hoses to attach Align Blue Axis Forward!!.. [img width=512][/img] (Side note i use transform For a simple reason, after positioning, the nodes, if i need to move the Hyd# Hoses back or Forward ill just move the Hydraulic Transform, effectively moving all nodes in the Group. Thus Saving me Time ) Once your Nodes are placed Roughly Save the I3d BUT do NOT close it… Were Moving in the the Vehicle XML.. Step 5: Vehicle XML in the Vehicle Xml Find the attachJoints Section you need to repeat the Following for all joint you wish to have Hoses for, ill just use trailerLow for the Tutorial also you have to check the Joint Indexs, to make sure your adding it to the rear, Some tractor have front and Rear Attacher Joints[/b]

by Default it will Look like the following..

 <attacherJoint index="0>14|0|0" transNode="0>14|0" transMinYHeight="1.35" transMaxYHeight="1.45" jointType="trailer" maxRotLimit="20 80 80" minRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>9" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d"/>

       <attacherJoint index=“0>14|1” jointType=“trailerLow” maxRotLimit=“20 80 80” minRotRotationOffset=“0” allowsJointLimitMovement=“false” ptoOutputNode=“0>9” ptoFilename=“$data/vehicles/shared/powerTakeoff.i3d”/>[/code]

Let make our Changes.. First Delete the /  just leaving Behind the > at the the End of this attacherJoint.

now your going to add this Code after the > That you Saved

<HydraulicRef index=“0>35|0|0” hoseType=“hydraulic” /> <HydraulicRef index=“0>35|0|1” hoseType=“hydraulic” /> <HydraulicRef index=“0>35|0|2” hoseType=“hydraulic” /> <HydraulicRef index=“0>35|0|3” hoseType=“hydraulic” /> <HydraulicRef index=“0>35|0|4” hoseType=“hydraulic” /> <HydraulicRef index=“0>35|0|5” hoseType=“hydraulic” /> <HydraulicRef index=“0>35|1|0” hoseType=“electric” /> </attacherJoint>[/code]

Now there are 3 Hose Types you can Use, “electric” “hydraulic” and “air” So depending on your need you can alter the Above or add more Nodes. :P

Now to the Indexs, remember them groups we created in GE? now we need them. You need the Index for all Hyd# and the Electric Cable, Replace these Index with the Index in the codes above.

once your happy Save the Xml..

Your Done, Go ingame and test, you will need a trailer with Hoses that work.. Like on the Fliegl Trailer:

Now if the the hoses are not in the correct place you can open GE and Just tweak you Hyd# and Electric Positioning.. Takes some time But worth the effort..

That Bring this Tutorial to a Close. Thanks Gary FSModding

Original Author: FSModding_Gary | Date: April 30, 2016

Modding Index | Vehicle Tutorials