Freshness Sorter
An inserter that routes items based on their % freshness — automatically separating fresh stock from spoiled goods on your production lines.
Route Mode
The Freshness Sorter is a bulk inserter variant that reads the spoil percentage of the item it is currently holding and decides where to drop it:
- Match — item freshness is at or above the threshold → dropped in the visual facing direction (same as a normal inserter's drop side)
- No-Match — item freshness is below the threshold → dropped to the left or right of the facing direction (configurable)
Gate Mode
Instead of splitting everything into two streams, the sorter can act as a gate: it looks into the chest or machine in front of it before it grabs anything and only picks up what meets your threshold. Everything else stays where it is.
- Gate - at or above threshold — only fresh stock moves. Perfect for loading a rocket silo with agricultural science that has to arrive fresh.
- Gate - below threshold — only spoiled stock moves. Pull the old goods out of a buffer and leave the good ones in.
Whatever the sorter picks up is dropped in the facing direction — there is no second output in this mode.
When nothing in the source meets your threshold, the sorter simply stands still and shows a deny icon, so you can see at a glance that it is waiting rather than broken.
Worth knowing before you build with it:
- Gate mode reads from chests and machines only. A sorter pointed at a belt will not pick up anything.
- The sorter sets its own filter and stack size limit while in gate mode, so anything you set there by hand is overwritten.
- Items that cannot spoil are never picked up. A chest that fills up with iron plates simply leaves the sorter with nothing to do — make sure only the goods you want sorted end up in the source.
Pickup and Drop Flexibility
In route mode the Freshness Sorter is a standard inserter at its core, it can pick up and drop items from and to any combination of:
- Belts
- Chests
- Machines (assemblers, furnaces, any entity with an inventory)
Filters, stack size override and spoiled priority also work as usual.
In gate mode the drop side is just as flexible, but the pickup side has to be a chest or a machine.
Settings
All settings are startup settings and apply globally.
| Setting | Options | Default | Description |
|---|---|---|---|
| Mode | Route / Gate - at or above threshold / Gate - below threshold | Route | Whether the sorter splits everything into two streams or only picks up what meets the threshold. |
| Freshness Threshold in % | 0 – 100 | 50 | The freshness percentage everything is measured against. |
| No-Match Side | Right / Left | Right | Which side of the visual facing direction the No-Match output is placed on. Route mode only. |
| Non-Spoilable Item Route | No-Match / Match | No-Match | Where to send items that cannot spoil at all (e.g. spoilage, iron plates, coal). Route mode only. |
UPS Impact
Route mode is designed to be lightweight:
- The tick handler runs every 5 ticks (12 times per second at 60 UPS), not every tick
- While the inserter hand is empty, no work is done at all
- Per active inserter the handler performs ~8 simple API reads and one position write
Estimated cost at 60 UPS:
| Sorter count | Approx. cost per tick |
|---|---|
| 100 | < 0.1 ms |
| 1 000 | ~0.5 – 1 ms |
| 10 000 | ~5 – 10 ms |
For typical factory sizes (a few dozen to a few hundred sorters) the performance impact is negligible. Only at very large megabase scales with thousands of sorters would it become relevant.
Gate mode costs more. Deciding whether to grab an item means looking through the source inventory, and that decision has to be made fresh before every single swing. The work is kept as small as possible — each sorter is only checked once per tick, the inventory is only read after a swing has finished, and idle sorters are spread out so they never all check in the same tick. Still, expect it to be noticeably heavier than route mode, and use it where the freshness actually matters rather than everywhere.
Recipe
Unlocked by the Freshness Sorter technology, which requires Bulk Inserter and Agriculture.
| Ingredient | Amount |
|---|---|
| Bulk Inserter | 1 |
| Advanced Circuit | 5 |
| Processing Unit | 2 |
Research cost: 200 science packs (Automation + Logistic + Agricultural)
Compatibility
- Requires Factorio 2.1 or newer and the Space Age expansion
Credits
Mod concept & design by Morlot.
Implementation developed with the help of Claude (AI assistant by Anthropic).