Factorio Prototype DocsVersion 2.0.26

FluidPrototype 'fluid' changedExample code

A fluid.

Inherits from Prototype « PrototypeBase

Properties

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_temperaturechanged :: 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_colornew optional :: Color

Color to use for visualization. [...]

Color to use for visualization. [...]

max_temperaturechanged 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_temperaturechanged 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_descriptionnew optional :: LocalisedString

Provides additional description used in factoriopedia.

Provides additional description used in factoriopedia.

subgroupnew optional :: ItemSubGroupID

The name of an ItemSubGroup.

The name of an ItemSubGroup.

hiddennew optional :: bool
hidden_in_factoriopedianew optional :: bool
parameternew 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_simulationnew 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.

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 :: floatchanged

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]"
}

Prototypes

Types

Defines