Make spoilage levels available to circuit network

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

DorianTheFactorian
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Feb 27, 2019 5:28 am
Contact:

Make spoilage levels available to circuit network

Post 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
macdjord
Fast Inserter
Fast Inserter
Posts: 224
Joined: Fri Feb 22, 2013 4:26 am
Contact:

Re: Make spoilage levels available to circuit network

Post by macdjord »

+1
Rseding91
Factorio Staff
Factorio Staff
Posts: 17448
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Make spoilage levels available to circuit network

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Fletch
Inserter
Inserter
Posts: 26
Joined: Thu May 08, 2025 10:18 pm
Contact:

Re: Make spoilage levels available to circuit network

Post 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.
Post Reply

Return to “Ideas and Suggestions”