RecipePrototype 'recipe' Example code
| Inherits from Prototype « PrototypeBase |
| category optional | :: RecipeCategoryID | The category of this recipe. [...] |
The category of this recipe. [...] | ||
| additional_categories optional | :: array[RecipeCategoryID] | |
| crafting_machine_tint optional | :: RecipeTints | Used by WorkingVisualisations::working_visualisations to tint certain layers with the recipe color. [...] |
Used by WorkingVisualisations::working_visualisations to tint certain layers with the recipe color. [...] | ||
| icons optional | :: array[IconData] | Can't be an empty array. |
Can't be an empty array. | ||
| icon optional | :: FileName | If given, this determines the recipe's icon. [...] |
If given, this determines the recipe's icon. [...] | ||
| icon_size optional | :: SpriteSizeType | The size of the square icon, in pixels. [...] |
The size of the square icon, in pixels. [...] | ||
| ingredients optional | :: array[IngredientPrototype] | A table containing ingredient names and amounts. [...] |
A table containing ingredient names and amounts. [...] | ||
| results optional | :: array[ProductPrototype] | A table containing result names and amounts. [...] |
A table containing result names and amounts. [...] | ||
| main_product optional | :: string | For recipes with one or more products: Subgroup, localised_name and icon default to the values of the singular/main product, but can be overwritten by the recipe. [...] |
For recipes with one or more products: Subgroup, localised_name and icon default to the values of the singular/main product, but can be overwritten by the recipe. [...] | ||
| energy_required optional | :: double | The amount of time it takes to make this recipe. [...] |
The amount of time it takes to make this recipe. [...] | ||
| emissions_multiplier optional | :: double | |
| maximum_productivity optional | :: double | Must be >= 0. |
Must be >= 0. | ||
| requester_paste_multiplier optional | :: uint32 | |
| overload_multiplier optional | :: uint32 | Used to determine how many extra items are put into an assembling machine before it's considered "full enough". [...] |
Used to determine how many extra items are put into an assembling machine before it's considered "full enough". [...] | ||
| allow_inserter_overload optional | :: boolean | Whether the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size). |
Whether the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size). | ||
| enabled optional | :: boolean | This can be |
This can be | ||
| hide_from_stats optional | :: boolean | Hides the recipe from item/fluid production statistics. |
Hides the recipe from item/fluid production statistics. | ||
| hide_from_player_crafting optional | :: boolean | Hides the recipe from the player's crafting screen. [...] |
Hides the recipe from the player's crafting screen. [...] | ||
| hide_from_bonus_gui optional | :: boolean | |
| allow_decomposition optional | :: boolean | Whether this recipe is allowed to be broken down for the recipe tooltip "Total raw" calculations. |
Whether this recipe is allowed to be broken down for the recipe tooltip "Total raw" calculations. | ||
| allow_as_intermediate optional | :: boolean | Whether the recipe can be used as an intermediate recipe in hand-crafting. |
Whether the recipe can be used as an intermediate recipe in hand-crafting. | ||
| allow_intermediates optional | :: boolean | Whether the recipe is allowed to use intermediate recipes when hand-crafting. |
Whether the recipe is allowed to use intermediate recipes when hand-crafting. | ||
| always_show_made_in optional | :: boolean | Whether the "Made in: |
Whether the "Made in: | ||
| show_amount_in_title optional | :: boolean | Whether the recipe name should have the product amount in front of it. [...] |
Whether the recipe name should have the product amount in front of it. [...] | ||
| always_show_products optional | :: boolean | Whether the products are always shown in the recipe tooltip. |
Whether the products are always shown in the recipe tooltip. | ||
| unlock_results optional | :: boolean | Whether enabling this recipe unlocks its item products to show in selection lists (item filters, logistic requests, etc.). |
Whether enabling this recipe unlocks its item products to show in selection lists (item filters, logistic requests, etc.). | ||
| preserve_products_in_machine_output optional | :: boolean | |
| result_is_always_fresh optional | :: boolean | When set to true, the recipe will always produce fresh (non-spoiled) item even when the ingredients are spoiled. |
When set to true, the recipe will always produce fresh (non-spoiled) item even when the ingredients are spoiled. | ||
| reset_freshness_on_craft optional | :: boolean | When set to true, if the recipe successfully finishes crafting without spoiling, the result is produced fresh (non-spoiled). |
When set to true, if the recipe successfully finishes crafting without spoiling, the result is produced fresh (non-spoiled). | ||
| allow_consumption_message optional | :: LocalisedString | |
| allow_speed_message optional | :: LocalisedString | |
| allow_productivity_message optional | :: LocalisedString | |
| allow_pollution_message optional | :: LocalisedString | |
| allow_quality_message optional | :: LocalisedString | |
| surface_conditions | :: array[SurfaceCondition] | |
| hide_from_signal_gui optional | :: boolean | If left unset, this property will be determined automatically: If the recipe is not |
If left unset, this property will be determined automatically: If the recipe is not | ||
| allow_consumption optional | :: boolean | |
| allow_speed optional | :: boolean | |
| allow_productivity optional | :: boolean | |
| allow_pollution optional | :: boolean | |
| allow_quality optional | :: boolean | |
| allowed_module_categories optional | :: array[ModuleCategoryID] | Sets the module categories that are allowed to be used with this recipe. |
Sets the module categories that are allowed to be used with this recipe. | ||
| alternative_unlock_methods optional | :: array[TechnologyID] | Additional technologies to list under "Unlocked by" on a recipe's Factoriopedia page. |
Additional technologies to list under "Unlocked by" on a recipe's Factoriopedia page. | ||
| auto_recycle optional | :: boolean | Whether the recipe should be included in the recycling recipes automatically generated by the quality mod. [...] |
Whether the recipe should be included in the recycling recipes automatically generated by the quality mod. [...] | ||
| factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...] |
The ID type corresponding to the prototype that inherits from this. [...] | ||
| custom_tooltip_fields optional | :: array[CustomTooltipField] | Allows to add extra description items to the tooltip and Factoriopedia. |
Allows to add extra description items to the tooltip and Factoriopedia. | ||
| type | :: string | Specifies the kind of prototype this is. [...] |
Specifies the kind of prototype this is. [...] | ||
| name | :: string | Unique textual identification of the prototype. [...] |
Unique textual identification of the prototype. [...] | ||
| order optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...] |
Used to order prototypes in inventory, recipes and GUIs. [...] | ||
| localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...] |
Overwrites the name set in the locale file. [...] | ||
| localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...] |
Overwrites the description set in the locale file. [...] | ||
| factoriopedia_description optional | :: LocalisedString | Provides additional description used in factoriopedia. |
Provides additional description used in factoriopedia. | ||
| subgroup optional | :: ItemSubGroupID | The name of an ItemSubGroup. |
The name of an ItemSubGroup. | ||
| hidden[overridden] optional | :: boolean | Hides the recipe from crafting menus and other recipe selection lists. |
Hides the recipe from crafting menus and other recipe selection lists. | ||
| hidden_in_factoriopedia optional | :: boolean | |
| parameter optional | :: boolean | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. |
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function. | ||
| factoriopedia_simulation optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI. |
The simulation shown when looking at this prototype in the Factoriopedia GUI. | ||
Properties
category :: RecipeCategoryID optional 
Example
category = "smelting"
additional_categories :: array[RecipeCategoryID] optional 
crafting_machine_tint :: RecipeTints optional 
icons :: array[IconData] optional 
icon :: FileName optional 
Example
icon = "__base__/graphics/icons/fluid/heavy-oil.png"
icon_size :: SpriteSizeType optional 
ingredients :: array[IngredientPrototype] optional 
Examples
-- Recipe with items
ingredients =
{
{type = "item", name = "iron-stick", amount = 2},
{type = "item", name = "iron-plate", amount = 3}
}
-- Recipe with fluids
ingredients =
{
{type = "fluid", name = "water", amount = 50},
{type = "fluid", name = "crude-oil", amount = 100}
}
results :: array[ProductPrototype] optional 
Examples
results =
{
{type = "fluid", name= "heavy-oil", amount = 3},
{type = "fluid", name= "light-oil", amount = 3},
{type = "fluid", name= "petroleum-gas", amount = 4}
}
results =
{
{type = "item", name = "iron-plate", amount = 9},
{type = "item", name = "copper-plate", amount = 1}
}
results = {{type = "fluid", name = "steam", amount = 1, temperature = 165}}
main_product :: string optional 
energy_required :: double optional 
emissions_multiplier :: double optional 
maximum_productivity :: double optional 
requester_paste_multiplier :: uint32 optional 
overload_multiplier :: uint32 optional 
allow_inserter_overload :: boolean optional 
enabled :: boolean optional 
hide_from_stats :: boolean optional 
hide_from_player_crafting :: boolean optional 
hide_from_bonus_gui :: boolean optional 
allow_decomposition :: boolean optional 
allow_as_intermediate :: boolean optional 
allow_intermediates :: boolean optional 
always_show_made_in :: boolean optional 
show_amount_in_title :: boolean optional 
always_show_products :: boolean optional 
unlock_results :: boolean optional 
preserve_products_in_machine_output :: boolean optional 
result_is_always_fresh :: boolean optional 
reset_freshness_on_craft :: boolean optional 
allow_consumption_message :: LocalisedString optional 
allow_speed_message :: LocalisedString optional 
allow_productivity_message :: LocalisedString optional 
allow_pollution_message :: LocalisedString optional 
allow_quality_message :: LocalisedString optional 
surface_conditions :: array[SurfaceCondition] optional 

