Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# ItemProduct - Runtime Docs

## ItemProduct :: table

#### Table fields

type | :: `"item"` |
name | :: string | Prototype name of the result.
Prototype name of the result.
amount | :: uint16? | Amount of the item to give. If not returned, `amount_min` and `amount_max` will be present instead.
Amount of the item to give. If not returned, `amount_min` and `amount_max` will be present instead.
amount_min | :: uint16? | Minimal amount of the item to give. Not returned if `amount` is returned.
Minimal amount of the item to give. Not returned if `amount` is returned.
amount_max | :: uint16? | Maximum amount of the item to give. Not returned if `amount` is returned.
Maximum amount of the item to give. Not returned if `amount` is returned.
probability | :: double | A value in range `[0, 1]`. Item is only given with this probability; otherwise no product is produced.
A value in range `[0, 1]`. Item is only given with this probability; otherwise no product is produced.
ignored_by_stats | :: uint16? | How much of this product is ignored by statistics.
How much of this product is ignored by statistics.
ignored_by_productivity | :: uint16? | How much of this product is ignored by productivity.
How much of this product is ignored by productivity.
extra_count_fraction | :: float? | Probability that a craft will yield one additional product. Also applies to bonus crafts caused by productivity.
Probability that a craft will yield one additional product. Also applies to bonus crafts caused by productivity.
percent_spoiled | :: float? |

#### Examples

    -- Products of the "steel-chest" recipe (an array of Product)
    {{type="item", name="steel-chest", amount=1}}

    -- What a custom recipe would look like that had a probability of 0.5 to return a
    -- minimum amount of 1 and a maximum amount of 5
    {{type="item", name="custom-item", probability=0.5, amount_min=1, amount_max=5}}

Concept used in

- LuaItemPrototype::initial_items
- Product