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 40d: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 "40d"). 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: | ||
− | |||
''Also see [[Item designations]].'' | ''Also see [[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 [[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. | ||
− | Item quality can have an effect on an item's properties, especially [[armor]] and [[ | + | Item quality can have an effect on an item's properties, especially [[armor]] and [[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. | [[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. | ||
Line 11: | Line 10: | ||
== Quality grades == | == Quality grades == | ||
− | All crafted items ([[furniture]], [[armor]], [[ | + | All crafted items ([[furniture]], [[armor]], [[bolts]], etc.) – but not intermediate materials ([[bars]], [[blocks]], 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 Decorating/Encrusting (with gems, leathers, cloth, etc). Prepared foods have quality levels. Alcohol 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 38: | Line 37: | ||
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 (but not as much as might be - see below). | 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 (but not as much as might be - see below). | ||
− | The magnitude of the unhappy thought is equal to 1000 | + | The magnitude of the unhappy thought is equal to 1000 divided by the number of masterworks the dwarf has created{{verify}}. So an engraver with hundreds of masterwork images on the walls of the fortress or a bonecarver with several dozen masterpiece bone bolts will be merely irked by the destruction of one of their many masterworks, while a dwarf who has only made a single masterwork item would be deeply and significantly affected. |
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. | 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. | ||
====Artifacts==== | ====Artifacts==== | ||
− | [[Artifact]] items have a unique name instead of bracketing symbols and are worth 120x base value. | + | [[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 == | ||
Line 59: | Line 58: | ||
| 1 || Novice|| 63.0% || 31.4% || 5.2% || 0.38% || 0.01% || 0.000089% ||1.430||0.430 | | 1 || Novice|| 63.0% || 31.4% || 5.2% || 0.38% || 0.01% || 0.000089% ||1.430||0.430 | ||
|- | |- | ||
− | | 2 || | + | | 2 || No|| 36.4% || 44.1% || 16.7% || 2.6% || 0.16% || 0.0028% ||1.860||0.430 |
|- | |- | ||
| 3 || Competent|| 18.3% || 43.8% || 29.4% || 7.7% || 0.79% || 0.022% ||2.291||0.431 | | 3 || Competent|| 18.3% || 43.8% || 29.4% || 7.7% || 0.79% || 0.022% ||2.291||0.431 | ||
Line 130: | Line 129: | ||
:::::::::''Full code breakdown here:'' | :::::::::''Full code breakdown here:'' | ||
− | {{Spoil small|Here is | + | {{Spoil small|Here is 0x517A5D's dis-assembly and analysis, up-to-date as of version .40d9:<br /><br /> |
--------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ||
<nowiki> | <nowiki> | ||
− | + | loc_6FCB92: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
push eax | push eax | ||
− | call | + | call get_dorf_level_in_a_skill |
− | mov | + | mov ebx, eax |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | loc_6FCB9A: | |
− | + | cmp ebx, 20 | |
− | + | mov [edi+7Ah], bx ; Save the creator's true skill level. | |
− | mov | + | ; EDI points to the item being created. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | jle short loc_6FCBA8 | |
− | + | mov ebx, 20 ; EBX is a value in the range of [0..20], | |
− | + | ; and is the (capped) skill level of the | |
− | + | ; creator, possibly adjusted for material | |
− | + | ; preferences, I didn't check. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
; We roll a d5 and compare the result with the creator's skill level. | ; We roll a d5 and compare the result with the creator's skill level. | ||
; (Technically, we compare d5 - 1 against skill_level - 1.) | ; (Technically, we compare d5 - 1 against skill_level - 1.) | ||
− | + | loc_6FCBA8: ; field 78h is quality. | |
− | + | xor eax, eax | |
− | call | + | mov [edi+78h], ax ; Init item quality to 0 |
+ | |||
+ | call mt_engine ; Get a random number (returned in EAX). | ||
mov ecx, eax ; This mess is a division by 5, | mov ecx, eax ; This mess is a division by 5, | ||
Line 221: | Line 174: | ||
; i.e. d5 - 1 | ; i.e. d5 - 1 | ||
− | cmp edx, | + | cmp edx, ebx ; Compare the "die roll" against the |
− | ; 0-based skill level (still in | + | ; 0-based skill level (still in EBX). |
− | jge short | + | jge short loc_6FCBE1 |
− | + | add [edi+78h], bp ; If the random number was less than | |
; the skill level, | ; the skill level, | ||
− | + | ; add 1 to the quality level. | |
− | ; add 1 to the quality level | + | ; (BP is known to be 1, and |
+ | ; item quality is known to be 0.) | ||
; Now we roll a d10 and compare. It's important to note that the roll | ; 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. | ; of the d10 is independent, not conditional, of the roll of the d5. | ||
− | + | loc_6FCBE1: ; Random number | |
− | call | + | call mt_engine |
mov ecx, eax ; Modulus | mov ecx, eax ; Modulus | ||
mov eax, 3 | mov eax, 3 | ||
Line 248: | Line 202: | ||
shr edx, 1Ah ; now EDX is in the range [0..9] | shr edx, 1Ah ; now EDX is in the range [0..9] | ||
; i.e. d10 - 1 | ; i.e. d10 - 1 | ||
− | cmp edx, | + | cmp edx, ebx ; Compare |
− | jge short | + | jge short loc_6FCC14 |
− | + | add [edi+78h], bp ; If d10 < skill, bump quality. | |
− | |||
− | + | loc_6FCC14: ; Same thing for a d15. | |
− | call | + | call mt_engine |
mov ecx, eax | mov ecx, eax | ||
mov eax, 3 | mov eax, 3 | ||
Line 269: | Line 222: | ||
shr edx, 1Bh | shr edx, 1Bh | ||
cmp edx, ebx | cmp edx, ebx | ||
− | jge short | + | jge short loc_6FCC47 |
− | + | add [edi+78h], bp ; If d15 < skill, bump quality. | |
− | |||
− | + | loc_6FCC47: ; Same thing for a d20. | |
− | call | + | call mt_engine |
mov ecx, eax | mov ecx, eax | ||
mov eax, 3 | mov eax, 3 | ||
Line 291: | Line 243: | ||
add ecx, edx | add ecx, edx | ||
shr ecx, 1Ah | shr ecx, 1Ah | ||
− | cmp ecx, | + | cmp ecx, ebx |
− | jge short | + | jge short loc_6FCC80 |
− | + | add [edi+78h], bp ; If d20 < skill. bump quality. | |
− | |||
− | + | loc_6FCC80: ; Now we roll a d25 | |
− | call | + | call mt_engine |
mov ecx, eax | mov ecx, eax | ||
mov eax, 3 | mov eax, 3 | ||
Line 311: | Line 262: | ||
mul ecx | mul ecx | ||
shr edx, 1Ah | shr edx, 1Ah | ||
− | cmp edx, | + | cmp edx, ebx ; Compare against skill, |
− | jge short | + | jge short loc_6FCCE2 |
− | call | + | call mt_engine ; AND roll a d3 |
mov ecx, eax | mov ecx, eax | ||
mov eax, 3 | mov eax, 3 | ||
Line 327: | Line 278: | ||
mul ecx | mul ecx | ||
shr edx, 1Dh | shr edx, 1Dh | ||
− | + | test edx, edx ; The d3 result must be 1. | |
; (Technically, d3-1 is tested against 0.) | ; (Technically, d3-1 is tested against 0.) | ||
− | jnz short | + | jnz short loc_6FCCE2 |
− | + | add [edi+78h], bp ; If d25 < skill AND d3 = 1, bump | |
− | |||
− | + | loc_6FCCE2: | |
− | cmp word ptr [ | + | cmp word ptr [edi+78h], 5 |
− | jnz | + | jnz loc_6FCE28 |
− | + | lea ecx, [esp+40h+var_2C] | |
− | + | call ds:??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ | |
− | + | lea ecx, [esp-14h+arg_24] | |
− | + | push ecx | |
− | push | + | mov ecx, esi |
− | + | mov [esp-10h+arg_4C], 0 | |
− | mov [esp+ | + | call get_dorf_name |
− | call | ||
add esp, 4 | add esp, 4 | ||
− | + | push offset aHasCreatedAMasterpiece ; " has created a masterpiece!" | |
− | push offset | + | lea ecx, [esp-10h+arg_24] |
− | lea | + | call ds:??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z |
− | call ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z | + | cmp [esp-18h+arg_40], 10h |
− | + | mov ecx, [esp-18h+arg_2C] | |
+ | jnb short loc_6FCD2C | ||
+ | lea ecx, [esp-18h+arg_2C] | ||
</nowiki> | </nowiki> | ||
}} | }} | ||
Line 361: | Line 312: | ||
===Food=== | ===Food=== | ||
− | Higher quality [[prepared | + | Higher quality [[prepared meals]] give dwarfs who consume them more [[thought|happiness]]. |
===Furniture=== | ===Furniture=== | ||
Line 421: | Line 372: | ||
---- | ---- | ||
+ | =DF 2010: Upcoming changes to artifact weapons= | ||
+ | Toady just gave us a further quote on weapon and armor quality, giving the game qualities of an "artifact" in the next version: | ||
+ | <div style="width: 50em; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ccc; background: #eee;"> | ||
+ | #Value*10. | ||
+ | #Cannot be owned (can be equipped, you might have to do it explicitly though). | ||
+ | #Armor deflection roll has *3 roll modifier instead of the masterwork's *2. | ||
+ | #Same for melee attack and archery rolls. | ||
+ | #It looks like the artifact edges are the maximum edge for the material, which is also what a masterwork gets, so beyond a masterwork you'd just be getting the hit roll modifier. | ||
+ | #Things like artifact bone spears will likely be crap against steel, yeah. We don't have actual magical artifacts yet, and that's what would be required. | ||
+ | </div> | ||
− | + | [[Category:Items|*Quality]] |