Page 1 of 1
Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 9:37 am
by iUltimateLP
Hi guys, I tried to implement a simple test storage chest inside my test mod. I did it all like in the Modding Tutorial in wiki, but everytime I start the game I get following error:
What is wrong? Here are the contents of files:
item.lua Code: Select all
data:extend({
{
type = "item",
name = "test64x64item",
icon = "__TestItems_0.0.1__/graphics/icons/test64x64.png",
flags = { "goes-to-quickbar" },
subgroup = "storage",
place_result="test64x64",
stack_size= 50,
},
{
type= "item",
name= "test128x128item",
icon = "__TestItems_0.0.1__/graphics/icons/test128x128item.png",
flags= { "goes-to-quickbar" },
subgroup = "production-machine",
place_result="test128x128",
stack_size= 50,
}
})
recipe.lua Code: Select all
data:extend({
{
type = "recipe",
name = "test64x64item",
enabled = "true",
ingredients =
{
{"wood",1}
},
result = "test64x64item"
},
{
type = "recipe",
name = "test128x128item",
enabled = "true",
ingredients =
{
{"wood",1}
},
result = "test128x128item"
}
})
entity.lua Code: Select all
data:extend({
{
type = "container",
name = "test64x64",
icon = "__TestItems_0.0.1__/graphics/icons/test64x64.png",
flags = { "placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "test64x64item"},
max_health = 10,
corpse = "medium-remnants",
collision_box = {{0, 0}, {0, 0}},
selection_box = {{-1, -1}, {1, 1}},
fast_replaceable_group = "container",
inventory_size = 32,
picture = {
filename = "__TestItems_0.0.1__/graphics/test64x64.png",
priority = "extra-high",
width = 64,
height = 64,
shift = {0,0}
}
},
{
type = "container",
name = "test128x128",
icon = "__TestItems_0.0.1__/graphics/icons/test128x128.png",
flags = { "placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "test64x64item"},
max_health = 10,
corpse = "medium-remnants",
collision_box = {{0, 0}, {0, 0}},
selection_box = {{-1, -1}, {1, 1}},
fast_replaceable_group = "container",
inventory_size = 64,
picture = {
filename = "__TestItems_0.0.1__/graphics/test128x128.png",
priority = "high",
width = 128,
height = 128,
shift = {0,0}
}
}
})
Any suggestions? Thanks for help!
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 9:56 am
by prg
Omit the version number from the path in the item definition.
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:11 am
by itzJanuary
It doesn't work because the path "__TestItems_0.0.1__/something" needs to be "__TestItems__/something".
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:20 am
by iUltimateLP
itzJanuary wrote: It doesn't work because the path "__TestItems_0.0.1__/something" needs to be "__TestItems__/something".
But then he says the folder isn't correctly named because the version is missing in folder name
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:26 am
by prg
The version number needs to be in the actual path where the mod is in, but not when you refer to it in the item definition.
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:46 am
by itzJanuary
Please post your info.json. It could also have something to do with that.
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:47 am
by iUltimateLP
prg wrote: The version number needs to be in the actual path where the mod is in, but not when you refer to it in the item definition.
It worked! Thanks!
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:49 am
by itzJanuary
I think I understand what your problem is now.
The actual path has to be:
"Factorio/Mods/TestItems_0.0.1/something/axe.png"
but in the lua files it should be:
"__TestItems__/something/axe.png"
Re: Path does not match any mod, but path is correct!
Posted: Mon May 25, 2015 10:53 am
by iUltimateLP
itzJanuary wrote: I think I understand what your problem is now.
The actual path has to be:
"Factorio/Mods/TestItems_0.0.1/something/axe.png"
but in the lua files it should be:
"__TestItems__/something/axe.png"
Already fixed, but thanks for help!