Trigonometric Oil


This mod adjusts oil production chains to be slightly more involved at every step, without subjecting you to total intermediate chemistry hell. Includes some custom assets from other popular mods.

Content
1 year, 7 months ago
1.1
189
Fluids Manufacturing

g Asphalt Roads compatibity?

1 year, 8 months ago
(updated 1 year, 8 months ago)

I have the Asphalt Roads mod installed and it supplies a recipe for asphalt using heavy oil, could you maybe add support for the mod and have it use your recipe?

Edit: Hmm, on a similar note, I use King Jo's Fuels which supplies a recipe for Kerosene from light oil. I will write something to crawl recipes and modify those using the original oil fluids.

Edit 2: Come to think of it, Gotlag has the routine already written, I think it is his Glass mod.

1 year, 8 months ago

Hi, thank you for the suggestions!

I will begin work on adding in a compatibility patch for the Asphalt Roads mod to make it based off of this mod's item immediately.
After that, I will take a look at more general compatibility. There's likely a way to check for recipes that required light, heavy, etc, and replace them in data-fixes-final.

1 year, 8 months ago
(updated 1 year, 8 months ago)

Thank you! I just checked Glass, while it does have a "replace ingredient", it does not crawl the recipes, but I know I have seen that code somewhere.

1 year, 8 months ago

Making "fuels" for the different vehicles might be reasonable to add. There are numerous vehicles that could use a specialty fuel... and maybe some napalm.

1 year, 8 months ago

I'm preparing a release soon for this, and a few other changes that are fairly large.

This may break your save, please let me know if a migration needs to be re-written and I'll try to save your save.

1 year, 8 months ago

It looks good to me, thank you very much!

Have you taken a look at Pollution Solutions Lite? tldr; it makes a Toxic Sludge from pollution, I am thinking of combining the Waste Pollutant as an ingredient.

1 year, 8 months ago

I have, but not in depth. I'll see about integrating that as well.

1 year, 8 months ago
(updated 1 year, 8 months ago)

-- en.cfg
heavy-oil=Heavy oils
light-oil=Light gasoil

Implies they are not vanilla.

Edit: Nice clean code, well done.

1 year, 7 months ago

I expect you are busy with your own plans, so I decided to start messing around with a personal mod, dependent on Trig Oil, which will add a few hydrocarbon fuels. Who knows, maybe it will work well and I publish it.

1 year, 7 months ago

Oh, and I was not intending for you to add support for Pollution Solutions Lite. I am not even sure I want to integrate them... while possible and maybe even a nice pairing, having flare stacks burning in the fuel refinery has its' appeal.

1 year, 7 months ago

Cool :) I think that would be a lovely bonus addition, keep me updated if you ever do.

I was gonna take a look at Pollution Solutions anyway as I've known about it.
I've heard from another user it is "indirectly compatible" i.e. you can vent pollution fluid next to something to capture it, rather than just using the direct fluid, but I want to make sure they do totally play nice in the background.

I'm glad you agree, the flare stacks burning and venting is a fun aesthetic. If you'd like a version of pollutant fluid, but in a flare stack as well purely for pretty looks, let me know

1 year, 7 months ago
(updated 1 year, 7 months ago)

I have not punched too much code yet, but here are my notes... kind of lets you know a little more specifically of what I am thinking.

