Fluid Permutations

by spiwn

Rotate fluid inputs and outputs of buildings

Utilities
3 years ago
0.16 - 1.1
17.7K

b Not generating all permutations

5 years ago

As title says, the mod doesn't generate all possible permutations. For instance, if I have a building with three input slots but only two ingredients, I'll be able to use the original A-B-B recipe, and the permuted B-A-A, but there is no A-B-A or B-A-B recipe.

Like that for instance:
https://i.imgur.com/q78cXPw.jpg
https://i.imgur.com/ytYCh9d.jpg

In another case, I had three outputs, with three products (Water, Oil and Gas) and although the mod generated nearly all variations, there was none where I could have the oil in the middle and the water on the right.

https://i.imgur.com/Pz3kzk5.jpg

My permutations threshold is on the default 120.

5 years ago

In the first case, this is how Factorio works when the recipe has fewer inputs/outputs than the building.
In your case it has only the A and B inputs and the two permutations AB and BA are generated. I think it is not possible to have the same ingredient multiple times so generating AAB ABB would not be possible. It would also be problematic as it would suggest generating aaab, aaba, aabb, abaa, abab, abba, baab, baba, babb, bbaa and bbba if a building with 4 inputs exists. Same for 5, 6, ad infinitum.
On a side note in the case of Angel's mods using the "Chemical plant" instead of the "Advanced chemical plant" would yield higher crafting speed and eliminate the situation at hand.

As for the second case the mod should be generating that permutation. The threshold should not affect this as there are only 6 permutations. I will look into it, but I doubt the original code has just broken.
What version of Factorio are you playing and what version of the mod are you using?

5 years ago

Ah, I see. I thought that it might be something like that, since GDIW, this mod and Omnipermute all have this issue. Well, that's not an actual issue since the only thing it does is to mess with my symmetrical designs, but it's good to have clarification on why these permutations aren't possible.

So yeah, sometimes I'm using an Advanced Chemical Plant rather than the regular one, just for the sake of looking good in a given situation, and that's when something like ABA would be practical.

As for the actual issue, I'm using the latest experimental version of Factorio, and the latest version of the mod.

New response