Types/FluidIngredientPrototype: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(link typos)
(Added note about automatic catalyst_amount calculation)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A fluid ingredient definition for a [[Prototype/Recipe]]. Its loading is triggered by the <code>type</code> of a [[Prototype/IngredientPrototype]] being "fluid".
A fluid ingredient definition, for example for a [[Prototype/Recipe]]. Its loading is triggered by the <code>type</code> of a [[Types/IngredientPrototype]] being "fluid".


== Mandatory properties ==
== Mandatory properties ==
Line 27: Line 27:


If [[#temperature]] is not set, this sets the expected ''maximum'' temperature of the fluid ingredient.
If [[#temperature]] is not set, this sets the expected ''maximum'' temperature of the fluid ingredient.
=== catalyst_amount ===
'''Type''': [[Types/double]]
'''Default''': 0
Amount of this ingredient that should not be included in the fluid consumption statistics. Usually used together with an equal catalyst amount on the "product" of the catalyst in the recipe.
If this FluidIngredientPrototype 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 ingredient should use on the [[Prototype/CraftingMachine|machine]]. It will only use this one fluidbox.
== Example ==
<syntaxhighlight lang="lua">
{type="fluid", name="water", amount=50}</syntaxhighlight>


== See also ==
== See also ==
* [[Types/IngredientPrototype]]
* [[Types/IngredientPrototype]]
* [[Types/ItemIngredientPrototype]]
* [[Types/ItemIngredientPrototype]]

Latest revision as of 15:22, 9 June 2022

A fluid ingredient definition, for example for a Prototype/Recipe. Its loading is triggered by the type of a Types/IngredientPrototype being "fluid".

Mandatory properties

name

Type: Types/string

The name of a Prototype/Fluid.

amount

Type: Types/double

Optional properties

temperature

Type: Types/double

Sets the expected temperature of the fluid ingredient.

minimum_temperature

Type: Types/double

If #temperature is not set, this sets the expected minimum temperature of the fluid ingredient.

maximum_temperature

Type: Types/double

If #temperature is not set, this sets the expected maximum temperature of the fluid ingredient.

catalyst_amount

Type: Types/double

Default: 0

Amount of this ingredient that should not be included in the fluid consumption statistics. Usually used together with an equal catalyst amount on the "product" of the catalyst in the recipe.

If this FluidIngredientPrototype 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 ingredient should use on the machine. It will only use this one fluidbox.

Example

{type="fluid", name="water", amount=50}

See also