Hi all
First question:
While i'm trying to assign an item that can be crafted via certain entity i got this message Difficulty normal: Value must be a string in property tree at ROOT
now i don't know if i misunderstood that message,but according to the recipe prototype page normal and expensive seem optional to put as a code?
even though i put them both i still got the same message.am i missing something here?
Second question:
is there a way to tell Factorio in lua that specific item can be crafted in that specific entity?
an example:can i tell Factorio that iron plate can be smelted using only stone furnace and not electric furnace?
Third question:
While i'm making category i've decided to remove any vanilla categories as well,but i don't know how to do so;i was searching for similar mods that achieved the same idea,i used the code but it seems that just added the category that i wanted but not removed every vanilla category in the process,so how to do that?
Thanks in advance
Multiple questions regarding items and categories
Re: Multiple questions regarding items and categories
1. You missed the last word of this error message. It tells you which property is causing the error.
2. Yes, each machine can have its own crafting_categories. You need to put the recipe in a unique recipe-category and remove it from all the others.
3. data.raw["recipe-category"]["smelting"] = nil
2. Yes, each machine can have its own crafting_categories. You need to put the recipe in a unique recipe-category and remove it from all the others.
3. data.raw["recipe-category"]["smelting"] = nil
Re: Multiple questions regarding items and categories
thanks for the informationDaveMcW wrote: ↑Mon Aug 10, 2020 9:55 am1. You missed the last word of this error message. It tells you which property is causing the error.
2. Yes, each machine can have its own crafting_categories. You need to put the recipe in a unique recipe-category and remove it from all the others.
3. data.raw["recipe-category"]["smelting"] = nil
about the 1st question it was about recipe.item name.normal.result,as i said in the question i added both normal and expensive in the item.lua file,but still the same result.
Re: Multiple questions regarding items and categories
Problem solved,thanks for the help
Re: Multiple questions regarding items and categories
about the 3rd question i got this error Error in assignID: recipe-category with name 'smelting' does not exist. It was removed by my mod.Suf wrote: ↑Mon Aug 10, 2020 10:46 amthanks for the informationDaveMcW wrote: ↑Mon Aug 10, 2020 9:55 am1. You missed the last word of this error message. It tells you which property is causing the error.
2. Yes, each machine can have its own crafting_categories. You need to put the recipe in a unique recipe-category and remove it from all the others.
3. data.raw["recipe-category"]["smelting"] = nil
about the 1st question it was about recipe.item name.normal.result,as i said in the question i added both normal and expensive in the item.lua file,but still the same result.
Re: Multiple questions regarding items and categories
You also have to remove it from every recipe and furnace. It might be better to just do that and let the recipe-category still exist.
Re: Multiple questions regarding items and categories
So i voided the items and that didn't work,seems you can't really remove an item but only move it from one category into another.is there a way to truly remove the category aside from using data.raw["recipe-category"]["category name"] = nil.