[boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)

Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2432
Joined: Fri Nov 06, 2015 7:41 pm

[boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)

Post by Deadlock989 »

I'm referring in this report to crafting machine ingredient/result fluidboxes, not energy source fluidboxes which work correctly as far as I can tell.

For reference see this thread which led to the creation of the filter property for fluidboxes.

For assembling machines, any fluidbox filter is ignored until a recipe is selected, at which point, the fluidboxes are effectively filtered by the recipe's inputs and outputs. This makes sense.

For furnaces, the filter appears to be ignored both before any recipe is set (by inserting/piping in ingredients) and after the recipe is set by having a valid combination of ingredients put in.

This behaviour isn't documented on the wiki but I thought I would report it here before making a wiki change. It feels like a bug to me - I feel like I should be able to create a furnace entity which only ever expects one specific fluid input or output, and has that filter shown in the alt-mode/mouseover fluidbox icons to make it easy to place and orient entities, so that I can stop punters filling up the entity with the wrong fluids, the way I currently can for generators or pumps or almost anything else with a fluidbox.

(For furnaces with a fluid input, it's not actually possible to put any solid ingredients into the furnace until one of the valid fluids has been put in. The mouseover tooltip for the solid and fluid ingredient slots on the furnace GUI was updated in 1.1 to show all the valid combinations of input and output. If there is one and only one allowed input or output fluid, and there is a good reason why filters are currently being ignored on crafting machines, it would make sense to effectively filter the furnace's fluidboxes the same way that assembling machines impose their filters.)
"If Stalin had a good writeup on programming, would linking that be dangerous?"

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2432
Joined: Fri Nov 06, 2015 7:41 pm

Re: [1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)

Post by Deadlock989 »

To illustrate what I'm talking about here.

Untitled.jpg
Untitled.jpg (718.21 KiB) Viewed 128 times

Entity A is a furnace. It has energy source fluidboxes with a filter specified. The filter is set up correctly and is shown in alt-mode. No problem.

Entities B and C are also furnaces. B is idle without a recipe set, C is working on a recipe determined by the inputs. They have crafting machine fluidboxes with a filter specified. The filter is silently ignored. There is only one input fluid allowed for all of the recipes in this machine's crafting category, which is confirmed when you hover the mouse over the input fluid or item slots ("Possible inputs:" followed by a single fluid). There is also only one output fluid ever created, but this is not shown in a tooltip. No alt-mode fluidbox filter icons ever appear on furnaces whether working on a recipe or not.

Entities D and E are similar to B and C with the same fluidbox set up, except this time only the output fluidbox is filtered (and ignored). There is more than one possible input fluid. Still, no alt-mode filter icons are shown whether the machine is working or not.

Entities F and G are assemblers with input and output crafting fluidboxes. They do not have filters specified. F is idle without a recipe set - it has off_when_no_fluid_recipe set to true so there are no visible fluidboxes. G is working on a recipe with both an input and output fluid. An automatic filter has been applied based on the recipe and the alt-mode icons are shown.

I get why it's tricky to set filters on entities that can change recipe, particularly furnaces where the recipe is determined by the inputs, and it makes sense to me that FluidBox.set_filter() doesn't work on crafting machines at runtime for that reason. However, I'm also aware that fluidboxes are effectively "locked" on to a fluid once they are dealing with it. So what doesn't make sense to me, and is limiting for the modder and confusing for the player, is that furnaces don't show the locked fluid for crafting fluidboxes under any circumstances. I also don't get why these fluidboxes silently ignore the filter set in the prototype in the data stage - if it blocks any particular recipe, so be it, recipes are already blocked for other reasons (e.g. lack of the correct number and type of fluidboxes, different crafting categories etc.)

Best case scenario: furnaces respect the filter on crafting fluidboxes and show it in alt-mode. I'm less interested in whether that would also apply to assemblers.

Second best scenario: furnaces "figure out" that a fluidbox is only ever going to be used for one thing (this logic presumably exists already because it is used in the fluid slot tooltips) and they show that "lock" or filter in alt-mode.

Third best case: furnaces at least show locked fluidbox filters when they are processing, the way assemblers do, though that won't help players as much when setting up production lines.

If this is a minor issue or won't fix, I'm happy to update the wiki.
"If Stalin had a good writeup on programming, would linking that be dangerous?"

Post Reply

Return to “Assigned”