Friday Facts #312 - Fluid mixing saga & Landfill terrain

Regular reports on Factorio development.
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Oktokolo »

I don't care much about having fluid mixing prevention. But i would like to be able to design flexible systems, which change recipes dynamically and use different fluids delivered using a pipe network wich is connected to multiple different fluid sources by pumps of wich only one is enabled at a time.
So please consider a less restrictive fluid mixing prevention.
Also, please adopt Picker Pipe Tools into vanilla.
Gergely wrote: Fri Sep 13, 2019 1:28 pm We all hate refactoring don't we?
I really like refactoring code to be easier to understand / better maintainable, less bug-prone, or more performant.
Cyclonut
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 22, 2019 9:25 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Cyclonut »

Good report on efforts to fix fluid mixing. I was wondering if you could have two pipes travelling in the same direction, but carrying two different fluids work? Instead of having them automatically try to connect to each other and therefore not allowing two pipes to run in parallel?
Also, regarding the landfills, can you maybe program them to change in time, like when the dead biters disappear, the land is automatically morphed into colours infiltrated from adjoining edges? Of course not the water colour. Cest praci!
Cyclonut
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 22, 2019 9:25 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Cyclonut »

Oh, one more wish for landfill: Can you program it so that after few turns, the brush of small tress start growing, and then aging? I need more wood close to the base, and also would like to set up an area for a tree farm. Thanks.
gGeorg
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by gGeorg »

Now the landfill is recognizable,
- make a tool for dig landfill. (but cant dig the original land)
- allow place water pump thru landfill terrain
Uristqwerty
Inserter
Inserter
Posts: 20
Joined: Tue May 06, 2014 8:00 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Uristqwerty »

Would it work to have a "fluid conflict" lock, that flood-fills out replacing other fluid locks that changed in the past few ticks (and/or locks on pipes without any current contents), doesn't allow fluids to enter the conflicting segment (visually disconnecting the pipe, as someone else brought up?), and pings an appropriate error notification to the player alongside the usual combat, etc. ones until they resolve the issue?
RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 362
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by RocketManChronicles »

Love the idea of the landfill texture being "Manmade," but it is still too uniform in the grid pattern. Scatter them a bit, not totally (perfectly) aligned. I do like the angled attempt by the community, but again, scatter the squares so that there are no extremely long lines/seams along the grid.
foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by foamy »

eradicator wrote: Fri Sep 13, 2019 9:01 pm
urza99814 wrote: Fri Sep 13, 2019 8:45 pm I think the current mechanic is more annoying than the occasional accidental mixing. And honestly, a lot of that is just because "well that was stupid" is far less frustrating to me than "WHY won't it let me build this here?"
I think (pure speculation) the main motivation for the removal of mixing was probably ease of implementation. Because an algorithm that only has to handle one fluid at a time is easier to write, less bug prone, and potentially faster than if you have to handle a random mixed chaos in every edge case. Also there wasn't really ever any simulation of "mixing", there was only "this pipe has A and this adjacent pipe has B, and neither of them can move". Oxygen not Included use that kind of non-mixing "mixing" exclusively and i found it so frustrating to use that i quit playing that. So while i'm not "anti-mixing", i also lack the imagination how it could possibly be implemented as a fun mechanic. Maybe a mod could implement a circuit-connected valve that can completely drain+seperate a fluid system?

The nice thing about banning mixing is that it keeps people from attaching their steam engines wrong. I completely appreciate the motivation behind making it so's you don't need to tear up your entire dang oil processing facility because you misclicked and routed your water into a light oil line or whatever, too.
King Mir
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Aug 11, 2019 2:53 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by King Mir »

One suggestion: Make a "disconnected underground pipe" graphic. Like a capped pipe going toward the ground or something. Used for any case where you've placed one end but not the other. Would be useful for detecting these pipe network changed because a pipe in the middle was destroyed cases. May also be useful for belts.

A lot of people seem to be suggesting that fluid mixing be allowed but behave differently. This strikes me as just as much work; you still have to detect all the ways that a pipe can have two fluids and display it accordingly. Whether it's allowing fluid mixing by having "fluid boxes" with multiple fluids or creating a blocked pipe graphic, or some tug of war system, the game needs to detect that multiple fluids could be mixed by a given action.

That said, I favor drawing a blocked pipe, because it would allow actions like rotating an assembler pipe from facing east to west, even when there's a wrong fluid north.

I think this is a healthy and necessary endeavor in making making player error clearly visible. Great work!
Hlebuw3k wrote: Fri Sep 13, 2019 5:58 pm Maybe i just dont understand something, but why not ONLY allow placing fluid boxes when it doesnt mix fluids? And dont allow to place them in ANY other case?
That's the intent. The problem is in detecting what actions cause fluid boxes to mix.

Like in the oil and acid example: deleting a ghost while placing a pipe actually causes two fluid connections by the same user action.
User avatar
Drury
Filter Inserter
Filter Inserter
Posts: 794
Joined: Tue Mar 25, 2014 8:01 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Drury »

