Page 1 of 1

Describe order of ItemProductPrototype quality operations

Posted: Tue Jun 30, 2026 6:04 am
by PennyJim
In what order the quality change and quality roll apply affect the odds of the quality being output.

When I asked the discord, the conversation said that as of 2.1.8 it's
  1. get recipe quality
  2. apply quality_change
  3. apply quality_min/quality_max
  4. if affected_by_quality, apply quality effect
  5. if affected_by_quality, apply quality_min/quality_max
  6. resulting quality is product quality

I propose we add a note to quality_min and quality_max to mention it.
I am not tied to those locations specifically, but I personally feel it makes the most sense.

Something like
When processing a recipe, the clamping applies after the quality was affected by `quality_change`, then after it was rolled if `affected_by_quality` is true.
The wording might be improvable, but I like that it also implicitly mentions that quality change applies before the quality roll.