(fluids unlocked by flammables, but add plastics as a prerequisite - 'cause napalm!)
-- table.insert(data.raw['technology']['flammables'].prerequisites, 'plastics')

-- fuels

gasoline (fluid)
kerosene (fluid)
diesel (fluid)

gasoline-barrel (fuel) (top speed/accel?) (stack size?)
kerosene-barrel (fuel) (top speed/accel?) (stack size?)
diesel-barrel (fuel) (top speed/accel?) (stack size?)
(fluid) + empty-barrel = (fluid)-barrel (100 MJ fuel)

chemical plant
heavy-oils + steam = diesel + sulfur + pollution
light-gasoil + steam = 50% gasoline + 50% kerosene + 2x sulfur + pollution

(unlocked by lubricant)
refinery - catalyzed
heavy-oils + vacuum + iron ore = 80% diesel + 20% lubricant + pollution
heavy-oils + vacuum + copper ore = 20% diesel + 80% lubricant + pollution

(unlocked by vacuum oil distillation)
refinery - catalyzed
light-gasoil + vacuum + iron ore = 80% kerosene + 20% gasoline + pollution
light-gasoil + vacuum + copper ore = 20% kerosene + 80% gasoline + pollution

-- napalm

napalm (fluid)

chemical plant
polyethylene + gasoline = napalm + pollution

(unlocked by flamethrower)
napalm-ammo (flamethrower ammo) 150% damage (greater range?)

chemical plant
napalm + 5 steel-bars = napalm-ammo + pollution

  • May introduce a new technology: Fuel Processing
  • Exact numbers pending balancing
1 year, 7 months ago

I like the idea for napalm ammo, haha. It was something I had in mind eventually, but I didn't think of a light oil+polyethylene recipe being right in front of my face.

I think it's worth peeking at making a fluid fueled smelter from a gas product to stand in between kerosene and gasoline (likely gasoline will analog them both), but as vanilla and my mod don't have a use for fluid fuels, I'm not sure what else they would be used for besides perhaps a new power generator entity.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Well, fuels are not so "useful", more to the "it's not about launching a rocket folks". Tons of vehicles that don't normally use any of the available fuels, ie. nuclear fuel (whatever that is exactly), Dectario, Realistic Reactors, etc. And have you tried this? No more entertaining way to clear trees, biters or cliffs!
https://www.youtube.com/watch?v=ZFLbDQOkB34

Edit: All of King Jo's planes and vehicles use his Fuel mod, not vanilla fuels. The recipes are can/barrel + light oil, with not so inspiring graphics, blah. Then I noticed Trig Oil and the nice changes that could make fuels more than just can + light oil. Same kind of blah for Diesel Trains... so a bit of "fuel challenge" to go along with nice mods that settle for sub-par fuels.
I would not expect fuels to be large volume, but napalm would likely see full-time production, which will likely force a continuous over-production of kerosene, unless they fly a lot... so flare stacks.
As for balance, with the above recipes, 1 diesel + 1 gasoline + 1 kerosene + 1 lubricant = net zero sulfur... it's balanced. :D

1 year, 7 months ago

Hmm, use of fuel furnaces... like the gas furnace mod? Interesting... fuel values for liquids... it gets deeper.

1 year, 7 months ago

Yeah, I definitely like that idea and I want to continue using it. I'll have to learn about fluid box graphics so I can render them onto the furnaces. It might be a bit, I've got a fair amount of "real life" coding to do for the next few days though.

1 year, 7 months ago

Dude, 2.1.0 is awesome work!

1 year, 7 months ago

I'm glad you are enjoying things :)

Let me know what you think of the numbers for fuel usage, by the way. I just went with gut feeling and playing around with Factory Planner.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Confirmed, fuel values make my head swim. :)
The production of liquid fuel, goes from 30 x 10kj light gasoil to making 20 x 400kj liquid fuel. So if there will be an imbalance, likely here as the fuel can be used run the gasoline generator. But with a production line of single distilled refinery with fluid catalytic cracking and a single liquid fuel production, it can not produce enough fuel to run the generator continuously at ~95% load of radars. So it does not "feel" imbalanced.

1 year, 7 months ago
(updated 1 year, 7 months ago)

With a single petrochemical plant, it does not produce enough ethylene to run the furnace continuously. And if you use liquid fuel for the furnace, you see the imbalance between the fuels.

Edit: In fact, as I let it run a bit longer, I noticed that the single refinery with heavy cracking can not produce enough light gasoil to keep up with ethylene demand for the furnace.

Edit 2: I lowered the energy consumed for the gas furnace to 90kw to match the steel furnace, but ethylene production could not keep up with 2 gas furnaces.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Ethylene itself wasn't meant to be used as a furnace fuel, but in retrospect probably should be adjusted as it would make sense in theory.

I gave all flammable liquids a fuel value - though some extremely poor to disincentivize using them in the furnace and the power station. Sort of like "Just because you could doesn't mean you should".

Having the fluid just go in and the machine not work felt like something was actually wrong back when I first played Krastorio 2. Though eventually, I found out it was just only select fuels.

This might not be clear either, though. Perhaps it would be better to block the lower fuels from being used and include this in the description of the entity. I don't think Factorio's fluid mechanics really support preferring to use the excess ethylene, then switching over to a different fuel if it ran out in an automated way.

Thank you for the feedback as usual! I'll play around with some numbers as well, and likely will revert gas furnace energy consumption back in line with steel.

1 year, 7 months ago
(updated 1 year, 7 months ago)

I wondered if it was a "just because you can...", I was not sure. It is not bad, but maybe have the gasoline generator work similarly. It does not run on ethylene... so it caused me to think ethylene for the gas furnace was "proper", since it worked.

Edit: lol, I just noticed. The gas generator does indeed work with ethylene, nice!

