Page 1 of 1

Recipe is in crafting category but has a non-item product

Posted: Sun Feb 19, 2017 3:35 am
by pfg
I am registering a fluid called science-red, however when I try to use it in a crafting recipe, it says that "Recipe is in crafting category but has a non-item product". I can use other items I created such as an inserter I made, however the fluid isn't registering or isn't working for some reason.

Code: Select all

data:extend({
  {
    type = "fluid",
    name = "science-red",
    default_temperature = 0,
    max_temperature = 0,
    heat_capacity = "0KJ",
    base_color = {r=0.8, g=0.0, b=0.0},
    flow_color = {r=0.7, g=0.1, b=0.1},
    subgroup = "tool",
    max_temperature = 100,
    icon = "__base__/graphics/icons/fluid/lubricant.png",
    pressure_to_speed_ratio = 0.4,
    flow_to_energy_ratio = 0.59,
    order = "e[lubricant]",
  }
})

Code: Select all

data:extend({
 {
    type = "recipe",
    name = "science-red",
    enabled = "true",
    ingredients = {
      {"iron-stick",50}
    },
    results = {
      {
        type="fluid",
        name="science-red",
        amount=1
      }
    }
  }
})

Re: Custom fluid has unknown key

Posted: Sun Feb 19, 2017 3:36 am
by Rseding91
Unknown key means there's no locale (translation) for the thing giving the error text.

Re: Custom fluid has unknown key

Posted: Sun Feb 19, 2017 3:39 am
by pfg
Rseding91 wrote:Unknown key means there's no locale (translation) for the thing giving the error text.
How can I fix this?

Re: Custom fluid has unknown key

Posted: Sun Feb 19, 2017 3:45 am
by Yoyobuae
pfg wrote:
Rseding91 wrote:Unknown key means there's no locale (translation) for the thing giving the error text.
How can I fix this?
By adding the locale/en/locale.cfg file to your mod with the respective translations.

Re: Custom fluid has unknown key

Posted: Sun Feb 19, 2017 3:49 am
by pfg
Yoyobuae wrote:
pfg wrote:
Rseding91 wrote:Unknown key means there's no locale (translation) for the thing giving the error text.
How can I fix this?
By adding the locale/en/locale.cfg file to your mod with the respective translations.
It appears this isn't actually the problem, the full error says "recipe is in crafting category but has a non-item product"

Edit: Solved it, it must be in the oil processing category

Re: Custom fluid has unknown key

Posted: Sun Feb 19, 2017 4:09 am
by Nexela
Edit: Solved it, it must be in the oil processing category
Yes and no. What that error means is that it must be in a category that can handle type="fluid" results. The default category (the one used for handcrafting) can't do this however oil-processing and advanced-crafting can. There might be more in vanilla but that should give you start.

Re: Recipe is in crafting category but has a non-item product

Posted: Sun Feb 19, 2017 6:06 am
by mpratt
You need to change the category. 'crafting-with-fluids' is usually what I set things to when they have a fluid component. I don't know any particular gameplay difference between that and 'advanced-crafting'