Types/ItemProductPrototype: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(catalyst_amount description)
(amount takes precedence over amount_min/amount_max)
Line 13: Line 13:
'''Type''': [[Types/uint16]]
'''Type''': [[Types/uint16]]


Mandatory when using numbered keys (an array).
Mandatory when using numbered keys (an array).<br>
If <code>amount</code> is present, <code>amount_min</code> and <code>amount_max</code> are not loaded.


=== probability ===
=== probability ===

Revision as of 07:45, 26 April 2021

An item product definition for a Prototype/Recipe. Its loading is triggered by the type of a Types/ProductPrototype being "item". It can be specified as a table with named or numbered keys, but not a mix of both.

Mandatory properties

name or 1

Type: Types/string

The name of a Prototype/Item.

Optional properties

amount or 2

Type: Types/uint16

Mandatory when using numbered keys (an array).
If amount is present, amount_min and amount_max are not loaded.

probability

Type: Types/double

Default: 1

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

amount_min

Type: Types/uint16

Mandatory if amount is not specified and named keys are being used.

amount_max

Type: Types/uint16

Mandatory if amount is not specified and named keys are being used.

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

catalyst_amount

Type: Types/uint16

Default: 0

Amount that should not be affected by productivity modules (not yielded from bonus production) and should not be included in the item production statistics.

See also