Integration of mods. Item does not exist.

Place to get help with not working mods / modding interface.
KepperMIEM
Inserter
Inserter
Posts: 22
Joined: Wed Nov 16, 2016 3:55 pm
Contact:

Integration of mods. Item does not exist.

Post by KepperMIEM »

I try to use items of other(Yuoki) mod in recipes of my mod.
"Error in assignID 'y-coal-dust' does not exist"

My info.json

Code: Select all

...
"dependencies": ["base >= 0.14.0", "? Nucular >= 1.0.4", "? Yuoki >= 0.4.63", "? yi_engines >= 0.4.19"],
...
Integration with Yuoki mod is optional.

My mod see some Yuoki items(y-toxic-dust) and do not see other Yuoki items(y-coal-dust).
I guess that the "y-coal-dust" does not have time to load.

How can my mod wait for other mod?


Yuoki data.lua

Code: Select all

...
require("prototypes.item.y_items")  -- y-toxic-dust  declaration
...
require("prototypes.z_items") -- y-coal-dust  declaration
...

My data.lua

Code: Select all

...
require("Yuoki.Yuoki")
My Yuoki.lua

Code: Select all

...
if data.raw.fluid["y-con_water"] then
	local tmp_recipe = data.raw.recipe["clearing-contaminated-water"]
	tmp_recipe.results = {
		{type="fluid", name="water", amount=24},
		{type="item", name="dirt", amount=5},
		[b]{type="item", name="y-toxic-dust", amount=1}, -- this line work correct[/b]
	}
...
	tmp_recipe = data.raw.recipe["coal-dust|solid-fuel"]	--coal-processing-recipes.lua
	tmp_recipe.ingredients = {
		[b]{type="item",name="y-coal-dust ", amount=4},  -- this line generate error[/b]
	}
...
end

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Integration of mods. Item does not exist.

Post by daniel34 »

KepperMIEM wrote:My mod see some Yuoki items(y-toxic-dust) and do not see other Yuoki items(y-coal-dust).
I guess that the "y-coal-dust" does not have time to load.

How can my mod wait for other mod?
If you define it as a dependency (even an optional one) it is always completely loaded before your mod.

The error is here:

Code: Select all

{type="item",name="y-coal-dust ", amount=4},  -- this line generate error
You have a space after y-coal-dust before the closing quotation mark.
quick links: log file | graphical issues | wiki

KepperMIEM
Inserter
Inserter
Posts: 22
Joined: Wed Nov 16, 2016 3:55 pm
Contact:

Re: Integration of mods. Item does not exist.

Post by KepperMIEM »

Yes. You right.
I did not notice the space.

Thank you.

Post Reply

Return to “Modding help”