Page 1 of 1

How to add a furnace with fluids

Posted: Sun Sep 02, 2018 12:09 pm
by hreintke
Hi,

Not 100% sure whether it is possible.

I would like to add furnaces that smelt a fluid into an item and vice versa.
When searching for such I see that added furnaces definitions are deeply within the other mods.

Is there a small/easy example of such a furnace prototype ?

Herman

Re: How to add a furnace with fluids

Posted: Sun Sep 02, 2018 5:46 pm
by darkfrei
Did you try just replace output to input?

Code: Select all

entity.fluid_boxes =
  {
    {
    production_type = "output",
    pipe_picture = assembler2pipepictures(),
    pipe_covers = pipecoverspictures(),
    base_area = 10,
    --base_level = 1,
    base_level = -1,
    pipe_connections = {{ type="input", position = {1, 2} }},
    secondary_draw_orders = { north = -1 }
    },
  off_when_no_fluid_recipe = false
  }

Re: How to add a furnace with fluids

Posted: Sun Sep 02, 2018 7:42 pm
by hreintke
No, I did not.

It's my first try to get custom furnaces working so my knowledge is only basic.

However, found this mod https://mods.factorio.com/mod/Flare%20Stack
That implements furnaces to dispose fluids and items. Gives me a start to understanding the principles.

Got that updated to get from fluids -> items. Now looking into items -> fluids.

Re: How to add a furnace with fluids

Posted: Mon Sep 03, 2018 8:53 am
by bobingabout
don't forget to change the base level from 1 to -1. think of it as the floor, a level of 1 would means the floor of the fluid box is 1 meter off the ground, where the pipe next to it, the top of the pipe would be 1 meter off the ground, so when full, it's still only level with the floor of the fluid box.
a base level of -1 would mean it's 1 meter below the ground level, and fluid from the connecting pipe will fall into it, to fill the fluid box even if the pipe contains a trickle.

Anyway. give it the following:

Code: Select all

  {
    pipe_picture = assembler2pipepictures(),
    pipe_covers = pipecoverspictures(),
    base_area = 10,
    base_level = -1,
    pipe_connections = {{ type="input", position = {1, 2} }},
    production_type = "input"
  },
you could probably turn off the input item too, otherwise it could contain 2 things, an item and a fluid, and get confused. a furnace can only ever have 1 input ingredient, so you should create a new entity for this, not edit any of the existing ones.

Re: How to add a furnace with fluids

Posted: Sat Sep 08, 2018 12:33 pm
by hreintke
@bobingabout : Thanks, gave me a headstart for development.

@all :

I managed to get the furnace(s) defined.

There are are now :

Factorio 0.16.51
- Furnace for fluid -> belt
- Furnace for belt -> fluid
- Recipe categories for belting & unbelting
- Recipes for fluid -> raw resource and raw resource -> fluid.

But I have strange/unwanted/buggy behavior.
Made a minimal save-game to show the issue I have.

In the savegame there is a chain containing

Waterpump -> FluidBelt furnace -> fast inserter -> belts -> BeltFluid furnace -> pipes -> FluidBelt furnace -> inserter -> iron chest.
The detail is that there is a fast and normal inserter -> Consume is slower than produce.

The issue shows in the BeltFluid furnace.
What happens :
- The flow is OK, all working
- The BeltFluid furnace output fluidbox fills up.
- When fluidbox is full, there are no more items inserted
- The fluidbox is emptied, still no items inserted -----> This is the issue
- The BeltFluid furnace stops working due to no more ingredients
- The pipes behind are emptied
- No more flow thru the chain.

But.. after some time, the BeltFluid box is again getting items inserted -> for some time the chain works OK, until the situation above repeats.

You can see the behavior in the attached savegame.
In that I used only the "creative-mode-fix_0.0.32" mod and my fluidbelt mod (attached also)

Any hints how this can be explained/avoided ?

Re: How to add a furnace with fluids

Posted: Sun Sep 09, 2018 12:10 pm
by hreintke
Found that this is similar behavior as in viewtopic.php?f=11&t=59316 and viewtopic.php?f=29&t=59807

Submitted a bug report for this too.

Re: How to add a furnace with fluids

Posted: Mon Sep 10, 2018 9:02 am
by bobingabout
I have honestly never tried a furnace with a fluid output.
The only furnace I've tried personally with a fluid input was my "Gas vent" also known as a void pump. Liquid goes in, nothing comes out.
So I can't say I've had any real experience with it, other than setting up the fluid input.

When I made my other "Furnace" machines, I just used the assembling machine. The only difference between the two is...
Assembling machine: Set a recipe.
Furnace: Automatically sets it's recipe, but limited to only a single input item/fluid.

Re: How to add a furnace with fluids

Posted: Mon Sep 10, 2018 9:53 am
by darkfrei
bobingabout wrote:I have honestly never tried a furnace with a fluid output.
The only furnace I've tried personally with a fluid input was my "Gas vent" also known as a void pump. Liquid goes in, nothing comes out.
So I can't say I've had any real experience with it, other than setting up the fluid input.
My mod Ice Ore adds only one entity and one recipe for this furnace: melt the ice into water.

Re: How to add a furnace with fluids

Posted: Tue Sep 11, 2018 4:25 pm
by hreintke
@darkfrei
Thanks for the link to your mod.
I will check for differences with mine/try to reproduce with your mod to find root reason.

Re: How to add a furnace with fluids

Posted: Tue Sep 11, 2018 6:41 pm
by hreintke
@darkfrei

I can reproduce the issue also with your mod & creative mod only.
Had to update the crafting speed to 20 so that the production of water is higher than consuming in the barreling assembler.

In attached savegame the furnace is producing and stops shortly after that.
Wait some time and it restarts.

Re: How to add a furnace with fluids

Posted: Sun Sep 23, 2018 12:36 pm
by hreintke
For completeness of this thread.
This has proved to be a bug. Solved in 0.17.
viewtopic.php?f=218&t=62434