Factorio Runtime DocsVersion 2.1.9

LuaRecipePrototype - Runtime Docs

ClassLuaRecipePrototypeextendsLuaPrototypeBasechanged

A crafting recipe prototype.

Inherits from LuaPrototypeBase

Members

has_category(category) boolean

Checks if recipe has given category

Checks if recipe has given category

get_ingredient_quality(ingredient_index, recipe_quality?) newLuaQualityPrototype

Ingredient materials required to craft recipe when configured to a specific quality.

Ingredient materials required to craft recipe when configured to a specific quality.

get_product_quality(product_index, recipe_quality?) newLuaQualityPrototype

Quality of the product given when recipe is configured to a specific quality.

Quality of the product given when recipe is configured to a specific quality.

get_product_amount(product_index, productivity?) newdouble

Average amount of the product given.

Average amount of the product given.

enabled :: R boolean

If this recipe prototype is enabled by default (enabled at the beginning of a game).

If this recipe prototype is enabled by default (enabled at the beginning of a game).

categories new :: R array[string]

Categories of the recipe.

Categories of the recipe.

ingredients :: R array[Ingredient]

The ingredients to this recipe.

The ingredients to this recipe.

products :: R array[Product]

The results/products of this recipe.

The results/products of this recipe.

main_product :: R Product?

The main product of this recipe, if any.

The main product of this recipe, if any.

hidden_from_flow_stats :: R boolean

Is the recipe hidden from flow statistics (item/fluid production statistics)?

Is the recipe hidden from flow statistics (item/fluid production statistics)?

hidden_from_player_crafting :: R boolean

Is the recipe hidden from player crafting? [...]

Is the recipe hidden from player crafting? [...]

always_show_made_in :: R boolean

Should this recipe always show "Made in" in the tooltip?

Should this recipe always show "Made in" in the tooltip?

energy :: R double

Energy required to execute this recipe. [...]

Energy required to execute this recipe. [...]

request_paste_multiplier :: R uint32

The multiplier used when this recipe is copied from an assembling machine to a requester chest. [...]

The multiplier used when this recipe is copied from an assembling machine to a requester chest. [...]

overload_multiplier :: R 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".

maximum_productivity :: R double

The maximal productivity bonus that can be achieved with this recipe.

The maximal productivity bonus that can be achieved with this recipe.

allow_inserter_overload :: R boolean

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

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

allow_as_intermediate :: R boolean

If this recipe is enabled for the purpose of intermediate hand-crafting.

If this recipe is enabled for the purpose of intermediate hand-crafting.

allow_intermediates :: R boolean

If this recipe is allowed to use intermediate recipes when hand-crafting.

If this recipe is allowed to use intermediate recipes when hand-crafting.

emissions_multiplier :: R double

The emissions multiplier for this recipe.

The emissions multiplier for this recipe.

allow_decomposition :: R 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.

unlock_results :: R boolean

Whether this recipe unlocks the result item(s) so they're shown in filter-select GUIs.

Whether this recipe unlocks the result item(s) so they're shown in filter-select GUIs.

hide_from_signal_gui :: R boolean

Whether this recipe is marked to be hidden from the signal GUI.

Whether this recipe is marked to be hidden from the signal GUI.

hide_from_flow_stats :: R boolean
hide_from_player_crafting :: R boolean
hide_from_bonus_gui :: R boolean
trash :: R array[LuaItemPrototype]?

The 'trash' items that this recipe might produce as a result of spoiling.

The 'trash' items that this recipe might produce as a result of spoiling.

preserve_products_in_machine_output :: R boolean
allowed_effects :: R dictionary[string → boolean]?

The allowed module effects for this recipe, if any.

The allowed module effects for this recipe, if any.

allowed_module_categories :: R dictionary[string → true]?

The allowed module categories for this recipe, if any.

The allowed module categories for this recipe, if any.

effect_limitation_messages :: R array[LocalisedString]?
surface_conditions :: R array[SurfaceCondition]?

The surface conditions required to craft this recipe.

The surface conditions required to craft this recipe.

alternative_unlock_methods :: R array[LuaTechnologyPrototype]?

Additional technologies listed under "Unlocked by" on a recipe's Factoriopedia page.

Additional technologies listed under "Unlocked by" on a recipe's Factoriopedia page.

crafting_machine_tints :: R array[Color]
factoriopedia_alternative :: R LuaRecipePrototype?

An alternative prototype that will be used to display info about this prototype in Factoriopedia.

An alternative prototype that will be used to display info about this prototype in Factoriopedia.

can_set_quality new :: R boolean

True if a player can set quality of the recipe to craft. [...]

True if a player can set quality of the recipe to craft. [...]

valid :: R boolean

Is this object valid? [...]

Is this object valid? [...]

object_name :: R string

The class name of this object. [...]

The class name of this object. [...]

Inherited from LuaPrototypeBase
type :: R string

