In Prototype stage we can chooce between Watt and Joules, but in Runtime there is no info anywhere which energy type is used.
For example:
https://lua-api.factorio.com/latest/cla ... rning_fuel What type of energy is left? Is it watts or joules?
https://lua-api.factorio.com/latest/cla ... ergy_usage What type of energy does it use? Is it watts or joules?
This would be very helpful in knowning how to supply fuel to entities.
As am I currently struggling to figure out how to use the values correctly, to not overtick locomotives.
https://github.com/LuziferSenpai/factor ... s.lua#L270
As my fuel is 10MJ in prototype.
My current highest locomotives uses 5MW max_power in prototype.
And with how the documentation currently is, it would result in maybe alot of magic number?
Greetz,
Luzifer
Explain which energy type is used in runtime
- LuziferSenpai
- Filter Inserter

- Posts: 406
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: Explain which energy type is used in runtime
It's all joules. You can find the conversion formula used by the game to get from the prototype stage value to the runtime value on the prototype doc page for energy: https://lua-api.factorio.com/latest/types/Energy.html
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- LuziferSenpai
- Filter Inserter

- Posts: 406
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: Explain which energy type is used in runtime
Could the docs then be extended, for when Energy usage/production is written somewhere, it links to https://lua-api.factorio.com/latest/types/Energy.html ?
