Adding Modifiable Trees

Adding New File Names (i3D XML)

Estimated reading: 8 minutes 420 views

This guide is a follow-up from the previous guide, where we made a modifiable apple tree.

In this guide, I’ve renamed the following texture map files for the apple tree:

i3D XML Line #Old File Name (Vanilla)New File Name (Mod)
6appleBranch_diffuse.pngappleTreeBranch_diffuse.png
7appleBranch_mask.pngappleTreeBranch_mask.png
8appleBranch_normal.pngappleTreeBranch_normal.png
9appleBranch_specular.pngappleTreeBranch_specular.png
10appleTrunk_diffuse.pngappleTreeTrunk_diffuse.png
11appleTrunk_height.pngappleTreeTrunk_height.png
12appleTrunk_normal.pngappleTreeTrunk_normal.png
13apple_stage03LOD_depth.pngappleTree_stage03LOD_depth.png

…and so the filename changes continue. The <Files> section inside the i3d for this tree now looks like this:

XML
<Files>
    <File fileId="5" filename="appleTreeBranch_diffuse.png" />
    <File fileId="9" filename="appleTreeBranch_mask.png" />
    <File fileId="6" filename="appleTreeBranch_normal.png" />
    <File fileId="7" filename="appleTreeBranch_specular.png" />
    <File fileId="1" filename="appleTreeTrunk_diffuse.png" />
    <File fileId="4" filename="appleTreeTrunk_height.png" />
    <File fileId="2" filename="appleTreeTrunk_normal.png" />
    <File fileId="14" filename="appleTree_stage03LOD_depth.png" />
    <File fileId="10" filename="appleTree_stage03LOD_diffuse.png" />
    <File fileId="15" filename="appleTree_stage03LOD_mask.png" />
    <File fileId="11" filename="appleTree_stage03LOD_normal.png" />
    <File fileId="16" filename="appleTree_stage03LOD_seasonalCurve.png" />
    <File fileId="12" filename="appleTree_stage03LOD_specular.png" />
    <File fileId="13" filename="$data/shaders/billboardSemiOctahedronShader.xml" />
    <File fileId="8" filename="$data/shaders/treeBranchShader.xml" />
    <File fileId="3" filename="$data/shaders/treeTrunkShader.xml" />
  </Files>

Will This Tree Work Inside Farming Simulator 25?

That’s the remaining question. Since all the file paths work for the i3D, they will also work when this modified i3D file is imported into a modded map. So to the question…

Modified apple tree that was previously a vanilla game apple tree.

We can also cut down this tree using the chainsaw.

This proves that this modified apple tree can now be placed at several locations on the modded map, but wait a moment…

Correcting File Paths For The Apple Tree For A Modded Map

Inside the modded map’s i3d file, we find these lines when opening “mapEU.i3D” (the name of my modded map’s i3D) in NotePad++.

XML
<File fileId="1361" filename="../../trees/appleTreeBranch_diffuse.png"/>
    <File fileId="1364" filename="../../trees/appleTreeBranch_mask.png"/>
    <File fileId="1362" filename="../../trees/appleTreeBranch_normal.png"/>
    <File fileId="1363" filename="../../trees/appleTreeBranch_specular.png"/>
    <File fileId="1358" filename="../../trees/appleTreeTrunk_diffuse.png"/>
    <File fileId="1360" filename="../../trees/appleTreeTrunk_height.png"/>
    <File fileId="1359" filename="../../trees/appleTreeTrunk_normal.png"/>
    <File fileId="1368" filename="../../trees/appleTree_stage03LOD_depth.png"/>
    <File fileId="1365" filename="../../trees/appleTree_stage03LOD_diffuse.png"/>
    <File fileId="1369" filename="../../trees/appleTree_stage03LOD_mask.png"/>
    <File fileId="1366" filename="../../trees/appleTree_stage03LOD_normal.png"/>
    <File fileId="1370" filename="../../trees/appleTree_stage03LOD_seasonalCurve.png"/>
    <File fileId="1367" filename="../../trees/appleTree_stage03LOD_specular.png"/>

These dots ../.. are not okay. So, how to correct this?

Moving The Trees Directory To Same Directory With The Map.i3D

To be absolutely waterproof on these file paths for the modified apple tree, it’s a good idea to move the asset’s parent directory into the same directory where the map.i3d (mapEU/AS/US.i3d) is located.

After that, we can reopen the map’s i3D file, remove the “broken” apple tree with its textures not displayed, import the modified apple tree, and save the map’s i3D file again.

Now the file paths for the modified apple tree will look like these inside the map’s i3D file (i3D XML)

XML
<File fileId="1361" filename="trees/appleTreeBranch_diffuse.png"/>
    <File fileId="1364" filename="trees/appleTreeBranch_mask.png"/>
    <File fileId="1362" filename="trees/appleTreeBranch_normal.png"/>
    <File fileId="1363" filename="trees/appleTreeBranch_specular.png"/>
    <File fileId="1358" filename="trees/appleTreeTrunk_diffuse.png"/>
    <File fileId="1360" filename="trees/appleTreeTrunk_height.png"/>
    <File fileId="1359" filename="trees/appleTreeTrunk_normal.png"/>
    <File fileId="1368" filename="trees/appleTree_stage03LOD_depth.png"/>
    <File fileId="1365" filename="trees/appleTree_stage03LOD_diffuse.png"/>
    <File fileId="1369" filename="trees/appleTree_stage03LOD_mask.png"/>
    <File fileId="1366" filename="trees/appleTree_stage03LOD_normal.png"/>
    <File fileId="1370" filename="trees/appleTree_stage03LOD_seasonalCurve.png"/>
    <File fileId="1367" filename="trees/appleTree_stage03LOD_specular.png"/>

Summary

To be absolutely sure, you may load your map in Farming Simulator 25 and perform a chainsaw test (tree cutting), and it should work the same way when cutting down vanilla trees.

In this guide, the file names for a vanilla apple tree were changed after placing the vanilla apple tree in a mod map, where the map’s <Files> section for this asset was updated.
Later, after placing the modded apple tree in GIANTS Editor on the map’s terrain, the map’s i3D was saved, which created file paths with ../.., which was corrected by moving the apple tree’s parent directory to the same directory as the map’s i3D, reloading the map’s i3D, removing the “broken tree” and importing the apple tree’s i3D file and saving the map’s i3D to get correct file paths.