KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
547 stars 146 forks source link

Suggestion: Coal Liquefaction Recipe + Basic oil processing #62

Closed mulark closed 6 years ago

mulark commented 6 years ago

Exactly as it says on the tin, the ability to choose between different oil recipes.

KirkMcDonald commented 6 years ago

This is actually part of a broader issue that I've been considering for a while, but which I have not created an issue for yet.

The calculator actually considers these recipes every time it performs a calculation for oil-related items. In some circumstances (when enough heavy oil is required), it will actually use basic oil processing, at least to some extent, because of that recipe's greater yield of heavy oil.

It comes down to the calculator's logic for prioritizing resources. Its preference for advanced oil processing over basic oil processing is because, most of the time, that will use less crude oil, at the cost of using more water. Its preference for advanced oil processing over coal liquefaction is because it values steam more highly than crude oil.

This list of priorities is hardcoded, but I've thought for some time that it might be useful to expose the priority list to the user somehow. This is almost a requirement for supporting certain mods, which have alternate production chains for certain items based on different resources.

If I didn't want to go that far, it would be pretty easy to add an option to choose between different preset lists which would bias it in favor of different oil processing recipes. I tend to prefer generalized solutions (so that I could, in theory, throw different mods at the calculator), but I'm not above hardcoding things if it's useful.

SniderThanYou commented 6 years ago

I empathize with your desire to provide a generalized solution. In the mean time, would you consider adding an option to the "Settings" tab, at least on a branch, to hold us over? I imagine the other options on that page involve some hard coding as well, for things like the assembling machines and belts, so adding an oil processing option would still be consistent with your existing solution.

Whichever you decide, would you kindly let me know? If you'd rather not add the setting right now, I'll see about cloning the repo to figure out how to do it myself.

Thank you sir! Your project is a boon to the community.

KirkMcDonald commented 6 years ago

Done in 1cbf8d9b957d3c9688ad46c6f414bbdc0bbd6068.