Page 1 of 1

[2.0.8] Recipe Quality

Posted: Wed Oct 23, 2024 12:23 am
by Anachrony
TL;DR
Improve customizability of how modded recipes interact with the new Quality system.
What ?
Add new quality related fields to LuaRecipePrototype allowing greater customizability of Quality system on a per recipe basis.
Add a minimum_quality field to ItemIngredientPrototype. Below this doesn't qualify for the recipe. This is the baseline, so only quality above this level adds to the quality of the result.
Add a quality_weight field to ItemIngredientPrototype. If set then the quality of this ingredient has more or less impact relative to other ingredients on the overall result quality.
Add a quality_bonus field to ItemProductPrototype. If set this output of the recipe has a higher quality baseline. This isn't random and doesn't have a chance of resulting in even higher quality tiers.
Why ?
Right now the behavior of the Quality system seems very hard coded with limited flexibility for modding. The built-in assumptions make sense for the design philosophy of vanilla Factorio, but can be an awkward fit for mods which often have more tiers of the same type of items than vanilla, and alternate recipes for the same product. There is potential in some cases for such mods to consolidate some of the different tiers of items into different qualities of items instead. But for this to make sense they may require a little more customization in how quality works.