Types/EnergySource: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Added information about type "fluid".)
(0.17.12)
Line 4: Line 4:
'''Type''': [[Types/string]]
'''Type''': [[Types/string]]


Only valid values are "electric", "burner", "heat", "fluid" or "void", it specifies the type of the energy source to be used.
Mandatory. Only valid values are "electric", "burner", "heat", "fluid" or "void", it specifies the type of the energy source to be used.
 
=== emissions_per_second_per_watt ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
Optional. Preferred over using <code>emissions</code>. The pollution an entity emits per second is ''emissions_per_second_per_watt '' times the energy consumption in W. (This gives you the number that is shown in the entiy tooltip.)


=== emissions ===
=== emissions ===
Line 11: Line 18:
'''Default''': 0
'''Default''': 0


The pollution an entity emits is ''emissions'' times the energy consumption in kW. (This gives you the number that is shown in the entiy tooltip.)
Optional. Does the same thing as <code>emissions_per_second_per_watt</code> but will be removed at some point.


=== render_no_power_icon ===
=== render_no_power_icon ===
Line 18: Line 25:
'''Default''': true
'''Default''': true


Whether to render the [[File:Electricity-icon-red.png|50px]] icon on the entity if it is low on power. Also applies to [[File:Fuel-icon-red.png|50px]] when using a burner energy source.
Optional. Whether to render the [[File:Electricity-icon-red.png|50px]] icon on the entity if it is low on power. Also applies to [[File:Fuel-icon-red.png|50px]] when using a burner energy source.


=== render_no_network_icon ===
=== render_no_network_icon ===
Line 25: Line 32:
'''Default''': true
'''Default''': true


Whether to render the [[File:Electricity-icon-unplugged.png|50px]] icon on the entity if it is not connected to a electric network.
Optional. Whether to render the [[File:Electricity-icon-unplugged.png|50px]] icon on the entity if it is not connected to a electric network.


== Electric energy source ==
== Electric energy source ==
Line 31: Line 38:
'''Type''': [[Types/Energy]]
'''Type''': [[Types/Energy]]


How much power the entity holds.
Optional. How much power the entity holds.
=== usage_priority ===
=== usage_priority ===
'''Type''': [[Types/ElectricUsagePriority]]
'''Type''': [[Types/ElectricUsagePriority]]
Mandatory.
=== input_flow_limit ===
=== input_flow_limit ===
'''Type''': [[Types/Energy]]
'''Type''': [[Types/Energy]]
Line 39: Line 48:
'''Default''': 0
'''Default''': 0


How fast the energy can flow into the entity. 0 means no limit.
Optional. How fast the energy can flow into the entity. 0 means no limit.
=== output_flow_limit ===
=== output_flow_limit ===
'''Type''': [[Types/Energy]]
'''Type''': [[Types/Energy]]
Line 45: Line 54:
'''Default''': 0
'''Default''': 0


How fast the energy can flow out of the entity. 0 means no limit.
Optional. How fast the energy can flow out of the entity. 0 means no limit.


=== drain ===
=== drain ===
'''Type''': [[Types/Energy]]
'''Type''': [[Types/Energy]]
Optional.


== Burner ==
== Burner ==
=== fuel_inventory_size ===
=== fuel_inventory_size ===
'''Type''': [[Types/ItemStackIndex]]
'''Type''': [[Types/ItemStackIndex]]
Mandatory.


=== burnt_inventory_size ===
=== burnt_inventory_size ===
Line 58: Line 71:


'''Default''': 0
'''Default''': 0
Optional.


=== smoke ===
=== smoke ===
'''Type''': [[Types/table]] of [[Types/SmokeSource]]
'''Type''': [[Types/table]] of [[Types/SmokeSource]]


Array of 1 or more smoke sources.
Optional. Array of 1 or more smoke sources.


=== light_flicker ===
=== light_flicker ===
'''Type''': [[Types/LightFlickeringDefinition]]
'''Type''': [[Types/LightFlickeringDefinition]]
Optional.


=== effectivity ===
=== effectivity ===
Line 72: Line 89:
'''Default''': 1
'''Default''': 1


1 means 100% effectivity. Can't be 0.
Optional. 1 means 100% effectivity. Must be greater than 0


=== fuel_category ===
=== fuel_category ===
Line 79: Line 96:
'''Default''': "chemical"
'''Default''': "chemical"


The energy source can be used with fuel from this [[Prototype/FuelCategory|fuel category]].
Optional. The energy source can be used with fuel from this [[Prototype/FuelCategory|fuel category]].


=== fuel_categories ===
=== fuel_categories ===
'''Type''': [[Types/table]] of [[Types/string]]
'''Type''': [[Types/table]] of [[Types/string]]


