Page 1 of 1

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

Posted: Mon Jul 27, 2026 3:59 pm
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 249 times
quality-min.png
quality-min.png (53.98 KiB) Viewed 249 times
Reproduction mod with the following contents in data-updates.lua:
zzz-ShempDebug_0.2.1.zip
(1.02 KiB) Downloaded 18 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 249 times
iron-gear-crafting.png
iron-gear-crafting.png (14.55 KiB) Viewed 249 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.

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

Posted: Tue Jul 28, 2026 6:39 am
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.

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

Posted: Tue Jul 28, 2026 9:41 am
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".