Flow Limit Valve

by latotty

A valve that lets through at most a set amount of fluid per second, fixed or from a circuit signal. It moves the fluid steadily every tick, needs no power, and can be placed over a pump.

Content
a day ago
2.1
3
Logistics Fluids Circuit network
Owner:
latotty
Source:
https://github.com/latotty/factorio-m...
Homepage:
https://github.com/latotty/factorio-mods
License:
MIT
Created:
a day ago
Latest Version:
1.0.0 (a day ago)
Factorio version:
2.1
Downloaded by:
3 users

Flow Limit Valve (llwz-flow-limit-valve)

Made for our own play experience. I don't promise to maintain it. Feel free to fork, reuse or rewrite it (license: MIT).

A valve that moves at most a set amount of fluid per second, steadily every tick.
- Looks: an orange-tinted pump.
- Recipe: a pump and 2 electronic circuits, unlocked with the pump (Fluid handling).
- Power: none needed.
- Placement: it shares the pump's fast-replace group, so it can be placed over a pump.

A "Flow limit" panel sits beside the valve window:
- No limit: full speed. An enable condition of your own still works.
- Fixed limit: N fluid per second, set with a slider or a number.
- Limit from a signal: the chosen signal's value on the valve's wires is the limit in fluid per second. The script follows it every 10 ticks.

The status line shows the limit ("Flow limit: 300/s", yellow at 0).

How it works

The valve is a copy of the pump that runs on a hidden "Flow setting" fluid instead of electricity.
- A fluid power source that doesn't burn its fluid gives usage × temperature × heat capacity per tick, with the usage fixed for 100 °C.
- So a drive at 25 °C gives a quarter of the power, and the valve pumps a quarter of its top speed on every tick. The drive's temperature is the valve's speed in percent.
- Its power is set to 1 W, since the power section can't be hidden from the tooltip and window, and only the share of that power the valve gets sets its speed.
- The game's own fluid usage value comes out rounded down. So the mod sets it by hand with 0.05% to spare, and the script reads the stored value back and aims 0.01% above the limit. That way the speed readout shows the round number.
- 100 units of drive last about 2.8 hours. The script refills below 50 units, re-checking 25 valves every second.

The limit is kept in the valve's own circuit condition, Flow limit < N (or < signal), so blueprints, copy-paste and undo carry it.
- The Flow limit signal is never sent, so it reads as 0.
- The condition is therefore true for any limit above 0 and false at 0.

Tested (2026-12-01, Factorio 2.1.25)

  • Water between infinity pipes, 20 s: every valve moved exactly the same amount on every tick.
  • Limits 7, 60, 300 → 7.0, 60.0, 300.0/s
  • 1199 → 1199.1/s; 5000 and no limit → 1200/s; 0 → 0
  • signal F = 240 → 240.0/s; F changed to 90 → 90/s within 30 ticks
  • legendary valve at 1500 → 1500.2/s
  • Blueprint round trip: 300 → 300.0/s.
  • Refill: a drive set down to 10 units was topped up by the next check.
  • Save and reload keeps everything.
  • Placing a valve over a limited pump by script (fast_replace): the pump's condition was not taken over, so the valve started with no limit.
  • Space platform thruster fed through two valves at 30/s: it burns 30.0/s of fuel and 30.0/s of oxidizer.
  • UPS: 400 valves cost 0.01 ms per tick more than 400 plain pumps without a limit, and 0.02 ms with one (3 × 3600 ticks, 0.135 → 0.147 / 0.155 ms average).
  • The full co-op pack (182 mods with the valve) loads with it, every tweak guard passes, and the run's save loads with no errors.

Build

The mod zip is this folder as llwz-flow-limit-valve_<version>/, without build/ and this README.