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.)
[boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
To illustrate what I'm talking about here.
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.
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.
Re: [boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
Thanks for the report. Issue is now fixed for 1.2.
Issue was that CraftingMachines (which includes AssemblingMachine and Furnaces) are using FluidBoxManager to have flexible fluidboxes (where the amount of them is not hardcoded but can be given by some prototypes, either the FluidBoxManagerPrototype itself or by the recipe which can take multiple FluidBoxPrototypes of that manager and merge them or use specific ones based on custom fluid indexes). FluidBoxManager is internally creating copies of the FluidBoxPrototype because they can be mutated (for example assembling machine may merge multiple fluidboxes and it needs a prototype that is a sum of multiple original prototypes and it can change volume of those fluidboxes). When those copies were created it was not copying the filter, minimum temperature or maximum temperature from the source prototypes. After fix those internally mutable prototype copies will use the fluid filter, minimum temperature and maximum temperature of the first fluid box that becomes part of the compound.
This fix does not affect AssemblingMachines without recipe because of other changes where i decided that assembling machine without recipe will use empty FluidBoxManager (FluidBox of a FluidEnergySource is not part of this object so it will stay as normal).
Issue was that CraftingMachines (which includes AssemblingMachine and Furnaces) are using FluidBoxManager to have flexible fluidboxes (where the amount of them is not hardcoded but can be given by some prototypes, either the FluidBoxManagerPrototype itself or by the recipe which can take multiple FluidBoxPrototypes of that manager and merge them or use specific ones based on custom fluid indexes). FluidBoxManager is internally creating copies of the FluidBoxPrototype because they can be mutated (for example assembling machine may merge multiple fluidboxes and it needs a prototype that is a sum of multiple original prototypes and it can change volume of those fluidboxes). When those copies were created it was not copying the filter, minimum temperature or maximum temperature from the source prototypes. After fix those internally mutable prototype copies will use the fluid filter, minimum temperature and maximum temperature of the first fluid box that becomes part of the compound.
This fix does not affect AssemblingMachines without recipe because of other changes where i decided that assembling machine without recipe will use empty FluidBoxManager (FluidBox of a FluidEnergySource is not part of this object so it will stay as normal).
Re: [boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
Once 1.1.83 will be released, could you verify if this issue is still present? When fixing 106428 i had to backport one of the changes related to compound prototypes creation where i also decided to bring the fluid filter fix.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
Confirmed that this is much improved in 1.1.83, thank you.
Furnace fluidboxes now respect filters and show them in alt-mode, which was the most limiting issue here.
Furnace fluidboxes now respect filters and show them in alt-mode, which was the most limiting issue here.
Re: [boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
Great, do you have any remaining issues in this topic that i missed here or can i mark this topic as "Resolved" (not in 1.2)?
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [boskid][for 1.2][1.1.70] Fluidbox filters are ignored by crafting machines (except when they aren't)
Not really. It initially seemed weird to me that filter icons don't appear on unfiltered fluidboxes when the furnace has "chosen" a recipe, but thinking about it, it's probably correct as it is - an assembling machine locks on to the filters because they won't change without manual intervention but a furnace could theoretically switch recipe at any time, so it's for the modder to manage how that works out.