Page 1 of 1

Prevent flipping of blueprints that are sensitive to belt lanes

Posted: Sat May 22, 2021 1:19 am
by Orange
As described in FFF-364 for release 1.1 the intent is to disallow a blueprint from flipping if it would break.

The below image shows two inserter & belt builds (left) that break when flipped (right).
The first example is intended to put a different resource on each belt lane, but mixes them when flipped.
The second example is intended to produce two lanes of output, but is limited to one lane when flipped.
factorio_unsafe_flip.png
factorio_unsafe_flip.png (61.66 KiB) Viewed 1185 times
When determining whether a blueprint can be flipped, please also consider whether it would break blueprints that rely on belt lanes to behave a certain way.
I'm not sure how to reliably identify this problem. An important factor seems to be that inserters always place items on the right lane of a belt moving away from them. But that doesn't always indicate a problem; I'd consider the blueprint below to be a "safe" flip.
factorio_safe_flip.png
factorio_safe_flip.png (45.76 KiB) Viewed 1185 times
If this problem doesn't have a well-defined answer, another solution could be a manual flag on the blueprint for whether to allow flips.

Re: Prevent flipping of blueprints that are sensitive to belt lanes

Posted: Sat May 22, 2021 7:12 am
by ssilk
I think it’s not possible - in the sense of effort of programming this (so that it finds all of those cases) vs. outcome (yeah now I am prevented to accidentally flip things).

The reason is, that to make this correct, the game needs to simulate the belts for the flipped and un-flipped version and if there is a change after some while of simulation, it should prevent you from doing that. That will never work for big blueprints.

Much easier to implement would be a switch in the inserters: “prefer right/left side”. And when flipping vertical, vertical inserters get this switch flipped, too. And all works identical.

But that would also mean to remove a very important game-element from Factorio. This preference of the right lane is part of many puzzles. Adding this switch removes such puzzles and doesn’t add new ones.

And also this flipping and the unawaited consequences could be seen as part of game-play. :) so I think this will not come.

Re: Prevent flipping of blueprints that are sensitive to belt lanes

Posted: Sat May 22, 2021 7:43 am
by Durr
Adding a checkbox to the blueprint menu to disallow flipping of the blueprint would be feasible. But simulating every blueprint (or copy/paste) flip to see if it would result in a different output is too difficult to implement for the tiny improvement it could add.