Map making: importing frefab and texture location

Your forum for all discussions around Modding.
Dim67
Posts: 83
Joined: Tue Nov 22, 2022 2:23 pm

Map making: importing frefab and texture location

Post by Dim67 »

Need help:
Ok I know this should be importing items into your map 101, but I am stuck on the following: (I tried to find YT tutorials, Farmer Bob, Jewel the Jet, Bauer Brown etc, but no help)

Starting a blank map, I did all the prep work, now I want to put in a road network. I have the prefab in a folder on another drive. When I import the i3d into the map all the road pieces are there to build with. But when I look in the Materials manager I see the texture for the pieces are still in the prefab folder elsewhere on my pc. I could export the transform again, including files, to the modmap folder which also moves the textures.

However. Other modmaps dont have a prefab-roadnetwork folder with i3d. It just has the road textures in the regular modmap texture folder and thats it.

So how does this work?
XPModder
Posts: 76
Joined: Thu Oct 30, 2014 2:45 pm

Re: Map making: importing frefab and texture location

Post by XPModder »

This works pretty simple:
You copy the textures that you need from where they are right now to the textures folder in your map.
Then you open the map i3d in a text editor, locate the line (somewhere near the top) that has the old path to the texture in it (it will be something like <File fileId="4" filename="D:/prefabs/prefab-roadnetwork/textures/road_diffuse.dds"/> or similar, the path of course depending on where the file is) and just replace the path (so everything in filename="") with the new path.
Assuming the map textures folder is in the same folder as the map i3d, the new path will be something like "textures/road_diffuse.dds" or similar. Note that the path can be relative to the i3d file.
So "textures/road_diffuse.dds" means the file "road_diffuse.dds" in the folder "textures" which is in the same folder as the i3d itself.
Its important that you dont touch the fileId, as if you change that, the texture will no longer be connected to the 3d model of the road.
When you have changed the paths for all the textures you need, save the i3d with the text editor and then open it again with Giants Editor.
If you did everything correctly, the roads will have their textures and they will now be relative to the map i3d.
At this point you can delete the original i3d and textures (leaving the copies in the maps textures folder of course) from the prefab if you want.
You do NOT need to copy the prefab i3d files. Once you imported them into the map the contents of these i3d files have been copied into the maps i3d file.
Das Universum ist unvorstellbar groß und wir sind im Vergleich dazu winzig.

Daher kann mir jemand der unter uns Winzlingen Unterschiede in Hautfarbe oder Herkunft sucht, nur Leid tun, weil seine Sichtweise so begrenzt ist!

Fremdenfeindlichkeit ist Menschenfeindlichkeit!
Post Reply