Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Crafting Skills, Quality and Statistics research  (Read 12001 times)

Blue_Dwarf

  • Bay Watcher
    • View Profile
Crafting Skills, Quality and Statistics research
« on: November 16, 2011, 06:43:23 pm »

I was curious about the mechanics of crafting skills, so I tested a bunch of them to find common patterns. Unsurprisingly, there are so many similarities that anything in this post will most likely apply to all of them (details and methodology included at the bottom). Feel free to peer review.

More specifically, I tried to find answers to the following questions:
  • What are the chances of getting a masterful, exceptional etc item? (actually how many steel axes do I have to make, stud and melt until I have 10 masterful axes masterfully studded with platinum for my squad)
  • How do attributes affect the crafting process? (actually do we really need to assign labors according to a dwarf's attributes, and is there any reason to train attributes for that purpose, and will I get better axes from it)
  • What is Core Quality and Total Quality, and how are they determined? (actually in which stockpile do I put them axes)
  • How much experience do dwarves get from crafting? (actually how fast can I train that guy so he can make me better axes)


Qualities
First let's take a look at what quality actually means, because there is some confusion around it.

We have two kinds of items, some are made of quality-less components (such as axes), while others are made of components that have their own quality (such as most cloth items). Decorations are also treated as  components that have quality (such as studding with metal, and sewing cloth images). By the way, prepared meals are in the second category as well.

Core Quality means the quality of the craftsmanship of the item (masterful axe = core is masterful, and exceptional dress made from standard cloth = core is exceptional).

Total Quality means the highest between the craftsmanship of the item and the craftsmanship of its components (masterful dress made from standard cloth = masterful total quality, standard dress made from masterful cloth = masterful total quality). Similarly, an exceptional axe with finely-studded platinum has exceptional total quality, so does a standard axe with exceptional studding.

This means that it's hard to impossible to fully separate items according to their decorations or components - there can be no stockpile that will accept only masterful axes with masterful studding (the dwarves will put all masterful axes in there with any studding, because the masterful core gives them a masterful Total Quality regardless of studding). A possible workaround would be to set up a second stockpile that drains up to exceptional cores and up to masterful total quality items from the first stockpile.

Items made of quality-less components are apparently treated as if their Total Quality is equal to their Core Quality, so a stockpile for plain masterful axes needs to have "Masterful" enabled in both Core and Total settings.


Experience
Now to experience gains.

Crafting labors give 60 experience points. Exception to this are labors that produce more than one item - these give +50% for each additional item, so up to 120 total experience for a single job (making crafts, goblets/mugs, gloves/mittens/shoes etc).

This is useful when training new armorsmiths, blacksmiths and metalcrafters, because they can use less resources to level. Weaponsmiths always make one item and only receive the standard experience, this is of course an outrage.

Decorating gives only 30 experience points (studding with metal, sewing cloth images).

Rusty skills will result in lower experience gain for a few crafts, but it returns to normal in no time. Dwarves with no experience at a skill receive full experience for working on it.


Statistics
Now that we know how long it takes to get a Legendary+5 dwarf, let's see how many items of each quality he can make.

The results are close to the following averages:

☼ Masterful ☼29.1%
≡ Exceptional ≡63.4%
* Superior *4.5%
+ Finely-crafted +1.3%
- Well-crafted -1.1%
Standard0.3%

edit: additional tests show that a dwarf with item/material preferences can produce less low-quality items, and more high-quality. See details in Post#6 below.


Attributes
I was wondering if higher attributes could improve these percentages, but the results are disappointing. The only thing that definitely improves with attributes is the speed of crafting.

In a nutshell, I don't think that attributes have a noticeable impact in regular gameplay (where regular means un-modded random migrant dwarves with average attributes). A dwarf with 800 attribute will do just as well as a dwarf with 1200 attribute. There seems to be no benefit in assigning labors according to attributes, except for role-playing purposes. Yes, that means Creativity. There also doesn't seem to be any benefit in training attributes (I had these plans of multiple workshop setups just for training...).

Beyond regular gameplay (at extreme values of attributes), there does seem to be some evidence that attributes improve the quality of output items. I'm still not fully convinced that they were not simple deviations, because very similar results were achieved with average dwarves. We're talking about a questionable 1-4% bonus to the masterful/exceptional percentages, when attributes are in 4000+ range.


So basically, I need to make and stud approximately 100 axes, and about 10 of them will be perfect masterful axes with masterful studs...


Notes on methodology
The testing I've done mostly involved making about 500-1800 different items with the same dwarf for each skill, for each testing process. Several additional tests were made with random dwarves, and some more with an older fortress save, to make sure the results are not specific to the main test dwarf.

I chose a dwarf with no preferences to the materials or items I was testing. I did some minimal testing of material and item preference with a couple of other dwarves, but I didn't see anything out of the ordinary. This area could use more testing.

The skills I tested (even after getting bored, but before saying screw it) are: Carpentry, Weaponsmithing, Armoring, Blacksmithing, Metalcrafting, Woodcrafting, Stonecrafting, Weaving, Clothesmaking. The results are very similar for all of them, with acceptable deviations. I would expect the same results from all the other skills.

Attribute testing involved the same procedure, while changing (with Runesmith) each skill's associated attributes to several significant values within 0-4000 range. At some point I decided that it was a waste of time, so I didn't actually do this for all of the above skills.


« Last Edit: November 18, 2011, 10:49:21 am by Blue_Dwarf »
Logged
Crafting Statistics 42.06Farming Statistics

Blue Dwarf has been happy lately. He did some !!science!! recently. He admired a fine forum post lately. He was enraged by a forum troll recently. He was upset by the delayed release of the new version of Dwarf Fortress lately. He took joy in planning a noble's death recently.

Diamond

  • Bay Watcher
  • Did someone just say "elves" ?
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #1 on: November 16, 2011, 07:34:43 pm »

Well-done research, but most of this can be found in magmawiki.
Logged

Blue_Dwarf

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #2 on: November 16, 2011, 09:16:16 pm »

I must have missed it, because I couldn't find any of it either on the wiki or on these forums, hence the research  :-\
Logged
Crafting Statistics 42.06Farming Statistics

Blue Dwarf has been happy lately. He did some !!science!! recently. He admired a fine forum post lately. He was enraged by a forum troll recently. He was upset by the delayed release of the new version of Dwarf Fortress lately. He took joy in planning a noble's death recently.

NecroRebel

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #3 on: November 16, 2011, 09:56:19 pm »

Well-done research, but most of this can be found in magmawiki.
It would appear that the information on the wiki us out-of-date, however, as it's different from the numbers Blue_Dwarf found.

I must have missed it, because I couldn't find any of it either on the wiki or on these forums, hence the research  :-\
There is this on the 40d item quality page, but as I mentioned before, it appears that it's not completely accurate to 31.x. In particular, your data suggests that it's possible for a legend+5 dwarf to produce items of below exceptional quality, which in 40d wasn't the case. Your data also has a somewhat higher chance of masterworks than that data, though the difference may not be statistically significant (it's less than 3%, after all, though depending on how many tests you did that may be big enough).

I seem to recall Toady saying that effective skill levels are affected by fatigue, hunger, thirst, etc., which I know they weren't in 40d. It's possible that the 40d numbers are correct for a well-rested, well-fed, well-boozed, and otherwise-healthy individual, but it's probably impossible to maintain that state for every item made. Perhaps further tests should be made with a [NO_EAT][NO_DRINK][NO_SLEEP] race to determine the baseline? You could even control for skill levels with a [SKILL_LEARN_RATE:some quality-producing skill's token name:0] and [NATURAL_SKILL:the same skill:whatever level you want to test at] if you wanted, as the combination should make it so that every member of that race has the skill at that level and cannot develop it further.
Logged
A Better Magma Pump Stack: For all your high-FPS surface-level magma installation needs!

acetech09

  • Bay Watcher
  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #4 on: November 16, 2011, 10:06:18 pm »

Thanks - I have been looking for answers but I was too lazy to do it myself.

Somebody should definitely go on wiki duty for this.
Logged
I challenge you to a game of 'Hide the Sausage', to the death.

assimilateur

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #5 on: November 17, 2011, 12:53:09 am »

In particular, your data suggests that it's possible for a legend+5 dwarf to produce items of below exceptional quality, which in 40d wasn't the case.

I'm positive I didn't have any amateurs produce armor in my current fort (didn't bother with artifact-oriented cross-training and any enabled labors are monitored via Dwarf Therapist), but I ended up with a few subpar items when my l+5 armorsmith produced a surplus not long ago anyway. Not that the original poster needs me to vouch for him, mind you.

This either means that the quality mechanics have changed or that effects like drowsiness influence effective skill levels similarly to how they slow a dwarf down.

EDIT: The above sentence would have been omitted had I actually read your whole post before replying.

« Last Edit: November 17, 2011, 12:56:30 am by assimilateur »
Logged

Blue_Dwarf

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #6 on: November 17, 2011, 01:02:17 am »

I must have missed it, because I couldn't find any of it either on the wiki or on these forums, hence the research  :-\
There is this on the 40d item quality page, but as I mentioned before, it appears that it's not completely accurate to 31.x. In particular, your data suggests that it's possible for a legend+5 dwarf to produce items of below exceptional quality, which in 40d wasn't the case. Your data also has a somewhat higher chance of masterworks than that data, though the difference may not be statistically significant (it's less than 3%, after all, though depending on how many tests you did that may be big enough).

I seem to recall Toady saying that effective skill levels are affected by fatigue, hunger, thirst, etc., which I know they weren't in 40d. It's possible that the 40d numbers are correct for a well-rested, well-fed, well-boozed, and otherwise-healthy individual, but it's probably impossible to maintain that state for every item made. Perhaps further tests should be made with a [NO_EAT][NO_DRINK][NO_SLEEP] race to determine the baseline? You could even control for skill levels with a [SKILL_LEARN_RATE:some quality-producing skill's token name:0] and [NATURAL_SKILL:the same skill:whatever level you want to test at] if you wanted, as the combination should make it so that every member of that race has the skill at that level and cannot develop it further.

Yeah I haven't noticed that page...

It's quite possible that my results were affected by fatigue and hunger. However, I looked at the 40d talk page, and someone suggests that a Legendary dwarf could still make low-quality items back in 2008.

As for the masterwork chance, the number in the first post is just an average I ended up with. As minimum-maximum we can expect 26-34% for masterwork, and 60-69% for exceptional, though more often it will be closer to the middle. In the 40d table the low-quality percentages contribute to the exceptional, which most likely is the main reason for the difference.

We could definitely benefit from a test with a spherical Urist in a vacuum, I'll try to mod it to see what happens.



Update

I ran some tests with a [NO_EAT] etc tags. I'm not sure if I was supposed to start a new game with that change, but the dwarves in my regular save were not eating or sleeping, so I think it's fine.

So with a hungerless/sleepless dwarf I got results like this:

☼ Masterful ☼26.7%
≡ Exceptional ≡64.9%
* Superior *4.9%
+ Finely-crafted +1.6%
- Well-crafted -1.2%
Standard0.5%



I also ran more tests for preference crafting.

The results are consistent enough to conclude that there is in fact a bonus, even though it's pretty small and most likely won't be very noticeable. Again, at Legendary +5 skill (I didn't test lower, because it would take me weeks to get reliable average numbers for several skill levels).

With a material preference I got these numbers:

☼ Masterful ☼30.7%
≡ Exceptional ≡66.2%
* Superior *2.1%
+ Finely-crafted +0.5%
- Well-crafted -0.3%
Standard0%

While the averages are not generally better than with random dwarves, we do get the shift towards higher quality. Zero standard items, and less well/fine are noteworthy.

With item and material preferences I got this:

☼ Masterful ☼33.2%
≡ Exceptional ≡66.4%
* Superior *0.1%
+ Finely-crafted +0.08%
- Well-crafted -0%
Standard0%


So while we get percentages in the same range, preferences shift them towards the higher values.

I guess that a dwarf with super attributes and two preferences would produce higher qualities slightly more reliably, though random dwarves can perform equally well with some luck.
« Last Edit: November 18, 2011, 10:43:35 am by Blue_Dwarf »
Logged
Crafting Statistics 42.06Farming Statistics

Blue Dwarf has been happy lately. He did some !!science!! recently. He admired a fine forum post lately. He was enraged by a forum troll recently. He was upset by the delayed release of the new version of Dwarf Fortress lately. He took joy in planning a noble's death recently.

Blue_Dwarf

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #7 on: November 18, 2011, 11:02:54 am »

Minor bump for the additional test results (edited in the previous post).

Another thing I noticed while doing this project is the probability of getting a perfect dwarf with decent preferences. It's abysmally low.

I think I might be checking my dwarves' info before assigning important labors, but I wouldn't even think about trying to re-embark or savescum to get better dwarves. The hours days needed to find a perfect dwarf would be better spent training a random one instead.
Logged
Crafting Statistics 42.06Farming Statistics

Blue Dwarf has been happy lately. He did some !!science!! recently. He admired a fine forum post lately. He was enraged by a forum troll recently. He was upset by the delayed release of the new version of Dwarf Fortress lately. He took joy in planning a noble's death recently.

ancistrus

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #8 on: November 18, 2011, 02:56:32 pm »

Cant we just ask Toady to share the algorithm? Or has he said that he doesnt want to?
Logged

Shark

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #9 on: November 18, 2011, 04:56:52 pm »

This is actually pretty awesome !!SCIENCE!! here but we REALLY need the spherical urist in a vacuum air resistance is forking up these results
Logged
Real dorf doctors wash with water AND magma. The resulting burning cauterizes the wound, and the obsidian that forms covers the wound so it can heal.

htabdoolb

  • Bay Watcher
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #10 on: December 19, 2011, 12:59:32 am »

Thank you for posting this. It's very useful and just what I was looking for.

I'm also curious to know if personality traits, not just attributes, affect the crafting process. I'm thinking of "imagination" ("has a fertile imagination" versus "isn't given to flights of fancy") and "artistic interest" ("appreciates art and natural beauty" versus "is not interested in art ") in particular. Would a dwarf with higher of either be more likely to create better quality items? I think this would be harder to test, because I'm not sure if traits are moddable with Runesmith.
Logged

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Crafting Skills, Quality and Statistics research
« Reply #11 on: December 19, 2011, 04:08:51 am »

Toady posted about this in the Future of the Fortress thread recently, in response to a question:
Quote from: Kogut
Attributes are supposed to impact performance at various tasks, but according to my testing impact of attributes on quality of products is completely unimportant compared to skill. There is no noticeable difference between "legendary carpenter with a boundless creative imagination" and "legendary carpenter (with average creativity)". Is it intended?

It's not intended, but that is how it is, for all attributes and all skills (with some combat related exceptions probably).  In response to the discussion, creativity is an attribute for carpentry and it does effect the roll, but skill outpaces it.  To check, just ran a test - an unskilled, meager creativity dwarf with no other notable atts made 10 lowest quality items, where an unskilled, great creativity dwarf with no other notable atts had 5 come out well-crafted.  Once they are legendary and churning out exceptional goods and masterpieces, it doesn't matter anymore.  I don't want attributes to dominate the game, but I think they should be important even at the highest levels.  It kind of makes me want to split quality into different categories though.

So when assigning skills at embark, or finding a new carpenter (or whatever) after your old one has an 'accident', it's worth looking for a creative dwarf even if if makes little difference in the long run.
Logged