1 year, 7 months ago
(updated 1 year, 7 months ago)

Is it your vision for the gas furnace with liquid fuel to be a viable replacement for coal furnaces? If so, maybe a liquid fuel powered inserter? This has a lib to make fueled inserters, if that would be of interest. https://mods.factorio.com/mod/pneumatic-inserter

Edit: But as think more about it, the extra fluid calculations required to power the inserters, probably not worth it.

1 year, 7 months ago

I am having trouble getting a working setup. I run out of H2S. Even with priming my two sulfuric acid plants with 50 sulfur each to get the heavy oil cracking running, I still run out of sulfur. I am not producing any excess oils, cracking everything to ethylene and then to Plastic, output is also very low. Starting with eight vacuum distillation units, I get maybe a 1/4th of a yellow belt of plastic.

1 year, 7 months ago

Hmm. Thanks for the feedback. I've been a bit busy with a few other commitments and I hope to return to this in a day or two finally.

I think in general, some production numbers should be increased. The typically vanilla numbers slowly decrease as you go down, but with more and more steps that effect is amplified a ton.

If you don't mind, I'd love to take a look at your save

1 year, 7 months ago
(updated 1 year, 7 months ago)

You should be able to download it here: https://drive.google.com/file/d/1ljh1H4jZnC6oOTRFPoc02TxkSk4LgYp8/view?usp=sharing

I have over one hundred other mods loaded, but none of them should be required, to test drive the oil production.

1 year, 7 months ago

Thank you! This is really helpful. I'm going to look this afternoon and increase H2S production and see where that goes.

1 year, 7 months ago
(updated 1 year, 7 months ago)

The amount of sulfuric acid required is quite high, which then consumes all of the sulfur and also requires a pretty good flow of iron plates. And possibly consider increasing the ethylene/polyethylene or decrease the amount required in the plastic recipe. My expectation was that starting with 8-10 refineries, I should be able to extract a 1/2 yellow belt of sulfur and close to a full belt of plastic, with some excess for some lube and a little fuel. But this of course does not need to be true. However, if Trig Oil does not "generally" reproduce vanilla-like results, some notes to that effect might be good in the description, so folks are prepared. Blue science comes at you quickly.

Also, I tried to use Factory Planner for Plastic, but I think it was confused when I clicked on light oils, I have not yet investigated.

Edit: I just needed to activate the FP matrix solver.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Ah yeah, I need to take a look at the matrix solver again.

Thanks for some general pointers. I think 8-12 is a fair number of refineries (for pre-megabase expectations, ofc) for science purposes.
I did want to keep it somewhat in line, and obviously my initial guesstimates were wayyy off. I didn't think to approach it by belts worth of output, and that was probably a better idea. So far, with your save, I'm leaning towards:

  • Decreasing the amount of sulfuric acid needed for the heavy oil cracking
  • Increasing the amount of sulfur generated per cycle
  • Increasing the amount of plastic gained overall - less cost in polyeth, and making eth produced a bit more.
1 year, 7 months ago

After messing around a bit with FP, set for a full yellow belt of plastic, it appears that there should be an excess of sulfur ( 0.15 belts, not enough for blue science) and the entire process sustainable. So somewhere, I have something not optimal... not that I was expecting it be optimal. :)

But if FP is correct, it will require 36 refineries, 66 petrochemical plants, 28 chem labs and 7 blue assemblers... just too much that early on.

1 year, 7 months ago

Yeah. I noticed a few underground pipes were a tad too long and thus didn't connect, and that you weren't dealing with some of the asphalt (but assumed perhaps mods I didn't load in your save handled this).

That said: I had hoped to keep basic oil processing still useful for when you need asphalt for solid rocket fuel but it shouldn't change the ratios much.
So far, in this test bench some changes I've made are a bit nicer - a full belt of plastic off of just under four machines. Some numbers now line up better (like polyethylene to bar machines).

Still have some work to do, but definitely after fixing it feels a bit nicer. Hopefully tomorrow I'll have a release ready for more testing haha

1 year, 7 months ago
(updated 1 year, 7 months ago)

Oops, sorry about that. I do have the Aligned Underground Pipes mod that extends the underground pipes by 1. https://mods.factorio.com/mod/aligned-ugp

1 year, 7 months ago

Right. Sorry about the delay. I've put out an experimental release with some of the changes, as well as made the source code more visible online at https://github.com/sinewavey/trigonometric-oil

With that said: I'm gonna close this thread in particular. Feel free to use the other newly created balancing thread or open an issue on GitHub.

This thread has been locked.