Fluid Permutations

by spiwn

Rotate fluid inputs and outputs of buildings

Utilities
3 years ago
0.16 - 1.1
15.7K

g Happy 9999 Downloads

3 years ago
(updated 3 years ago)

https://prnt.sc/v4wpso

I have planned to support your mod in my Kux-BlueprintExtensions, as an alternative to GDIW.

3 years ago
(updated 3 years ago)

Thank you :)
10000 now.

I can add a remote interface that when given a recipe name will return the mirrored recipe name (if said recipe has permutations or nil/false otherwise).

Fluid Permutations aside, flipping/mirroring a building with fluid inputs/outputs can be tricky as a recipe might not use all of the inputs/outputs.

3 years ago

That would be very cool. I was just looking for an easy way to do this w/o compare each recipe

3 years ago
(updated 3 years ago)

Some time later, Fluid Permutations 0.3.6 exposes a remote interface with a "flip_recipe" function that when given a recipe name will return the name of the recipe that has both the input fluids and output fluids reversed (or nil if it is not a valid recipe).
You can use it like this:
remote.call("fluid_permutations", "flip_recipe", "advanced-oil-processing") --"advanced-oil-processing-fp-da-i1-r5"

3 years ago

Oh alive again. Sleeping Beauty? ;-)
OK Thanks I will try it.

3 years ago
(updated 3 years ago)

flip fluid_permutations: advanced-oil-processing
-> advanced-oil-processing-fp-da-i1-r5
but is wrong it must be
-> advanced-oil-processing-fp-da-i2-r2
https://prnt.sc/wmx6d5
flip not standard recipe are also wrong
https://prnt.sc/wmx9cs

3 years ago
(updated 3 years ago)

I will look into it. This time faster than 2 months ;)
Edit:
I've made a mistake. The mirroring algorithm works with lexicographical order permutations and I've forgotten than Fluid permutations uses a simpler permutations generator that does not generate them in lexicographical order.
Switching the generation algorithm would be simple, but it would break people's saves, so it is not an option.
Adjusting the mirroring algorithm will take a bit of time.

3 years ago

I have published the new Version of Blueprint Extensions.
So hopefully it does not take too long to fix this.

3 years ago

Since I have to figure out the algorithm, I cannot say for sure, but I will try to make it happen before the weekend.

3 years ago

I did not manage to figure out a proper algorithm, so I added a brute force one. Should work now with versions:
Fluid Permutations 0.3.7 for Factorio 1.0
Fluid Permutations 0.4.1 for Factorio 1.1

3 years ago

Thank you.
locally I had used a mapping table for test purposes, but I could not generate all cases.
https://prnt.sc/x17ze3
I have nothing to change, the users must use only the newest version from you

3 years ago

Unknown recipe name: advanced-oil-processing-fp-da-i1-r2
simple Mode is activated

3 years ago

Ok. I know what is wrong. I will fix it tomorrow.

3 years ago

After some consideration, I've decided to fix the problem in its root. This will take a bit more time, but should be worth it. I also think I can avoid breaking existing saves.

New response