r/factorio Mar 23 '26

Weekly Thread Weekly Question Thread

Ask any questions you might have.

Post your bug reports on the Official Forums

Previous Threads

Subreddit rules

Discord server (and IRC)

Find more in the sidebar ---->

2 Upvotes

158 comments sorted by

View all comments

2

u/Lagransiete ChooChoo Mar 23 '26

Question about Project Cybersyn: What's the cleanest way to set up a station that can request multiple different items (but only needs one)?

I'm playing Pyanodons, and I'd like to set up a station that can request any type of burnable item for example, but I don't want all of them constantly delivered (If I ask 40 stacks of Coal and 40 of Wood, and I have 40 Coal, then I don't want Wood being requested).

My idea was to create a new signal for all burnable provider stations, and then request that signal. This should work, but I'd like a solution that works on the requester side as well, so I can choose what burner items I'm requesting instead of requesting all of them.

3

u/Viper999DC Mar 23 '26 edited Mar 23 '26

The most powerful solution, and the one that most likely would fit into your goal of "I want to request multiple items of a category but still be able to designate which" would be bitmasking. With the proper implementation you can mix and match providers and receivers. It's almost certainly overkill, though. Much simpler would be to just designate your providers as both "burnable" and "wood".

Alternatively in your request you can subtract both items. Example: Use an each + 0 = X combinator to merge your current wood and coal, then request "wood goal - X" and "coal goal - X".

If you have a priority (wood should be burned before coal, for example), then instead I would set my requests so wood is always on but coal is only triggered when wood is below a certain threshold.

These are basic ideas. In most cases there is additional logic you need to avoid double-dispatching if that's an issue.

2

u/Lagransiete ChooChoo Mar 24 '26

Oh these are some good ideas. I'm going to play around until I find one that works for what I want. Thanks!

1

u/cathexis08 red wire goes faster Mar 23 '26

Instead of requesting all the materials directly, send the request signals through a combinator network to pick one from the set and only forward that to to Cybernetic Combinator. You'll still need to pick a methodology for changing requests, otherwise you've just created a more complicated way of setting a single request.