Type of this prototype.

Type of this prototype.

name :: R string

Name of this prototype.

Name of this prototype.

order :: R string

The string used to alphabetically sort these prototypes. [...]

The string used to alphabetically sort these prototypes. [...]

localised_name :: R LocalisedString
localised_description :: R LocalisedString
factoriopedia_description :: R LocalisedString

Provides additional description used in factoriopedia.

Provides additional description used in factoriopedia.

group :: R LuaGroup

Group of this prototype.

Group of this prototype.

subgroup :: R LuaGroup

Subgroup of this prototype.

Subgroup of this prototype.

hidden :: R boolean
hidden_in_factoriopedia :: R boolean
parameter :: R boolean
custom_tooltip_fields :: R array[CustomTooltipField]?

Extra description items in the tooltip and Factoriopedia.

Extra description items in the tooltip and Factoriopedia.

Methods

has_category(category) → boolean

Checks if recipe has given category

Parameters

category :: RecipeCategoryID

Return values

→ boolean

true if recipe has this category.


get_ingredient_quality(ingredient_index, recipe_quality?) → LuaQualityPrototypenew

Ingredient materials required to craft recipe when configured to a specific quality.

Parameters

ingredient_index :: uint32
recipe_quality :: QualityID?

Defaults to normal.

Defaults to normal.


get_product_quality(product_index, recipe_quality?) → LuaQualityPrototypenew

Quality of the product given when recipe is configured to a specific quality.

Parameters

product_index :: uint32
recipe_quality :: QualityID?

Defaults to normal.

Defaults to normal.


get_product_amount(product_index, productivity?) → doublenew

Average amount of the product given.

Parameters

product_index :: uint32
productivity :: double?

Attributes

enabled :: Read boolean

If this recipe prototype is enabled by default (enabled at the beginning of a game).


categories :: Read array[string] new

Categories of the recipe.


ingredients :: Read array[Ingredient]

The ingredients to this recipe.

Example

-- The ingredients of "advanced-oil-processing" would look like this
{{type="fluid", name="crude-oil", amount=100}, {type="fluid", name="water", amount=50}}

products :: Read array[Product]

The results/products of this recipe.

Example

-- The products of "advanced-oil-processing" would look like this:
{{type="fluid", name="heavy-oil", amount=25}, {type="fluid", name="light-oil", amount=45}, {type="fluid", name="petroleum-gas", amount=55}}

main_product :: Read Product?

The main product of this recipe, if any.


hidden_from_flow_stats :: Read boolean

Is the recipe hidden from flow statistics (item/fluid production statistics)?


hidden_from_player_crafting :: Read boolean

Is the recipe hidden from player crafting? The recipe will still show up for selection in machines.


always_show_made_in :: Read boolean

Should this recipe always show "Made in" in the tooltip?


energy :: Read double

Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.


request_paste_multiplier :: Read uint32

The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.


overload_multiplier :: Read uint32

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


maximum_productivity :: Read double

The maximal productivity bonus that can be achieved with this recipe.


allow_inserter_overload :: Read boolean

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


allow_as_intermediate :: Read boolean

If this recipe is enabled for the purpose of intermediate hand-crafting.


allow_intermediates :: Read boolean

If this recipe is allowed to use intermediate recipes when hand-crafting.


emissions_multiplier :: Read double

The emissions multiplier for this recipe.


allow_decomposition :: Read boolean

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


unlock_results :: Read boolean

Whether this recipe unlocks the result item(s) so they're shown in filter-select GUIs.


hide_from_signal_gui :: Read boolean

Whether this recipe is marked to be hidden from the signal GUI.


hide_from_flow_stats :: Read boolean


hide_from_player_crafting :: Read boolean


hide_from_bonus_gui :: Read boolean


trash :: Read array[LuaItemPrototype]?

The 'trash' items that this recipe might produce as a result of spoiling.


preserve_products_in_machine_output :: Read boolean


allowed_effects :: Read dictionary[string → boolean]?

The allowed module effects for this recipe, if any.


allowed_module_categories :: Read dictionary[string → true]?

The allowed module categories for this recipe, if any.


effect_limitation_messages :: Read array[LocalisedString]?


surface_conditions :: Read array[SurfaceCondition]?

The surface conditions required to craft this recipe.


alternative_unlock_methods :: Read array[LuaTechnologyPrototype]?

Additional technologies listed under "Unlocked by" on a recipe's Factoriopedia page.


crafting_machine_tints :: Read array[Color]


factoriopedia_alternative :: Read LuaRecipePrototype?

An alternative prototype that will be used to display info about this prototype in Factoriopedia.


can_set_quality :: Read booleannew

True if a player can set quality of the recipe to craft. False when only normal quality recipes can be crafted.


valid :: Read boolean

Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.


object_name :: Read string

The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

Fulltext search

Classes

Concepts

Events

Defines

Fulltext search for