Same as above, only one of them can exist.
Optional. Same as above, only one of them can exist.


== Heat energy source ==
== Heat energy source ==
=== max_temperature ===
=== max_temperature ===
'''Type''': [[Types/double]]
'''Type''': [[Types/double]]
Mandatory. max_temperature must be >= default_temperature.
=== default_temperature ===
'''Type''': [[Types/double]]
'''Default''': 15
Optional.


=== specific_heat ===
=== specific_heat ===
'''Type''': [[Types/Energy]]
'''Type''': [[Types/Energy]]
Mandatory.


=== max_transfer ===
=== max_transfer ===
'''Type''': [[Types/Energy]]
'''Type''': [[Types/Energy]]
Mandatory.


=== min_temperature_gradient ===
=== min_temperature_gradient ===
Line 100: Line 130:


'''Default''': 1
'''Default''': 1
Optional.
=== min_working_temperature ===
'''Type''': [[Types/double]]
'''Default''': 15
Optional. min_working_temperature must be >= default_temperature. min_working_temperature must be <= max_temperature.


=== connections ===
=== connections ===
'''Type''': [[Types/table]] of [[Types/HeatConnection]]
'''Type''': [[Types/table]] of [[Types/HeatConnection]]
Optional. The table may only contain up to 32 connections.


=== pipe_covers ===
=== pipe_covers ===
'''Type''': [[Types/Sprite4Way]]
'''Type''': [[Types/Sprite4Way]]
Optional.


== Void energy source ==
== Void energy source ==
Line 114: Line 157:
'''Type''': [[Types/FluidBox]]
'''Type''': [[Types/FluidBox]]


The fluid type energy source MUST have a fluid box defined.
Mandatory.
All standard fluid box configurations are acceptable, but the type must be "input" or "input-output" to function correctly.
All standard fluid box configurations are acceptable, but the type must be "input" or "input-output" to function correctly.
In the default configuration, all fluid that enters the fluid box will be consumed instantly. it is recommended you set scale_fluid_usage, fluid_usage_per_tick or both to prevent this behaviour.
In the default configuration, all fluid that enters the fluid box will be consumed instantly. it is recommended you set scale_fluid_usage, fluid_usage_per_tick or both to prevent this behaviour.
Line 121: Line 164:
'''Type''': [[Types/table]] of [[Types/SmokeSource]]
'''Type''': [[Types/table]] of [[Types/SmokeSource]]


Array of 1 or more smoke sources.
Optional. Array of 1 or more smoke sources.


=== light_flicker ===
=== light_flicker ===
'''Type''': [[Types/LightFlickeringDefinition]]
'''Type''': [[Types/LightFlickeringDefinition]]
Optional.


=== effectivity ===
=== effectivity ===
Line 131: Line 176:
'''Default''': 1
'''Default''': 1


1 means 100% effectivity. Can't be 0.
Optional. 1 means 100% effectivity. Can't be 0.


=== burns_fluid ===
=== burns_fluid ===
Line 138: Line 183:
'''Default''': false
'''Default''': false


If set to true, the energy source will calculate power based on the fluid's fuel_value entry, else it will calculate based on fluid temperature, like [[Prototype/Generator]].
Optional. If set to true, the energy source will calculate power based on the fluid's fuel_value entry, else it will calculate based on fluid temperature, like [[Prototype/Generator]].


=== scale_fluid_usage ===
=== scale_fluid_usage ===
Line 145: Line 190:
'''Default''': false
'''Default''': false


If set to true, the energy source will consume as much fluid as required to produce the desired power, if set to false it will consume as much as it is allowed to, wasting any excess.
Optional. If set to true, the energy source will consume as much fluid as required to produce the desired power, if set to false it will consume as much as it is allowed to, wasting any excess.


=== fluid_usage_per_tick ===
=== fluid_usage_per_tick ===
'''Type''': [[Types/bool]]
'''Type''': [[Types/double]]


'''Default''': false
'''Default''': 0


The number of fluid units the energy source uses per tick.
Optional. The number of fluid units the energy source uses per tick.
if used with scale_fluid_usage, this specifies the maximum.
if used with scale_fluid_usage, this specifies the maximum.


Line 159: Line 204:


'''Default''': unlimited
'''Default''': unlimited
Based on steam engine mechanics, this specifies the maximum temperature of the fluid of which energy can be extracted. If a fluid of a higher temperature enters and scale_fluid_usage is true then less fluid is consumed. if the scale_fluid_usage is false the excess energy is wasted.
 
