Disable quality chances per item in a recipes results

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 471
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: Disable quality chances per item in a recipes results

Post by BraveCaperCat »

Quorken wrote: Sun Nov 09, 2025 7:20 pm
BraveCaperCat wrote: Sun Nov 09, 2025 7:12 pm
Quorken wrote: Sun Nov 09, 2025 6:58 pm
I'm wondering if you could take it a step further, and always have outputs that are of a different quality (relative to the "expected" quality) go into special "different quality" slots. So even in the base game, if a recipe's output is bumped up a quality, it will go into the special "different quality" slots, instead of the normal "same quality" slots.

I.e. if a machine is set to produce uncommon beacons, and it produces a legendary beacon, that legendary beacon would go into the "different quality" slots, instead of the "same quality" slots.

So if you then have a recipe that produces 4 advanced circuits, with two of them ignored by quality, any that are bumped/dropped in quality would go into the "different quality" slots, while all others would go into the "same quality" slots.
No, I think this "different slot" thing should only apply to differing quality items created as a byproduct/catalyst. I even think it would make sense for byproducts/catalysts to have a different slot even when the quality doesn't differ to other resulting items.
I'm not sure what you mean by a byproduct in this context.

The reason I suggested pushing all "different quality" items into these slots was to give uniform behavior - the player knows that if a recipe normally produces a product B at quality X, but some effect/probability means it is produced at quality X', it will be in these other slots. So if there isn't such a slot for a product B, the player knows it can only be produced at quality X, and they do not need to handle any other quality for that item.
It's hard to explain since I don't think there are any examples of this in the base game. (or base game + space age) Pretty much just anything that uses ignored_by_productivity (or ignored_by_quality if/when it's added) which isn't also an ingredient of the recipe. Catalyst there being used for when it is an ingredient of the recipe.

It would still be uniform behaviour the way I imagine it, since all byproducts/catalysts would be in a separate slot from other results with the same name and type properties.
Quorken wrote: Sun Nov 09, 2025 7:20 pm
BraveCaperCat wrote: Sun Nov 09, 2025 7:12 pm
Quorken wrote: Sun Nov 09, 2025 6:58 pm Edit: That said, if you need ignored_by_quality to be an integer, couldn't you instead create a separate product entry with amount=<to be ignored by quality> and ignored_by_quality=true?
I actually don't need ignored_by_quality to be an integer, I just think that the other people who have posted in this topic might find it useful. Also, I'm not sure you can have two product entries with the same name and type properties.
You can have duplicate product entries, likely for this kind of stuff (say, 20%, 5%, and 1% chance of a product) - just not duplicate ingredient entries.

From the wiki (https://lua-api.factorio.com/latest/pro ... ml#results):
Can be set to an empty table to create a recipe that produces nothing. Duplicate results, e.g. two entries with the same name, are allowed.
Ok. By the way, that's a link to the lua documentation and not the wiki.
Quorken wrote: Sun Nov 09, 2025 7:20 pm Also, I actually edited my previous post while you were typing out yours, I think.

Edit: A side benefit of separate slots for quality outputs is if the machine works very quickly, with a quality chance - in the base game, if the machine produces a quality result, and produces a normal result before an inserter can remove the quality result (say, because of the swing time of its arm, since an inserter would need to make a separate trip if the quality is different), it will stall until the inserter can remove said quality item. If you have separate slots for "different" and "same" quality results, this becomes much less likely - it would only happen if two different quality results were produced back-to-back.
I think I did too.

Yeah, but that's actually one of the reasons why I didn't want to have separate slots for different quality items for just anything, since the way it is currently balances higher speed machines for quality, even if just a bit. It also punishes using semi-automation (ie hand feeding) with quality at the same time.
Creator of multiple mods, including Quality Assurance - My most popular one.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 376
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Disable quality chances per item in a recipes results

Post by protocol_1903 »

BraveCaperCat wrote: Sun Nov 09, 2025 7:12 pm
Quorken wrote: Sun Nov 09, 2025 6:58 pm Edit2: UI for the different slots would be a duplicate of the output slots, but with the wildcard quality icon on each possible output - or perhaps the recipe's "base quality" with a greater-than/less-than next to it. An additional advantage of this is that it could clearly communicate what items are affected by quality, and how - if a product cannot have its quality bumped (e.g. fluids, the catalysts in the original post), it would not appear in these "different slots". If the machine has no net quality effect (no modules, no inherent bonus, no transmitted effects...), it would not show these slots at all, as it cannot produce quality items.
The game can already handle adding extra output slots to machines. It already does so when you change the recipe of the machine via the circuit network.
This isn't how it's done internally; the extra output slots are a separate "dump inventory" that is hidden 99% of the time. That inventory is generated dynamically when the recipe is changed, and is not 'resizing an inventory' but creating an inventory with an exact size, then hiding it once it's not required.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 471
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: Disable quality chances per item in a recipes results

Post by BraveCaperCat »

protocol_1903 wrote: Mon Nov 10, 2025 5:53 am
BraveCaperCat wrote: Sun Nov 09, 2025 7:12 pm
Quorken wrote: Sun Nov 09, 2025 6:58 pm Edit2: UI for the different slots would be a duplicate of the output slots, but with the wildcard quality icon on each possible output - or perhaps the recipe's "base quality" with a greater-than/less-than next to it. An additional advantage of this is that it could clearly communicate what items are affected by quality, and how - if a product cannot have its quality bumped (e.g. fluids, the catalysts in the original post), it would not appear in these "different slots". If the machine has no net quality effect (no modules, no inherent bonus, no transmitted effects...), it would not show these slots at all, as it cannot produce quality items.
The game can already handle adding extra output slots to machines. It already does so when you change the recipe of the machine via the circuit network.
This isn't how it's done internally; the extra output slots are a separate "dump inventory" that is hidden 99% of the time. That inventory is generated dynamically when the recipe is changed, and is not 'resizing an inventory' but creating an inventory with an exact size, then hiding it once it's not required.
1. How would you know how it's done internally?
2. It appears exactly the same externally - and even then, the recipe could just have "extra outputs" which are generated during the prototype stage, instead of needing to use a "dump inventory" as you say that changing the recipe does.
Creator of multiple mods, including Quality Assurance - My most popular one.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.
curiosity
Filter Inserter
Filter Inserter
Posts: 706
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Disable quality chances per item in a recipes results

Post by curiosity »

BraveCaperCat wrote: Mon Nov 10, 2025 1:13 pm 1. How would you know how it's done internally?
It is obvious from the API.
Post Reply

Return to “Modding interface requests”