Modding: cant use files with same name in different folders
Posted: Sun Apr 12, 2015 5:02 pm
I had a problem just now, and it took me forever to fix it. The game said, that 'xxx' was not a recognized ID of recipe, but i've checked, all commas, {}, ID references etc. were correct. The structure of files was like the following:
--------------------------------------------
- Mod_0.0.0/
- data.lua
- info.json
prototypes/oxygen/data.lua
prototypes/oxygen/fluid.lua
prototypes/oxygen/recipes.lua
prototypes/hydrogen/data.lua
prototypes/hydrogen/fluid.lua
prototypes/hydrogen/recipes.lua
--------------------------------------------
In oxygen/data.lua and hydrogen/data.lua are the same lines of code:
Then I changed the name of oxygen/fluid.lua and oxygen/recipes.lua, and behold, the mod works.
Why it's not possible to have lua-files with same name in different folders (to notice, both data.lua have the same name and that bothers anyone)?
I really hope that's a bug, not a feature![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
--------------------------------------------
- Mod_0.0.0/
- data.lua
- info.json
prototypes/oxygen/data.lua
prototypes/oxygen/fluid.lua
prototypes/oxygen/recipes.lua
prototypes/hydrogen/data.lua
prototypes/hydrogen/fluid.lua
prototypes/hydrogen/recipes.lua
--------------------------------------------
In oxygen/data.lua and hydrogen/data.lua are the same lines of code:
Code: Select all
require("fluid")
require("recipes")
Why it's not possible to have lua-files with same name in different folders (to notice, both data.lua have the same name and that bothers anyone)?
I really hope that's a bug, not a feature
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)