Adds Balancer Parts, that can be put together, to balance all adjusting lanes. Updated for better performance and Factorio 2.0, fixing some bugs from previous versions.
Mods introducing new content into the game.
Version: 1.0.3
Date: 01.11.2026
Changes:
- Performance: the balancer hot path (balancer_functions.run) does less work per item. Measured on Factorio 2.1.24 with 50 saturated 4x4 balancers on express belts, the average tick went from 2.45 ms to 2.24 ms (about 9% of the whole tick, with the test script's own cost included); with intermittent input from 1.57 ms to 1.44 ms.
- Performance: stablize_item_stack no longer calls the prototype API for every item (item types are cached by name) and only reads the fields that apply to the item type.
- Performance: the lane scan no longer calls '#lane' twice per item, and the output step no longer creates a closure or shifts the whole buffer with table.remove on every run.
- Fixed: a loader (loader or loader-1x1, from any loader mod) that was built before the balancer part next to it was never connected, so no items moved. Parts now also look for neighbouring loaders when they are built.
- Apart from that fix the behaviour is unchanged: in the benchmark every output lane received exactly the same number of items as before, for saturated, intermittent, part/belt add-and-remove, undergrounds, splitters, loaders and items with durability or ammo.
- Buffered items no longer carry unused 'false' fields for durability, ammo and tags.
- Known limit: the mod still moves items with Lua, so its cost grows with the number of items. For very large bases a splitter-based balancer mod will use less UPS.
Version: 1.0.2
Date: 24.10.2026
Changes:
- Migrated to Factorio 2.1 (factorio_version and base dependency raised to 2.1).
- 2.1 API: replaced the removed LuaEntity::neighbours with LuaEntity::underground_belt_neighbour when rotating underground belts.
- Fixed the "other end" direction of a rotated underground belt: it now uses the 16-direction enum (180 degrees = +8 modulo 16) instead of the old 8-direction maths.
- Loaders: every loader is now detected by prototype type (loader / loader-1x1) instead of by name, so any loader mod works, not only Loaders Modernized.
- Removed the unused on_post_entity_died handler (that event has no 'entity' field) and the dead 'created_entity' fallback.
- Entity handlers now use a type lookup table and an if/elseif chain instead of several string.find calls per event.
- Memory leak: removing a balancer part never cleaned its belts and lanes from 'storage' (the code checked 'belt.valid' on a plain table). It now checks 'belt.entity.valid'.
- Fixed a scoping bug where 'found_lane' was always nil when a splitter was removed from a balancer's input side.
- Fixed belt_functions.check_track using an undefined variable, which could leave 'next_belt_check' pointing at a deleted belt (crash in on_tick).
- Fixed a possible crash in the nth_tick handler when its event list no longer exists.
- test.lua (about 2000 lines) is only loaded when running with debug and creative-mod, which saves memory in normal games.
- Removed a debug print of the whole technology table at startup.
- Fixed the typo 'wieght' in the balancer-part item prototype (now 'weight'; the intended 25 kg is applied).
Thanks:
- 6oundwave, for presenting the solution to make the mod compatible with several loader mods.
Version: 1.0.1
Date: 18.11.2025
Changes:
- 'durability' bug discovered thanks to cartwer.
- Fixed thanks to Maximagor.
Version: 1.0.0
Date: 01.11.2025
Changes:
- Fixing bugs by version 2
- Now can place belt balancer into plataform space