How to add external objects to a mod

[4-part expansive tutorial]

Game Version: Farming Simulator 2013 upwards
Programs required: Giant's Editor | Notepad / Notepad++


Modding Index | Vehicle Tutorials


So I've written this tutorial to include quite a bit of content and am now posting it in the knowledge base to be in a clearer format.
In the tutorial I will cover: Adding a standard object, Adding/changing wheels, Adding/swapping to tracks and adding a front loader or any attaching joint.
The mods used in the tutorial are:
New Holland T8.320
Tractor Edit Pack
Control Panel Set
(Credits to the respective mod owners)

For the tutorial I will be using the New Holland T8 mod by BulletBill83. It is a nice and simple mod that's open to any sort of customisation.
New Holland T8.320
And the above files for tractor add-on parts
Look for what you need to add, and have it ready for this tutorial to begin.

This is going to be set up into 4 sections


Standard Object


Step 1

First you need to have an object you want to add (if you hadn't guessed that yet :-))

There are a lot of these available online or you could always extract one prior from a different mod.

Also use them from the links provided above for
Tractor-edit-pack Credits: Sanderrr and Control-Panel-Pack Credits: CryteX

Step 2

Using the first link above, the different objects handily come in separate folders. To start with choose an object you want to add and then copy and paste it into the mod you want to edit's root folder.

Adding Objects Fig:1

Next you need to open the mod I3D in Giants Editor.
Before touching anything, create a new camera (in the top toolbar choose the Create drop-down menu and select camera)

Adding Objects Fig:2

Change your view to this new camera (right click, 'cameras' and then choose the bottom camera).

Adding Objects Fig:3

Go to File and then the Import option in that drop-down menu and then find the folder you pasted into the mod being edited's root folder.

Open this folder and open the I3D for the object.

Step 3

Select this imported object in the Giants Editor Scenegraph window and copy (CTRL+C) and paste (CTRL+V) into the main object.

Adding Objects Fig:4

Adding Objects Fig:5

Finally all you need to do is position your object. You can put it where you want at what size and rotation you want.

Step 4

Save and exit Giants Editor then Re-Zip the mod and name it the same name it had before. Place the mod in your mod folder and look at your masterpiece ;-).


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.


Section 1

This section will furthermore be split into two parts, 'A' and 'B', to cover the two possible situations encounterable.

Step 1A

The first possibility is that the wheels are dynamically loaded, this is by far the easiest to change so I'd recommend when making a new mod also to use dynamic part loading nodes. Obviously it's best when linking to ingame vehicles because you don't have to link to any new folders although it works for anything.

Now I'm still going to use BulletBill's New Holland and change the mod back to it's original wheels using both example situations.

First off find a mod where you like it's wheels, select all four of them at their base transform group and go to File then Export Selection With Files. Create a new folder in your edited mod's root folder called 'wheels' (or 'new wheels' if there is already a wheels folder) and save the exported files there.

Step 2A

Now you have the wheels you want to access you now need to open the vehicle.XML file and look for these tags:

<dynamicallyLoadedParts>
</dynamicallyLoadedParts>


Now here is an example of what you might find between these tags:

<dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0|1" linkNode="0>0|0|0" filename="trelleborg/trelleborgTM800.i3d" />
        <dynamicallyLoadedPart node="0|0" linkNode="0>1|0|0" filename="trelleborg/trelleborgTM800.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="0>2"     filename="trelleborg/trelleborgTM800.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="0>3"     filename="trelleborg/trelleborgTM800.i3d" />
    </dynamicallyLoadedParts>


What you need to edit is the file name. All this represents is the path taken from the root mod folder to the wheel file, in this case the one you just saved. Most probably, your file will now look something like this:

<dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0|1" linkNode="0>0|0|0" filename="wheels/[new wheel I3D]" />
        <dynamicallyLoadedPart node="0|0" linkNode="0>1|0|0" filename="wheels/[new wheel I3D]" />
        <dynamicallyLoadedPart node="1|1" linkNode="0>2"     filename="wheels/[new wheel I3D]" />
        <dynamicallyLoadedPart node="1|0" linkNode="0>3"     filename="wheels/[new wheel I3D]" />
    </dynamicallyLoadedParts>


You may also need to check the first node section. This is the object drawn from the new wheel file so you need to check in your mod's I3D where each individual linknode is placed to make sure the correct wheels go in the correct places.

Wheels Fig:1

Wheels Fig:2

Now this might sound a bit complex but it's easy to understand in practice Wink

There is even less work when your drawing wheels from the game.

In the in-game version of the New Holland, this is the code for the wheels:

<dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="0>0|0|0" filename="$data/vehicles/wheels/trelleborg/trelleborgTM900_600_70R30.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="0>1|0|0" filename="$data/vehicles/wheels/trelleborg/trelleborgTM900_600_70R30.i3d" />
        <dynamicallyLoadedPart node="0|0" linkNode="0>2"     filename="$data/vehicles/wheels/trelleborg/trelleborgTM900_710_70R42.i3d" />
        <dynamicallyLoadedPart node="0|1" linkNode="0>3"     filename="$data/vehicles/wheels/trelleborg/trelleborgTM900_710_70R42.i3d" />
    </dynamicallyLoadedParts>


Now I'm not going to do it to my example edit because it doesn't use dynamic parts but to change these wheels all you need to do is change the filename to a different one from the same folder in the game SDK.

Step 3A

Save the file and Re-Zip your mod, yet again you can feel free to be delighted at your masterpiece.

There is much more possible to go wrong in this section of the tutorial but this is the general principle for dynamically loaded parts.

Step 1B

The other situation is that the wheels are joined to your mod. This makes changing the wheels fairly similar to the tutorial in the above post so it wont be necessary to go into too much detail.

Yet again export wheels you want from a mod and save them into a new file in the mod you want to edit's root folder. After import this saved wheel file in Giants Editor (after creating a camera of cause)

Step 2B

Find the first wheel you want to replace and check the file names and paths from the root of the wheel. Often this is the transform group called 'wheelFrontLeft_rot' or something fairly similar.

Now check the imported version of this wheel, make sure all the different components are in the same place and all the names are the same as the already existing wheel.

Wheels Fig:3

Re-select the wheel you want to replace and go to Edit and Replace (CTRL+W). Select the top load option with the same wheel still highlighted and then select the replacement wheel and choose the second load box. Next click replace and your new wheel should be in place of the old one. You can now repeat this step for all of the wheels.

Step 3B

Zip up your mod and see the results, be aware that you can change the scale of the wheels in Giants Editor if they are not exactly to your liking or simply don't quite fit.


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.


Step 1

So to start open the mod in GE.

Adding tracks Fig:1

After creating a camera find the wheels, whether dynamically loaded or models already there.

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.

Adding tracks Fig:3

Adding tracks Fig:4

Then you need to find the wheels of the same index node in the <wheels> tags.

Adding tracks Fig:5

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.

<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" />


Adding tracks Fig:7

Next the actual tracks need to be linked to the mod.

<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>

Paste this code into the XML, anywhere to your preference but I placed it under the <indoorHud> tags like in GIANTS combine.

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 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.

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.

Adding tracks Fig:10

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.

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’.

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.

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)

<!-- 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" />

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.

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.

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.

Adding a front loader or attacher joint Fig:6

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


Original Author: Chocolatecake2001 | Date: January 27, 2016

Modding Index | Vehicle Tutorials