Page 1 of 1

Energy usage ratios for modded entities?

Posted: Mon Apr 15, 2019 3:48 pm
by Deadlock989
I'm having difficulty figuring this out, brain's gone to sleep.

energy_usage is how much energy the machine consumes "while crafting". Most of the prototypes give it in watts while the fuel values are in joules. But what are its units? Per second? Does a machine with crafting speed 2 use half the energy of crafting speed 1 to make something, then?

What about mining drills - they have "mining speed" instead of "crafting speed" - is the energy usage per time unit (what time unit?) or per 1.0 mining speed?

What I'm aiming for is a formula that tells me how much energy E a machine should be set to consume, given crafting speed / mining speed S, the energy of 1 coal C, and a ratio of 1 second recipes crafted to 1 coal R.

E = C * R / S?

Re: Energy usage ratios for modded entities?

Posted: Mon Apr 15, 2019 4:22 pm
by Bilka
Crafting speed and mining speed (as long as you aren't talking about modules) are irrelevant. Watt is Joule per second, per definition. So, if something consumes 1W, that means that it consumes 1J every second. You can see this calculation in action in the game: Both stone and steel furnace consume 90kW as per their tooltip and their energy source. A piece of coal is 4MJ = 4000kJ. So, 4000kJ / 90kW = 44.4s -> how long one piece of coal lasts in a furnace. This works for any of the two furnaces, showing that crafting speed does not matter.

We have an outdated (numbers from 0.16) tutorial on the wiki about exactly this math: https://wiki.factorio.com/Tutorial:Applied_power_math

Re: Energy usage ratios for modded entities?

Posted: Mon Apr 15, 2019 4:52 pm
by Deadlock989
Thanks again, Bilka.

So if - just purely as a made-up example - I have a machine (speed 1) which turns over a recipe every 3.2 seconds, and I wanted it to consume 1 coal for every 8 operations, with coal at the default 4MJ. The calculation for desired kWs is 4000 / (3.2*8) = 156.25 kW?

And if the machine were speed 2, I should double the energy used, unless I want the machine to be twice as efficient?

Re: Energy usage ratios for modded entities?

Posted: Mon Apr 15, 2019 6:33 pm
by Bilka
Yes, sounds correct.

Re: Energy usage ratios for modded entities?

Posted: Mon Apr 15, 2019 6:44 pm
by Deadlock989
Cheers mate.