Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## FluidPrototype 'fluid' changed Example code

A fluid.

Inherits from Prototype « PrototypeBase

## Properties

- default
- sorted

icons optional | :: array[IconData] | Can't be an empty array.
Can't be an empty array.
icon optional | :: FileName | Path to the icon file. [...]
Path to the icon file. [...]
icon_size optional | :: SpriteSizeType | The size of the square icon, in pixels. [...]
The size of the square icon, in pixels. [...]
default_temperature changed | :: float | Also the minimum temperature of the fluid. [...]
Also the minimum temperature of the fluid. [...]
base_color | :: Color | Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluid wagon tooltip; and for the pipe windows and storage tank fill gauges.
Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluid wagon tooltip; and for the pipe windows and storage tank fill gauges.
flow_color | :: Color | Used only for pipe windows or storage tank fill gauges.
Used only for pipe windows or storage tank fill gauges.
visualization_color new optional | :: Color | Color to use for visualization. [...]
Color to use for visualization. [...]
max_temperature changed optional | :: float |
heat_capacity optional | :: Energy | Joule needed to heat 1 Unit by 1 °C.
Joule needed to heat 1 Unit by 1 °C.
fuel_value optional | :: Energy |
emissions_multiplier optional | :: double | Scales pollution generated when the fluid is consumed.
Scales pollution generated when the fluid is consumed.
gas_temperature changed optional | :: float | Above this temperature the `gas_flow` animation is used to display the fluid inside storage tanks and pipes.
Above this temperature the `gas_flow` animation is used to display the fluid inside storage tanks and pipes.
auto_barrel optional | :: bool | Whether the fluid should be included in the barrel recipes automatically generated by the base mod. [...]
Whether the fluid should be included in the barrel recipes automatically generated by the base mod. [...]

Inherited from Prototype

factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...]
The ID type corresponding to the prototype that inherits from this. [...]

Inherited from PrototypeBase

type | :: string | Specifies the kind of prototype this is. [...]
Specifies the kind of prototype this is. [...]
name | :: string | Unique textual identification of the prototype. [...]
Unique textual identification of the prototype. [...]
order optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...]
Used to order prototypes in inventory, recipes and GUIs. [...]
localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...]
Overwrites the name set in the locale file. [...]
localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...]
Overwrites the description set in the locale file. [...]
factoriopedia_description new optional | :: LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
subgroup new optional | :: ItemSubGroupID | The name of an ItemSubGroup.
The name of an ItemSubGroup.
hidden new optional | :: bool |
hidden_in_factoriopedia new optional | :: bool |
parameter new optional | :: bool | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
factoriopedia_simulation new optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI.
The simulation shown when looking at this prototype in the Factoriopedia GUI.

base_color | :: Color | Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluid wagon tooltip; and for the pipe windows and storage tank fill gauges.
Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluid wagon tooltip; and for the pipe windows and storage tank fill gauges.
default_temperature changed | :: float | Also the minimum temperature of the fluid. [...]
Also the minimum temperature of the fluid. [...]
flow_color | :: Color | Used only for pipe windows or storage tank fill gauges.
Used only for pipe windows or storage tank fill gauges.
auto_barrel optional | :: bool | Whether the fluid should be included in the barrel recipes automatically generated by the base mod. [...]
Whether the fluid should be included in the barrel recipes automatically generated by the base mod. [...]
emissions_multiplier optional | :: double | Scales pollution generated when the fluid is consumed.
Scales pollution generated when the fluid is consumed.
fuel_value optional | :: Energy |
gas_temperature changed optional | :: float | Above this temperature the `gas_flow` animation is used to display the fluid inside storage tanks and pipes.
Above this temperature the `gas_flow` animation is used to display the fluid inside storage tanks and pipes.
heat_capacity optional | :: Energy | Joule needed to heat 1 Unit by 1 °C.
Joule needed to heat 1 Unit by 1 °C.
icon optional | :: FileName | Path to the icon file. [...]
Path to the icon file. [...]
icon_size optional | :: SpriteSizeType | The size of the square icon, in pixels. [...]
The size of the square icon, in pixels. [...]
icons optional | :: array[IconData] | Can't be an empty array.
Can't be an empty array.
max_temperature changed optional | :: float |
visualization_color new optional | :: Color | Color to use for visualization. [...]
Color to use for visualization. [...]

Inherited from Prototype

factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...]
The ID type corresponding to the prototype that inherits from this. [...]

Inherited from PrototypeBase

name | :: string | Unique textual identification of the prototype. [...]
Unique textual identification of the prototype. [...]
type | :: string | Specifies the kind of prototype this is. [...]
Specifies the kind of prototype this is. [...]
factoriopedia_description new optional | :: LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
factoriopedia_simulation new optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI.
The simulation shown when looking at this prototype in the Factoriopedia GUI.
hidden new optional | :: bool |
hidden_in_factoriopedia new optional | :: bool |
localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...]
Overwrites the description set in the locale file. [...]
localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...]
Overwrites the name set in the locale file. [...]
order optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...]
Used to order prototypes in inventory, recipes and GUIs. [...]
parameter new optional | :: bool | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
subgroup new optional | :: ItemSubGroupID | The name of an ItemSubGroup.
The name of an ItemSubGroup.

## Properties

### icons :: array[IconData] optional

Can't be an empty array.

### icon :: FileName optional

Path to the icon file.

Mandatory if `icons` is not defined.

### icon_size :: SpriteSizeType optional

Default: `64`

The size of the square icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.

Only loaded if `icons` is not defined.

### default_temperature :: float changed

Also the minimum temperature of the fluid. Has to be lower than `max_temperature`.

### base_color :: Color

Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluid wagon tooltip; and for the pipe windows and storage tank fill gauges.

### flow_color :: Color

Used only for pipe windows or storage tank fill gauges.

### visualization_color :: Color optional new

Color to use for visualization. This color should be vibrant and easily distinguished.

If not specified, this will be auto-generated from `base_color` by converting to HSV, decreasing saturation by 10% and setting value to 80%.

### max_temperature :: float optional changed

Default: value of `default_temperature`

### heat_capacity :: Energy optional

Default: `"1kJ"`

Joule needed to heat 1 Unit by 1 °C.

#### Example

    heat_capacity = "0.2kJ"

### fuel_value :: Energy optional

Default: `"0J"`

#### Example

    fuel_value = "3MJ"

### emissions_multiplier :: double optional

Default: `1.0`

Scales pollution generated when the fluid is consumed.

### gas_temperature :: float optional changed

Default: max value of float

Above this temperature the `gas_flow` animation is used to display the fluid inside storage tanks and pipes.

### auto_barrel :: bool optional

Default: `true`

Whether the fluid should be included in the barrel recipes automatically generated by the base mod.

This property is not read by the game engine itself, but the base mod's data-updates.lua file. This means it is discarded by the game engine after loading finishes.

## Example

    {
      type = "fluid",
      name = "water",
      default_temperature = 15,
      max_temperature = 100,
      heat_capacity = "0.2kJ",
      base_color = { r = 0, g = 0.34, b = 0.6 },
      flow_color = { r = 0.7, g = 0.7, b = 0.7 },
      icon = "__base__/graphics/icons/fluid/water.png",
      icon_size = 64,
      order = "a[fluid]-a[water]"
    }