Page 1 of 1

Make spoilage levels available to circuit network

Posted: Mon Aug 10, 2026 8:58 pm
by DorianTheFactorian
TL;DR
Instead of reading the contents of a chest, add the ability to read how spoiled the items are.

What?
A "read spoilage" mode on chests. The simplest way to do this is for each spoilable item in the chest, take the spoilage level of the most spoiled stack as a percent and output that on the channel for that item, so a number between 1 and 100.

There are several variations you can imagine, but I think they are less intuitive or helpful: 1 to 1000 (more precision), seconds or ticks until first spoilage, average spoilage level instead of most spoiled.
Why?
• Dump eggs into a heating tower when they are about to spoil
• Sound an alarm before you run out of bioflux
• Build a legendary biolab is three legendary biters eggs are available, but make a legendary prod 3 module if they're about to spoil

Re: Make spoilage levels available to circuit network

Posted: Thu Aug 27, 2026 12:51 pm
by macdjord
+1

Re: Make spoilage levels available to circuit network

Posted: Thu Aug 27, 2026 4:19 pm
by Rseding91
I doubt this will happen. Currently reading chest contents has a relatively small overhead of counting additions and removals as things come and go. What you're asking for is a full inventory scan each tick to re-compute the spoilage levels and output that value.

Re: Make spoilage levels available to circuit network

Posted: Fri Aug 28, 2026 2:47 am
by Fletch
+1 -- we have an awesome game mechanic (spoilables), but has no connectivity to the circuit network

There's a mod that mostly implements this: https://mods.factorio.com/mod/spoilage-scanner
A combinator that scans freshness on items in a chest, caches the value and outputs the signal (avg / min / max), and rescans the inventory every XX-ticks (configurable). Their implementation distributes the performance load onto different ticks based on the combinator's modulo entity ID, helpful when you have lots of these combinators deployed to avoid cache stampede performance problems that would happen if they all fired on the same tick.

Its signals aren't tick-perfect (cache is stale for XX-ticks), but good enough for most use cases.