[2.1.12] quality_min/change have misleading tooltips when used in combination

Bugs which we just recently fixed in our development version and will reach you in the next release.
User avatar
Shemp
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Jan 19, 2026 6:51 pm
Contact:

[2.1.12] quality_min/change have misleading tooltips when used in combination

Post by Shemp »

When you assign either of these properties on a recipe product, viewing the tooltips in Factoriopedia suggests that quality_min is applied both before and after the quality_change step.
quality-change.png
quality-change.png (102.13 KiB) Viewed 247 times
quality-min.png
quality-min.png (53.98 KiB) Viewed 247 times
Reproduction mod with the following contents in data-updates.lua:
zzz-ShempDebug_0.2.1.zip
(1.02 KiB) Downloaded 17 times

Code: Select all

local gear = data.raw.recipe["iron-gear-wheel"]
gear.results[1].quality_min = "uncommon"
gear.results[1].quality_change = 1
gear.can_set_quality = true
Using this example mod along with the Quality mod, when the Iron gear wheel recipe is set to Normal mode, I expect it to output Rare gears (if it is unlocked), because quality_min would clamp it to Uncommon before quality_change steps up to Rare.

What actually happens is that it always outputs Uncommon gears (with or without the Uncommon quality unlocked):
iron-gear-tooltip.png
iron-gear-tooltip.png (42.96 KiB) Viewed 247 times
iron-gear-crafting.png
iron-gear-crafting.png (14.55 KiB) Viewed 247 times
Based on my understanding from the ItemProductPrototype docs and my own testing, quality_change always runs completely before any quality_min/max clamping.

I also shared this Lua algorithm on another thread, of how I think Quality adjustment currently works in the game.

Either the two tooltips (from the first two images) are misleading, or the adjustment implementation is incorrect.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4748
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.1.12] quality_min/change have misleading tooltips when used in combination

Post by boskid »

Oh, there are tooltips there. Well, i will not be changing what qualities are selected in this case because what you get matches my design decisions. It looks like the tooltips are not accurate here. Recipe quality goes through 4 transformations in order: 1/ quality_change, 2/ min/max, 3/ quality roll, 4/ min/max. Steps 3 and 4 only happen when product is affected by quality effect from modules. Mismatch is that tooltip suggests min/max happening before quality change while its not happening.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4748
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.1.12] quality_min/change have misleading tooltips when used in combination

Post by boskid »

Thanks for the report. For 2.1.13 i adjusted 2 locale related to quality control to better match what is happening (removed "before and" from `quality-min-tooltip`; removed "(or min quality)" from `quality-change-tooltip`) and also changed the order of effects such that "+1 step" will appear before "min uncommon".
Post Reply

Return to “Resolved for the next release”