hide_from_signal_gui :: boolean optional 
allow_consumption :: boolean optional 
allow_speed :: boolean optional 
allow_productivity :: boolean optional 
allow_pollution :: boolean optional 
allow_quality :: boolean optional 
allowed_module_categories :: array[ModuleCategoryID] optional 
alternative_unlock_methods :: array[TechnologyID] optional 
auto_recycle :: boolean optional 
Overridden Properties
Examples 
{
type = "recipe",
name = "iron-plate",
category = "smelting",
energy_required = 3.5,
ingredients = {{type = "item", name = "iron-ore", amount = 1}},
results = {{type = "item", name = "iron-plate", amount = 1}}
}
{
type = "recipe",
name = "coal-liquefaction",
category = "oil-processing",
subgroup = "fluid-recipes",
order = "a[oil-processing]-c[coal-liquefaction]",
enabled = false,
energy_required = 5,
icon = "__base__/graphics/icons/fluid/coal-liquefaction.png",
icon_size = 32,
ingredients =
{
{type = "item", name = "coal", amount = 10},
{type = "fluid", name = "heavy-oil", amount = 25},
{type = "fluid", name = "steam", amount = 50}
},
results=
{
{type = "fluid", name = "heavy-oil", amount = 35},
{type = "fluid", name = "light-oil", amount = 15},
{type = "fluid", name = "petroleum-gas", amount = 20}
},
allow_decomposition = false
}

