The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

rollc_at
Inserter
Inserter
Posts: 41
Joined: Fri Sep 01, 2023 3:11 pm
Contact:

The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by rollc_at »

TL;DR
The (new) stack inserter should drop the held spoilable product as soon as the product in hand changes state.
What?
The stack inserter will wait to get a full stack (up to 16 items) before making a single swing.
An item that is spoilable, can (and will) spoil while stuck in the inserter's hand.
In some unfortunate scenarios, the inserter may be stuck for a very long time (e.g. hours for bioflux), waiting to get enough spoilage to drop anything.
Why?
It's likely possible to "fix" this by dynamically adjusting the inserter's stack size - reading hand contents, detecting spoilage/ore, etc. However it kinda sucks. It's a very powerful unlock of Gleba, so it's a very natural first place to start using it - I've ran into issues with this quite soon after using the new inserter for the first time.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4042
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by boskid »

Welcome on the forums. While i see your idea proposal, unfortunately i have to say that this exact behavior is already part of stack inserter logic and is enabled by https://lua-api.factorio.com/2.0.14/pro ... ck_spoiled on the inserter prototype (it is enabled for stack inserters). The issue you are observing is more likely caused by lack of filters set so the stack inserter is allowed to take spoilage that appeared in the machine under the pickup position - in that case there is no state change of the item in hand: it took spoilage so it waits for more spoilage.
rollc_at
Inserter
Inserter
Posts: 41
Joined: Fri Sep 01, 2023 3:11 pm
Contact:

Re: The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by rollc_at »

Hm I wasn't actually able to reproduce this behaviour for now (with belt or chest as a destination), please ignore until I can provide a save file / BP!
feofeujo32m3r
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Apr 05, 2023 12:26 pm
Contact:

Re: The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by feofeujo32m3r »

edit: I can't reproduce this in the editor, so I don't know how this happened in my actual save. Also don't have the save where this was occurring anymore, my bad.
boskid wrote: Sun Nov 03, 2024 12:27 pm Welcome on the forums. While i see your idea proposal, unfortunately i have to say that this exact behavior is already part of stack inserter logic and is enabled by https://lua-api.factorio.com/2.0.14/pro ... ck_spoiled on the inserter prototype (it is enabled for stack inserters). The issue you are observing is more likely caused by lack of filters set so the stack inserter is allowed to take spoilage that appeared in the machine under the pickup position - in that case there is no state change of the item in hand: it took spoilage so it waits for more spoilage.
Is this also supposed to work when the stack inserter has a different stack size set?
Or does the stack size setting override enter_drop_mode_if_held_stack_spoiled?

Because I just had to add some circuit logic to get my stack inserters to drop spoilage while they had a jelly-only whitelist with stack size set to 4 and space on the belt to drop the spoilage.
Screenshot_2024-11-24_09-13-05.png
Screenshot_2024-11-24_09-13-05.png (443.61 KiB) Viewed 1713 times
robot256
Smart Inserter
Smart Inserter
Posts: 1243
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by robot256 »

FYI this behavior can be guaranteed by setting the inserter to filter->blacklist->spoilage. In 2.0.24 they are guaranteed to immediately drop items that do not match their filter.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Orum
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jul 11, 2019 6:23 am
Contact:

Re: The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by Orum »

robot256 wrote: Fri Dec 06, 2024 6:18 pm In 2.0.24 they are guaranteed to immediately drop items that do not match their filter.
While I'm not on that version yet, as I tend to stick to the stable release, I suspect this only works in instances where you're unloading. I.e. situations where the destination is a belt or chest.

I don't think it will solve the problem when you're trying to load things that don't have a proper trash slot. AFAIK, this only affects captive biter spawners, where if you aren't constantly unloading their eggs, and you pick up bioflux which then spoils before the arm inserts it into the captive biter spawner, the arm gets stuck trying to insert it. As there is no dedicated trash slot, the only way to 'fix' this is to keep the egg output slot clean, which requires constant removal of eggs.
robot256
Smart Inserter
Smart Inserter
Posts: 1243
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: The (new) stack inserter should drop the held spoilable product as soon as it changes state

Post by robot256 »

You mean the captive biter spawner is producing eggs so slowly that the first egg spoils in the hand of the inserter before the spawner produces enough for a full stack? Or that you can't filter the inserter because the eggs in the spawner output spoil while the inserter is waiting for apace to drop the last product?

In that case the only answer may be to use a bulk inserter instead. The devs have made it very clear they do not intend for the stack inserter to work flawlessly in every location that a bulk inserter works, especially not when multiple item types and unfiltered inserters are combined. Needing the inserter to timeout so it can switch to picking up spoilage instead sounds like one of those times.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Post Reply

Return to “Ideas and Suggestions”