Make quality modules affect the quality “skip” probability

Place to discuss the game balance, recipes, health, enemies mining etc.
secelt
Inserter
Inserter
Posts: 29
Joined: Sat Dec 03, 2022 3:00 am
Contact:

Make quality modules affect the quality “skip” probability

Post by secelt »

currently, when an item craft completes with a nonzero quality probability, the following process occurs:
  1. the game “rolls a die” with the final calculated quality effect probability. if the check fails, output the product in the same quality as the ingredients. if it succeeds, continue to step 2.
  2. upgrade the quality of the products by one level. if this is the maximum quality, output the products. otherwise, continue to step 3.
  3. now, “roll a die” with a flat 10 % chance to succeed. if it fails, output the products. if it succeeds, go to step 2.
you might have noticed that the probability that the quality is upgraded differs between the first upgrade within the craft and any subsequent, “additional” upgrades. the developers refer to this as the “quality skip” chance mechanic. personally, i find this to be an inelegant, unintuitive, “hacky” system.

why not just apply the quality effect at all steps of the quality skipping ladder? under this system, when a craft occurs with a 5 % quality effect, there’s a (100 % − 5 %) = 95 % chance that the quality is unchanged, a (5 %) × (100 % − 5 %) = 4.75 % chance of the quality being upgraded by exactly one level, a (5 %)² × (100 % − 5 %) = 0.2375 % chance of the quality being upgraded by exactly two levels, et cetera.

by comparison, the current system is a secret buff to low qualities and a secret nerf to high qualities­: a 5 % quality craft with common‐quality ingredients has a disproportionately high chance of rare‐quality outputs. at very high quality probabilities, it becomes much more effective to “spread out” quality increases over multiple crafting steps, unlike with lower quality probabilities.

this would be trivial to implement in the game’s code: simply multiply each quality prototype’s next_probability with the quality effect value at every step of the quality ladder, rather than only at the first. in contrast, this is nearly impossible to implement via the modding API, since it would require a Lua script to be run every time a craft affected by quality is completed. i’m not sure if such a mod is even possible right now!

please let me know if this has already been considered internally, and if so, why it was rejected in favor of the current system. thanks a million!
Warpspeed
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Dec 21, 2024 5:31 pm
Contact:

Re: Make quality modules affect the quality “skip” probability

Post by Warpspeed »

+1

This would really open up the design space for content mods. Right now any quality chance over 100% is meaningless. I would really like any quality over 100% to increase the quality skip chance.

For example starting with common ingredients:
Quality 100% = 100% of at least uncommon, 10% rare, 0.1% epic, 0.01% legendary
Quality 200% = 100% of at least rare, 10% epic, 0.1% legendary
Quality 300% = 100% of at least epic, 10% legendary
Quality 400% = 100% of legendary
Quality greater than 400% is meaningless.

I fixed the quality skip chance to a minimum of 10%. This means the quality between 100% and 110% doesn't have an effect, but doing it this way keeps the numbers cleaner. If anyone has a better idea for an equation feel free to chip in.

With mods giving better quality bonuses to modules, adding base quality to machines, giving certain recipes a base quality chance (or increasing that chance with research), and even having different surfaces add a flat quality bonus, the sum of quality can easily add up do greater than 100%
Hurkyl
Filter Inserter
Filter Inserter
Posts: 311
Joined: Mon Dec 02, 2024 10:54 am
Contact:

Re: Make quality modules affect the quality “skip” probability

Post by Hurkyl »

Isn't this a massive nerf to early-game quality? And especially so pre-recycler?

I get the impression that a lot of people are already think that the rewards are not worth spending the effort to think about making the system work. This change seems like it would make things even worse.
Hurkyl
Filter Inserter
Filter Inserter
Posts: 311
Joined: Mon Dec 02, 2024 10:54 am
Contact:

Re: Make quality modules affect the quality “skip” probability

Post by Hurkyl »

And, FWIW, there is a direct practical simplification to the math with the current system.

E.g. you want to make quality red circuits early on? And you do so by putting common quality modules in the plants making plastic and copper cable and your uncommon quality modules in the green circuit makers?

You have different quality% in all three ingredients... but they all come in the same proportion of uncommon to rare, which is a massive help in balancing inputs.

My impression is that messing up the ratio of uncommon to rare between different ingredients is one of the subtle issues that give people a lot of trouble making quality work without recyclers. And this change would make that so much harder to get right.
Alfonse215
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Dec 23, 2024 6:53 pm
Contact:

Re: Make quality modules affect the quality “skip” probability

Post by Alfonse215 »

Warpspeed wrote: Fri Jul 10, 2026 10:20 pm This would really open up the design space for content mods. Right now any quality chance over 100% is meaningless.
I haven't actually tried it, but I seem to recall something about how 2.1 changes the way the quality bonus and roll works that allows >100% quality chances to mean something. At the very least, it would be reasonable to investigate how it works now, because they definitely changed the mechanics of how the 10% chance works in 2.1. The next probability and similar settings on quality prototypes are new.
Post Reply

Return to “Balancing”