Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtoaddexternalobjectstoamod [2016/10/20 18:01]
robbie
howtoaddexternalobjectstoamod [2017/05/24 14:27] (current)
Line 76: Line 76:
 ---- ----
 ==== Adding Wheels ==== ==== Adding Wheels ====
 +
 This tutorial will be split into two sections, one for new wheels and another for the tracks which take a bit of extra coding work. This tutorial will be split into two sections, one for new wheels and another for the tracks which take a bit of extra coding work.
 ---- ----
Line 166: Line 167:
  
 ==== Adding tracks ==== ==== Adding tracks ====
 +
 A lot of this is scripting related so I highly recommend Notepad++ if you for some reason don't have it already. For this tutorial I will be using a combine mod, the same applies to any mod though.\\ A lot of this is scripting related so I highly recommend Notepad++ if you for some reason don't have it already. For this tutorial I will be using a combine mod, the same applies to any mod though.\\
  
 ---- ----
  
 +**Step 1**
  
 +So to start open the mod in GE.\\
  
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_20_23_0.png|Adding tracks Fig:1]]
  
 +After creating a camera find the wheels, whether dynamically loaded or models already there.\\
  
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_20_23_1.png|Adding tracks Fig:2]]
  
 +For now you can leave the wheels but you need to make a note of what the index paths are for the wheels for reference in Step 2
  
 +The translations of each respective wheel may also be noteworthy while your having a look.
  
 +**Step 2**
 +
 +Now open your mods vehicle.XML file and find the wheels/​dynamically loaded parts section. Opening an ingame vehicle with track'​s vehicle.XML may also be useful at this point but it's not necessary.
 +
 +If the mod has dynamically loaded wheels then it's a good idea to remove them first. ​
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_20_23_2.png|Adding tracks Fig:3]]
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_20_23_3.png|Adding tracks Fig:4]]
 +
 +Then you need to find the wheels of the same index node in the <​wheels>​ tags.\\
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_20_23_4.png|Adding tracks Fig:5]]
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_21_48_0.png|Adding tracks Fig:6]]
 +
 +**Step 3**
 +
 +Now we are ready to add the tracks.
 +
 +Still in the wheels section, paste this code at the top. I advise leaving a gap between the wheels that are already there as I have done to just make it clearer.\\
 +
 +<​code><​wheel rotSpeed="​1" ​ restLoad="​2.4"​ repr="​0>​0|0"​ driveNode="​0>​0|0|0"​ radius="​0.43"​ width="​0.48"​ initialCompression="​40"​ suspTravel="​0.1"​ spring="​90"​ damper="​30"​ frictionScale="​1.5"​ mass="​0.2"​ hasTyreTracks="​true"​ tireType="​crawler"​ />
 +        <wheel rotSpeed="​1" ​ restLoad="​1.3"​ repr="​0>​0|1" ​                    ​radius="​0.43"​ width="​0.48"​ initialCompression="​40"​ suspTravel="​0.1"​ spring="​90"​ damper="​30"​ frictionScale="​1.5"​ mass="​0.2"​ hasTyreTracks="​true"​ tireType="​crawler"​ />
 +        <wheel rotSpeed="​1" ​ restLoad="​2.4"​ repr="​0>​1|0"​ driveNode="​0>​1|0|0"​ radius="​0.43"​ width="​0.48"​ initialCompression="​40"​ suspTravel="​0.1"​ spring="​90"​ damper="​30"​ frictionScale="​1.5"​ mass="​0.2"​ hasTyreTracks="​true"​ tireType="​crawler"​ />
 +        <wheel rotSpeed="​1" ​ restLoad="​1.3"​ repr="​0>​1|1" ​                    ​radius="​0.43"​ width="​0.48"​ initialCompression="​40"​ suspTravel="​0.1"​ spring="​90"​ damper="​30"​ frictionScale="​1.5"​ mass="​0.2"​ hasTyreTracks="​true"​ tireType="​crawler"​ /></​code>​\\
 +        ​
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_21_48_1.png|Adding tracks Fig:7]]
 +
 +Next the actual tracks need to be linked to the mod.\\
 +
 +<​code><​crawlers>​
 +        <crawler index="​0"​ speedRefWheel="​1"​ scrollSpeed="​0.148"​ scrollLength="​6.76"​ shaderParameterName="​offsetUV"​ shaderParameterComponent="​1"​ length="​1"​ filename="​$data/​vehicles/​wheels/​lizard/​crawler.i3d"​ linkIndex="​0>​0|0"​ crawlerIndex="​2|0">​
 +            <​rotatingPart index="​1"​ radius="​0.46"​ />
 +            <​rotatingPart index="​2"​ radius="​0.317"​ />
 +            <​rotatingPart index="​3"​ radius="​0.317"​ />
 +            <​rotatingPart index="​4"​ radius="​0.177"​ />
 +            <​rotatingPart index="​5"​ radius="​0.177"​ />
 +            <​rotatingPart index="​6"​ radius="​0.177"​ />
 +            <​rotatingPart index="​7"​ radius="​0.177"​ />
 +        </​crawler>​
 +        <crawler index="​0"​ speedRefWheel="​3"​ scrollSpeed="​0.148"​ scrollLength="​6.76"​ shaderParameterName="​offsetUV"​ shaderParameterComponent="​1"​ length="​1"​ filename="​$data/​vehicles/​wheels/​lizard/​crawler.i3d"​ linkIndex="​0>​1|0"​ crawlerIndex="​2|1">​
 +            <​rotatingPart index="​1"​ radius="​0.46"​ />
 +            <​rotatingPart index="​2"​ radius="​0.317"​ />
 +            <​rotatingPart index="​3"​ radius="​0.317"​ />
 +            <​rotatingPart index="​4"​ radius="​0.177"​ />
 +            <​rotatingPart index="​5"​ radius="​0.177"​ />
 +            <​rotatingPart index="​6"​ radius="​0.177"​ />
 +            <​rotatingPart index="​7"​ radius="​0.177"​ />
 +        </​crawler>​
 +    </​crawlers></​code>​
 +    ​
 +Paste this code into the XML, anywhere to your preference but I placed it under the <​indoorHud>​ tags like in GIANTS combine.\\
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_21_49_2.png|Adding tracks Fig:8]]
 +
 +Even though we're moving into GE now, keep Notepad++ open as it certainly wont be long before we need to check things in it again.
 +
 +**Step 4**
 +
 +Now for adding the nodes I recommend exporting the track node from an ingame vehicle for the sake of making sure things are correct.
 +
 +I have a link to the nodes [[http://​www.mediafire.com/​download/​055o6s5jxl4l7tv|here]] to make adding the tracks a bit quicker but you should see my other tutorial on separating objects to reference how to export something from the I3D.
 +
 +Import these into your I3D. And paste them into the mod's root object/​transform and then move them to where the unwanted wheels are. Your I3D should now look something like mine.\\
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_21_49_3.png|Adding tracks Fig:9]]
 +
 +It's fine for the old wheels to be deleted now and then to return to the vehicle.XMl (keeping Giants Editor open)
 +
 +Now as if it couldn'​t get any easier, if the old wheels were the first thing in the scenegraph (nodes of 0>0 and 0>1) then at this point you wont need to change anything else in the XML as all the things I linked are referenced to those nodes
 +
 +On the other hand your mod may be awkward when it comes to the wheels and in that case you would have to change the nodes. I will show you what parts link to what mainly for this situation.
 +
 +The different coloured rings in the two below pictures explain what is what.
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_21_49_4.png|Adding tracks Fig:10]]
 +
 +[[http://​img-eu1.fs-uk.com/​161517_15_01_16_10_22_26_0.png|Adding tracks Fig:11]]
 +
 +Now your ready to test ingame, obviously you will need to position the tracks in the I3D to where you want and this part may take a bit of refining. For me though I don't as the mod I'm editing'​s chassis is from the ingame CR10.90 anyway meaning after exporting the tracks from it they will be in the same position.\\
 +
 +----
 +==== Adding a front loader or attacher joint ====
 +
 +What I’m going to show is how to add a Farming Simulator 15 front loader block to a mod. Not only does this apply to a front loader but from this tutorial you can get advice on how to add any attacher joint to your mod.\\
 +
 +----
 +
 +**Step 1**
 +
 +To begin, we need to get a front loader block to add. Open one of the ingame vehicles with the front loader, I recommend the New Holland T6.\\
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_15_09.png|Adding a front loader or attacher joint Fig:1]]
 +
 +Obviously as you **do not save** this file, there’s no need for a camera change so for once you can skip that part.
 +Find the object in the scenegraph for the front loader block and then go to ‘File’ and ‘Export selection with files’.\\
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_15_43.png|Adding a front loader or attacher joint Fig:2]]
 +
 +Save the file into a new folder in the mod your editing’s root folder entitled FL or something like that.
 +Close this file, again make sure you **do not save**. ​
 +
 +**Step 2**
 +
 +Next you need to open the vehicle.XML file of the tractor you exported the FL block from.
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_16_08.png|Adding a front loader or attacher joint Fig:3]]
 +
 +Here you need to find the <​attacherJoints>​ tags and then this line of code (or something similar)\\
 +
 +<​code><​!-- frontloader attacher -->
 +        <​attacherJoint index="​0>​36|0"​ jointType="​attachableFrontloader"​ minRot="​0 0 0" minRot2="​0 0 0" maxRot="​0 0 0" maxRot2="​0 0 0" maxTransLimit="​0 0 0" maxRotLimit="​0 0 0" moveTime="​2"​ /></​code>​
 +        ​
 +Copy this and close the vehicle.XML. Now you need to open the mod your editing’s vehicle.XML.
 +
 +Find the same <​attacherJoints>​ tags and paste the copied code into here.
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_16_32.png|Adding a front loader or attacher joint Fig:4]]
 +
 +**Step 3**
 +
 +Keep the vehicle.XML open because it’s likely you will need to change the index node for your mod. After opening the mod’s I3D (creating a new camera of cause), import the front loader block which you saved into the new folder in the mod’s root folder and then paste it into the root transform group in the scenegraph.
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_17_15.png|Adding a front loader or attacher joint Fig:5]]
 +
 +Position the block and then find the attacher joint which is a child of the front loader block object. Look at the index node of this and then replace the one in the vehicle.XML with it.\\
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_17_37.png|Adding a front loader or attacher joint Fig:6]]
 +
 +[[http://​img-eu1.fs-uk.com/​161517_23_01_16_3_17_54.png|Adding a front loader or attacher joint Fig:7]]
 +
 +----
 +
 +Now **Step 3** is applicable to any form of attacher joint. The '​jointType'​ section of the code can also be changed depending on whatever type of attacher joint you want.\\
 +
 +----
 +
 +I hope this tutorial has helped a few people. I appreciate this tutorial is probably available in different forms for Farming Simulator 2013 but I feel this should have at least brought it up to date.
 +
 +As always any problems/​improvements can be posted below.
 +
 +Thanks|Chocolatecake2001
  
  
Line 184: Line 336:
 Original Author: ​ **Chocolatecake2001** ​ | Date: **January 27, 2016** Original Author: ​ **Chocolatecake2001** ​ | Date: **January 27, 2016**
         ​         ​
-[[modding_tutorials|Modding Index]] | [[vehicle_modding|Vehicle Tutorials]]+[[modding_tutorials|Modding Index]] | [[vehicle_modding|Vehicle Tutorials]]\\ 
 + 
 +{{:​fsukwiki.png?​nolink&​200 |}}