[2.0.72] Wrong recipe set to assembler via signal with multiple recipes

Bugs that are actually features.
dhrakon
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Sep 22, 2024 3:57 pm
Contact:

[2.0.72] Wrong recipe set to assembler via signal with multiple recipes

Post by dhrakon »

Background:

K2SO (Krastorio 2 Spaced Out) mod overhaul has an additional recipe to craft electronic circuits, which includes wood. This mod does not hide the signal from this alternative recipe, resulting in two distinct signals: "electronic-circuit" and "kr-electronic-circuit-wood".

What did I do:
  1. Place an assembler (or electromagnetic plant) and a constant combinator with a signal of "electronic-circuit" and a value of 1.
  2. Wire the constant combinator to the assembler (or electromagnetic plant) (use red or green it doesn't matter)
  3. Enable "Set recipe" in the assembler (or electromagnetic plant) option.
What happened:
  • (4) The assembler (or electromagnetic plant) set the recipe to "kr-electronic-circuit-wood".
What I expected to happen:
The assembler (or electromagnetic plant) set the recipe to "electronic-circuit"

Frequency of occurrence:
Always.

What I think is happening
I tried my hand at debugging this to see if it was first a modding issue or issue with base functionality of factorio, but I wasn't able to determine the mechanism that an assembler chooses its recipe from a signal. I think that maybe it's looking for the first recipe that it can craft to satisfy the signal, instead of getting the recipe from the signal itself.

I'm sure that there's a few workarounds that can be implemented. Maybe fiddling with the order of the recipe? Regardless, given the two options of signal ("electronic-circuit" and "kr-electronic-circuit-wood") I would have expected to be able to differentiate setting the crafting recipe via signal.
11-22-2025, 11-22-30.png
11-22-2025, 11-22-30.png (3.07 MiB) Viewed 108 times
Attachments
k2so.zip
(16.4 MiB) Downloaded 2 times
Loewchen
Global Moderator
Global Moderator
Posts: 10518
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [2.0.72] Wrong recipe set to assembler via signal with multiple recipes

Post by Loewchen »

That is not a bug, if you send an item signal it will set the first recipe that produce that item.
dhrakon
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Sep 22, 2024 3:57 pm
Contact:

Re: [2.0.72] Wrong recipe set to assembler via signal with multiple recipes

Post by dhrakon »

Thanks for your quick (amazingly quick, actually) response.

I understand that's what happens. I suppose I am arguing that's an unexpected occurrence given the ability to have different item signals with different recipes.

This decision seems to limit the ability for mod developers to create alternative recipes unless the lock those recipes behind different types of assemblers (i.e. using the assembler itself to sort of filter the signal).

Regardless, at least if this happens again someone will be able to see this (not-a) bug report instead of trying to solve it like I did.
Post Reply

Return to “Not a bug”