Types/ItemProductPrototype: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.17)
(→‎Optional properties: documented clamping)
Line 24: Line 24:


Mandatory if <code>amount</code> is not specified and named keys are being used.
Mandatory if <code>amount</code> is not specified and named keys are being used.
If set to 0, the game will use 1 internally.


=== amount_max ===
=== amount_max ===
Line 29: Line 31:


Mandatory if <code>amount</code> is not specified and named keys are being used.
Mandatory if <code>amount</code> is not specified and named keys are being used.
If set to a number that is less than <code>amount_min</code>, the game will use <code>amount_min</code> internally.


=== catalyst_amount ===
=== catalyst_amount ===

Revision as of 12:19, 19 May 2019

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

probability

Type: Types/double

Default: 1

amount_min

Type: Types/uint16

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

If set to 0, the game will use 1 internally.

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

See also