dominik_irl.png
dominik_irl.png (150.9 KiB) Viewed 8091 times
kisss256
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Nov 03, 2017 12:24 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by kisss256 »

Am I the only one that enjoys mixing fluids?
When you fuck something up, you have to purge the pipes (I usually pump it out). Its a very simple and straight-forward mechanic, with parallels to conveyor belts with bad items on them. Being able to manually purge pipes is the only break in this parallel.
Don't make a heavily convoluted system to prevent the player from fucking up, it's all part of the fun!

Also, please don't rotate the landfill 45 degrees, you monsters. Looks great though, reminds me of reinforced soil.
Schwoby
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Sep 13, 2019 7:33 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Schwoby »

i would really like the ability to dig out soil from a water source in addition to covering it up with landfill. this type of action would only work on the edge of water and would yield some trivial amount of stone instead of a full landfill. you would not be able to 'just dig' a pond from nothing.
aljo
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Nov 10, 2018 7:54 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by aljo »

pr0n wrote: Fri Sep 13, 2019 3:12 pm Please stop messing with established mechanics. Was fluid mixing annoying? Yes. Is this better? Not necessarily, your gif shows a quite awful example. Does this change add to the game? Absolutely not.

Feels like so much cool stuff could have been done with all that time.

I feel like my favorite game is just getting dumbed down with every update. I dont want an easy game, that's not why *anyone* plays factorio. Think about what minecraft would be like if they went back and changed all the weird unintentional quirks that popped up in early development that are now just rock solid mechanics.
Something to keep in mind, the post clearly said that originally he thought it would be an easy change. And it was. And then that slowly went to hell. I've been there. You dig yourself into a hole without realizing, for months. Then when you realize it you have to decide whether you'd rather roll back to the old code and delete months of hard work with nothing to show for it (aside from, idk, lessons learned), or just push forward in the hopes that you'll find the end. And it just keeps getting pushed further and further back as you fix problems only to have new ones arise, but the extra work you've put in just makes you want to not throw it all away even more. It's an incredibly vicious and frustrating cycle. *Believe me*, I understand that. Wholeheartedly.

Just my two cents, I actually really appreciate the ban on fluid mixing. Maybe I'm too casual, but when it blocks up a whole system, it just frustrates me. Having said that, in recent months I've pretty much completely stopped playing. I just lost all motivation to deal with designing production lines (I had just started a new game when I finally stopped altogether), so maybe I'm not the best judge for what's fun. Clearly I can't figure it out for myself. Maybe I'll give it another shot. I'm like 50 hours from the 1000 hour mark. So close.
RobertTerwilliger
Fast Inserter
Fast Inserter
Posts: 196
Joined: Wed Nov 18, 2015 10:12 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by RobertTerwilliger »

Maybe locking underground pipes in pairs would work? I.e., building in pairs and removing in pairs. No rotating, but suddenly allowing the thing which we do with different tier belt, when you can de-facto run 3 belts through 1-tile width.

Although it'd make more sense to use gravel-like texture for landfill (as one uses solely stone), this new texture looks way better than gravel would))
Holding formation further and further,
Millions of lamb stay in embrace of Judas.
They just need some bread and faith in themselves,
BUT
THE TSAR IS GIVEN TO THEM IN EXCHANGE!
Original: 5diez - "Ищу, теряя" (rus, 2013)
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by mrvn »

Why is this something you can't fix? Why is that happening at all?

Image

Lets describe what I see going on:

1) The crude oil pipe is empty but locked by the assembler.
2) Placing a ghost disconnects part of the pipe making it unlocked.
3) Replacing the ghost does two things (in this order):
- connect the empty pipe to sulfuric acid (allowed)
- re-connect the empty pipe to crude oil because the ghost was emoved (mixing fluids)

It looks to me like you only check if placing a pipe is allowed but not if any side effect, like ghosts getting removed due to it, breaks things.

I know any action involving multiple steps (remove ghost, place pipe) can have many corner cases. But there would be two simple solutions I can see here:

1) reverse the order. First remove the ghost. This makes the empty pipe a crude oil pipe again. Then placing the new pipe becomes illegal and fails. If you can't do better the ghost will be gone but no fluids mixed.

But would it be impossible to undo the ghost removal? The game already has undo functionality which records how to reverse an action. At first glance I would think an undo should never fail if no fluid has flown because both the old new state of each performed sub-action was valid. So "all" you have to do if any action causes a fluid mixing is to call undo. If undo does fail leave the user in the state with no mixed fluids.

The drawback there is that there might be corner cases where removing the ghost makes placing the new pipe impossible. But with the new pipe placed the result would have been fine (no mixed fluids). Well, to bad. Deconstruct something temporarily to work around it. Should be rather rare and not too annoying.

2) Handle this as a transaction. If the end state does not validate then you reset to the start.

This would mean you do several actions while allowing fluid mixing and at the end you do an extra check if the result still has any mixed fluids. If any mixing is going on you undo all actions and recalculate the fluid locks. This would involve tons of code because every entity with fluids would have to be changed to allow mixing fluids temporarily and have a is_mixed() method. So I won't hold my breath.


