[MOD 2.1] Quality Down-Binning (Ground-up Re-write, Modded Qualities Supported)

Topics and discussion about specific mods
AssaultRaven
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Jun 08, 2014 4:00 am
Contact:

[MOD 2.1] Quality Down-Binning (Ground-up Re-write, Modded Qualities Supported)

Post by AssaultRaven »

https://mods.factorio.com/mod/quality-down-binning

Trying for Rare's but getting your smelters clogged up with Uncommons, that you can't even throw into infinite technologies because you don't have an entire duplicate factory for Uncommon inputs?

Then this mod is the solution for you! Take after the example of real-world manufactures with too many, too good items, and down-bin them by choosing to forget about their original quality and just treat them like lower-quality versions of themselves.
Factorio 2.1
Only accepts items that can be used as ingredients.

Dynamically generates down-bins based on all quality levels present. If there are more than 7 total, a new tab will be created to avoid cluttering the Logistics tab.

Consistent with their theme as "just a bin with a different label on it", down-bins operate fast enough to handle a max stacked turbo belt loader.

Items with equipment grids that are also ingredients will be accepted (such as Power Armor MK2), but if they contain items, those items will be spilled rather than destroyed.
Under the Hood
Using new quality-related elements of the recipe API introduced in 2.1, it is now possible to dynamically generate recycling-like recipes for quality reduction for all items and all target quality levels and use them in the appropriate down-bin type. By then rewriting the down-bins as furnaces rather than script-based containers, this also resolves the race condition that allowed prematurely removing an item before it had been down-binned, as well as the need for per-tick runtime scripting.

Because this mod generates a hidden recipe for every combination of ingredients and target quality levels, it is necessary to more aggressively filter items, hence why only ingredients are accepted. This is the main purpose of down-binning, and so should not be an issue.

One may wonder if perhaps this large number of recipes risks hitting the hard-coded engine limit for prototypes of 65,536. In the base game, not even close. With mods, maybe, if you combine mods with large amounts of items and use a quality mod with a very high number of quality levels, such as Unlimited Quality. I found the following values for down-binning recipes / total prototypes:

Space Age, base quality levels: 568 / 5776
Space Age, 98 quality levels: 13,774 / 19,447
Krastorio 2 Spaced Out, base quality levels: 2,260 / 9,421
Krastorio 2 Spaced Out, 98 quality levels: 54,805 / 62,431

That last test is actually close! But even so, it only got close with 98 quality levels. So if you actually run into an issue while running all of Pyanodons or something combined with 98 quality levels, my first recommendation would be to use fewer quality levels.
Factorio 2.0
Unfortunately, because the quality recipe API needed to produce quality-affecting recipes was only introduced in 2.1, it will not be possible to introduce the new functionality to 2.0. I did get a set of bug-fixes in before the migration, but be mindful of the following if you're still on 2.0:

- It is possible to grab an item before it has been down-binned. Use quality filters on output inserters and loaders to prevent this.
- Unlike the 2.1 version, almost every possible item can be down-binned, and item data will be preserved, including modded items with tags or blueprints. The only things it will refuse are items with a non-empty equipment grid or inventory.

Image

Image
Last edited by AssaultRaven on Sat Jun 27, 2026 5:19 pm, edited 2 times in total.
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 328
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: [MOD 2.0] Quality Down-Binning

Post by Quezler »

hi, i had an user request such a functionality on one of my many quality mods:
https://mods.factorio.com/mod/awesome-s ... 7a3f2e27fa

near the end he mentioned the existence of such a mod, i didn't have enough time on my hand to write a new one but i did have enough time (25 minutes) to edit your mod and add support for modded qualities, please see the enclosed zip for a 0.6.0 version.

i didn't test it very much in depth, but at first glance i think i ported/updated your mod correctly.
Attachments
quality-down-binning_0.6.0.zip
(139.34 KiB) Downloaded 243 times
Flindros
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Dec 23, 2024 7:27 am
Contact:

Re: [MOD 2.0] Quality Down-Binning

Post by Flindros »

Hi as I mentioned on the mod discussion earlier, I cannot get my construction bots to build this chest. I run 90 or so mods on this save so there is a possibility that construction bot issue is caused by https://mods.factorio.com/mod/Better_Robots_Extended

My suggestion for why working bins stop functioning is this: I have a suspicion that it stops working if the bin gets its quality upgraded while working. (this mod upgrades q of working buildings over timehttps://mods.factorio.com/mod/upgradeable-quality)
Maybe it is caused by a chest inventory sorting mod that I use: https://mods.factorio.com/mod/manual-inventory-sort or this https://mods.factorio.com/mod/Sort-All-Inventories

In any case I attached my save file here as requested on discussions. There is a basic downgrade setup where I left the engineer on Nauvis. You can check out the location tag X and see my setup isn't working and when I tried to fix it from afar, it didn't place the bin.
Attachments
Flindros SA 1.zip
(81.28 MiB) Downloaded 194 times
AssaultRaven
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Jun 08, 2014 4:00 am
Contact:

Re: [MOD 2.1] Quality Down-Binning

Post by AssaultRaven »

Updated for 2.1, including preserving item properties in the way you'd expect.

I've addressed the bot build issue (it was an interaction with Packing Tape) and made changes that should make it more robust against other mod interactions.

I have different ideas on how to bring it to a 1.0 release which will almost certainly work a little different than the current implementation, but I'm exploring options. I hope to get it figured out before 2.1 hits stable.
AssaultRaven
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Jun 08, 2014 4:00 am
Contact:

Re: [MOD 2.1] Quality Down-Binning (Ground-up Re-write, Modded Qualities Supported)

Post by AssaultRaven »

New version released, ground-up re-write using new quality-related recipe API's added in 2.1. Resolves the race condition issue, removes run-time scripting and any related interactions completely, and supports modded qualities.
Post Reply

Return to “Mods”