Types/FluidProductPrototype: Difference between revisions
(Created page with "A fluid product definition for a Prototype/Recipe. Its loading is triggered by the <code>type</code> of a Types/ProductPrototype being "fluid". == Mandatory propertie...") |
(Updated styling of prototype doc migration note) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
A fluid product definition for a [[Prototype/Recipe]]. Its loading is triggered by the <code>type</code> of a [[Types/ProductPrototype]] being "fluid". | <div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/FluidProductPrototype.html https://lua-api.factorio.com/latest/types/FluidProductPrototype.html] | ||
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div> | |||
A fluid product definition, for example for a [[Prototype/Recipe]]. Its loading is triggered by the <code>type</code> of a [[Types/ProductPrototype]] being "fluid". | |||
== Mandatory properties == | == Mandatory properties == | ||
Line 14: | Line 20: | ||
'''Default''': 1 | '''Default''': 1 | ||
Value between 0 and 1, 0 for 0% chance and 1 for 100% chance. | |||
=== amount === | === amount === | ||
'''Type''': [[Types/double]] | '''Type''': [[Types/double]] | ||
Cannot be < 0. If this is present, <code>amount_min</code> and <code>amount_max</code> are not loaded. | |||
=== amount_min === | === amount_min === | ||
Line 22: | Line 32: | ||
Mandatory if <code>amount</code> is not specified. | Mandatory if <code>amount</code> is not specified. | ||
May not be < 0. | |||
=== amount_max === | === amount_max === | ||
Line 27: | Line 39: | ||
Mandatory if <code>amount</code> is not specified. | Mandatory if <code>amount</code> is not specified. | ||
If set to a number that is less than <code>amount_min</code>, the game will use <code>amount_min</code> internally. | |||
=== temperature === | === temperature === | ||
Line 32: | Line 46: | ||
Sets the temperature of the fluid product. | Sets the temperature of the fluid product. | ||
=== catalyst_amount === | |||
'''Type''': [[Types/double]] | |||
'''Default''': 0 | |||
Amount that should not be affected by productivity modules (not yielded from bonus production) and should not be included in the fluid production statistics. | |||
If this FluidProductPrototype is used in a recipe, the catalyst amount is calculated automatically based on the [[Prototype/Recipe#ingredients|ingredients]] and [[Prototype/Recipe#results|results]].[https://factorio.com/blog/post/fff-256] | |||
=== fluidbox_index === | |||
'''Type''': [[Types/uint32]] | |||
'''Default''': 0 (no specific fluidbox) | |||
Used to specify which [[Prototype/CraftingMachine#fluid_boxes|fluidbox]] this product should use on the [[Prototype/CraftingMachine|machine]]. It will only use this one fluidbox. | |||
== See also == | == See also == | ||
* [[Types/ProductPrototype]] | * [[Types/ProductPrototype]] | ||
* [[Types/ItemProductPrototype]] | * [[Types/ItemProductPrototype]] |
Latest revision as of 10:42, 21 September 2023
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/FluidProductPrototype.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
A fluid product definition, for example for a Prototype/Recipe. Its loading is triggered by the type
of a Types/ProductPrototype being "fluid".
Mandatory properties
name
Type: Types/string
The name of a Prototype/Fluid.
Optional properties
probability
Type: Types/double
Default: 1
Value between 0 and 1, 0 for 0% chance and 1 for 100% chance.
amount
Type: Types/double
Cannot be < 0. If this is present, amount_min
and amount_max
are not loaded.
amount_min
Type: Types/MaterialAmountType
Mandatory if amount
is not specified.
May not be < 0.
amount_max
Type: Types/MaterialAmountType
Mandatory if amount
is not specified.
If set to a number that is less than amount_min
, the game will use amount_min
internally.
temperature
Type: Types/double
Sets the temperature of the fluid product.
catalyst_amount
Type: Types/double
Default: 0
Amount that should not be affected by productivity modules (not yielded from bonus production) and should not be included in the fluid production statistics.
If this FluidProductPrototype is used in a recipe, the catalyst amount is calculated automatically based on the ingredients and results.[1]
fluidbox_index
Type: Types/uint32
Default: 0 (no specific fluidbox)
Used to specify which fluidbox this product should use on the machine. It will only use this one fluidbox.