Open alexkaratarakis opened 1 year ago
Do you have a solution for this? Seems like an engine issue.
I think the former can be solved, sort of, but there would still be cases where the inserter stack size would cause issues unless we put the science stack size very high. The latter I'm not certain can be solved within a mod. Thoughts?
Possibly helpful: It is possible for buildings to exceed the item stack size. Below is an example with Korlex Food. Meat, Seeds, Tin Plate have stack-size 100 while Flora, Fish, Seaweed, Fawogae, Salt have stack-size 50. All limits are exceeded in the screenshots below.
Furthermore, crafting speed seems to affect the "internal" size. The beaconed building in the second screenshot allows even more items. I was able to go even higher by stacking more beacons.
I think increasing automation science pack size to 400 (2x 200 where 200 is the highest recipe size) or to 411 (2x200 + 12 - 1 where 12 is the max stack inserter size)
and increasing stack size for pysp1 to 211 (2x100 + 12 - 1) should mostly fix the issue
I think increasing automation science pack size to 400 (2x 200 where 200 is the highest recipe size) or to 411 (2x200 + 12 - 1 where 12 is the max stack inserter size)
and increasing stack size for pysp1 to 211 (2x100 + 12 - 1) should mostly fix the issue
Absolutely not doing random ass numbers like 411 or 211. It's arbitrary and annoying to both dev and players. I'd rather round up to the nearest 50 or 100.
but we can look at increasing the sizes. Probably inline with the endgame tech ratios to hopefully fix the issue.
According to the last line on the Automatic insertion limits documentation (https://wiki.factorio.com/Inserters#Insertion_limits), the inserter should be able to overfill the building, instead of deadlocking.
"An inserter that has a higher inserter capacity bonus than 1 can overfill the target building, due to the inserter picking up a higher amount of items than needed. Overfilling can also occur if multiple inserters are used to insert items into one building."
Could you raise this as a Factorio bug? At least we'd get confirmation if the above is correct or not.
Mod source
Factorio Mod Portal
Which mod are you having an issue with?
Operating system
GNU/Linux
What kind of issue is this?
What is the problem?
There are cases where the production building is requesting for more items than the item's stack size. This causes the inserters to pick up additional items to place into the building, but then failing to do drop them because the stack size limit has been reached. Since the inserter(s) is now blocked until it drops its payload, the production building may stop producing if another ingredient runs out, causing a deadlock.
Automatic insertion limits may be relevant here: https://wiki.factorio.com/Inserters#Insertion_limits
Steps to reproduce
The examples use 1 inserter for easier reproducibility, but the deadlock can occur even when having more than 1 inserters.
Example 1:
Lab
researching one of the high sciences1) Have a box containing all science packs 2) Have 1 inserter picking up science packs from the box and putting them in the lab 3)
Lab
is researchingPyrhhic Victory
After a couple of cycles, you will get a deadlock like the following.
a) deadlock with
Automation Science Pack
b) deadlock with
Py Science Pack 1
The problem can occur with either
Automation Science Pack
(recipe needs 200) orPy Science Pack 1
(recipe needs 100). The inserter will attempt to load more than that (presumably 2x), even if other science packs are missing. Other science packs stop at 2x what the recipe asks (matching what the wiki says about lab limits), which is below each pack's stack size. The highest one of the others is theLogistic Science Pack
which stops at ~160, and since its stack size is 200 (and the gap between the 160 and 200 is more than what an inserter can do in 1 swing), it won't cause a deadlock.For
Py Science Pack 1
, the request is 200 science packs which is right at the item's stack size limit, but can still cause a deadlock due to the inserter's stack size (as per the screenshot).Workaround: Have an auxiliary inserter than blocklists
Automation Science Pack
andPy Science Pack 1
.Example 2:
Basic Oxygen Furnace
withRocket Fuel
1) Have a belt with plastic and
Rocket Fuel
2) Have 1 inserter picking up from the belt and loading into a Basic Oxygen Furnace 3)Basic Oxygen Furnace
is using the 3x Antimony Oxide Recipe (recipe-name:sb-oxide-02
). SupplyOxygen
andAntimony Pulp 02
as well. 4) (optional) Use speed modules for faster reproAfter some cycles, you will get the following deadlock
The furnace needs plastic, but the inserter is stuck trying to place
Rocket Fuel
which it never will because the furnace won't consumeRocket Fuel
until more plastic is inserted.Workarounds: a) Have a dedicated belt for fuel b) Have an inserter that filters-in fuel, and an inserter that filter-out fuel (but that can be problematic as you can have as many filters as the filter-inserter-type allows and can't mix or swap fuel without modifying the filters) c) Use a smaller stack size limit only when using Rocket Fuel. 5 seems to be safe given the insertion limits from the wiki.
Additional context
Here is a blueprint with the above two examples.
(This blueprint uses https://mods.factorio.com/mod/creative-mod entities for item and power generation)
Factorio Version 1.1.80 pycoalprocessing: 2.1.0 pyrawores version: 2.4.8 (these are latest as of 2023-04-01)
Log file
No response