Factorio

Factorio

View Stats:
jpinard Apr 2, 2021 @ 11:06am
How do you know how many basic oil refineries to build?
Sorry for yet another question. I love this game and am still trying to wrap my head around a few things.

I'm trying to produce enough petroleum gas to feed 14 plastic chemical plants. I thought I'd only need 4, but now I'm up to 8 and a few still aren't getting enough petroleum gas to operate. I'm a little confused what's going on here.
Last edited by jpinard; Apr 2, 2021 @ 11:17am
< >
Showing 1-15 of 24 comments
knighttemplar1960 Apr 2, 2021 @ 11:58am 
With basic oil processing 100 crude oil is turned into 45 petroleum gas per cycle. A cycle is 5 seconds so that's 9 petroleum per second. A chemical plant making plastic uses 1 coal and 20 petroleum gas per second to make 2 plastic bars.

To support 14 chemical plants making plastic you would need 32 basic oil refineries and that's just for plastic. You'll need more because you will also need to produce sulfur.

Edit: to save your self a bit of heartache.... make sure that you chain no more than 12 refineries from a single pump and crude storage tank (I only use 10) or you will run into issues with liquid flow rates. 12 refineries in a chain will have your flow rate down to 1,200 crude per second which means that any additional refineries on that pump chain will cause starvation.
Last edited by knighttemplar1960; Apr 2, 2021 @ 12:02pm
Fel Apr 2, 2021 @ 12:39pm 
100 crude oil per refinery every 5 seconds means 20
To reach the throughput of 1200 per second you would need no less than
1200 / 20 = 60 refineries
jskis Apr 2, 2021 @ 5:59pm 
Honestly, I found it a bit overwhelming to try and figure out the proper ratios on my first play through. The factorio cheat sheet that was linked above my comment is super useful, but there is no shame in brute-forcing things here and there. :D
Fel Apr 2, 2021 @ 6:04pm 
Yeah, the basic approach of looking at the flow of items and liquids and just adding more to those that seem to be lacking is more than enough to get through the game without having to mind the ratios and formulas.
Well, if you grow big enough you also need to be able to detect when the bottleneck is the throughput (no matter if it's pipes or belts) but it's generally fairly easy to notice since the production gets backed up and the consumers don't get enough to work all the time, both at once.
RiO Apr 3, 2021 @ 5:06am 
Originally posted by Fel:
100 crude oil per refinery every 5 seconds means 20
To reach the throughput of 1200 per second you would need no less than
1200 / 20 = 60 refineries

Iirc you cannot cleanly amortize over the duration of the whole cycle as the refineries are resuppplied in full burst, different from inserters picking up items off of a belt having small delays in between and allowing 'some' resources to flow through further down the chain.

If the first 12 refineries on a pipe sync up, they will starve all refineries after. Either that or a tiny bit of liquid has to flow through to the other refineries and starve the first 12. Either way, one batch starts a tiny, tiny bit later - potentially late enough to throw off any carefully made calculations on throughput that don't have enough over-production buffer calculated in for downstream operations.

Better to split pipes into branches accommodating 12 refineries each, with each branch headed by a storage tank that can refill over the course of the refineries running their cycle and be ready to burst-resupply all 12 in the branch ASAP, I'd think.
Last edited by RiO; Apr 3, 2021 @ 5:08am
Fel Apr 3, 2021 @ 5:37am 
You end up having refineries that are not in sync, but that's not an issue, in fact it's even a good thing since it means that the production is also not in big batches every 5 seconds but spread out as well for a more constant flow.
jpinard Apr 3, 2021 @ 4:26pm 
Originally posted by knighttemplar1960:

Edit: to save your self a bit of heartache.... make sure that you chain no more than 12 refineries from a single pump and crude storage tank (I only use 10) or you will run into issues with liquid flow rates. 12 refineries in a chain will have your flow rate down to 1,200 crude per second which means that any additional refineries on that pump chain will cause starvation.

Whoa. You have solved a LOT of heartache for me. So do you keep them on distinct tanks, or can you chain the tanks together?
Originally posted by knighttemplar1960:
With basic oil processing 100 crude oil is turned into 45 petroleum gas per cycle. A cycle is 5 seconds so that's 9 petroleum per second. A chemical plant making plastic uses 1 coal and 20 petroleum gas per second to make 2 plastic bars.

To support 14 chemical plants making plastic you would need 32 basic oil refineries and that's just for plastic. You'll need more because you will also need to produce sulfur.

Edit: to save your self a bit of heartache.... make sure that you chain no more than 12 refineries from a single pump and crude storage tank (I only use 10) or you will run into issues with liquid flow rates. 12 refineries in a chain will have your flow rate down to 1,200 crude per second which means that any additional refineries on that pump chain will cause starvation.


I am currently on oil myself on my first playthrough.

I purposefully only hooked up half the oil supply. Would it be in my best interests to ensure when I hook up the next half (found about 16 or so patches) to keep the pipelines separate?

My output will remain the same but I will have 2 separate flowrates to rely on, meaning I can have 2 x 12 refineries.

Is this correct or am I misunderstanding?

Or can I simply hook up to two storage tanks to the one supply and rely on that bifocation to get the flow back?
Last edited by ExoneratedPhoenix; Apr 3, 2021 @ 5:19pm
Fel Apr 3, 2021 @ 5:27pm 
Unless your tanks are completely full you might need pumps to output the crude oil to the pipe system(s) leading to the refineries to ensure a throughput as high as possible.
knighttemplar1960 Apr 3, 2021 @ 11:25pm 
Originally posted by jpinard:
Originally posted by knighttemplar1960:

Edit: to save your self a bit of heartache.... make sure that you chain no more than 12 refineries from a single pump and crude storage tank (I only use 10) or you will run into issues with liquid flow rates. 12 refineries in a chain will have your flow rate down to 1,200 crude per second which means that any additional refineries on that pump chain will cause starvation.

Whoa. You have solved a LOT of heartache for me. So do you keep them on distinct tanks, or can you chain the tanks together?
If you join the tanks at the output points the oil transfers at a rate of 12,000 units per second but if you completely empty the adjoined tanks a tiny but messy remainder will be left in the tanks that don't have an attached pump.

A 2x2 storage tank arrangement has a shape like an "X" when the outputs are connected. A line of 1 tank width will produce a ripple like one half of a zipper when the outputs are connected. A storage tank has 4 input/output ports and holds 25,000 units of fluid. If your input rate and output rates to a lone tank are balanced you can have 2 inputs and 2 outputs from one tank.

When you start using advanced oil processing, modules, and beacons an array of 12 refineries will still keep your flow rates above the starvation point but if you join the outputs of the arrays you will have to make sure that you don't join so many of them that you back up your system with product. You might find this table from the wiki helpful.

https://wiki.factorio.com/Fluid_system

@TwistedHelix3 what Fel said. You will likely find the fluid system table from the wiki helpful too. Additionally, pump jacks can use modules and are also affect by beacons. This can be extremely useful when an oil well depletes because a depleted well still produces a small amount of oil and modules and beacons will allow you to squeeze more production out of a depleted well. You'll have to determine if the extra power required to do that is worth the amount of oil produced from the depleted well on a well by well basis as each one is different based on the amount of starting oil.
Serendipitous Apr 4, 2021 @ 9:27am 
I will recommend a mod Rate Calculator. With it you only need to worry about overall design instead of constant number crunching.
RiO Apr 4, 2021 @ 12:18pm 
Originally posted by carashi:
I will recommend a mod Rate Calculator. With it you only need to worry about overall design instead of constant number crunching.

You'll still need to crunch numbers - occasionally anyway; can't totally avoid it - because Rate Calculator will show you the maximum throughput rates for all intermediate products. You will have to crunch the numbers on the net positives/negatives per intermediate product to see by how much you are either over- or under-producing.

I have a working example of this for a steel build I just finished wedging into a 100 by 100 city block, actually.

Let's say you create a standard 8-beacon build of electric furnaces to create steel. Speed modules in the beacons; productivity modules in the furnaces; 7 furnaces producing iron plate from iron ore followed by 8 furnaces producing steel from iron plate.


Rate calculator may give you (per second) something like:
Rate Machines Per machine Steel +5.640 +8 +0.7050 Iron Plate +23.925 +7 +3.4179 -23.500 -8 -2.9370 Iron Ore -19.940 -7 -2.8480

(In case the unequal number of machines surprises you: the productivity module bonuses applied in the iron plate smelting actually eliminate the need for its 8th furnace. Always nice to know. And now you do.)

Tile 8 columns of that side by side and you get:
Rate Machines Per machine Steel +45.12 +64 +0.7050 Iron Plate +191.40 +56 +3.4179 -188.00 -64 -2.9370 Iron Ore -159.50 -56 -2.8480

I.e. one compressed blue belt of steel (45.12 per sec) output.

Question:
How much iron ore input is actually required to achieve this fully compressed belt of output?

The naive and wrong answer is 159.50 aka ~160 ore/sec -- the maximum intake of iron ore reported by Rate Calculator.

Note that Rate Calculator shows that the iron plates have a net overproduction and thus will backlog once the steel (which also has a ve----ry slight overproduction) eventually saturates.

We're overproducing iron plate by 3.4179 - 2.9370 = 0.4809 per machine. At 56 machines that is an overproduction of 0.4809 * 56 = 26.9304 plates per second total.

Back-tracing through the recipe for iron plate, we see that there is a 1:1 ratio between iron ore consumed and iron plate created. That means the intake of iron ore is effectively lowered to 159.50 - 26.9304 = 132.5696 which is a reduction from the theoretical maximum ~160 ore/sec to an actual ~133 ore/sec.

In this exact case the difference is inconsequential, as either still works out to 4 blue belts needed. But it could be very consequential for other builds, especially those that contain intermediary products that feature more heavy overproduction. There can definitely be situations where it makes the difference between needing another belt of input product or not.
Last edited by RiO; Apr 5, 2021 @ 4:25pm
Serendipitous Apr 5, 2021 @ 6:25am 
Originally posted by RiO:
You'll still need to crunch numbers because Rate Calculator will show you the maximum throughput rates for all intermediate products. You will have to crunch the numbers on the net positives/negatives per intermediate product to see by how much you are either over- or under-producing.
No, not unless you are a perfectionist chasing after ideal ratios. Also, you don't really need to crunch the numbers, you can just adjust your build by fiddling - remove/add some assembling machine, beacon, chemical plant etc. For most players, like the OP, you just need numbers to be "close enough", for which Rate Calculator will suffice.
Halliwax Apr 5, 2021 @ 7:45am 
It's too messy to try to ratio this. Just make sure you have at least one storage tank for petroleum gas, then:
  • If your gas tank is not empty or nearly empty, you're good.
  • If your gas tank is empty but your oil tanks are full, build more refineries.
  • If your oil tanks are empty, tap more oil fields or improve your train system.
Last edited by Halliwax; Apr 5, 2021 @ 7:46am
RiO Apr 5, 2021 @ 8:28am 
Originally posted by carashi:
No, not unless you are a perfectionist chasing after ideal ratios. Also, you don't really need to crunch the numbers, you can just adjust your build by fiddling - remove/add some assembling machine, beacon, chemical plant etc. For most players, like the OP, you just need numbers to be "close enough", for which Rate Calculator will suffice.

I'd say if you're going to teach a man to fish; then actually teach a man to fish, and don't tell them it's easier to just buy canned fish.

If you're just aiming to get something up and running quick&dirty, just using the intake and output parameters from Rate Calculator may suffice, sure. But then be candid and up front about the fact that it's not accurate and that there's more to it - e.g. with respect to max rate vs effective rate and intermediary products used in builds, if you're in it for a fine-tuned accurate build.

It helps prevent novice players from settling into a bad behavior they'll have to unlearn later should they become more advanced players that want to take a stab at the 'post-game,' because they'll now have it in their heads that regarding Rate Calculator:

Originally posted by carashi:
With it you only need to worry about overall design instead of constant number crunching.

which of course isn't the whole truth.
Last edited by RiO; Apr 5, 2021 @ 9:43am
< >
Showing 1-15 of 24 comments
Per page: 1530 50

Date Posted: Apr 2, 2021 @ 11:06am
Posts: 24