The logic for determining item quality changed a while ago (back in version 0.40, I think), and I believe the significance of Legendary+5 has been largely lost in the process. A few mechanisms still use it (such as Farming/Herbalism yields), but item quality seems to use a completely different formula now. Further research is needed. --Quietust (talk) 13:28, 6 May 2020 (UTC)
Update: I believe I've figured out the logic used for determining Item Quality from jobs:
- Find the effective skill level (i.e. Novice=1, Legendary=15), uncapped, with status penalties applied (see article)
- Roll for item quality "points":
trandom(11) + trandom(1 + (level * 5) / 2) + trandom(1 + (level * 5) / 2)(note:
trandom(N)returns a number from 0 to N-1)
- Add points for physical attributes:
(trandom(phys_attr1 + 1) / 100) + (trandom(phys_attr2 + 1) / 250) + (trandom(phys_attr3 + 1) / 250)(for whichever attributes are actually associated with the skill)
- Add points for mental attributes:
(trandom(ment_attr1 + 1) / 100) + (trandom(ment_attr2 + 1) / 250) + (trandom(ment_attr3 + 1) / 250)(see above)
- Adjust points based on focus:
points = (points * current_focus) / undistracted_focus(field names from "unit_personality" struct in df-structures)
- Apply status penalties again, this time to the "points" (this might be a bug?)
- If you have a Curse (or Blessing) with a Luck modifier, apply it to the points:
points = (points * luck_mul_percent) / 100
- Add 10 points if the item being produced matches an Item preference on the maker
- Add 10 points if the item being produced matches a Material preference on the maker
- Feed the points into the following formula:
- 0-21 - base quality
- 22-29 - Well-crafted
- 30-34 - Fine
- 35-44 - Superior
- 45-54 - Exceptional
- 55+ - 1/3 Masterwork, 2/3 Exceptional
Few clarifications for others (from elsewhere):
In the above calculations the number is always converted to integer by flooring down - so all divisions (involving skills and attributes) round down. trandom also returns random integer, evenly distributed between all possible values between 0 and N-1 (inclusive).
This discrepancy is explained and brought on par by Attribute_table_old: The skill tested was Carpenter, and Carpenter uses only five attributes: Strength/Agility & Kinesthetic Sense/Spatial sense/Creativity (in order of importance).
- Preference is worth about 4 skill levels in raw points. At higher levels of skill, it works out even better than that, though, reducing the likelihood of non-exceptional crafts.
- As creativity is never primary attribute, often the best soldiers are also the best crafters.
This section suggests there is no effect other than the rusty skill description in fortress mode. By observation a rusty skill might effect quality of produced items and eventually the dwarf will loose experiece and/or skill level.