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 Material science
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.
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|Exceptional|23:57, 9 October 2013 (UTC)}} | |
− | {{Quality| | ||
{{av}} | {{av}} | ||
{{Material properties}} | {{Material properties}} | ||
− | [[Material|Materials]] have a number of properties representing real | + | [[Material|Materials]] have a number of properties representing real world variables that describe how they respond to inputs. In particular, the game now has a number of variables that describe what happens to a material when it's put under stress. |
==What is stress?== | ==What is stress?== | ||
Line 11: | Line 10: | ||
In the material raws, whenever you see 'yield', 'fracture', or '[[Strain at yield|strain at yield]]', that property is a stress-related quality. | In the material raws, whenever you see 'yield', 'fracture', or '[[Strain at yield|strain at yield]]', that property is a stress-related quality. | ||
− | ==When does | + | ==When does Dwarf Fortress make stress calculations?== |
At present, DF seems to only apply forces during combat, and thus only stresses objects (generally armor and various body layers) at that time. | At present, DF seems to only apply forces during combat, and thus only stresses objects (generally armor and various body layers) at that time. | ||
Line 22: | Line 21: | ||
===Mechanical Performance Properties=== | ===Mechanical Performance Properties=== | ||
− | Yield: This is almost certainly 'Yield Strength', which is the amount of stress needed to cause a material to go from elastic deformation | + | Yield: This is almost certainly 'Yield Strength', which is the amount of stress needed to cause a material to go from elastic deformation to plastic deformation. (That is, if you cease stressing the object, does it revert to its original shape or not). Since most objects only elastically deform over small distances of deformation, high Yield values generally means it takes a lot of force to noticeably 'stretch' them (but see strain at yield). |
Fracture: The fracture point is the amount of stress or force necessarily to cause the material to fail, or in other words, to break. | Fracture: The fracture point is the amount of stress or force necessarily to cause the material to fail, or in other words, to break. | ||
− | Strain at yield (sometimes incorrectly referred to as 'elasticity'): This variable tells you how much deformation occurs to the material while it is deforming elastically. That is, as long as the force is less than the yield strength, stress * strain at yield = deformation distance. The smaller the strain at yield, the less deformation occurs under stress | + | Strain at yield (sometimes incorrectly referred to as 'elasticity'): This variable tells you how much deformation occurs to the material while it is deforming elastically. That is, as long as the force is less than the yield strength, stress * strain at yield = deformation distance. The smaller the strain at yield, the less deformation occurs under stress. |
− | Note: Strain at yield is the inverse of the | + | Note: Strain at yield is the inverse of the Elastic Modulus. Thus a highly elastic material has low elastic modulus, and engages in less elastic collisions. |
===Modes of Applying Force=== | ===Modes of Applying Force=== | ||
Line 44: | Line 43: | ||
==Effects on Combat== | ==Effects on Combat== | ||
− | The | + | The Dwarf Fortress combat system does not use all material properties at present (0.40.05). Weapon and armor damage/wear/decay is not tracked. |
The formulae below have been reverse-engineered [http://www.bay12forums.com/smf/index.php?topic=131995.0] [http://www.bay12forums.com/smf/index.php?topic=142372.0] and experimentally proven [http://www.bay12forums.com/smf/index.php?topic=116151.0] [http://www.bay12forums.com/smf/index.php?topic=141364] by several independent researchers. Below are the simplified results; for more details see links above. | The formulae below have been reverse-engineered [http://www.bay12forums.com/smf/index.php?topic=131995.0] [http://www.bay12forums.com/smf/index.php?topic=142372.0] and experimentally proven [http://www.bay12forums.com/smf/index.php?topic=116151.0] [http://www.bay12forums.com/smf/index.php?topic=141364] by several independent researchers. Below are the simplified results; for more details see links above. | ||
Line 52: | Line 51: | ||
The attacks marked with [EDGE] flag deliver ''edged'' damage which is governed by [SHEAR_*] tokens; they can be further differentiated by attack contact area: generally concentrated strikes (area of 50 or less) are considered ''stabbing'' while wider areas correspond to ''slashing'' attacks. This distinction shall be emphasized later. | The attacks marked with [EDGE] flag deliver ''edged'' damage which is governed by [SHEAR_*] tokens; they can be further differentiated by attack contact area: generally concentrated strikes (area of 50 or less) are considered ''stabbing'' while wider areas correspond to ''slashing'' attacks. This distinction shall be emphasized later. | ||
− | Every other attack is considered ''blunt''. [IMPACT_*] tokens affect blunt combat. Most specialised blunt weapons have small contact area; edged weapons generally also have blunt attacks with larger area values; items or creatures without defined attacks get default blunt attack with area = (size)^ | + | Every other attack is considered ''blunt''. [IMPACT_*] tokens affect blunt combat. Most specialised blunt weapons have small contact area; edged weapons generally also have blunt attacks with larger area values; items or creatures without defined attacks get default blunt attack with area = (size)^2/3. |
− | Under certain circumstances edged attack can be converted to blunt, but not | + | Under certain circumstances edged attack can be converted to blunt, but not otherwise. |
Wrestling moves are special: '''breaking bones''' uses [BENDING_*] values, '''pinching''' utilizes [COMPRESSIVE_*] properties, and '''biting''' can deal [TENSILE] or [TORSION] damage depending on whether the attack is edged. Those attacks generally ignore armor. | Wrestling moves are special: '''breaking bones''' uses [BENDING_*] values, '''pinching''' utilizes [COMPRESSIVE_*] properties, and '''biting''' can deal [TENSILE] or [TORSION] damage depending on whether the attack is edged. Those attacks generally ignore armor. | ||
Line 59: | Line 58: | ||
===Contact Area=== | ===Contact Area=== | ||
Attack contact area is the minimum of weapon contact area and armor/layer contact area. | Attack contact area is the minimum of weapon contact area and armor/layer contact area. | ||
− | Body parts have areas | + | Body parts have areas dependant on their size, as with non-weapon items; part size is <u>creature size</u> '''times''' <u>relative size of the part in proportion to whole body</u>. |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Body part | ! Body part | ||
! Relative size (human) | ! Relative size (human) | ||
− | ! | + | ! Kobold |
− | ! | + | ! Elf |
− | ! | + | ! Human |
− | ! | + | ! Troll |
|- | |- | ||
|| Total || 100% || 20000 || 60000 || 70000 || 250000 | || Total || 100% || 20000 || 60000 || 70000 || 250000 | ||
Line 98: | Line 97: | ||
! Size multiplier | ! Size multiplier | ||
! Body part | ! Body part | ||
− | ! | + | ! Dwarf |
− | ! | + | ! Human |
! Extra body parts covered (humanoid) | ! Extra body parts covered (humanoid) | ||
! Notes | ! Notes | ||
Line 127: | Line 126: | ||
===Attack Momentum=== | ===Attack Momentum=== | ||
− | DF uses momentum-based combat physics, so the momentum plays | + | DF uses momentum-based combat physics, so the momentum plays central role in calculations. |
− | Since momentum | + | Since momentum equals velocity times mass, and lighter items can be swung faster, attack momentum is largely independent from weapon weight. The simplified formula is as follows: |
M = Str * Vel / ( 10<sup>6</sup>/Size + 10*F/W ), | M = Str * Vel / ( 10<sup>6</sup>/Size + 10*F/W ), | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
where: | where: | ||
− | + | * '''Str''' is creature strength (e.g. 1250 for average dwarf) | |
− | * '''Str''' is | + | * '''Vel''' is weapon's velocity modifier if present (e.g. 1.25x, 2x) |
− | * '''Vel''' is | + | * '''Size''' is normal creature size (e.g. 60000 for dwarves) |
− | * '''Size''' is | + | * '''F''' is "fatness modifier" (also includes muscle); dwarf with weight of 66000 will have F=66000/60000=1.1 |
− | + | * '''W''' is weapon weight in kilograms (Γ). | |
− | * '''F''' is "fatness modifier" (also includes muscle) | ||
− | * '''W''' is weapon | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | There is also a hard velocity limit | + | There is also a hard velocity limit that might skew these calculations, but it's actually impossible to reach in unmodded game. (Well, okay, if you're a zombie adventurer with maxed out strength you ''might'' reach the limit using an adamantine whip -- but [[stupid dwarf trick|why]]?) |
− | |||
Momentum can be further increased with weapon skill, status effects, attack modifiers etc. | Momentum can be further increased with weapon skill, status effects, attack modifiers etc. | ||
− | |||
− | |||
− | |||
− | |||
====Ranged Attacks==== | ====Ranged Attacks==== | ||
− | Attacks from missile launchers are entirely dependent on | + | Attacks from missile launchers are entirely dependent on launcher's [SHOOT_FORCE] and [SHOOT_MAXVEL] tags. |
− | + | Specifically, as long as projectile is heavy enough, it is fired with momentum of SHOOT_FORCE/20; if this would make its speed exceed SHOOT_MAXVEL, it is capped at this value instead. | |
− | + | (As usual, momentum = velocity times weight.) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Specifically, as long as projectile is heavy enough, it is fired with | ||
− | |||
− | |||
− | + | Vanilla [[bolt]]s and [[arrow]]s end up with momenta of 49, as long as their density exceeds 1670. [[Divine metal|Divine]] ammo has momentum of 30, [[bone]] and most [[wood]] get 15, and [[adamantine]] bolts have only 6. Wooden [[dart]]s usually have 5. | |
− | |||
===Attack Momentum Costs=== | ===Attack Momentum Costs=== | ||
Line 270: | Line 153: | ||
If the attack is '''edged''', it also can cut through it instead. For latter it has to have momentum no less than: | If the attack is '''edged''', it also can cut through it instead. For latter it has to have momentum no less than: | ||
− | M >= (rSY + (A+1)*rSF) * | + | M >= (rSY + (A+1)*rSF) * 10 / (S * Q), |
where: | where: | ||
Line 276: | Line 159: | ||
* '''rSF''' is ditto with SHEAR_FRACTURE | * '''rSF''' is ditto with SHEAR_FRACTURE | ||
* '''A''' is attack contact area | * '''A''' is attack contact area | ||
− | * '''S''' is | + | * '''S''' is material [[edge|sharpness]] multiplier (1x for most metals, 1.2x for [[divine metal]], 1.5x for [[glass]], 2x for [[obsidian]], 10x for [[adamantine]] and 0.1x for all other materials) |
− | * ''' | + | * '''Q''' is [[quality]] sharpness multiplier (1x for normal quality, 1.4x for fine, 2x for masterwork (or artifact) etc.) |
− | |||
Should it exceed this value, attack momentum is decreased by some 5% and the layer is considered punctured/severed. Calculations then repeat for the underlying layer. Otherwise damage is converted to blunt ''just for this layer'' and proceeds as following. | Should it exceed this value, attack momentum is decreased by some 5% and the layer is considered punctured/severed. Calculations then repeat for the underlying layer. Otherwise damage is converted to blunt ''just for this layer'' and proceeds as following. | ||
Line 286: | Line 168: | ||
2 * Sw * IYw < A * Da, | 2 * Sw * IYw < A * Da, | ||
− | where '''Da''' is armor material's density (in g/cm<sup>3</sup>), '''A''' is attack contact area, '''Sw''' is weapon size and '''IYw''' is its impact | + | where '''Da''' is armor material's density (in g/cm<sup>3</sup>), '''A''' is attack contact area, '''Sw''' is weapon size and '''IYw''' is its impact yeild in MPa (i.e. raw value divided by 10<sup>6</sup>). |
Otherwise, attack must have minimum momentum of: | Otherwise, attack must have minimum momentum of: | ||
− | M >= (2*IF - IY) * | + | M >= (2*IF - IY) * 2 * A, |
− | where '''IF''' and '''IY''' are layer's impact fracture and impact yield in MPa, | + | where '''IF''' and '''IY''' are layer's impact fracture and impact yield in MPa, and '''A''' is contact area as above. |
Again, on success layer is considered thrashed, momentum is reduced by about 5% and next layer is tested. | Again, on success layer is considered thrashed, momentum is reduced by about 5% and next layer is tested. | ||
If both edged and blunt momenta thresholds haven't been met, attack is ''permanently'' converted to blunt and its momentum may be greatly reduced. | If both edged and blunt momenta thresholds haven't been met, attack is ''permanently'' converted to blunt and its momentum may be greatly reduced. | ||
− | Specifically, it is multiplied by SHEAR_STRAIN_AT_YIELD/50000 for ''edged'' attacks or IMPACT_STRAIN_AT_YIELD/50000 otherwise. I.e., most metals reduce blocked attacks by 98%-99% | + | Specifically, it is multiplied by SHEAR_STRAIN_AT_YIELD/50000 for ''edged'' attacks or IMPACT_STRAIN_AT_YIELD/50000 otherwise. I.e., most metals reduce blocked attacks by 98%-99%; but see below. |
===Elastic Material Modifiers=== | ===Elastic Material Modifiers=== | ||
Line 303: | Line 185: | ||
Items with [STRUCTURAL_ELASTICITY_CHAIN_ALL] or metallic items with [STRUCTURAL_ELASTICITY_CHAIN_METAL] have their [*_STRAIN_AT_YIELD] increased to 50000, which means that blocked attack will not be dampened; it still may be converted to ''blunt'', however. Metal leggings and chainmail shirts have this property in vanilla. | Items with [STRUCTURAL_ELASTICITY_CHAIN_ALL] or metallic items with [STRUCTURAL_ELASTICITY_CHAIN_METAL] have their [*_STRAIN_AT_YIELD] increased to 50000, which means that blocked attack will not be dampened; it still may be converted to ''blunt'', however. Metal leggings and chainmail shirts have this property in vanilla. | ||
− | Items made of cloth with [STRUCTURAL_ELASTICITY_WOVEN_THREAD] additionally have their SHEAR values reduced to negligible 20-30 kPa. | + | Items made of cloth (including adamantine!) with [STRUCTURAL_ELASTICITY_WOVEN_THREAD] additionally have their SHEAR values reduced to negligible 20-30 kPa. This makes candy clothing especially useless in combat. Caps and all clothing have this tag in vanilla. |
===Penetration Depth=== | ===Penetration Depth=== | ||
− | + | This is also very important parameter. | |
+ | Please write something about it. | ||
===Pulping=== | ===Pulping=== | ||
− | Pulping appears to work by evaluating the layers in a body part. If each layer meets any one of the following criteria then the body part is pulped: | + | <pre> |
− | + | Pulping appears to work by evaluating the layers in a body part. | |
− | + | If each layer meets any one of the following criteria then the body part is pulped: | |
− | + | a) 100% bruised/burned/frostbite/melt/necrosis/blister/boil/freeze/condense (i.e. 10000+ in layer_effect_fraction) | |
− | + | b) 250% dented (i.e. 25000+ in layer_dent_fraction) | |
− | + | c) 100% cut (i.e. 10000+ in layer_cut_fraction) (cut in this case is synonymous with fracture) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Spines, skulls, and perhaps other body parts have the [PREVENTS_PARENT_COLLAPSE] token which prevents the parent body part (such as | |
+ | the head, upper body, or lower body) from being pulped until the sub-part is broken. It appears that only external body parts can be pulped, | ||
+ | not internal organs. You will find that boneless body parts that don't contain a spine/skull part will pulp VERY easily (i.e. eyes/ears). | ||
− | + | There does not appear to be any distinctions between the combat text descriptions of the pulping, | |
+ | beyond the messages being appropriate to the weapon used (edged, blunt, or creature body part). | ||
+ | </pre> | ||
{{Category|Materials|*}} | {{Category|Materials|*}} |