Factorio Prototype DocsVersion 1.1.107

RecipeData :: struct

Used when defining a RecipePrototype that uses difficulty. For a recipe without difficulty, these same properties are defined on the prototype itself.

Properties

ingredients :: array[IngredientPrototype]

A table containing ingredient names and counts. [...]

A table containing ingredient names and counts. [...]

results :: array[ProductPrototype]

A table containing result names and counts. [...]

A table containing result names and counts. [...]

result optional :: ItemID

The item created by this recipe. [...]

The item created by this recipe. [...]

result_count optional :: uint16

The number of items created by this recipe. [...]

The number of items created by this recipe. [...]

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

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

This can be false to disable the recipe at the start of the game, or true to leave it enabled. [...]

This can be false to disable the recipe at the start of the game, or true to leave it enabled. [...]

hidden optional :: bool

Hides the recipe from crafting menus.

Hides the recipe from crafting menus.

hide_from_stats optional :: bool

Hides the recipe from item/fluid production statistics.

Hides the recipe from item/fluid production statistics.

hide_from_player_crafting optional :: bool

Hides the recipe from the player's crafting screen. [...]

Hides the recipe from the player's crafting screen. [...]

allow_decomposition optional :: bool

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

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

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

Whether the "Made in: " part of the tool-tip should always be present, and not only when the recipe can't be hand-crafted.

Whether the "Made in: " part of the tool-tip should always be present, and not only when the recipe can't be hand-crafted.

show_amount_in_title optional :: bool

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

Whether the products are always shown in the recipe tooltip.

Whether the products are always shown in the recipe tooltip.

unlock_results optional :: bool

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.).

Properties

ingredients :: array[IngredientPrototype]

A table containing ingredient names and counts. Can also contain information about fluid temperature and catalyst amounts. The catalyst amounts are automatically calculated from the recipe, or can be set manually in the IngredientPrototype (see here).

The maximum ingredient amount is 65 535. Can be set to an empty table to create a recipe that needs no ingredients.

Duplicate ingredients, e.g. two entries with the same name, are not allowed. In-game, the item ingredients are ordered by ItemGroup::order_in_recipe.

Examples

-- Shorthand format
ingredients = {{"iron-stick", 2}, {"iron-plate", 3}}
-- Full format
ingredients = {
  {type = "item", name = "iron-stick", amount = 2},
  {type = "item", name = "iron-plate", amount = 3}
}
-- Fluids don't support shorthand
ingredients = {
  {type="fluid", name="water", amount=50},
  {type="fluid", name="crude-oil", amount=100}
}

results :: array[ProductPrototype]

A table containing result names and counts. Can also contain information about fluid temperature and catalyst amounts. The catalyst amounts are automatically calculated from the recipe, or can be set manually in the ProductPrototype (see here).

Can be set to an empty table to create a recipe that produces nothing. Duplicate results, e.g. two entries with the same name, are allowed.

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-nuggets", amount = 9},
  {type = "item", name = "gold-nuggets", amount = 1}
}
results = {{type = "fluid", name = "steam", amount = 1, temperature = 165}}

result :: ItemID optional

The item created by this recipe. Must be the name of an item, such as "iron-gear-wheel".

Only loaded if results is not defined.

result_count :: uint16 optional

Default: 1

The number of items created by this recipe.

Only loaded if results is not defined.

main_product :: string optional

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. Setting the main_product to an empty string ("") forces the title in the recipe tooltip to use the recipe's name (not that of the product) and shows the products in the tooltip.

If 1) there are multiple products and this property is nil, 2) this property is set to an empty string (""), or 3) there are no products, the recipe will use the localised_name, icon, and subgroup of the recipe. icon and subgroup become non-optional.

energy_required :: double optional

Default: 0.5

The amount of time it takes to make this recipe. Must be > 0.001. Equals the number of seconds it takes to craft at crafting speed 1.

emissions_multiplier :: double optional

Default: 1

requester_paste_multiplier :: uint32 optional

Default: 30

overload_multiplier :: uint32 optional

Default: 0

Used to determine how many extra items are put into an assembling machine before it's considered "full enough". See insertion limits.

If set to 0, it instead uses the following formula: 1.166 / (energy_required / the assembler's crafting_speed), rounded up, and clamped to be between2 and 100. The numbers used in this formula can be changed by the UtilityConstants properties dynamic_recipe_overload_factor, minimum_recipe_overload_multiplier, and maximum_recipe_overload_multiplier.

allow_inserter_overload :: bool optional

Default: true

Whether the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).

enabled :: bool optional

Default: true

This can be false to disable the recipe at the start of the game, or true to leave it enabled.

If a recipe is unlocked via technology, this should be set to false.

hidden :: bool optional

Default: false

Hides the recipe from crafting menus.

hide_from_stats :: bool optional

Default: false

Hides the recipe from item/fluid production statistics.

hide_from_player_crafting :: bool optional

Default: false

Hides the recipe from the player's crafting screen. The recipe will still show up for selection in machines.

allow_decomposition :: bool optional

Default: true

Whether this recipe is allowed to be broken down for the recipe tooltip "Total raw" calculations.

allow_as_intermediate :: bool optional

Default: true

Whether the recipe can be used as an intermediate recipe in hand-crafting.

allow_intermediates :: bool optional

Default: true

Whether the recipe is allowed to use intermediate recipes when hand-crafting.

always_show_made_in :: bool optional

Default: false

Whether the "Made in: " part of the tool-tip should always be present, and not only when the recipe can't be hand-crafted.

show_amount_in_title :: bool optional

Default: true

Whether the recipe name should have the product amount in front of it. E.g. "2x Transport belt"

always_show_products :: bool optional

Default: false

Whether the products are always shown in the recipe tooltip.

unlock_results :: bool optional

Default: true

Whether enabling this recipe unlocks its item products to show in selection lists (item filters, logistic requests, etc.).

Prototypes

Types