Multiple questions regarding items and categories

Place to get help with not working mods / modding interface.
Post Reply
Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Multiple questions regarding items and categories

Post by Suf »

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 :D

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Multiple questions regarding items and categories

Post by DaveMcW »

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

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Multiple questions regarding items and categories

Post by Suf »

DaveMcW wrote:
Mon Aug 10, 2020 9:55 am
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
thanks for the information
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.

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Multiple questions regarding items and categories

Post by Suf »

Problem solved,thanks for the help ;)

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Multiple questions regarding items and categories

Post by Suf »

Suf wrote:
Mon Aug 10, 2020 10:46 am
DaveMcW wrote:
Mon Aug 10, 2020 9:55 am
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
thanks for the information
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.
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.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Multiple questions regarding items and categories

Post by DaveMcW »

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.

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Multiple questions regarding items and categories

Post by Suf »

DaveMcW wrote:
Tue Aug 11, 2020 5:24 pm
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.
Can i void the items instead? i'm assuming it would be the same result.

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Multiple questions regarding items and categories

Post by Suf »

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.

Post Reply

Return to “Modding help”