Page 1 of 1
Items held by the inserters shouldn't spoil.
Posted: Tue Nov 12, 2024 3:52 am
by ik1ne
TL;DR
Make items held by the inserter not spoil for max-efficient, lock-free factory.
What?
Items held by the inserters doesn't spoil.
Why?
Consider this case:
1. Inserter picks up item that is about to spoil.
2. While the inserter arm is mid-air, the item spoils.
3. The target machine doesn't accept spoilage, so the inserter is stuck at this state and so does the target machine.
When feeding biter spawner, it is more efficient to use most spoiled item first because the nutrient value doesn't get affected by the freshness of the bioflux.
However, after configuring the inserters to pick up most spoiled item first, I noticed some biter spawner starvation due to the inserter trying to insert spoilage to spawner.
After setting the priority to fresh one I never experienced the issue, but I hope there's a way to maximize bioflux efficiency while not worrying about inserter locking.
Note: After writing this, I found the lua api flag enter_drop_mode_if_held_stack_spoiled(
https://lua-api.factorio.com/latest/pro ... ck_spoiled), probably suggesting this is an expected behavior. Please disregard this suggestion if setting the priority to fresh one is the intended solution.
Re: Items held by the inserters shouldn't spoil.
Posted: Wed Nov 13, 2024 4:11 am
by McFrugal
I agree with this, for one important reason: if an inserter is taking items off a belt to feed a machine, and the item rots while the inserter is swinging, then the inserter will get clogged and there's no way to prevent it. You'd have to put a second inserter to grab any potential Spoilage off of the first inserter and that is absurd.
Re: Items held by the inserters shouldn't spoil.
Posted: Wed Nov 13, 2024 4:28 am
by Ranakastrasz
Kinda like trying to use burner inserters for everything in that way.
I think this is abusable though. Instead, if an inserter has something spoil while held, it places it in the target machine's trash slot, like when recipes are changed. Only for just now spoiled stuff, so it won't grab spoilage or anything.
Re: Items held by the inserters shouldn't spoil.
Posted: Wed Nov 13, 2024 4:47 am
by AntiBlueQuirk
I think preventing items from spoiling in inserters' hands is a good idea, but their spoilage level should still drop all the way to zero. That way the inserter can still always successfully insert the item, but it will spoil immediately in the target inventory. That's fine, because that would happen eventually anyway. The only exception I would make is for things that don't spoil into an item, like eggs. There's no point in preventing this spoilage, and it prevents preserving eggs forever by just jamming them in an inserter.
Re: Items held by the inserters shouldn't spoil.
Posted: Wed Nov 13, 2024 6:47 am
by boskid
This idea makes no sense for at least 3 reasons:
1/ There is no difference between item spoiling in the inserter hand and item spoiling inside of the drop target's input inventory, just trying to make items not spoil in inserter hand does not prevent the items from spoiling in the target so you need to make your gleba setups resiliant to spoilage in such cases anyway. This idea would not change this at all.
2/ If an item spoils while in hand, then inserter will hold an item that is known to be a spoil product of a different item. Such items get slightly different treatment when trying to insert into entity where the item does not fit into input inventory. If its attempted to be inserted into assembler and it does not fit ingredients inventory it will be put into dump inventory as a spoil product.
3/ Proposed logic could be abused to prevent spoilage by using inserters and power switches. Entire spoil mechanic was implemented under design assumption that once started, spoiling never changes speed.
Re: Items held by the inserters shouldn't spoil.
Posted: Wed Nov 13, 2024 9:01 am
by DarkShadow44
boskid wrote: ↑Wed Nov 13, 2024 6:47 am
2/ If an item spoils while in hand, then inserter will hold an item that is known to be a spoil product of a different item. Such items get slightly different treatment when trying to insert into entity where the item does not fit into input inventory. If its attempted to be inserted into assembler and it does not fit ingredients inventory it will be put into dump inventory as a spoil product.
Thanks, that's good to know - I think that makes the entire suggestion void.
However, after configuring the inserters to pick up most spoiled item first, I noticed some biter spawner starvation due to the inserter trying to insert spoilage to spawner.
What exactly do you mean?
Re: Items held by the inserters shouldn't spoil.
Posted: Sun Nov 17, 2024 6:04 am
by Everspace
I noticed this being a little wonky with a stack inserter holding spoilage not dropping/inserting due to not reaching it's stack size.
Re: Items held by the inserters shouldn't spoil.
Posted: Mon Nov 18, 2024 10:32 pm
by tobinyehle@gmail.com
2/ If an item spoils while in hand, then inserter will hold an item that is known to be a spoil product of a different item. Such items get slightly different treatment when trying to insert into entity where the item does not fit into input inventory. If its attempted to be inserted into assembler and it does not fit ingredients inventory it will be put into dump inventory as a spoil product.
This should include fuel inventory so you can't clog a nutrients inserter on recipes like iron bacteria where the recipe spoilage is different than the fuel required for the biochamber.