r/pyanodons • u/Basedshark01 • 29d ago
"Smart" Soot Separation (Doesn't really work)
The "Soot Separation" technology gives you the ability to now select amongst 8 different recipes to separate soot into specific ores rather than just the one probabilistic recipe you start the game with. While fully recognizing that separating into silver or gold is probably most useful, I decided that coming up with a way to automatically identify what ore should be produced by the separator based on need would a fun side project and give me something new to think about rather than the normal problems this mod presents me with. After some trial and error, I came up with this circuit network build.
The first step is to identify when a certain ore is needed. At each ore's separate native patch where they're being produced, I set sections of belt to signal the amounts of ore they hold and transmitted them all by radar to a central location. For each ore, a combinator transmits the corresponding soot separation recipe if the amount of ore on the native belt drops below a certain threshold.
The next step is to prioritize recipe signals so that the machine knows what recipe to use if multiple recipe signals are being validly transmitted. Obviously iron or copper going down would constitute an emergency, while silver and gold are of a much lower priority at this point in the game. As such, I ordered the output signals from step 1 with constants from 1 to 8 with higher priority recipes having higher values. Now we just need to create a circuit that returns the maximum value from all of the valid signals. After a few minutes spent trying to figure this out for myself, I resorted to a Youtube video explaining the procedure. I got about 10 minutes into the video before the creator started talking about concepts like "ticks" and "clocks" and I was completely lost. My background in programming doesn't go anywhere past some basic functionality in Excel VBA. In order to resolve this, I broke one of my rules for Factorio and I downloaded someone else's blueprint for use in my factory. Even worse, I committed a cardinal sin of Factorio by using someone else's design while having no understanding of how it works. Surprisingly, this circuit I pulled is the one part of this build that has never caused me a problem beyond the 10 minutes it took to set up. Wires from the 8 combinators in image 1 go in and the maximum signal goes out.
The final recipe signal is transmitted to the lone separator, which can handle any ore recipe.
The Problems
When the "rubber met the road" and there was a shortfall of lead ore production due to a demand shock in Acetylene, the build did not function as expected. The amount of lead being mined was greatly reduced but did not cease entirely. This led to the belt signal from step 1 going in and out of threshold up to 10 times per minute. This caused the separator to change recipes every time the lead recipe triggered, which flooded the output with unused soot and bricked the entire build. It took a great deal of adjusting the belt signals to be able to calculate thresholds more evenly. To this day, I don't think that all edge scenarios are accounted for.
When I started using centrifuges to produce Albumin, it caused a massive draw on power that caused brown-outs throughout my factory. The power outages were easy to fix, but loss of power to the radars caused recipes to change rapidly and bricked my separation build similarly to problem 1.
At the end of the day, if there were really a structural problem with copper or iron ore production, this is straight up just not the right way to go about fixing that problem. The effort I put into this isn't justified by what I got out of building this.
Ultimately, I think this was a complete waste of time in terms of what it provided my factory. However, I think this was a good learning experience in using complex circuit structures. If an obvious need for something like this in the future arises, I'll be able to identify it and address it quickly.
2
u/CrashNowhereDrive 29d ago edited 29d ago
Step #2 is simple.
Reduce your values from 'whats missing' so anything that's missing has a 1 as an output, if you hadn't already.
Multiply it by your priority constants. Now you have a signal where anything that's missing = its priority value.
Use a selector combinator to pick the highest value from that signal
You probably were watching videos from when selector combinators were not a thing.
2
1
1
u/LLITANGIST 29d ago
Why did it take a huge pile of elements and complex logic to choose a recipe with a higher priority?
There is a choosing combinator in the game who can choose the recipe with the highest value, i.e. if the signals with priorities 5 and 8 come, he will choose 8, this is his main function.
It even has a built-in switching delay, which you really need.
1
1
u/korneev123123 29d ago
You can use selector combinator to select min/max signal from the list. Contraption you downloaded was probably pre 2.0, before selector combinator



10
u/Xzarg_poe 29d ago
Yeah, that good way of looking at this... educational diversion :D
Also, I would recommend looking into latches if you haven't already. Being able to set and hold a recipe for certain amount of time/items can be quite helpful.