Mandatory if this does not burn fluid, otherwise not read. Based on steam engine mechanics, this specifies the maximum temperature of the fluid of which energy can be extracted. If a fluid of a higher temperature enters and scale_fluid_usage is true then less fluid is consumed. if the scale_fluid_usage is false the excess energy is wasted.

Revision as of 20:37, 14 March 2019

Basics

Specifies the way the entity gets its energy.

type

Type: Types/string

Mandatory. Only valid values are "electric", "burner", "heat", "fluid" or "void", it specifies the type of the energy source to be used.

emissions_per_second_per_watt

Type: Types/double

Default: 0

Optional. Preferred over using emissions. The pollution an entity emits per second is emissions_per_second_per_watt times the energy consumption in W. (This gives you the number that is shown in the entiy tooltip.)

emissions

Type: Types/double

Default: 0

Optional. Does the same thing as emissions_per_second_per_watt but will be removed at some point.

render_no_power_icon

Type: Types/bool

Default: true

Optional. Whether to render the Electricity-icon-red.png icon on the entity if it is low on power. Also applies to Fuel-icon-red.png when using a burner energy source.

render_no_network_icon

Type: Types/bool

Default: true

Optional. Whether to render the Electricity-icon-unplugged.png icon on the entity if it is not connected to a electric network.

Electric energy source

buffer_capacity

Type: Types/Energy

Optional. How much power the entity holds.

usage_priority

Type: Types/ElectricUsagePriority

Mandatory.

input_flow_limit

Type: Types/Energy

Default: 0

Optional. How fast the energy can flow into the entity. 0 means no limit.

output_flow_limit

Type: Types/Energy

Default: 0

Optional. How fast the energy can flow out of the entity. 0 means no limit.

drain

Type: Types/Energy

Optional.

Burner

fuel_inventory_size

Type: Types/ItemStackIndex

Mandatory.

burnt_inventory_size

Type: Types/ItemStackIndex

Default: 0

Optional.

smoke

Type: Types/table of Types/SmokeSource

Optional. Array of 1 or more smoke sources.

light_flicker

Type: Types/LightFlickeringDefinition

Optional.

effectivity

Type: Types/double

Default: 1

Optional. 1 means 100% effectivity. Must be greater than 0

fuel_category

Type: Types/string

Default: "chemical"

Optional. The energy source can be used with fuel from this fuel category.

fuel_categories

Type: Types/table of Types/string

Optional. Same as above, only one of them can exist.

Heat energy source

max_temperature

Type: Types/double

Mandatory. max_temperature must be >= default_temperature.

default_temperature

Type: Types/double

Default: 15

Optional.

specific_heat

Type: Types/Energy

Mandatory.

max_transfer

Type: Types/Energy

Mandatory.

min_temperature_gradient

Type: Types/double

Default: 1

Optional.

min_working_temperature

Type: Types/double

Default: 15

Optional. min_working_temperature must be >= default_temperature. min_working_temperature must be <= max_temperature.

connections

Type: Types/table of Types/HeatConnection

Optional. The table may only contain up to 32 connections.

pipe_covers

Type: Types/Sprite4Way

Optional.

Void energy source

Void is free energy, there are no additional entries required.

Fluid energy source

fluid_box

Type: Types/FluidBox

Mandatory. All standard fluid box configurations are acceptable, but the type must be "input" or "input-output" to function correctly. In the default configuration, all fluid that enters the fluid box will be consumed instantly. it is recommended you set scale_fluid_usage, fluid_usage_per_tick or both to prevent this behaviour.

smoke

Type: Types/table of Types/SmokeSource

Optional. Array of 1 or more smoke sources.

light_flicker

Type: Types/LightFlickeringDefinition

Optional.

effectivity

Type: Types/double

Default: 1

Optional. 1 means 100% effectivity. Can't be 0.

burns_fluid

Type: Types/bool

Default: false

Optional. If set to true, the energy source will calculate power based on the fluid's fuel_value entry, else it will calculate based on fluid temperature, like Prototype/Generator.

scale_fluid_usage

Type: Types/bool

Default: false

Optional. If set to true, the energy source will consume as much fluid as required to produce the desired power, if set to false it will consume as much as it is allowed to, wasting any excess.

fluid_usage_per_tick

Type: Types/double

Default: 0

Optional. The number of fluid units the energy source uses per tick. if used with scale_fluid_usage, this specifies the maximum.

maximum_temperature

Type: Types/double

Default: unlimited

Mandatory if this does not burn fluid, otherwise not read. Based on steam engine mechanics, this specifies the maximum temperature of the fluid of which energy can be extracted. If a fluid of a higher temperature enters and scale_fluid_usage is true then less fluid is consumed. if the scale_fluid_usage is false the excess energy is wasted.