Factorio API Docs

1.1.62 <>

Class LuaRecipePrototype

A crafting recipe prototype.

help()
string

All methods and properties that this object supports.


:: boolean
[R]

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


:: string
[R]

Name of the recipe.


[R]

Localised name of the recipe.



:: string
[R]

Category of the recipe.


:: array[Ingredient]
[R]

Ingredients for this recipe.


:: array[Product]
[R]

The results of this recipe.


:: Product?
[R]

The main product of this recipe, if any.


:: boolean
[R]

Is the recipe hidden?


:: boolean
[R]

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


:: boolean
[R]

Is the recipe hidden from player crafting?


:: boolean
[R]

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


:: double
[R]

Energy required to execute this recipe.


:: string
[R]

The string used to alphabetically sort these prototypes.


[R]

Group of this recipe.


[R]

Subgroup of this recipe.


:: uint
[R]

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


:: uint
[R]

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


:: boolean
[R]

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


:: boolean
[R]

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


:: boolean
[R]

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


:: boolean
[R]

If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.


:: boolean
[R]

If the products are always shown in the recipe tooltip.


:: double
[R]

The emissions multiplier for this recipe.


:: boolean
[R]

Is this recipe allowed to be broken down for the recipe tooltip "Total raw" calculations?


:: boolean
[R]

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


:: boolean
[R]

Is this object valid?


:: string
[R]

The class name of this object.

Methods

help() → string

All methods and properties that this object supports.

Attributes

enabled :: boolean [Read]

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


name :: string [Read]

Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.


localised_name :: LocalisedString [Read]

Localised name of the recipe.


localised_description :: LocalisedString [Read]


category :: string [Read]

Category of the recipe.


ingredients :: array[Ingredient] [Read]

Ingredients for this recipe.


products :: array[Product] [Read]

The results of this recipe.


main_product :: Product? [Read]

The main product of this recipe, if any.


hidden :: boolean [Read]

Is the recipe hidden? Hidden recipe don't show up in the crafting menu.


hidden_from_flow_stats :: boolean [Read]

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


hidden_from_player_crafting :: boolean [Read]

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


always_show_made_in :: boolean [Read]

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


energy :: double [Read]

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.


order :: string [Read]

The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.


group :: LuaGroup [Read]

Group of this recipe.


subgroup :: LuaGroup [Read]

Subgroup of this recipe.


request_paste_multiplier :: uint [Read]

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 :: uint [Read]

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


allow_inserter_overload :: boolean [Read]

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


allow_as_intermediate :: boolean [Read]

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


allow_intermediates :: boolean [Read]

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


show_amount_in_title :: boolean [Read]

If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.


always_show_products :: boolean [Read]

If the products are always shown in the recipe tooltip.


emissions_multiplier :: double [Read]

The emissions multiplier for this recipe.


allow_decomposition :: boolean [Read]

Is this recipe allowed to be broken down for the recipe tooltip "Total raw" calculations?


unlock_results :: boolean [Read]

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


valid :: boolean [Read]

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 :: string [Read]

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.

|<

Classes

Events

Concepts

Defines

Builtin types

>|