I've been trying to figure out how the game decides what quality produced items are so I can better tune the %X% quality modifier in my mods. Did a lot of testing, and here's some of my results summarized. All of this was done with diy modded test items, so it might be different with cooking.
Both the base skill of the craftsman and the quality modifier affect the distribution of quality for items. When a craftsman makes an item, there's a roll for how well they crafted the item, and there are four categories - two good and two bad. The base skill of the craftsman determines what quality item is produced for each of those four categories. They work like this, with the min base skill of 5% and max base skill of 95%:
Base Skill | Poor | Bad | Good | Excellent |
5-9% | Crude | Crude | Crude | Rough |
10-19% | Crude | Crude | Rough | Rough |
20-39% | Crude | Rough | Decent | Decent |
40-49% | Rough | Rough | Decent | Fine |
50-69% | Rough | Decent | Fine | Fine |
70-89% | Rough | Decent | Fine | Masterwork |
90-95 | Rough | Crude | Masterwork | Masterwork |
This table is independent of the quality modifier in each recipe. That means there's a couple of natural breakpoints: craftsmen need at least 20% skill to make decent items, 40% to make fine items, and 70% to make masterwork items.
Where the quality modifier for each recipe comes in is calculating how likely each of these categories is. Add the modifier to the character's base skill and restrict it to be between 5% and 95%, which we'll call the adjusted skill. The adjusted skill is the likelihood of getting a good or excellent roll when you craft. One-fifth of those good or excellent rolls are excellent (rounded down). Same way for the bad two categories: 100% minus your adjusted skill likelihood of a poor or bad result, with one-fifth of those rolls being poor (rounded down). Then you look up in the table to transform those categories into actual item qualities.
As an example, suppose you're crafting with carpentry skill level 77% and making an item with quality modifier 30%. The adjusted skill is 95% (77 + 30, rounded down to 95). So 1% of the time(100 - 95 / 5), you'll make a rough item, 4% of the time a decent item, 19% a masterwork (95 / 5) and 76% a fine item.