Overall I love the fluid mixing prevention despite the corner cases where it doesn't allow things. Like changing a recipe in a row of chemical plants without first removing the old recipe in all of them first. There is only one thing missing now. Pipes with no lock from fluid box filters but minimal fluid (<0.1) should be considered empty. Setting a new fluid filter or pumping in new fluid should be allowed and destroy the remaining drops of wrong fluid.

The use case I have is for LTN depots where I want to remove left over fluids from returning trains. So I have 6 depot stops with pumps all connected to one provider stop. Normaly the pipes are empty. But if a train with fluid comes in the fluid is pumped to the provider stop and some other train will pick it up there and return it to the system. So far so good. Problem now is that the pumps don't manage to pump the pipe system 100% empty. All pipes show 0.0 fluids but some drops must remain somewhere. So the pipe system remains locked to the fluid and no other fluid can be remove from returning trains anymore. Result: It only woks once.
Arzorth
Inserter
Inserter
Posts: 24
Joined: Mon Oct 01, 2018 7:24 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Arzorth »

Ranger_Aurelien wrote: Fri Sep 13, 2019 8:49 pm
astroshak wrote: Fri Sep 13, 2019 8:13 pm
Arzorth wrote: Fri Sep 13, 2019 5:38 pm Isn’t this a bug?

Image
I don’t understand, what do you think is a bug there?
The red robot arm passing through the superstructure of the power pole to the south?
exactly, it’s a tiny graphical glitch but it may be worth to report it
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by mrvn »

Arzorth wrote: Sat Sep 14, 2019 8:04 am
Ranger_Aurelien wrote: Fri Sep 13, 2019 8:49 pm
astroshak wrote: Fri Sep 13, 2019 8:13 pm
Arzorth wrote: Fri Sep 13, 2019 5:38 pm Isn’t this a bug?

Image
I don’t understand, what do you think is a bug there?
The red robot arm passing through the superstructure of the power pole to the south?
exactly, it’s a tiny graphical glitch but it may be worth to report it
Unlikely to have any impact. The game basically draws entities top to bottom so entities lower on the screen appear before those further up. To cope with entities reaching down, like an inserter in north-south direction, graphics are also put in layers (or to handle trains being over rails even if the rails are further down on the screen). But that method isn't perfect as seen here. The base of the inserter and power pole are in one layer and are sorted correctly. The arm is in another layer and drawn after the power pole wrongly. It's impossibly to get it always right with the method used in the game.
Goose
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Tue Mar 13, 2018 4:18 am
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by Goose »

I guess this narrows down to personal opinion and suggestion, but I like the idea of landfill and other tile types working similar to how concrete and advanced concrete function together, where landfill would be on a higher layer than the rest of the tiles.
MicFac
Fast Inserter
Fast Inserter
Posts: 114
Joined: Sun Nov 20, 2016 7:33 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by MicFac »

Now that you're doing things with lanfill... how about making a way to remove ladfill?
I hate having to be scared of placing one bit of landfill wrong when I build my nuclear reactors, having to load a save if I mess up and then having to place all of it again. What about having some sort of miner structure which removes all landfill (but not normal terrain) in a radius of a couple tiles, or an explosive which does the same thing?
It would also be nice to have an option to automatically place landfill under every entity in a blueprint, so you can just place any blueprint on water.
MicFac
Fast Inserter
Fast Inserter
Posts: 114
Joined: Sun Nov 20, 2016 7:33 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by MicFac »

mrvn wrote: Sat Sep 14, 2019 8:20 am Unlikely to have any impact. The game basically draws entities top to bottom so entities lower on the screen appear before those further up. To cope with entities reaching down, like an inserter in north-south direction, graphics are also put in layers (or to handle trains being over rails even if the rails are further down on the screen). But that method isn't perfect as seen here. The base of the inserter and power pole are in one layer and are sorted correctly. The arm is in another layer and drawn after the power pole wrongly. It's impossibly to get it always right with the method used in the game.
I've noticed a couple of these glitches and they make this otherwise extremely polished game feel unfinished. I think this needs some sort of fix before 1.0. I guess this could get complicated though.
CzBuCHi
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Feb 22, 2018 10:25 pm
Contact:

Re: Friday Facts #312 - Fluid mixing saga & Landfill terrain

Post by CzBuCHi »

just an idea how to tweak autofix fluid mixing:

instead of removving recipes game could mark all pipes, that are connected to factories with special marker (i used deconstruct + upgrade) that is ignored by robots do not let fluid to pass and show 'mixed fluids' alert

Image

another idea: allow mixed fluids but let fluid with higher 'pressure' push other fluid out to next segment - that way invalid fluid get pushed to outputs (and block valid fluid flow - like invalid items on belts do) and player needs to fix only couple of pipes and not entire system ...

Edit: after posting i realised, that left refinery input would not have been marked in this setup ...
Post Reply

Return to “News”