v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing 23a:Item quality

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "23a"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{quality|Fine|23:38, 13 August 2010 (UTC)}}{{av}}
+
{{av}}{{Quality|Unrated}}
''Also see [[Item designations]].''
+
''Also see {{L|Item designations}}.''
  
All items in the game have a [[item value|base value]], which is multiplied by what [[material value|material]] the item is made of and by the item's '''quality'''.  [[Decoration]]s (such as bone, gems, and studding) further increase the value.
+
All items in the game have a {{L|item value|base value}}, which is multiplied by what {{L|material value|material}} the item is made of and by the item's '''quality'''.  {{L|Decoration}}s (such as bone, gems, and studding) further increase the value.
  
Item quality can have an effect on an item's properties, especially [[armor]] and [[weapons]].
+
Item quality can have an effect on an item's properties, especially {{L|armor}} and {{L|weapons}}.
  
[[Room]]s also have a "quality grade" which determines their [[Room#Specific room quality grades|value]] in the eyes of those owning/using the room, which is the sum of the objects placed within their designated area plus the [[material]]s that surround it plus improvements (such as [[engraving]]) to those materials.  See [[room]] for a more complete discussion of these values, and [[How do I increase the value of a room]] for a complete list of options.
+
{{L|Room}}s also have a "quality grade" which determines their {{L|Room#Specific room quality grades|value}} in the eyes of those owning/using the room, which is the sum of the objects placed within their designated area plus the {{L|material}}s that surround it plus improvements (such as {{L|engraving}}) to those materials.  See {{L|room}} for a more complete discussion of these values, and {{L|How do I increase the value of a room}} for a complete list of options.
  
 
__TOC__
 
__TOC__
 
== Quality grades ==
 
== Quality grades ==
  
All crafted items ([[furniture]], [[armor]], [[bolts]], etc.) – but not intermediate materials ([[bar]]s, [[block]]s, etc. except [[cloth]], which does have quality levels) – are bracketed by characters that show the quality of their craftsdwarfship. Dyeing also has a quality level, as does [[Decoration|decorating]] (with gems, leathers, cloth, etc). Prepared foods have quality levels, but simple foods and drinks do not.
+
All crafted items ({{L|furniture}}, {{L|armor}}, {{L|bolts}}, etc.) – but not intermediate materials ({{L|bar}}s, {{L|block}}s, etc. except {{L|cloth}}, which does have quality levels) – are bracketed by characters that show the quality of their craftsdwarfship. Dyeing also has a quality level, as does {{L|Decoration|decorating}} (with gems, leathers, cloth, etc). Prepared foods have quality levels. Alcohol supposedly has a hidden quality rating that controls the amount of happiness a dwarf gets from drinking it. It is not yet known whether the damage or destruction of masterful alcohol can cause tantrums.
  
 
{|
 
{|
Line 28: Line 28:
 
| ☼Item Name☼ || Masterful || style="text-align: center;" | ×12 || style="text-align: center;" | ×2.0
 
| ☼Item Name☼ || Masterful || style="text-align: center;" | ×12 || style="text-align: center;" | ×2.0
 
|-
 
|-
| ''Unique name'' || Artifact || style="text-align: center;" | ×120 || style="text-align: center;" | ×2.0
+
| ''Unique name'' || Artifact || style="text-align: center;" | ×120 || style="text-align: center;" | ×2.0?*
 
|}
 
|}
 +
 +
:''(* An analysis of game memory indicates a base multiplier of 2.0, however observational reports (and some other elements of the game code) imply that the multiplier might be (significantly?) higher.  As it stands, it's not perfectly clear - more research is needed.)''
  
 
====Masterpiece====
 
====Masterpiece====
 
A '''masterpiece''' is more than the highest normal quality and value - it is an artistic expression that is of great importance to the dwarf who created it.
 
A '''masterpiece''' is more than the highest normal quality and value - it is an artistic expression that is of great importance to the dwarf who created it.
  
When a masterful quality item is created, the game will announce, "<dwarf> has created a masterpiece!"  The loss, destruction or theft of such a masterpiece will cause the dwarf that created it a ''very'' unhappy thought. [[Trading]] a masterpiece item to merchants is always safe. Masterpiece meals can be eaten safely, although allowing the food to rot will provoke the same response as theft or destruction. Using masterpiece bolts will not cause a tantrum, even if the bolts break - however, ''losing'' a bolt, even one left on the battlefield, will. So if a kobold or wild animal steals a used masterpiece bolt which was lying around, or misses its target and falls into the [[chasm]] or is melted by "the impertinent [[magma]]", this also counts as defacement, and the maker's mood will decrease drastically.  
+
When a masterful quality item is created, the game will announce, "<dwarf> has created a masterpiece!"  The loss, destruction or theft of such a masterpiece will cause the dwarf that created it a ''very'' unhappy thought. {{L|Trading}} a masterpiece item to merchants is always safe. Masterpiece meals can be eaten safely, although allowing the food to rot will provoke the same response as theft or destruction. Using masterpiece bolts will not cause a tantrum, even if the bolts break - however, ''losing'' a bolt, even one left on the battlefield, will. So if a kobold or wild animal steals a used masterpiece bolt which was lying around, or misses its target and falls into the {{L|chasm}} or is melted by "the impertinent {{L|magma}}", this also counts as defacement, and the maker's mood will decrease drastically.  
  
Since [[legendary]] dwarves are most likely to be the ones creating masterpieces, keeping these creations safe should be high priority; [[tantrum]]ing legendary dwarves can be very difficult to subdue (as was discovered the hard way in [[Main:Boatmurdered|Boatmurdered]]).
+
Since {{L|legendary}} dwarves are most likely to be the ones creating masterpieces, keeping these creations safe should be high priority; {{L|tantrum}}ing legendary dwarves can be very difficult to subdue (as was discovered the hard way in [[Boatmurdered]]).
  
 
====Artifacts====
 
====Artifacts====
[[Artifact]] items have a unique name instead of bracketing symbols and are worth 120x base value. Unlike masterpiece items, losing an artifact will not result in unhappiness unless the current owner is ''obsessed'' with it - in this case, losing the artifact will cause said dwarf to go '''insane'''.  According to inspections of the memory values, it seems that artifacts have the same quality value as masterpiece items.  It is unclear if this is true for weapons/armor or not - opinions differ as to whether artifact weapons and armor have a 2.0 multiplier or something higher; nothing has been found in the game code to support such, but observation suggests otherwise.
+
{{L|Artifact}} items have a unique name instead of bracketing symbols and are worth 120x base value. Artifacts, like masterpiece items, will cause a significant mood drop in the creator when destroyed or stolen.  According to inspections of the memory values, it seems that artifacts have the same quality value as masterpiece items.  It is unclear if this is true for weapons/armor or not - opinions differ as to whether artifact weapons and armor have a 2.0 multiplier or something higher; nothing has been found in the game code to support such, but observation suggests otherwise.
  
 
== Skill and quality levels ==
 
== Skill and quality levels ==
  
Tradesdwarves of higher [[skill]] levels will ''tend'' to produce items of higher quality.  Looking at the table below, we see that "Dabbling" dwarves never (without an applicable [[preference]]) produce anything above a basic "no quality" item, Proficient dwarves (the highest possible skill level at [[embark]]) always produce at least some quality and usually +Finely Crafted items+, while [[legendary]] dwarves usually (65% of the time) produce ≡Exceptional items≡, and the best legendary dwarves produce nothing ''less'' than ≡Exceptional≡ and produce ☼Masterful items☼ approximately 27% of the time.
+
Tradesdwarves of higher {{L|skill}} levels will ''tend'' to produce items of higher quality.  Looking at the table below, we see that "Dabbling" dwarves never (without an applicable {{L|preference}}) produce anything above a basic "no quality" item, Proficient dwarves (the highest possible skill level at {{L|embark}}) always produce at least some quality and usually +Finely Crafted items+, while {{L|legendary}} dwarves usually (65% of the time) produce ≡Exceptional items≡, and the best legendary dwarves produce nothing ''less'' than ≡Exceptional≡ and produce ☼Masterful items☼ approximately 27% of the time.
 
 
Preferences for particular materials and/or objects make a considerable difference in the odds of producing better quality items - specifically, matching item preferences and matching material preferences each provide a +1 skill level boost, possibly '''beyond''' Legendary+5.
 
  
 +
Preferences for particular materials and/or objects make a considerable difference in the odds of producing better quality items.  Although the exact adjustment is unknown, preliminary testing indicates that they can boost effective skill (not quality) by one to three levels (if the craftdwarf likes the item type, subtype and material), and overlapping preferences seem to be cumulative (such as for both {{L|silver}} + {{L|axe}}s, or {{L|wood|birch}} + {{L|bed}}s, etc.).<br /><br />
 
{| border="1" cellpadding="5" cellspacing="0" valign="bottom"
 
{| border="1" cellpadding="5" cellspacing="0" valign="bottom"
 
|-
 
|-
!Lvl !! Skill of dwarf !! No quality !! -Well-crafted- !! +Finely-crafted+ !! *Superior quality* !! ≡Exceptional≡ !! ☼Masterful☼ !! Average<br />[[Value]] Multiplier !! Jump in<br />Average Value
+
!Lvl !! Skill of dwarf !! No quality !! -Well-crafted- !! +Finely-crafted+ !! *Superior quality* !! ≡Exceptional≡ !! <nowiki>☼</nowiki>Masterful☼ !! Average<br />{{L|Value}} Multiplier !! Jump in<br />Average Value
 
|-
 
|-
 
| 0 || Dabbling|| 100.0%      || || || || || ||1.000||
 
| 0 || Dabbling|| 100.0%      || || || || || ||1.000||
Line 93: Line 94:
 
|20 || Legendary+5|| || || || || 73.3%        || 26.7%        ||6.867||0.219
 
|20 || Legendary+5|| || || || || 73.3%        || 26.7%        ||6.867||0.219
 
|-
 
|-
|21 || ''Legendary+6''**|| || || || || 72.0%        || 28.0%        ||6.96||0.093
 
|-
 
|22 || ''Legendary+7''**|| || || || || 70.7%        || 29.3%        ||7.053||0.093
 
|-
 
|23 || ''Legendary+8''***|| || || || || 69.3%        || 30.7%        ||7.146||0.093
 
|-
 
|24 || ''Legendary+9''***|| || || || || 68.0%        || 32.0%        ||7.24||0.093
 
|-
 
|25 || ''Legendary+10''***|| || || || || 66.7%        || 33.3%        ||7.333||0.093
 
 
|}
 
|}
  
 
:''(* Proficient is the highest level a dwarf can have at embark.)''
 
:''(* Proficient is the highest level a dwarf can have at embark.)''
:''(** Legendary+6 and Legendary+7 can '''only''' be reached by making items that coincide with the dwarf's preferences)''
+
 
:''(** Legendary+8 thru Legendary+10 are only relevant for certain non-crafting-related skills, such as Farming, Fishing, and Plant Gathering)''
 
 
::''(The above table is based on the formula discovered by [[User:0x517A5D|0x517A5D]])''
 
::''(The above table is based on the formula discovered by [[User:0x517A5D|0x517A5D]])''
  
 
===The math behind the curtain===
 
===The math behind the curtain===
The in-game calculations to determine final quality of a product work like this: first, a skill level is computed, directly related to the dabbling through legendary+5 indicators and preferences of the particular crafter.  "No skill" or dabbling is 0, proficient is 5, legendary is 15, etc.  Skill levels are capped at 20, then item/material preference bonuses are added (so Legendary +5 will produce Masterpieces more often in their preferences).
+
The in-game calculations to determine final quality of a product work like this: first, a skill level is computed, directly related to the dabbling through legendary+5 indicators and preferences of the particular crafter.  "No skill" or dabbling is 0, proficient is 5, legendary is 15, etc.  Skill levels are capped at 20 (so Legendary +5 don't appear to produce Masterpieces more often in their preferences).
  
 
Item quality is set to 0.
 
Item quality is set to 0.
Line 124: Line 115:
  
 
According to inspections of the memory values, it seems that artifacts have a quality of 5.
 
According to inspections of the memory values, it seems that artifacts have a quality of 5.
 
:::::::::''Full code breakdown here:''
 
{{Spoil small|Here is Quietust's disassembly and analysis of version 0.23.130.23a:<br /><br />
 
 
---------------------------------------------------------------------------------
 
<nowiki>
 
; First, check what skill is being used
 
                push    1              ; ignore_building
 
                mov    ecx, ebx        ; job *
 
                call    job_getSkill
 
 
; Next, get the level of that skill, if there is one (if not, it will use 0 instead)
 
                mov    edi, [esp+2Ch+maker]
 
                push    eax            ; skill
 
                mov    ecx, edi        ; unit *
 
                call    unit_getSkillLevel
 
 
; Cap the skill level to a maximum of 20
 
                mov    esi, eax
 
                cmp    esi, 20
 
                mov    [ebp+item_craftedst.skill_level], si
 
                jle    short loc_5DC657
 
                mov    esi, 20
 
 
; Check if the item's type/subtype match any Item preferences in the maker
 
loc_5DC657:
 
                mov    eax, [ebp+itemst.vftable]
 
                push    1              ; activatePrefs
 
                push    -1              ; matgloss
 
                push    -1              ; material
 
                mov    ecx, ebp
 
                call    [eax+vtable_item.getSubtype]
 
                mov    edx, [ebp+itemst.vftable]
 
                push    eax            ; item_subtype
 
                mov    ecx, ebp
 
                call    [edx+vtable_item.getType]
 
                push    eax            ; item_type
 
                push    LikeItem        ; prefType
 
                mov    ecx, edi        ; unit *
 
                call    unit_likesItem
 
                test    al, al
 
                jz      short loc_5DC67C
 
                inc    esi            ; if so, increase skill level by 1
 
 
; Check if the item's material/matgloss match any Material preferences in the maker
 
loc_5DC67C:
 
                mov    ax, [ebp+item_craftedst.material]
 
                cmp    ax, 0FFFFh      ; skip if item has no material
 
                jz      short loc_5DC6A0
 
                mov    cx, [ebp+item_craftedst.matgloss]
 
                push    1              ; activatePrefs
 
                push    ecx            ; matgloss
 
                push    eax            ; material
 
                push    -1              ; item_subtype
 
                push    -1              ; item_type
 
                push    LikeMaterial    ; prefType
 
                mov    ecx, edi        ; unit *
 
                call    unit_likesItem
 
                test    al, al
 
                jz      short loc_5DC6A0
 
                inc    esi            ; if so, increase skill level by 1
 
 
; We roll a d5 and compare the result with the creator's skill level.
 
; (Technically, we compare d5 - 1 against skill_level - 1.)
 
loc_5DC6A0:
 
                push    5              ; max
 
                mov    [ebp+item_craftedst.quality], 0
 
                call    trandom        ; generate number from 0-4
 
                add    esp, 4
 
                cmp    eax, esi
 
                jge    short loc_5DC6B8
 
                                        ; If the random number was less than
 
                                        ; the skill level, increment quality
 
                inc    [ebp+item_craftedst.quality]
 
 
; Now we roll a d10 and compare.  It's important to note that the roll
 
; of the d10 is independent, not conditional, of the roll of the d5.
 
 
loc_5DC6B8:
 
                push    10              ; max
 
                call    trandom
 
                add    esp, 4
 
                cmp    eax, esi
 
                jge    short loc_5DC6CA
 
                                        ; If d10 < skill, bump quality
 
                inc    [ebp+item_craftedst.quality]
 
 
loc_5DC6CA:                            ; Same thing for a d15
 
                push    15              ; max
 
                call    trandom
 
                add    esp, 4
 
                cmp    eax, esi
 
                jge    short loc_5DC6DC
 
                                        ; If d15 < skill, bump quality
 
                inc    [ebp+item_craftedst.quality]
 
 
loc_5DC6DC:                            ; Same thing for a d20
 
                push    20              ; max
 
                call    trandom
 
                add    esp, 4
 
                cmp    eax, esi
 
                jge    short loc_5DC6EE
 
                                        ; If d20 < skill, bump quality
 
                inc    [ebp+item_craftedst.quality]
 
 
loc_5DC6EE:                            ; Now we roll a d25
 
                push    25              ; max
 
                call    trandom
 
                add    esp, 4
 
                cmp    eax, esi        ; Compare against skill,
 
                jge    short loc_5DC70E
 
                push    3              ; max
 
                call    trandom        ; AND roll a d3
 
                add    esp, 4
 
                test    eax, eax
 
                                        ; The d3 result must be 1.
 
                                        ; (Technically, d3-1 is tested against 0.)
 
                jnz    short loc_5DC70E
 
                                        ; If d25 < skill AND d3 = 1, bump
 
                inc    [ebp+item_craftedst.quality]
 
 
loc_5DC70E:
 
                cmp    [ebp+item_craftedst.quality], 5
 
                jnz    loc_5DC7EC
 
                ...
 
                mov    dword ptr [esp+2Ch+__$EHRec$.state], eax
 
                lea    eax, [esp+2Ch+message]
 
                push    eax            ; str
 
                push    edi            ; name
 
                call    formatLanguageName
 
                mov    edi, offset aHasCreatedAMas ; " has created a masterpiece!"
 
                ...
 
</nowiki>
 
}}
 
  
 
==Effects of Quality==
 
==Effects of Quality==
  
Most obviously, quality influences the [[value|monetary worth]] of an object, for purposes of [[trade|trading]] and determining price (the latter once [[economy]] starts). Destruction of a [[masterwork]] will also cause relevant unhappiness. However, for some items, quality may also influence other things.
+
Most obviously, quality influences the {{L|value|monetary worth}} of an object, for purposes of {{L|trade|trading}} and determining price (the latter once {{L|economy}} starts). Destruction of a {{L|masterwork}} will also cause relevant unhappiness. However, for some items, quality may also influence other things.
  
 
Note that this is not a complete list.
 
Note that this is not a complete list.
Line 267: Line 124:
 
===Food===
 
===Food===
  
Higher quality [[prepared meals]] give dwarves who consume them more [[thought|happiness]].
+
Higher quality {{L|prepared meals}} give dwarfs who consume them more {{L|thought|happiness}}.
  
 
===Furniture===
 
===Furniture===
  
Because [[room quality]] is based on total value of the furniture in a room, high-quality furniture will result in high quality rooms, which provide more satisfaction for the occupants.
+
Because {{L|room quality}} is based on total value of the furniture in a room, high-quality furniture will result in high quality rooms, which provide more satisfaction for the occupants.
  
 
===Weapons===
 
===Weapons===
Line 277: Line 134:
 
To quote Toady:
 
To quote Toady:
 
<div style="width: 50em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee;">
 
<div style="width: 50em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee;">
The quality of any weapon, including [[crossbow]]s used as launchers, affects the skill of the shooter. I think this even leads to obscene things like master crossbows + master bolts causing recruits to shoot like legends. In general, if the quality Q is from 0 to 5, the skill is modified according to
+
The quality of any weapon, including {{L|crossbow}}s used as launchers, affects the skill of the shooter. I think this even leads to obscene things like master crossbows + master bolts causing recruits to shoot like legends. In general, if the quality Q is from 0 to 5, the skill is modified according to
  
 
Skill<sub>new</sub> = Skill<sub>original</sub> &times; (1.0 + 0.2 &times; Q) + Q
 
Skill<sub>new</sub> = Skill<sub>original</sub> &times; (1.0 + 0.2 &times; Q) + Q
Line 290: Line 147:
 
{| border="1" cellpadding="5" cellspacing="0" valign="bottom"
 
{| border="1" cellpadding="5" cellspacing="0" valign="bottom"
 
|-
 
|-
!Result for  !!Well-crafted!!Finely-crafted!!Superior quality!!Exceptional !!Masterful
+
!Result for  !!Well-crafted!!Finely-crafted!!Superior quality!!Exceptional!!Masterful
|-
 
|Dabbling    ||Novice      ||No-label      ||Competent      ||Skilled    ||Proficient
 
 
|-
 
|-
|Novice      ||No label    ||Competent    ||Skilled        ||Proficient  ||Adept
+
|Dabbling    ||No label    ||Skilled      ||Talented        ||Expert    ||Accomplished
 
|-
 
|-
|No label    ||Competent  ||Skilled      ||Talented        ||Adept      ||Professional
+
|Novice      ||Competent  ||Proficient    ||Expert          ||Accomplished||Master
 
|-
 
|-
|Competent  ||Skilled    ||Talented      ||Adept          ||Professional||Great
+
|No label    ||Skilled    ||Adept        ||Professional    ||Master    ||Grand Master
 
|-
 
|-
|Skilled    ||Proficient  ||Adept        ||Professional    ||Great       ||High Master
+
|Competent  ||Talented    ||Expert        ||Great           ||High Master||Legendary
 
|-
 
|-
|Proficient  ||Adept      ||Professional ||Great          ||High Master ||Legendary
+
|Skilled    ||Adept      ||Accomplished ||Master          ||Legendary  ||Legendary
 
|-
 
|-
|Talented    ||Expert      ||Accomplished  ||Master         ||Grand Master||Legendary
+
|Proficient  ||Expert      ||Great        ||Grand Master   ||Legendary  ||Legendary
 
|-
 
|-
|Adept      ||Professional||Great        ||Grand Master    ||Legendary   ||Legendary
+
|Talented    ||Professional||Master        ||Legendary      ||Legendary ||Legendary
 
|-
 
|-
|Expert      ||Accomplished||High Master   ||Legendary      ||Legendary   ||Legendary
+
|Adept      ||Accomplished||Grand Master ||Legendary      ||Legendary ||Legendary
 
|-
 
|-
|Professional||Great      ||Grand Master  ||Legendary      ||Legendary   ||Legendary
+
|Expert      ||Master      ||Legendary    ||Legendary      ||Legendary ||Legendary
 
|-
 
|-
|Accomplished||High Master ||Legendary    ||Legendary      ||Legendary   ||Legendary
+
|Professional||High Master ||Legendary    ||Legendary      ||Legendary ||Legendary
 
|-
 
|-
|Great      ||Grand Master||Legendary    ||Legendary      ||Legendary   ||Legendary
+
|Accomplished||Grand Master||Legendary    ||Legendary      ||Legendary ||Legendary
 
|-
 
|-
|Master+    ||Legendary   ||Legendary     ||Legendary      ||Legendary   ||Legendary
+
|Great and better||Legendary||Legendary   ||Legendary      ||Legendary ||Legendary
 
|}
 
|}
  

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)