Universal transfer of quality, without pre-selected signal of a specific item
Posted: Wed Jan 28, 2026 11:41 am
In my railway network, which uses interrupts and logic, a situation sometimes arises where a train hasn't received a signal and doesn't know where to go.
Then the train goes to a correction station so that a train can assign it a station.
There are two types of resource receiving stations. One type is any quality type in any concentration, the other type is a specific quality type.
The naming of a station with any quality looks like this: The dispatch logic determines this, but the problem is that the logic of each supply station knows what kind of resource it is sending and what quality (configuring a specific item via a parametric drawing).
But the correction station doesn't know this.
So, the train departed, got lost for some reason, and arrived at the signal correction station: If the train didn't have at least one item of normal quality, a situation occurs where logic tries to send it to a station of the following format: The whole problem comes down to a task where we need to obtain a logical signal of some object of ordinary quality, from the signal of this object of any quality, without knowing in advance which specific object we are talking about.
The selecting combinator can only do this if this signal is known in advance.
Let me clarify that the correction station is universal for all objects.
Any train that doesn't know where it's going, no matter what it's carrying, will arrive at it.
Perhaps someone here knows such a method?
Perhaps there are mods that add a new type of combinator? If so, what are they?
I'm 80% sure that this problem is unsolvable in the current version without mods. It also seems like the problem would be solved if we could dynamically change the "Target Signal" in the selecting combinator.
I've encountered problems in many situations due to the lack of dynamism.
I suspect it's something to do with the engine, and the current implementation probably just can't do it dynamically. But if it's possible, I don't quite understand why they haven't done it.
Well... you know, like how you couldn't specify a recipe, read progress, and so on in assemblers before, and then they added it.
I'd hope something similar would happen here, too.
(Updated)
I managed to find a solution using the Lua combinator from the Moon Logic mod, with the following code: out = {}
for name, count in pairs(green) do
local quality_part, item_name = name:match("^(.-)/(.+)$")
if item_name then
out[item_name] = (out[item_name] or 0) + count
else
out[name] = (out[name] or 0) + count
end
end
But of course, I'd like to be able to do this using the game's tools.
Although this is not bad either)
It's funny that I couldn't find a solution to this problem for about a year, but when I went to the forum, I found it in less than an hour.
Maybe it'll be useful to someone.
Then the train goes to a correction station so that a train can assign it a station.
There are two types of resource receiving stations. One type is any quality type in any concentration, the other type is a specific quality type.
The naming of a station with any quality looks like this: The dispatch logic determines this, but the problem is that the logic of each supply station knows what kind of resource it is sending and what quality (configuring a specific item via a parametric drawing).
But the correction station doesn't know this.
So, the train departed, got lost for some reason, and arrived at the signal correction station: If the train didn't have at least one item of normal quality, a situation occurs where logic tries to send it to a station of the following format: The whole problem comes down to a task where we need to obtain a logical signal of some object of ordinary quality, from the signal of this object of any quality, without knowing in advance which specific object we are talking about.
The selecting combinator can only do this if this signal is known in advance.
Let me clarify that the correction station is universal for all objects.
Any train that doesn't know where it's going, no matter what it's carrying, will arrive at it.
Perhaps someone here knows such a method?
Perhaps there are mods that add a new type of combinator? If so, what are they?
I'm 80% sure that this problem is unsolvable in the current version without mods. It also seems like the problem would be solved if we could dynamically change the "Target Signal" in the selecting combinator.
I've encountered problems in many situations due to the lack of dynamism.
I suspect it's something to do with the engine, and the current implementation probably just can't do it dynamically. But if it's possible, I don't quite understand why they haven't done it.
Well... you know, like how you couldn't specify a recipe, read progress, and so on in assemblers before, and then they added it.
I'd hope something similar would happen here, too.
(Updated)
I managed to find a solution using the Lua combinator from the Moon Logic mod, with the following code: out = {}
for name, count in pairs(green) do
local quality_part, item_name = name:match("^(.-)/(.+)$")
if item_name then
out[item_name] = (out[item_name] or 0) + count
else
out[name] = (out[name] or 0) + count
end
end
But of course, I'd like to be able to do this using the game's tools.
Although this is not bad either)
It's funny that I couldn't find a solution to this problem for about a year, but when I went to the forum, I found it in less than an hour.
Maybe it'll be useful to someone.