Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hosereftractors [2017/05/24 14:27] (current)
Line 1: Line 1:
 +====== Adding HoseRef to Any Tractor ​ ======  ​
  
 +Game Version: ​     \\
 +Programs required: ​
 +----
 +
 +[[modding_tutorials|Modding Index]] | [[vehicle_modding|Vehicle Tutorials]]
 +
 +----
 +
 +===== Tutorial Intro =====
 +
 +
 +
 +===== Prep Work =====
 +
 +
 +
 +===== Full Details =====
 +
 +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..
 +
 +[b]Step 1: Preparations[/​b]
 +Extract your Tractor Zip.. ill not Explain how its Very Basic Knowledge ​
 +Grab the Script: you can find it Here : [url=http://​xentro.se/​index.php?​c=Overview&​type=scripts&​id=36]http://​xentro.se/​index.php?​c=Overview&​type=scripts&​id=36[/​url] 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.
 +
 +[b]Step 2: ModDesc[/b]
 +Open up your Tractor Mod Desc and in the specializations Section add the Following:
 +[code]
 +<​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:
 +[code]
 +<​specializations>​
 +        <​specialization name="​HydraulicRef"​ className="​HydraulicRef"​ filename="​Where you PUT the Script/​HydraulicRef.lua"/>​
 +</​specializations>​
 +[/code]
 +[b]Change The File Path to suit Your needs..[/b]
 +
 +Now add the Following to the vehicle Type, Just make it the last one before Closing this Section, again this is Basic Modding Knowledge..
 +
 +[code] <​specialization name="​HydraulicRef"​ />​[/​code]
 + 
 +[b]Save your ModDesc were Done with that Now[/b]
 +
 +[b]Step 3: Giants Editor Preparations[/​b]
 +Open your Tractor and Create 3 Empty Nodes (Create Menu --> Empty Transform Group ) you can just make one then Ctrl-D to Duplicate it..
 +
 +[b]Naming Nodes is Not Important But Keeps the i3d Clean and Understandable,​ you can skip this Naming Section if you so wish.[/b]
 +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][color=red]HydraulicRef[/​color][/​li]
 +[li][list][li][color=blue]Hydraulics[/​color][/​li][/​list][/​li]
 +[li][list][li][color=blue]Electric[/​color][/​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
 +
 +[b]Step 4: Positioning The Nodes[/b]
 +Node Hydraulic Ref Does need to part of the Main Component, so Ctrl-x Select the Main Component, Ctrl V.. 
 +[b]if your Tractor is like the Stieger, where Front and rear are Separate add it to the Rear Component.[/​b] ​
 +
 +**Align the Z Axis Forward, Like in the Images, So The Blue Arrow, only For the Hyd# Transform and Electric
 +
 +[b]Hydraulic Ref can be Left, we dont move this..[/b]
 +[url=http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_2.jpeg][img width=512]http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_2.jpeg[/​img][/​url]
 +
 +[b]Hydraulics Should be Move To the rear roughly where the Hoses shall attach.[/b]
 +[url=http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_3.jpeg][img width=512]http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_3.jpeg[/​img][/​url]
 +[b]Repeat for Electric.[/​b]
 +[url=http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_0.jpeg][img width=512]http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_0.jpeg[/​img][/​url]
 +[b]
 +Now position the Nodes, Hyd# and Electric to exact position where you would like the Hoses to attach Align Blue Axis Forward!![/​b].. ​
 +[url=http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_1.jpeg][img width=512]http://​img-eu1.fs-uk.com/​194631_30_04_16_1_49_37_1.jpeg[/​img][/​url]
 +
 +(**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.. 
 +
 +[b]Step 5: Vehicle XML[/b]
 +in the Vehicle Xml Find the attachJoints Section
 +
 +[b]**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..
 +[code] <​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]
 +
 +[b]Let make our Changes.. [/b]
 +First Delete the [b][color=red]/​[/​color][/​b]  just leaving Behind the [b][color=blue]>​[/​color][/​b] at the the End of this attacherJoint.
 +
 +now your going to add this Code after the [b][color=blue]>​[/​color][/​b] That you Saved
 +[code]
 +<​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.
 +
 +[b]once your happy Save the Xml.. [/b]
 +
 +Your Done, Go ingame and test, you will need a trailer with Hoses that work.. Like on the Fliegl Trailer: [url=http://​fs-uk.com/​mods/​view/​37542/​fsm-fliegl-asw-basic]http://​fs-uk.com/​mods/​view/​37542/​fsm-fliegl-asw-basic[/​url]
 +
 +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..
 +
 +[b]That Bring this Tutorial to a Close.
 +Thanks
 +Gary FSModding[/​b]
 +
 +
 +
 +----
 +
 +Original Author:  ​
 +FSModding_Gary | Date: April 30, 2016
 +        ​
 +[[modding_tutorials|Modding Index]] | [[vehicle_modding|Vehicle Tutorials]]\\
 +
 +{{:​fsukwiki.png?​nolink&​200 |}}