Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# RecipePrototypeFilter - Runtime Docs

## RecipePrototypeFilter :: table

#### Table fields

filter | :: `"enabled"` or `"hidden"` or `"hidden-from-flow-stats"` or `"hidden-from-player-crafting"` or `"allow-as-intermediate"` or `"allow-intermediates"` or `"allow-decomposition"` or `"always-show-made-in"` or `"always-show-products"` or `"show-amount-in-title"` or `"has-ingredients"` or `"has-products"` or `"has-ingredient-item"` or `"has-ingredient-fluid"` or `"has-product-item"` or `"has-product-fluid"` or `"subgroup"` or `"category"` or `"energy"` or `"emissions-multiplier"` or `"request-paste-multiplier"` or `"overload-multiplier"` | The condition to filter on.
The condition to filter on.
mode | :: `"or"` or `"and"`? | How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
invert | :: boolean? | Inverts the condition. Default is `false`.
Inverts the condition. Default is `false`.

Other attributes may be specified depending on `filter`:

#### `has-ingredient-item`

elem_filters | :: array[ItemPrototypeFilter]? | Matches if at least 1 ingredient is an item that matches these filters.
Matches if at least 1 ingredient is an item that matches these filters.

#### `has-ingredient-fluid`

    -- selects recipes that consume sulfuric acid
    {{filter = "has-ingredient-fluid", elem_filters = {{filter = "name", name = "sulfuric-acid"}}}}

elem_filters | :: array[FluidPrototypeFilter]? | Matches if at least 1 ingredient is a fluid that matches these filters.
Matches if at least 1 ingredient is a fluid that matches these filters.

#### `has-product-item`

Usage example:

    -- selects recipes that produce an item
    {{filter = "has-product-item"}}
    -- selects recipes that produce iron plates
    {{filter = "has-product-item", elem_filters = {{filter = "name", name = "iron-plate"}}}}
    -- selects recipes that produce items that place furnaces
    {{filter = "has-product-item", elem_filters = {{filter = "place-result", elem_filters = {{filter = "type", type = "furnace"}}}}}}

elem_filters | :: array[ItemPrototypeFilter]? | Matches if at least 1 product is an item that matches these filters.
Matches if at least 1 product is an item that matches these filters.

#### `has-product-fluid`

elem_filters | :: array[FluidPrototypeFilter]? | Matches if at least 1 product is a fluid that matches
Matches if at least 1 product is a fluid that matches

#### `subgroup`

subgroup | :: string | A LuaGroup (subgroup) name
A LuaGroup (subgroup) name

#### `category`

category | :: string | A LuaRecipeCategoryPrototype name
A LuaRecipeCategoryPrototype name

#### `energy`

comparison | :: ComparatorString |
value | :: double | The value to compare against.
The value to compare against.

#### `emissions-multiplier`

comparison | :: ComparatorString |
value | :: double | The value to compare against.
The value to compare against.

#### `request-paste-multiplier`

comparison | :: ComparatorString |
value | :: uint32 | The value to compare against.
The value to compare against.

#### `overload-multiplier`

comparison | :: ComparatorString |
value | :: uint32 | The value to compare against.
The value to compare against.

Concept used in

- LuaPrototypes::get_recipe_filtered()
- PrototypeFilter