[MOD 0.12, 0.13, 0.14, 0.15] Flow Control

Topics and discussion about specific mods
DarcClan
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Oct 27, 2016 7:08 am
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by DarcClan »

Seems its boblogistics doing it, I also note that boblogistics renames pipe into Iron pipe. Does that have something to do with it?

User avatar
Ayyno
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 05, 2016 2:58 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Ayyno »

I'm new to Factorio modding but I'd be willing to help fix the elbow pipe issue if you'd like.

It's definitely still occurring.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by GotLag »

If you can work out which mods are doing it, I'd be happy to see if there's a change I can make to fix it. But I haven't seen anything obvious in a quick look through bob's logistics.

User avatar
Ayyno
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 05, 2016 2:58 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Ayyno »

I'm pretty sure Angel is right and it's [Z] Group Change that's causing the issue. I think it's handling a name change or something like that oddly. I'll take a look later tonight after I've taken care of a paper I have to write.

User avatar
Ayyno
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 05, 2016 2:58 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Ayyno »

So I've been fiddling around with it a bit. If you set

Code: Select all

pipe_elbow.minable
in \prototyopes\entities.lua to

Code: Select all

{mining_time = 1, result = "iron-pipe"}
then that will fix it as it copies down to straight and junction. They will then successfully output the correct pipe when a normal iron pipe is placed on the ground. Any existing pipe forced into Flow Control in the player inventory will not be fixed, though. This also does not fix the core issue as Flow Control pipes now only output what you put them down as. So if you build and place a junction, you only get a junction back. Fixing it further is beyond my abilities right now, but it definitely makes the mod more useable in its current state with ZGroups and BobsLogistics.

I was curious what was happening here so I looked into reordering the entities.lua file to have pipe_straight deepcopy from check_valve instead and then pipe_elbow and pipe_junction deepcopy from pipe_straight. Before it was pipe_elbow deepcopying from check_valve and pipe_elbow and pipe_junction deepcopying from pipe_straight.

What this did is make it so every time you deconstruct a placed pipe it gives you a straight pipe instead of an elbow pipe. So it seems like the main pipe entry is being set based on the main pipe entry. I guess, somehow, data.raw["pipe"]["pipe"].minable is referencing the first entry pipe entry in that entities.lua file.

It seems like this happens because Z groups shuffles some stuff around...? It doesn't look like Bob's Logistics messes with the raw tables that Flow Control is pulling from... I'm still too new to Factorio modding to really get a handle on it, though...

Either way the entities.lua file I'm using is attached. Let me know if I was any help or if there's any place else you'd like me to look/investigate.
Modlist
Attachments
entities.lua
(5.65 KiB) Downloaded 179 times

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Nexela »

Can you post the whole mod pack somewhere? pre-edit.

Never mind I got it to load. And it is zgroup change that is doing it. but that is about the extent I will look into it because ---------

WHY anyone would want to use zgroup change is beyond me. It should be renamed to zchangeeverythingandbreakstuff

User avatar
Ayyno
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 05, 2016 2:58 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Ayyno »

The mod pack's available on the Factorio mod portal...

As for why use Z Group... It helps a lot with all the things added by Bob's and Angel's, especially when using them together. I haven't had very many issues aside from this one with it, but there may be more.

Either way that's what a community is for. Helping fix things! :)

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Nexela »

Zgroup change removes the electronics assembly machines! Doesn't load with bobs' modules (with defaults), removes the fancy pipes from bobs stuff and that was just stuff I skimmed from the surface :)

User avatar
Ayyno
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 05, 2016 2:58 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Ayyno »

I use ZGroups and don't have any of those issues. As far as I know these sorts of issues have mostly been resolved.

User avatar
Ayyno
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 05, 2016 2:58 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Ayyno »

I fixed it.

The issue is lines 500 - 503 in ZGroups in \mods\other.lua

Code: Select all

for k,v in pairs(new_pipes) do data:extend({v.entity,v.recipe,v.item}) end
data.raw[pipe_type]["pipe-straight"].minable.result = "pipe-straight"
data.raw[pipe_type]["pipe-junction"].minable.result = "pipe-junction"
data.raw[pipe_type]["pipe-elbow"].minable.result = "pipe-elbow"
Removing this segment of code resolves the issue. It was basically stomping whatever you set the minable.result to. With this change the entities.lua file I posted above is no longer necessary. My modding noobishness had me believing something far more complicated was the problem! ;P

I'll update my bug report with ZGroups. :)

EDIT: Link to bug on mod portal here.

User avatar
EstebanLB
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 15, 2013 3:00 am
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by EstebanLB »

I've just tested the mod and while doing so I've had a revelation. Suddenly I lost control of my body and a vision appeared in front of me, it was the LUAGod. He told me that instead of separete recipes and items for each pipe, a hot-key controlled function could be used to switch between the different pipes once placed, the base game pipe, or a moded one.
Using the Side Inserted mod of yours gave me that idea, is it possible or even convenient?

