Improve inserter circuit network counting control when picking up from belts

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
ChickenBones
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Feb 01, 2021 10:56 am
Contact:

Improve inserter circuit network counting control when picking up from belts

Post by ChickenBones »

TL;DR
The circuit network cannot react to an inserter's pickup of an item in time to prevent it from picking up another item in the following tick.

This is a repost of a not-a-bug report (viewtopic.php?f=23&t=108780) I made last year, and I'm hoping it can be considered for 2.0 if there are more recipes or mechanics which may motivate counting item pickup from belts.
What?
An inserter will only ever pick up one item off a belt each tick, but depending on item position, belt speed and inserter rotation, there are times when an inserter will pickup items in consecutive ticks and not have time to react to the signal from the previous pickup.

The easiest way to see the issue is with an inserter picking up from the far lane of a blue belt set to enable when not holding anything. It will sometimes pickup 2 items instead of 1.
Image
Why?
People who are new to circuit network, or just players aiming to make compact builds may see what appears to be a simple, elegant and intuitive solution, only to be confused by a tick delay which is hard to observe. It's frustrating because it works almost perfectly already, just because most of the time there is 2 or more ticks between inserter pickup from belts.

When using a combinator connected back to its input as a memory cell, and the inserter set to read hand contents in pulse mode, a pickup counter can be created, but that pickup counter can't be used to disable the inserter in time.

These two images are one frame tick. The inserter is disabled in the second tick, but also picked an item up, even though the circuit network reads 7 on the previous tick.
Image
Image

Alternatives/workarounds and their downsides are:
Use a chest.
- Chest based item counting has a different array of challenges and layout considerations.
- Exact item pickup control requires using the hand limit control signal.

Use the circuit network to calculate hand limit while picking up from the belt.
- Requires an extra combinator to do the subtraction.
- Because the stack size counts down as the inserter picks up items, the inserter will have to make extra swings.[/list]
Afterword
I understand if this may be difficult or impossible due to engine design, sequencing of circuit network read and write passes, and inserter wake lists. I would hope that some investigation may also help others with similar timing struggles:
- viewtopic.php?f=23&t=92636
- viewtopic.php?f=71&t=99519

computeraddict
Fast Inserter
Fast Inserter
Posts: 158
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: Improve inserter circuit network counting control when picking up from belts

Post by computeraddict »

Does it still do the same when you set the hand read mode to "hold"?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Improve inserter circuit network counting control when picking up from belts

Post by FuryoftheStars »

This is unlikely to change.

As was mentioned in at least one of those threads you linked, a signal on the circuit network is not processed by the entity receiving it on the same tick that it receives it. I would imagine this is deliberate, because otherwise a looped signal would have the potential of locking up the game as it'd never actually finish processing it. And it makes no sense to have some entities process the signal differently than others.

If you were to post into gameplay help (because here's not the right place for it and would likely result in this thread getting locked), I'm sure that someone can help you figure out how to accomplish the behavior you want.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Illiander42
Filter Inserter
Filter Inserter
Posts: 514
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: Improve inserter circuit network counting control when picking up from belts

Post by Illiander42 »

I can't even see what use cases this would be useful for that aren't completely handled by setting the stack size override.

Post Reply

Return to “Ideas and Suggestions”