Factorio Prototype DocsVersion 2.0.23

ItemProductPrototype :: struct

An item product definition.

Properties

type :: "item"
name :: ItemID

The name of an ItemPrototype.

The name of an ItemPrototype.

amount optional :: uint16
amount_min optional :: uint16

Only loaded, and mandatory if amount is not defined.

Only loaded, and mandatory if amount is not defined.

amount_max optional :: uint16

Only loaded, and mandatory if amount is not defined. [...]

Only loaded, and mandatory if amount is not defined. [...]

probability optional :: double

Value between 0 and 1, 0 for 0% chance and 1 for 100% chance. [...]

Value between 0 and 1, 0 for 0% chance and 1 for 100% chance. [...]

ignored_by_stats optional :: uint16

Amount that should not be included in the item production statistics, typically with a matching ingredient having the same amount set as ignored_by_stats. [...]

Amount that should not be included in the item production statistics, typically with a matching ingredient having the same amount set as ignored_by_stats. [...]

ignored_by_productivity optional :: uint16

Amount that should be deducted from any productivity induced bonus crafts. [...]

Amount that should be deducted from any productivity induced bonus crafts. [...]

show_details_in_recipe_tooltip optional :: bool

When hovering over a recipe in the crafting menu the recipe tooltip will be shown. [...]

When hovering over a recipe in the crafting menu the recipe tooltip will be shown. [...]

extra_count_fraction optional :: float

Probability that a craft will yield one additional product. [...]

Probability that a craft will yield one additional product. [...]

percent_spoiled optional :: float

Must be >= 0 and < 1.

Must be >= 0 and < 1.

Properties

type :: "item"

name :: ItemID

The name of an ItemPrototype.

amount :: uint16 optional

amount_min :: uint16 optional

Only loaded, and mandatory if amount is not defined.

amount_max :: uint16 optional

Only loaded, and mandatory if amount is not defined.

If set to a number that is less than amount_min, the game will use amount_min instead.

probability :: double optional

Default: 1

Value between 0 and 1, 0 for 0% chance and 1 for 100% chance.

The effect of probability is no product, or a linear distribution on [min, max]. For a recipe with probability p, amount_min min, and amount_max max, the Expected Value of this product can be expressed as p * (0.5 * (max + min)). This is what will be shown in a recipe tooltip. The effect of ignored_by_productivity on the product is not shown.

When amount_min and amount_max are not provided, amount applies as min and max. The Expected Value simplifies to p * amount, providing 0 product, or amount product, on recipe completion.

ignored_by_stats :: uint16 optional

Default: 0

Amount that should not be included in the item production statistics, typically with a matching ingredient having the same amount set as ignored_by_stats.

If ignored_by_stats is larger than the amount crafted (for instance due to probability) it will instead show as consumed.

Products with ignored_by_stats defined will not be set as recipe through the circuit network when using the product's item-signal.

ignored_by_productivity :: uint16 optional

Default: 0

Amount that should be deducted from any productivity induced bonus crafts.

This value can safely be set larger than the maximum expected craft amount, any excess is ignored.

This value is ignored when allow_productivity is false.

show_details_in_recipe_tooltip :: bool optional

Default: true

When hovering over a recipe in the crafting menu the recipe tooltip will be shown. An additional item tooltip will be shown for every product, as a separate tooltip, if the item tooltip has a description and/or properties to show and if show_details_in_recipe_tooltip is true.

extra_count_fraction :: float optional

Default: 0

Probability that a craft will yield one additional product. Also applies to bonus crafts caused by productivity.

percent_spoiled :: float optional

Default: 0

Must be >= 0 and < 1.

Prototypes

Types

Defines