How to add a furnace with fluids

Place to get help with not working mods / modding interface.
Post Reply
hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

How to add a furnace with fluids

Post 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

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: How to add a furnace with fluids

Post 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
  }
Last edited by darkfrei on Sat Sep 08, 2018 4:21 pm, edited 1 time in total.

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: How to add a furnace with fluids

Post 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.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7351
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: How to add a furnace with fluids

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: How to add a furnace with fluids

Post 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 ?
Attachments
creative_test.zip
(3.59 MiB) Downloaded 78 times
Fluidbelt_0.0.1.zip
(21.93 KiB) Downloaded 82 times

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: How to add a furnace with fluids

Post 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.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7351
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: How to add a furnace with fluids

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: How to add a furnace with fluids

Post 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.

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: How to add a furnace with fluids

Post 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.

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: How to add a furnace with fluids

Post 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.
Attachments
Creative_Test_1_ice5.zip
(4.44 MiB) Downloaded 88 times

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: How to add a furnace with fluids

Post by hreintke »

For completeness of this thread.
This has proved to be a bug. Solved in 0.17.
viewtopic.php?f=218&t=62434

Post Reply

Return to “Modding help”