this post was submitted on 23 Oct 2024
44 points (97.8% liked)

Factorio

898 readers
299 users here now

A Lemmy community for the game Factorio made by Wube Software.

Rules

founded 1 year ago
MODERATORS
 

With the update there was an overhaul of what combinators can do.
I had the problem that my oil cracking would flicker, turning on for a split second then back off again, hovering right around the set threshold. (Probably worsened by me not switching a pump anymore like what used to be the norm.)

The old method would have been an SR latch, which enables at a higher set point and disables again at a lower reset point. This used to take 3 combinators.

~~I figured it should be possible to do better now, but could not come up with a way to cram an sr latch into a single combinator, since it can only be either on or off at one time. I think it takes two combinators to build an sr latch now.~~
A single-combinator SR latch is in the comments.

Instead I came up with another way to "debounce" my cracking.

Here shown is the combinator sending the signal to enable cracking (the recipe icon of light oil cracking) while the actual activation signal, light oil above 20k, is off.

The signal was on for a moment, then after the cracking started up the oil level immediately dropped below 20k again. But now the second condition, T between 0 and 10s, is active. While the combinator is active, it is sending out 1 plus the old count to T, counting it up once per frame. It remains active while the condition is active or while T is counting up but has not yet reached 10s (at 60 ticks per second). This ensures that every time the cracking runs, it runs for at least 10 seconds.
After these 10+ seconds, the level should take a while before rising above the threshold again.

For me, this successfully made the row of chem plants turn on in one smooth go.

top 9 comments
sorted by: hot top controversial new old
[–] sxan@midwest.social 10 points 1 week ago (2 children)

The one part of Factorio I never got comfortable with, and actively disliked, was the wiring, signaling, and logic. I just don't find it fun, so much as frustrating.

I haven't had a chance to run Space Age yet, and one of the things that really worries me is that I'll finally be forced to use signaling in a large scale to get anywhere in the game. I hope that's not the case, though.

[–] Redjard@lemmy.dbzer0.com 10 points 1 week ago (1 children)

I think they mentioned somewhere that they paid attention to not force players to use it.
If I find something that needs circuits for anything but aesthetics or minor efficiency gains I will report back.

[–] sxan@midwest.social 4 points 1 week ago (1 children)

Oh, whew. That's welcome. Signals and programming took it from being a game to feeling more like work, so I avoided it after I first tried playing with it.

That's really good news, thanks

[–] Evotech@lemmy.world 4 points 1 week ago

Id suggest making some simple things, just to ease into it. Like alarms if oil is running low etc. Very simple stuff

[–] bleistift2@sopuli.xyz 4 points 1 week ago (1 children)

I’m right with you. When you find yourself attaching random entities to a power pole just so you can read the signals and debug the circuit, it gets annoying.

[–] Tlaloc_Temporal@lemmy.ca 3 points 1 week ago

Most entities have been changed to display all the signals on the input and output networks. It's very helpful.

[–] Redjard@lemmy.dbzer0.com 7 points 1 week ago (1 children)

I don't know what I was thinking, I managed to build an SR latch right after posting this and it wasn't even that hard.

Here is the SR latch, with its cycle of 4 states:

below reset cutoff, disabled:

rising above reset cutoff but still disabled:

reached set cutoff, upper limit. Enables:

Fell back below set cutoff, still enabled:

[–] Redjard@lemmy.dbzer0.com 6 points 1 week ago

Using that SR-latch, the final output can be used to replace the S, the set signal, and then many such combinators can be combined into a single network:

Which might look like this while in operation:

Note that the set and reset conditions in the refineries are flipped, since they increase instead of decrease petroleum.

[–] Deestan@lemmy.world 5 points 1 week ago

This is brilliant, thank you!

This made my cracking so much simpler. Using this logic I made one that turned on cracking at 20/25 tank and turned it off at 15/25.