Types/EnergySource: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Added information about type "fluid".)
(Removed old prototype docs)
Tag: Replaced
 
(35 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== Basics ==
<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/EnergySource.html https://lua-api.factorio.com/latest/types/EnergySource.html]
Specifies the way the entity gets its energy.
=== type ===
'''Type''': [[Types/string]]


Only valid values are "electric", "burner", "heat", "fluid" or "void", it specifies the type of the energy source to be used.
</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>
 
=== emissions ===
'''Type''': [[Types/double]]
 
'''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.)
 
=== render_no_power_icon ===
'''Type''': [[Types/bool]]
 
'''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.
 
=== render_no_network_icon ===
'''Type''': [[Types/bool]]
 
'''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.
 
== Electric energy source ==
=== buffer_capacity ===
'''Type''': [[Types/Energy]]
 
How much power the entity holds.
=== usage_priority ===
'''Type''': [[Types/ElectricUsagePriority]]
=== input_flow_limit ===
'''Type''': [[Types/Energy]]
 
'''Default''': 0
 
How fast the energy can flow into the entity. 0 means no limit.
=== output_flow_limit ===
'''Type''': [[Types/Energy]]
 
'''Default''': 0
 
How fast the energy can flow out of the entity. 0 means no limit.
 
=== drain ===
'''Type''': [[Types/Energy]]
 
== Burner ==
=== fuel_inventory_size ===
'''Type''': [[Types/ItemStackIndex]]
 
=== burnt_inventory_size ===
'''Type''': [[Types/ItemStackIndex]]
 
'''Default''': 0
 
=== smoke ===
'''Type''': [[Types/table]] of [[Types/SmokeSource]]
 
Array of 1 or more smoke sources.
 
=== light_flicker ===
'''Type''': [[Types/LightFlickeringDefinition]]
 
=== effectivity ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
1 means 100% effectivity. Can't be 0.
 
=== fuel_category ===
'''Type''': [[Types/string]]
 
'''Default''': "chemical"
 
The energy source can be used with fuel from this [[Prototype/FuelCategory|fuel category]].
 
=== fuel_categories ===
'''Type''': [[Types/table]] of [[Types/string]]
 
Same as above, only one of them can exist.
 
== Heat energy source ==
=== max_temperature ===
'''Type''': [[Types/double]]
 
=== specific_heat ===
'''Type''': [[Types/Energy]]
 
=== max_transfer ===
'''Type''': [[Types/Energy]]
 
=== min_temperature_gradient ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
=== connections ===
'''Type''': [[Types/table]] of [[Types/HeatConnection]]
 
=== pipe_covers ===
'''Type''': [[Types/Sprite4Way]]
 
== Void energy source ==
Void is free energy, there are no additional entries required.
 
== Fluid energy source ==
=== fluid_box ===
'''Type''': [[Types/FluidBox]]
 
The fluid type energy source MUST have a fluid box defined.
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]]
 
Array of 1 or more smoke sources.
 
=== light_flicker ===
'''Type''': [[Types/LightFlickeringDefinition]]
 
=== effectivity ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
1 means 100% effectivity. Can't be 0.
 
=== burns_fluid ===
'''Type''': [[Types/bool]]
 
'''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]].
 
=== scale_fluid_usage ===
'''Type''': [[Types/bool]]
 
'''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.
 
=== fluid_usage_per_tick ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
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
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.

Latest revision as of 14:32, 25 October 2024

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/EnergySource.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.