Page 1 of 1

Finer control of inserter pickup from belts

Posted: Sun Aug 01, 2021 12:20 pm
by PFQNiet
Is it at all possible fine-tune where inserters pick up from belts?

In particular I have modded inserters with custom vectors picking up from the end of a belt, and currently they pick up preferentially from the left lane, even when the custom vector positions the pickup location over the right lane. I'd also like for the inserter to wait until the item is closer to the end of the belt, rather than grabbing it the instant it crosses the tile border.

Are there any options that allow for this, or is this behaviour hard-coded?

Re: Finer control of inserter pickup from belts

Posted: Sun Aug 01, 2021 2:14 pm
by eradicator
Last time I tried pickup lane preference via vector worked. Maybe you set it wrong? It's not the most intuitive system as the preferred lane also depends on the relative position of the inserter to the belt. Item chasing behavior is hardcoded as far as i know.

Re: Finer control of inserter pickup from belts

Posted: Sun Aug 01, 2021 7:25 pm
by PFQNiet
Well, to be more specific, here's some ascii art of a belt:

Code: Select all

 _________
/         \
|    x    |
| \     \ |
|  >     >|
| /     / |
|    x    |
\_________/
So the belt is facing right, there are two inserters in the same tile to the right of it with the goal of each one picking from a preferred lane, indicated with x in the graphic above. Their custom vectors are set to the belt's position +/- 0.25 vertically, ie. directly over a lane. Would it perhaps help to set the vectors closer to +/- 0.4 instead?

Re: Finer control of inserter pickup from belts

Posted: Sun Aug 01, 2021 8:24 pm
by eradicator
The graphic is a bit difficult to understand... are you saying both inserters are in the same tile as the belt? Maybe a look at miniloaders code would help?

Re: Finer control of inserter pickup from belts

Posted: Sun Aug 01, 2021 9:41 pm
by PFQNiet
Both inserter are on the next tile to the right, but as far as I'm aware it shouldn't matter since it should just be the vectors that count. But I'll have a look at Miniloaders, good call.

Re: Finer control of inserter pickup from belts

Posted: Mon Aug 02, 2021 1:12 pm
by PFQNiet
After looking into it, it seems both Miniloaders and Editor Extensions use the same offset of +/-0.25 as I am. This isn't an issue for EE because they just load into a deleting infinity chest so never have a lane back up. I imagine with Miniloaders if a machine just needs a few items then it'll pull from one lane as well. Guess I'll just have to deal with that!

Re: Finer control of inserter pickup from belts

Posted: Mon Aug 02, 2021 2:45 pm
by eradicator
PFQNiet wrote: Mon Aug 02, 2021 1:12 pm After looking into it, it seems both Miniloaders and Editor Extensions use the same offset of +/-0.25 as I am. This isn't an issue for EE because they just load into a deleting infinity chest so never have a lane back up. I imagine with Miniloaders if a machine just needs a few items then it'll pull from one lane as well. Guess I'll just have to deal with that!
Hm...my memories are vague. I think I might have solved it by placing the inserters always at least one tile to the side so that they're never in parallel with the belt (perpendicular or diagonal). If the inserters are invisible / don't have collision boxes they can be anywhere without it mattering much.

Re: Finer control of inserter pickup from belts

Posted: Wed Aug 04, 2021 1:58 pm
by PFQNiet
After some experimenting, I confirmed that placing the inserters exactly alongside the belt would correctly pull from the near lane, but any kind of diagonal grab would pull from the left lane in the direction of travel.

I've managed to wrangle this successfully! Thank you for the pointers.