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

Place to get help with not working mods / modding interface.
pfg
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Sep 21, 2016 9:57 pm
Contact:

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

Post 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
      }
    }
  }
})
Last edited by pfg on Sun Feb 19, 2017 3:50 am, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14892
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Custom fluid has unknown key

Post by Rseding91 »

Unknown key means there's no locale (translation) for the thing giving the error text.
If you want to get ahold of me I'm almost always on Discord.
pfg
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Sep 21, 2016 9:57 pm
Contact:

Re: Custom fluid has unknown key

Post by pfg »

Rseding91 wrote:Unknown key means there's no locale (translation) for the thing giving the error text.
How can I fix this?
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 511
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Custom fluid has unknown key

Post 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.
pfg
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Sep 21, 2016 9:57 pm
Contact:

Re: Custom fluid has unknown key

Post 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
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Custom fluid has unknown key

Post 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.
mpratt
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Feb 14, 2017 5:28 am
Contact:

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

Post 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'
Post Reply

Return to “Modding help”