User avatar
Alice3173
Fast Inserter
Fast Inserter
Posts: 118
Joined: Sun Apr 24, 2016 11:35 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Alice3173 »

EstebanLB wrote:I've just tested the mod and while doing so I've had a revelation. Suddenly I lost control of my body and a vision appeared in front of me, it was the LUAGod. He told me that instead of separete recipes and items for each pipe, a hot-key controlled function could be used to switch between the different pipes once placed, the base game pipe, or a moded one.
Using the Side Inserted mod of yours gave me that idea, is it possible or even convenient?
I recall reading somewhere that modders can't really add hotkeys or anything like that. A tool with a GUI would probably be an option but it'd probably be clunkier than the current system on top of being quite a bit more complicated to handle. Also I see one flaw with changing the pipes after they're placed as well. If you're trying to deal with piping around another network then the two are going to run into each other until after you've switched the pieces which would result in getting the wrong fluid stuck in the network.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by GotLag »

Hotkeys can be done. There's just not that much point in doing them for the pipes, as you'd still need to be able to craft the custom pipe segments for blueprints to be useful. I could write a hotkey to convert regular pipes to fixed (and the reverse) but it's a fair bit of effort for minimal reward.

User avatar
Alice3173
Fast Inserter
Fast Inserter
Posts: 118
Joined: Sun Apr 24, 2016 11:35 pm
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by Alice3173 »

GotLag wrote:Hotkeys can be done.
Oh, can they? Either that must have changed without me noticing it or I might be managing to mix it up with another game and not realizing it then.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by daniel34 »

Alice3173 wrote:Oh, can they? Either that must have changed without me noticing it or I might be managing to mix it up with another game and not realizing it then.
It's called custom-input: http://pastebin.com/7upDfQKg
Users can also change the keybinding set in the Controls dialog, there will be an extra Mods tab.
quick links: log file | graphical issues | wiki

User avatar
EstebanLB
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 15, 2013 3:00 am
Contact:

Re: [MOD 0.12.x, 0.13.x] Flow Control

Post by EstebanLB »

Alice3173 wrote:
GotLag wrote:Hotkeys can be done.
Oh, can they? Either that must have changed without me noticing it or I might be managing to mix it up with another game and not realizing it then.
Try Side inserters: https://mods.factorio.com/mods/GotLag/Side%20Inserters
---------------------------
I didn't think of how that would work with blueprints. I remember the troubles that appeared with logistic configurations not saving on them, but then they fixed it, don't know how though. Still, the base game really needs a solution for pipes.

On another topic, can an underground layer for belts and pipes be modded into the game?

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x, 0.13.x, 0.14] Flow Control

Post by GotLag »

I've added the float valve, a complement of sorts for the overflow valve. The float valve allows flow only when the output is less than 80% full.

Due to the way they work, some small amount of fluid may remain in the valve when the rest of the pipe is drained. if you absolutely must recover this fluid, attaching a pump directly to either side of the valve will suck it out.

bNarFProfCrazy
Fast Inserter
Fast Inserter
Posts: 194
Joined: Sat Apr 23, 2016 7:11 am
Contact:

Re: [MOD 0.12.x, 0.13.x, 0.14] Flow Control

Post by bNarFProfCrazy »

Its nice to hear that you still improve your plugin.
I cannot think of a usecase where i need to enable a section of my factory if I dont have enough of the resource it consumes. Could you give me such an example?

EDIT: Or is this for Bergius Process if you have less than 80% of heavy oil you turn that section back on?

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x, 0.13.x, 0.14] Flow Control

Post by GotLag »

I can't think of vanilla uses off the top of my head, but I've already made use of it to control uranium slurry production for Reactors. Reprocessing spent fuel recovers uranium slurry, but slightly less than originally required to produce the fuel. By using a float valve, more slurry is only injected to top-up the fuel processing loop when the fluid level drops below 80%. If I didn't use either the float valve or a pump+tank+wire combo, fuel reprocessing would back up, preventing the reactors from unloading fuel and bringing my power production to a halt.

It's also useful for creating a passive, no-electricity-needed shared hot water line between my reactors that distributes hot water from active reactors to inactive reactors to run the auxiliary engines powering their circulation pumps. The unpowered nature of this line means I can also run it as an emergency/cold-start line with burner-inserter-fed coal boilers that only operate when no reactor is online, all without any electricity requirement.

Edit: here's a picture:
Image
The red pumps from each reactor to its auxiliary engines are shut down with the reactor. This means the hot water to the auxiliary engines is slowly consumed by the engines, when it drops below 80% hot water is injected from the common line via the white float valves. Operating reactors have their aux lines pressurised by the red pumps, so only they are over 80% full and send hot water through the brown overflow valves to the common line.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x, 0.13.x, 0.14] Flow Control

Post by GotLag »

Renamed the float valve to top-up valve, to be more descriptive.

Post Reply

Return to “Mods”