Lane Balancer


Evenly balances input & output lanes on a belt. Like a splitter, but for the lanes on a single belt.

Content
5 years ago
0.17
27
Logistics

g [Solved 0.0.2] UPS drops with blueprints

5 years ago

I'm getting huge FPS/UPS drops when holding a blueprint / copied ghosts if this mod is installed. The blueprint doesn't have to contain any lane balancers in it. I remember seeing that issue popping up in the single splitters mod as well.

5 years ago

Fascinating! I've always had single-splitters installed (and as of yesterday this mod instead), so I just thought my computer didn't like large blueprints. Do you recall hearing what may be causing it? I'm not sure where to even begin to debug that, but I would definitely love to solve it.

5 years ago

There was a hacked update to 0.17 for the single splitters (https://mods.factorio.com/mod/Single-Splitter-new/discussion) that has the same problem. Perhaps a change in 0.17 itself?

5 years ago

This is very weird. I removed all of the logic code (only leaving the prototype definitions) and it still stalls when a blueprint ghost is active that contains lots of belts (if there are no belts, the UPS drop doesn't occur). However, I can't see what would be causing the actual UPS drop, given how even with the mod doing nothing, the lag still happens. Thanks again for bringing this to my attention. I wonder if it is a 0.17 bug. I will have to explore further.

5 years ago

Does this mod have the weird layering issue where belts appear on top of the entity? I know single splitters did and I'm wondering if that may be related.

5 years ago

It does. It is because like single splitter (which it is based on), the base item type is an inserter, which is hard coded to draw before belts are drawn by the factorio code itself. I somewhat mitigated this for the time being by reducing the draw size of the balancer, so that unlike single-splitter, it doesn't actually get cut off. However, I don't like this solution long term, as it looks uglier when it is small like that.

5 years ago

Is is possible that could be related? I wonder if doing it something similar to a miniloader could help? Their visible entity is drawn properly, but the actual work is done by invisible attached inserters.

5 years ago

Per Factorio staff, one of the bounding boxes is too big:

https://forums.factorio.com/viewtopic.php?t=68616

5 years ago

Just tested that out and so far it's a massive improvement.

In technology.lua lines 57/58 & 134/135 & 211/212 I replaced with the numbers ripped out of the miniloaders mod as such:
pickup_position = {0, -0.2},
insert_position = {0, 0.8},

Items seem to dissapear a bit before hitting the balancer (maybe tweaking the numbers will change that?) but it works and doesn't hit the UPS.

5 years ago

Fantastic find! I will adjust those numbers until I find a value that doesn't break the pickup and dropoff locations and gets rid of the slowdown! Thank you sidelia and mikstravaganza!

5 years ago

Setting, them both to normal set of numbers like {0, 1} does indeed get rid of the ups drop with blueprints! I may release an update even sooner to include this.

The items disappearing is a side effect of how lua gives the splitter access to the front of a belt (I can't only grab items from the very front for the splitter), so it will often start grabbing from further back. I have some ideas as to what I can do to make this go away, but it would require a full rewrite. This is something I will be doing after this next bugfix build, so if things go well this will ideally work much better.

5 years ago

Just uploaded a new version just with the main bugfixes, including this one.

5 years ago

I love this mod, but it really messes up my fps/ups. (ryzen 1700x gtx 1080 ti) not a computer issue

I'm running a 1k spm megabase, had about 100 of these fuckers in my base, it single handedly reduced my fps from constant 60 to ~40s.
Discovered it was the mod via the time usage thing in the debug menu. Uninstalled (and had to find every f'ing spot I had them and fill in the blanks) and the fps problem was gone.

Would really love to be able to use this mod, but it's not a possibility at the moment

New response