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.

Difference between revisions of "v0.34:Material science"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(→‎Effects on Combat: - adding in results of arena testing for ballistics)
Line 46: Line 46:
 
Dwarf Fortress only features a limited combat system. Item decay does not seem to be simulated properly at all, so the hypotheses are largely incorrect.
 
Dwarf Fortress only features a limited combat system. Item decay does not seem to be simulated properly at all, so the hypotheses are largely incorrect.
  
The mechanics governing how material properties impact the protection armor provides against projectiles have been studied reasonably carefully, and are described below.  Armor protection from melee weapons has not been studied in detail, although it likely shares many similarities with ranged weapons.
+
The mechanics governing how material properties impact the protection armor provides against projectiles have been [http://www.bay12forums.com/smf/index.php?topic=116151.0 studied reasonably carefully], and are described below.  Armor protection from melee weapons has not been studied in detail, although it likely shares many similarities with ranged weapons.
  
 
===Projectile Properties===
 
===Projectile Properties===

Revision as of 22:52, 29 November 2012

This article is about an older version of DF.

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?

In the real world, an object is stressed when a force is applied to the object. Depending on the nature of the force applied, this stress can take a number of forms, and the object can respond differently based on its material and how that material handles different stresses.

In the material raws, whenever you see 'yield', 'fracture', or 'strain at yield', that property is a stress-related quality.

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.

There's a lot of stress-related properties, what do they mean?

The first thing you'll notice is that the second word in each stress variable is one of Yield, Fracture, or strain at yield. These are mechanical performance terms.

The first set of words are things like Impact, Bending, and so forth. These describe modes of applying force.

The following explanations assumes real world physics sort of apply (since Toady One chose real world 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 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.

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 Elastic Modulus. Thus a highly elastic material has low elastic modulus, and engages in less elastic collisions.

Modes of Applying Force

Impact: Force applied by a sudden strike, like a hammer.

Compressive: Force applied by exerting pressure on an object, like trying to squish something between your hands.

Tensile: Force applied by pulling on something, like suspending one object via another. (e.g., if you suspend an elf from a metal pole, you are applying a tensile force to the pole).

Torsion: Force applied by twisting something. Note that you're twisting some portion of the object relative to itself to cause a torsion stress to be applied to it. (Consider trying to twist a metal rod by grasping at either end and attempting to wring it - yes, you'd have to apply a lot of force to succeed).

Shear: Force applied by pushing part of the material so it tries to slide relative to another part of it. Ie, pushing at the top of an object when the bottom part is fixed to the ground is going to primarily apply a shear stress to it (the top part will try to move in the direction you push, and the lower part will resist this shear stress).

Bending: Force applied by bending a material.

Hypotheses based on Real World

  • High strain at yield should reduce the effectiveness of a weapon. (the more it deforms, the longer it takes to break contact with the struck surface and thus the more inelastic the collision is).
  • High strain at yield should be good for armor, because it decreases the force transferred by a weapon (to a point - it can't be so inelastic as to render the armor useless!)

Effects on Combat

Dwarf Fortress only features a limited combat system. Item decay does not seem to be simulated properly at all, so the hypotheses are largely incorrect.

The mechanics governing how material properties impact the protection armor provides against projectiles have been studied reasonably carefully, and are described below. Armor protection from melee weapons has not been studied in detail, although it likely shares many similarities with ranged weapons.

Projectile Properties

The main factor determining if a projectile penetrates armor is its momentum. Material properties of the bolt/arrow (except for IMPACT_YIELD, which will be described below), as well as bolt quality and marksdwarf/archer skills do not appear to matter. Dwarven weapons launch projectiles with roughly constant momentum. However rounding of projectile masses can result in some very strange behavior. The complete calculation used to determine projectile momentum is as follows:

  • Find the mass of your projectile. Mass=SOLID_DENSITY*SIZE/1,000,000.
  • Floor that number to an integer.
  • Divide the SHOOT_FORCE of the weapon by the integer, and round the result to the nearest integer.
  • Cap the results by the SHOOT_MAXVEL for the weapon.
  • Multiply the velocity by the unrounded mass of the projectile to get the momentum.

For DF34.11 values, iron, bronze, copper, silver, and steel bolts/arrows all have mass between 1 and 2, which will be floored to 1, meaning that they will have velocity equal to SHOOT_FORCE (so long as it is less than or equal to SHOOT_MAXVEL). Wood, adamantine, and bone bolts/arrows, as well as all blowdarts, have mass less than 1, and will have velocity which is always equal to SHOOT_MAXVEL and does not depend on SHOOT_FORCE.

Interactions Between Projectiles and Armor

When a projectile strikes armor, there are several possible outcomes:

  • Conversion of edged damage to blunt damage (chain mail does this).
  • The projectile absorbs the force of the collision, and is deflected.
  • The armor absorbs all or part of the force of the blow.
  • The armor is fractured and does nothing to stop the projectile.

For armor to be at all effective at stopping projectiles, the armor material must have SHEAR_YIELD and/or SHEAR_FRACTURE greater than or equal to the projectile material. Otherwise, the projectile just cuts through the armor like it isn’t there. Additionally, the IMPACT_FRACTURE of the armor must be large relative to the projectile momentum, or the armor fractures and the projectile passes through without slowing down significantly (this happens for all metal bolts against plate armor in the current version).