DF2014 Talk:Skill

From Dwarf Fortress Wiki
Jump to navigation Jump to search


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:

  1. Find the effective skill level (i.e. Novice=1, Legendary=15), uncapped, with status penalties applied (see article)
  2. 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)
  3. 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)
  4. Add points for mental attributes: (trandom(ment_attr1 + 1) / 100) + (trandom(ment_attr2 + 1) / 250) + (trandom(ment_attr3 + 1) / 250) (see above)
  5. Adjust points based on focus: points = (points * current_focus) / undistracted_focus (field names from "unit_personality" struct in df-structures)
  6. Apply status penalties again, this time to the "points" (this might be a bug?)
  7. If you have a Curse (or Blessing) with a Luck modifier, apply it to the points: points = (points * luck_mul_percent) / 100
  8. Add 10 points if the item being produced matches an Item preference on the maker
  9. Add 10 points if the item being produced matches a Material preference on the maker
  10. 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

--Quietust (talk) 02:42, 5 August 2021 (UTC)

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).

With six 1000 average attributes, the rolls should be like this. An astute player will note this still doesn't perfectly match Blue dwarf's research.

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).

Few corollaries:

- 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.

--Fleeting Frames (talk) 15:35, 17 August 2021 (UTC)

Skill Rust[edit]

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.