Determine contents of fluid wagon for values 0<x<1

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 880
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Determine contents of fluid wagon for values 0<x<1

Post by Impatient »

TL;DR
Create the possibility to determine what kind of fluid is in a fluid wagon for values 0 < x < 1 .

What ?
Fluid values below 1 are rounded down to 0. An exception to that is the train stop condition "cargo inventory empty". Usually one would test for (TypeOfFluid > 0) to determine what kind of fluid is in a fluid wagon. But this does not work for values 0 < x < 1.
Why ?
There is a landslide of threads regarding this issue. This one might be exemplary:
viewtopic.php?f=6&t=49274

Edit:
This does not mean I am asking for the circuit network to deal with floats or fluids 0 < x < 1 to be rounded to 1. Both was discussed and weighed exhaustingly and dismissed. I just request ANY way to determine what fluid is in there.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Determine contents of fluid wagon for values 0<x<1

Post by quyxkh »

Have you got a real map showing the trouble? There's lots of things the equipment in Factorio can't do very well or at all, but the game doesn't ask you to do those things. I don't often see it pose a design challenge that can't be solved neatly with the tools it offers. For me, that's the fun of it. Mixing fluids on a single pipeline is a recipe for pain irl too I think, so my solution here would be just don't try to make sushi-belts with fluids.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 880
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Determine contents of fluid wagon for values 0<x<1

Post by Impatient »

as i see it, factorio is about designing factories. there is not much of a story. It is all about designing something and trying out various ways to reach the goal. and because there is not much variety in goals, it is also about setting my own goals. I ran into that problem when trying to unload different fluids from the same wagon slot and also use the same wagon for different fluids. eg transporting water in one delivery and oil in another delivery by using the same wagon and unloading it in the same station). if i set up several pumps at one wagon slot in the station for different fluids (the pipe systems are distinct for each fluid btw -so no cocktail in the pipes), the circuit needs to know which one to activate for unloading. but because of the game mechanics this isn't possible for values 0 < x < 1. My self set goal aside, in my opinion this is also a slight inconsistency in the game mechanics.
Reading various discussions about the problem and the devs responses to my own bug report viewtopic.php?f=47&t=52918 , i got the impression, the devs are slightly unhappy with this situation themselves. this feature request is here to formalize a request for a solution to a problem that stems from this slight inconsistency. I agree, that many hardly notice this inconsistency. But those, like me, who tinker around with the possibilities of factorio, do. And I agree, that I don't have to do it like this. But as expressed above, imo doing things various ways is something the game encourages.
Last edited by Impatient on Sun Oct 01, 2017 12:35 pm, edited 2 times in total.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 880
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Determine contents of fluid wagon for values 0<x<1

Post by Impatient »

ha, thank you for your reply. While writing my response, the solution for my problem popped up in my mind.
The circuit needs to "memorize" what fluid is in he wagon, while the amount is 1 =< x and keep the same pump running until the wagon is emptied completely.
I will see if that can be done via the circuit network. I should be doable with some lump of combinators. :)

quyxkh
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Determine contents of fluid wagon for values 0<x<1

Post by quyxkh »

Impatient wrote:should be doable with some lump of combinators. :)
I think just one'll do it: put a one-tick delay on the signal, I use each-minus-constant-0-to-each for isolators/delays.
If the wagon was showing fumes-or-empty last tick, either the fumes are gone now or your output is completely stalled
.

p.s. while I agree there's a good case for fix-it-it-shouldn't-be-like-this, one the things I find loveliest in this game is the subtle, small quirks and imperfections when you're pushing limits in the modeled equipment. Getting that last ounce of performance _should_ be hard, you _should_ have to compensate for the little quirks that aren't even noticeable in ordinary use. The specific details of any of them may not be much or at all like the details of any real-world quirks, but what matters more is, there's something there. This is there, and you'll never notice it's there unless you're trying to squeeze the last drop (heh) of performance out of your factory, but when you do have to deal with it frikken annoying. See, in my perverted view, that makes it a good thing.

JohnyDL
Filter Inserter
Filter Inserter
Posts: 533
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: Determine contents of fluid wagon for values 0<x<1

Post by JohnyDL »

0.16 will have fluid squashing and if there's less than 1 fluid in say a tank or pipe when a new one wants to be in there it'll be pushed out of the way if possible and if not deleted as though the tank is empty.
Twinsen wrote:Oh no, not this again.
I remember the rounding method was changed about 2 times due to problems like this.
Won't rounding up(in all cases including storage tanks, since it has to be consistent) cause other problems in other setups?

I'll add this to my TODO and hopefully we can fix it.
We might implement a mechanic where large high pressure fluids would destroy static small amounts of leftover fluid. This would also solve the "delete and replace all pipes because I accidentally put the wrong fluid in it for 1 second" problem.
We are also considering remove all the pipe fluid physics and replacing it with a much simpler model, similar to how electric networks work.
from viewtopic.php?f=6&t=49274

and
There are overall tweaks planned like:
Fluid squashing in pipes
from FFF200

Post Reply

Return to “Ideas and Suggestions”