Error 4
From Rigs of Rods Wiki
This page is about an error. Please help by adding your own experiences with this problem.
Contents |
ResourceManager::add
- if you get something like "Resource with the name X already exists." then you have duplicate files under data/
- possible solution:
- search for duplicate files and remove all so that only one file remains of each.
How to fix the error
To fix this you find the 2 conflicting resources. Like below there is 2 resources. Finding will take time, most of the time its in the files you last added between the times loaded or you last edited.
Error 4 Detailed Solution
This is a error 4 message:
So now we go to fix this, first since the conflicting name is bighouse3_wall let's look in lookin bighouse3.material
material bighouse3_wall
{
technique
{
pass
{
48.0, 48.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall.jpg
}
}
}
}
material bighouse_fence1
{
technique
{
pass
{
36.0, 46.5625
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse_fence.jpg
}
}
}
}
material bighouse3_wall_2_1
{
technique
{
pass
{
60.0, 60.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall_2.jpg
}
}
}
}
material bighouse3_wall_3_1
{
technique
{
pass
{
3.93700787401575, 3.93700787401575
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall_3.bmp
}
}
}
}
material bighouse3_wall_1_1
{
technique
{
pass
{
3.937007874016, 3.937007874016
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall_1.bmp
}
}
}
}
material bighouse3_floor1
{
technique
{
pass
{
diffuse 1.0 0.894117647058824 0.768627450980392 1.0
}
}
}
material bighouse3_table1
{
technique
{
pass
{
12.0, 12.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_table.jpg
}
}
}
}
material bighouse3_book1
{
technique
{
pass
{
diffuse 1.0 1.0 1.0 1.0
}
}
}
material bighouse3_roof1
{
technique
{
pass
{
36.0, 36.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_roof.jpg
}
}
}
}
material bighouse3_carage1
{
technique
{
pass
{
12.0, 12.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_carage.jpg
}
}
}
}
material bighouse3_window1
{
technique
{
pass
{
scene_blend alpha_blend
depth_check on
depth_write off
24.0, 24.0
diffuse 1 1 1 0.48
texture_unit
{
texture bighouse3_window.jpg
}
}
}
}
WOW the conflicting resource is on the top, so lets change the name....
So lets change the resource name to bighouse3_wall1
material bighouse3_wall1
{
technique
{
pass
{
48.0, 48.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall.jpg
}
}
}
}
material bighouse_fence1
{
technique
{
pass
{
36.0, 46.5625
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse_fence.jpg
}
}
}
}
material bighouse3_wall_2_1
{
technique
{
pass
{
60.0, 60.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall_2.jpg
}
}
}
}
material bighouse3_wall_3_1
{
technique
{
pass
{
3.93700787401575, 3.93700787401575
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall_3.bmp
}
}
}
}
material bighouse3_wall_1_1
{
technique
{
pass
{
3.937007874016, 3.937007874016
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_wall_1.bmp
}
}
}
}
material bighouse3_floor1
{
technique
{
pass
{
diffuse 1.0 0.894117647058824 0.768627450980392 1.0
}
}
}
material bighouse3_table1
{
technique
{
pass
{
12.0, 12.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_table.jpg
}
}
}
}
material bighouse3_book1
{
technique
{
pass
{
diffuse 1.0 1.0 1.0 1.0
}
}
}
material bighouse3_roof1
{
technique
{
pass
{
36.0, 36.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_roof.jpg
}
}
}
}
material bighouse3_carage1
{
technique
{
pass
{
12.0, 12.0
diffuse 1 1 1 1.0
texture_unit
{
texture bighouse3_carage.jpg
}
}
}
}
material bighouse3_window1
{
technique
{
pass
{
scene_blend alpha_blend
depth_check on
depth_write off
24.0, 24.0
diffuse 1 1 1 0.48
texture_unit
{
texture bighouse3_window.jpg
}
}
}
}
And the game will load hopefully error free, for more, look at the EXAMPLE below
EXAMPLE
File an-12.material:
material tracks/An12
{
technique
{
pass
{
scene_blend alpha_blend
alpha_rejection greater 128
texture_unit
{
texture an-12.png
}
}
}
}
material tracks/an12wheelface
{
technique
{
pass
{
texture_unit
{
texture an12wheelface.png
}
}
}
}
material tracks/an12wheelband
{
technique
{
pass
{
texture_unit
{
texture an12wheelband.png
}
}
}
}
material prop
{
technique
{
pass
{
texture_unit
{
texture prop.png
}
}
}
}
Now this is a mod about to be released.
an-12af1.material
material tracks/An12af1
{
technique
{
pass
{
scene_blend alpha_blend
alpha_rejection greater 128
texture_unit
{
texture an-12af1.png
}
}
}
}
material tracks/an12af1wheelface
{
technique
{
pass
{
texture_unit
{
texture an12af1wheelface.png
}
}
}
}
material tracks/an12af1wheelband
{
technique
{
pass
{
texture_unit
{
texture an12af1wheelband.png
}
}
}
}
material prop
{
technique
{
pass
{
texture_unit
{
texture propaf1.png
}
}
}
}
As you see at the bottom of the 2 files, the material name "prop" is used 2 times, to fixed it change the name "prop" I changed it to "propaf" as seen below File an-12af1.material version 2
material tracks/An12af1
{
technique
{
pass
{
scene_blend alpha_blend
alpha_rejection greater 128
texture_unit
{
texture an-12af1.png
}
}
}
}
material tracks/an12af1wheelface
{
technique
{
pass
{
texture_unit
{
texture an12af1wheelface.png
}
}
}
}
material tracks/an12af1wheelband
{
technique
{
pass
{
texture_unit
{
texture an12af1wheelband.png
}
}
}
}
material propaf1
{
technique
{
pass
{
texture_unit
{
texture propaf1.png
}
}
}
}
and this will fix the problem ;)
WARNING, this is an example, doing what it says above exactly to the files mention will not fix this error, to fix this error you need to find 1 of the 2 conflicting source name, and change the name. As shown above in the example.
Images coming soon to help you more.


Gold
Silver
Bronze