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.

v0.34:Armor

From Dwarf Fortress Wiki
Revision as of 00:50, 5 June 2012 by HiEv (talk | contribs) (→‎Bugs: Wear by production order bug was fixed (v0.34.11))
Jump to navigation Jump to search
This article is about an older version of DF.

Armor is the protective equipment used to reduce/deflect damage during combat. It comes in several pieces, each one protecting a certain area. The purpose of each piece is pretty much self-explanatory. Note that breastplates only protect upper/lower torso areas, while mail shirts also cover the upper arms. Ears, nose, lips and teeth are exposed, even in full armor, whilst robes and capes tend to cover the throat.

The actual effectiveness of a given piece of armor depends on the weapon(s) being used against it.

Keeping in mind the armored enemies you are likely to meet, it is advisable to equip your military dwarves with at least iron armor. Testing in the arena shows that armored dwarves have a huge advantage over the unarmored ones, usually taking no casualties while making short work of their enemies. (But you shouldn't need this wiki to figure that out.)

Basics

Purpose

Armor's purpose is simple: to allow your dwarves to better withstand damage in combat. Where an unarmored dwarf hit by a weapon would invariably suffer damage, well-armored dwarves have a good chance of blunting the damage or bouncing it off altogether, reducing major strikes to mere bruises and grave wounds to serious ones. Clothes, though not specifically recognized by the game as armor, nonetheless also functions in that sense, often blocking weak attacks (and rendering a clothed dwarf a better fighter than a naked one).

A clothed dwarf takes little more than a few seconds to die to a goblin ambush. One clad in a full set of exceptional steel armor, meanwhile, can expunge a goblin squad of most of its ammo and a half a minute of its time before finally dying. Dwarves armed only with weapons might be a sufficient response to thieves and local wildlife, but a serious army requires equally serious armor.

Types of armor

In terms of classifications, armor can be classed into three different types. The first is clothing, made of leather or cloth. Clothing can only deflect very weak attacks - say, a raven bite - but nonetheless can dampen damage. Most dwarves will be wearing clothing; those that aren't will usually be very unhappy, babies, or insane. The second type is leather annd bone armor, which is specialized for the purpose from clothing; it is very weak, but still better than nothing. The last type is true metal armor, made at a metalsmith's forge; it is this armor that is made by an armorer, and should be used by a serious military.

Though all clothes can protect from damage, a "true" suit of armor consists of the following pieces:

  • Leather armor: Protects upper body, leather only.
  • Mail Shirt: Protects upper body and upper arms, made of chain mail (slightly weaker, but cheaper to produce).
  • Breastplate: Protects upper body, can be worn over a mail shirt.
  • Helms: Protect the head.
  • Gauntlets: Protect the hands and wrists.
  • Leggings: Protect upper and middle legs, made of chain mail.
  • Greaves: Protect upper and middle legs, made of plate mail.
  • Low boots: Protects feet.
  • High boots: Protects feet and lower legs.
  • Buckler: Can be used to block attacks.
  • Shields: Can be used to block attacks (better than a buckler).

Armor skill

Armor use trains the armor user skill. The exact way in which this skill is applied in combat is poorly understood; in testing the movement speed and armor penetration were the same for untrained dwarves as for legendary ones. Nonetheless, arena testing indicates that more novice armor users are injured far more often than more skilled dwarves, leading to the theory that the skill modifies armor block change.

Every time a dwarf reflects an attack with their armor (reported as "the attack was deflected by his/her <armor>"), they will receive 30 experience. The skill can trained with a danger room, by attacking local wildlife, or through live training schemes.

Shield skill

Likewise, shield use trains the shield user skill. Shields are a special piece of armor that can be worn on one arm (and cannot be worn with two-handed weapons) and can be used to block attacks better than equivalent armor can (a difference amounting to deflection instead of broken bones), greatly increasing dwarven survivability. The skill modifies how often the dwarf will be able to block an attack with the shield, and is likewise trained every time the shield is used to block an attack, at 30 experience apiece. It can be trained in the same ways.

Material

See also: Metal#Weapon and armor quality
Material Workshop Labor Notes
Metal Metalsmith's forge Armoring Best choice; see notes below
Bone Craftsdwarf's workshop Bone carving Leggings, greaves, gauntlets and helms only
Leather Leather works Leatherworking Light and unencumbering but weak protection.
Cloth Clothier's shop Clothesmaking Limited protection, nearly useless against metal.
Wood Carpenter's workshop Carpentry Shield/buckler only (except Elves)

Armor material is extremely important to combat; fully iron-armored dwarves with iron short swords stand no chance against those clad in steel. In general, slashing weapons will have difficulty piecing armor made of the same weapons-grade material as the weapon, piercing weapons will be increasingly blunted, and blunt weapons will break bones through armor almost regardless of its material. Rigid armor provides limited blunt protection, and the chain mail shirts and leggings provide next to none. Even adamantine armor only prevents an estimated 13% of blows, demonstrating the utility of the slow but sure war hammer.

Metal armor comparison
Poor Good Excellent Best
Copper Iron/Bronze* Steel Adamantine
  • Copper armor is the lowest-grade type of metal armor, but also the easiest to get, requiring one of native copper, malachite, or tetrahedrite (next-to-guaranteed on any embark containing more than one metal).
  • Bronze is an alloy of copper and tin, requiring cassiterite. It is much improved over copper armor, and has slightly better material properties than iron, but also weights more.
  • Bismuth bronze is just bronze alloyed with bismuth, fancier colored but more expensive to produce and with the same material definitions.
  • Iron is a fairly commonly found as hematite, limonite, or magnetite. It is comparable to bronze.
  • Steel is the best non-candy armor material, and requires fuel, flux, iron, and pig iron in its manufacturing. Note that steel is worth its weight in gold; making lots of armor is a sure way to attract attention, but at least it's going into shiny armor, right?
  • Adamantine is only found beneath the third cavern layer, plumbing the depths of the magma sea; it can be used to create unparallelled armor, but is very time-consuming to produce, in addition to being hazardous to mine. It is immensely valuable to boot.

A detailed breakdown can be found here.

Quality and strange moods

Quality is an important modifier on armor. Armor gets a deflection bonus based on quality level, but its effect is only known for regular (1x), masterwork (2x), and artifact (3x) armor; presumably, the quality ranks in between are progressive.

Designation Description Value
Modifier
 Weapon To-Hit /
Armor Deflect Modifier
 Item Name —     1x 1x
-Item Name- Well-crafted 2x unknown
+Item Name+ Finely-crafted 3x unknown
*Item Name* Superior quality 4x unknown
≡Item Name≡ Exceptional 5x unknown
☼Item Name☼ Masterful 12x 2x
Unique name Artifact 120x 3x
«Item Name» Decorated object Varies unknown

This means that, effectively, masterworks produced by legendary armorers cut damage done by as much as half. This, combined with the need to produce a lot of armor, makes armorers far and away the most desired dwarves for strange moods, and various schemes exist for influencing such an event.

Dwarves in strange moods can produce legendary artifacts, which benefit from a 3x multiplier, three times as good as a more mundane piece of armor. However, artifacts can be made of totally inappropriate materials, and the spectacularly low defensive values of a rainbow trout bone mail shirt vastly outweigh any bonuses it gets. This can be problematic when your militia commander drops everything to retrieve himself his new piece of candy. Nonetheless, artifact-quality weapons-grade armor are very strong defensively.

Strange moods are an exception to the number of bars rule; only one bar is required for the item itself, although additional materials may be gathered for decoration.

Attachment

Dwarves that have used a particular piece of armor for an extended period of time may grow attached to it, becoming unhappy if it is taken away. This is fine if it is a pair of ☼Steel Greaves☼, but a major problem if they are using what is meant to be interim armor. This happens less often with armor than it does for weapons. These events generate announcements.

Mechanics

There is no hard difference between clothing and armor, something accentuated by regular clothing's ability to block attacks. Armor can be thought of as metal clothing, thicker and made of materials that have a much better chance of blocking attacks. Armor is, however, different in that it is not subject to wear, and the fact that only non-clothing garments increase the armor user skill.

The availability of specific articles of clothing varies by civilization, and each has its own set of clothing that it can produce. In Fortress mode, shoes and sandals are in the same clothing class, but only the latter can be produced by dwarves, where the former must be stripped off of dead enemies. It is important to understand that dwarves are gender-insensitive; a male dwarf may well put on a dress.

Non-armor clothing can provide some defense, most importantly to areas that are not covered by regular armor. The ears, nose, lips, and teeth are always exposed, even in full armor. Robes and capes will protect the cover the throat and provide a bulwark of low-level protection, making them useful for military dwarves, especially those you plan to send through the danger room.

Layers

The layers are, in order from inner to outer:

  • Under
  • Over
  • Armor
  • Cover

Types of Protection

The number of regular metal bars needed to make a piece of metal armor is equal to the material size divided by 3, rounded down with a minimum of one. The number of adamantine wafers or stacks of cloth required to create armor is equal to the material size.

Headgear

Clothing Type Armor Level* Material Size Materials Size Permit Layer Coverage % Bars
Cap[S] + 1 C,L,M 10 15 Over 50% 1
Helm[S] 1+ 2 L,B,S,M 30 20 Armor 100% 1
Hood 2 C,L 10 100 Cover 100% N/A
Mask†[S] 2 C,L 20 10 Under 50% N/A
Turban† 2 C,L 20 100 Over 50% N/A
Head Veil† 2 C,L 10 100 Over 50% N/A
Face Veil† 2 C,L 10 100 Under 50% N/A
Headscarf† 2 C,L 10 100 Over 50% N/A

Upper Body

Clothing Type Armor Level* Material Size Materials Size Permit Layer Coverage % UBSTEP LBSTEP Bars
Dress 5 C,L 10 50 Under 100% MAX MAX N/A
Shirt 3 C,L 10 50 Under 100% MAX 0 N/A
Tunic 3 C,L 10 50 Under 100% 0 1 N/A
Toga 5 C,L 30 100 Over 100% 1 1 N/A
Vest 2 C,L 10 50 Over 50% 0 0 N/A
Robe 6 C,L 20 100 Over 100% MAX MAX N/A
Coat 5 C,L 20 50 Over 100% MAX 1 N/A
Leather Armor[S] 1 6 L 20 50 Armor 100% 1 1 N/A
Mail Shirt 2 6 M 15 50 Over 100% 1 1 2
Breastplate[S] 3 9 M 20 50 Armor 100% 0 0 3
Cloak 5 C,L 15 150 Cover 100% MAX 1 N/A
Cape† 5 C,L 10 300 Cover 50% 0 0 N/A

Quiver and Backpack are also worn on upper body, counting towards layer permit size.

Hands

Clothing Type Armor Level* Material Size Materials Size Permit Layer Coverage % UPSTEP Bars
Gloves 1 C,L 10 10 Under 100% N/A
Gauntlets[S] 2 2 B,S,M 20 15 Armor 100% 1 1
Mittens 1 C,L 15 20 Cover 150% N/A

Each crafting job produces a pair of gloves, gauntlets or mittens -- one right-handed and one left-handed. The items from a single job may have different quality levels.

Lower Body

Clothing Type Armor Level* Material Size Materials Size Permit Layer Coverage % LBSTEP Bars
Trousers 4 C,L 15 30 Over 100% MAX N/A
Leggings[S] 1+ 5 L,B,S,M 15 30 Armor 100% MAX 1
Greaves[S] 3 6 B,M 15 30 Armor 100% MAX 2
Loincloths† 1 C,L 10 30 Under 50% 0 N/A
Thongs† 1 C,L 10 30 Under 25% 0 N/A
Skirts (Short)† 2 C,L 10 100 Over 100% 0 N/A
Skirts† 2 C,L 10 100 Over 100% 1 N/A
Skirts (Long)† 2 C,L 10 100 Over 100% MAX N/A
Braies† 3 C,L 10 30 Under 100% 1 N/A

Footwear

Clothing Type Armor Level* Material Size Materials Size Permit Layer Coverage % UPSTEP Bars
Socks 1 C,L 10 15 Under 100% N/A
Sandals† 1 C,L 25 15 Over 100% N/A
Shoes 1 C,L 20 15 Over 100% N/A
Low Boots 1 1 L,M 25 15 Armor 100% 1
High Boots 1+ 2 L,M 25 15 Armor 100% 1 1
Chausses (sockmail)† 3 L,M 10 15 Under 100% MAX 1

Each crafting job produces one pair of footwear. Unlike gloves, footwear items are interchangeable (they are not right- or left-footed). The two items from a single crafting job may have different quality levels.

Shield

Clothing Type Armor Level* Material Size Materials Size Permit Layer Coverage % UPSTEP Bars
Buckler 1 2 L,M,W NA NA NA 1 1
Shield 2 4 L,M,W NA NA NA 2 1
  • * = Items without an armor rating are considered clothing. Armor levels 1-3 were referred to as 'leather', 'chain' or 'plate' in earlier versions.
  • + = The armor level of an item with a "+" can be increased by one if made from metal.
  • † = This article cannot be crafted by dwarves (except for artifacts), but may be purchased in trade.
  • [S] = shaped item, max one [S] per body slot (e.g. plate mail cannot be worn with leather armor, but can be worn with chain mail, and greaves and leggings cannot be combined).
  • Materials can be Cloth, Leather, Bone, Shell, Metal, or Wood.

Equipping Clothing

Items in Dwarf Fortress must be equipped in a specific order. A dwarf must equip a layer type of Under before he equips a layer of type Over, for example. The complete order goes: Under, Armor, Over, Cover. It is common among civilians to see a dwarf equip pants with no undergarments due to this restriction, even when an undergarment is available. This is typically not an issue with soldiers, however.

There is no restriction on wearing multiple items of the same type (Unless the item is shaped [S]). You can, for example, wear 3 cloaks without penalty.

Process for equipping a new piece of clothing

The following variables will be used in the logic below:

Current Item refers to the specific item being equipped.
Total Size refers to the size of all items equipped on that body part, excluding the item to be equipped (while including those on a different layer).
Permit refers to the maximum allowable size of items equipped on the same or lower level as the item to be equipped.


In order to equip a new item, the dwarf (or other creature) ...

  • will determine if he is eligible to wear the item in question (Perhaps the body part is missing/severed).
  • must start with the lowest layer first, continuing to the next layer when no other items of that layer need to be equipped
  • checks if the item is shaped [S], and will only equip the item if no other shaped items are equipped on that body part.
  • will equip items with lowest permit level first. If two items share the same permit value, the highest size item will be equipped first[Verify].
  • then checks if his total size (excluding the current item) is less than the current item's permit.
  • If all above logic is true, the dwarf will equip the item.

Equipment process example

Each item is listed in order of being equipped, the primary focus of this example is that the total size must be equal to, or less than the permit size of the item being equipped. Like above, the total size excludes the size of the item being equipped.

Item Type Size Permit Total Size*
Breastplate [S] 20 50 0
Mail Shirt 15 50 20
Mail Shirt 15 50 35
Mail Shirt 15 50 50
Mail Shirt 15 50 65
Cloak 15 150 65
Cloak 15 150 80
Cloak 15 150 95
Cloak 15 150 110
Cloak 15 150 125
Cloak 15 150 140
Cloak 15 150 155
  • * = Total Size include the size of all equipped items, but does not include the item being equipped
  • Red Text = This item cannot be equipped, because the total size is larger than the item's permitted size.

Size, Permit, and layering armor

The Size and Permit values govern how much clothing or armor can be worn.

Under the old system the lowest "permit" value for any given body part is used: for instance, if a dwarf is wearing a dress (permit value: 50) and a total of 50 or more size worth of clothing on the upper body, it cannot put any more clothing on the upper body. (This explains why the old dungeon masters tend to wear several cloaks: they arrive at the fortress wearing only a cloak on the upper body (permit 150), and can put on a total of 10 of them, at 15 size each.)

Unfortunately, [LAYER:COVER] items are the only items playing by the old rules. This much is certain from testing in arena mode.

  • If the item to be add is a [LAYER:COVER] item, add the total item size on the body part, if this sum is less than or equal to the item's permit value then evaluate as true.
  • If a [LAYER:ARMOR] item is present or to be added and if the sum of the non [LAYER:COVER] items would be less than the sum of the [LAYER:ARMOR] size+permit values then evaluate as true.
  • If one or more items of the same non-[LAYER:COVER] layer as the one being added are present and if the sum of their size values is less than the smallest permit value then evaluate as true.
  • If the sum of the size values for all items on the body part are less than or equal to the permit value of the item about to be added then evaluate as true.

The item is allowed if all rules either evaluate to true or are not applicable. This is in addition to the rule allowing only one shaped item on a given body part at a time.

Example: A helm (30 size,20 permit) means you can put on a mask (20,10) or two caps (10,20), but only two head veils (10,100). Any of these configurations can fit 6 additional hoods if desired.

Example: Wearing a cap (10,15) allows only one face veil (10,100), because they are both [LAYER:UNDER], but an additional combined total of up to 9 head veils and hoods is possible.

Note that the armor value of socks and other clothing is unknown under the new system - however, wearing them under "armor" such as boots is recommended for an adventurer.


Adventurer mode follows the arena rules so it is possible to have three chain mail shirts (15,50), a breastplate (20,50), and 25 capes (10,300) on ones upper body plus a helm and six hoods on ones head. Confirmation is needed to see if fortress mode follows the old rules or the new arena rules. (I tested this and found that Urist McNopants follows a totally different set of rules than either of these. His rules tell him to forget both caps all of the hoods both socks and his trousers, and each sucessive time he gets dressed he feels the need to do it differently.)

Some more workaround about Size, Permit and Layering

  • You can only have one shaped armor piece (marked with [S]) per body part.
  • The total size of non-cover items must be lower than any armour piece's permit + size total.
  • The total size of all items of any layer on any body part must be lower than the lowest permit value (excluding that item).
  • The total size of all items on any body part must be lower than the size + permit value of any cover item.
  • All items are put on in order of their layer.


As an example, lets say you want to kit out your soldiers upper body. Try walking through this in arena mode to get a feel for it.

You start off with a steel breastplate. This has a size of 20 and a permit of 50. It is also shaped, so you can't add any other shaped items; no more breastplates and no leather armor.

Now you want to add mail shirts. Each one has a permit of 50 and a size of 15. You can add three of these if you want. It checks the size against each of the armour pieces permit + size (or rather, the permit value ignoring that items size in the calculation), like so;

  • Against each of the mail shirts, you have 2 x 15 = 30 total size in mail shirts, + 20 from the breastplate, matching the 50 permit.
  • Against the breastplate you have 3 x 15 = 45 < 50, fine.

Now if you add a fourth mail shirt these test will fail. However, because of the layering order (mail shirts being armour layer 2, the breastplate armour layer 3) the breastplate is added after the shirts. This results in the breastplate being dropped.

Because this reaches the 50 permit limit for the mail shirts, you can't add more non-cover items without substituting them for existing items. If you want a robe (size 20), for example, you need to remove two of the mail shirts to clear a total size of 30, which then lets you add an extra size 10 shirt, vest or whatever.

However, you can add cover layer items. In this case, cloaks. Each cloak has a size of 15 and a permit of 150. Taking into account the 50 size already on the upper body, we can add 100 size worth of cloaks. This lets us add 6 (x 15 = 90) cloaks over the existing armour.

Going through like this for the rest of the body (most of it is simpler) gives you a final setup of;


Head
1 x helm
6 x hood


Upper Body
1 x breastplate
3 x mail shirts
6 x cloaks

Upper Body (cheap)
6 x dress
3 x robe
3 x cloak


Lower Body
3 x long skirts
1 x greaves

Lower Body (no foreign items)
2 x trousers
1 x greaves

Lower Body (cheap)
2 x trousers
1 x leggings


Hands
1 x pairs of gauntlets
1 x pairs of mittens

Hands (cheap)
2 x pairs of gloves
1 x pairs of mittens


Feet
1 x pairs of chausses
1 x pairs of high boots

Feet (no foreign items)
1 x pairs of socks
1 x pairs of high boots

Feet (cheap)
1 x pairs of socks
1 x pairs of shoes

Of course, so long as the bugs are still around, we are likely to see dwarves wearing more than this or refusing to put parts on because they found their boots before their socks.

Note: "Cheap" implies the set can be made from secondary materials such as bone and cloth with item types not overlapping with the other, more combat oriented set which use metal, leather and cloth (for socks). As a rule of thumb, combat sets provide better protection but cheap sets are lighter and easier to mass produce.

Coverage

There are three tags that govern how far coverage reaches.

[UBSTEP]

This token, when applied to torso armor, controls how far 'up' the body an item of armor reaches. Basically you can think of it as going out in stages along the body. It doesn't cover legs. It doesn't cover body parts with certain tags (notably [HEAD], [GRASP] and [STANCE], or the head). It can cover the children of such body parts (such as parts of the face) if it extends beyond them. The upper body and lower body are counted as 0 steps away, and so both always covered.

Breastplates have a default of 0, meaning they only cover the torso.
Mail shirts have [UBSTEP:1], so cover the upper arms and throat.

A number of clothing items have [UBSTEP:MAX]. What exactly this covers depends on a certain bug, but unless you are making adamantine robes you probably won't get that much extra protection this way anyway. This would mean, for example, they would cover the upper arm, lower arm, skip the hand, then cover the fingers. The same goes for facial features (and, oddly, the throat) after skipping the head and the toes after skipping the entire legs and feet.
The clothes with these properties seem to be robes, cloaks, coats, shirts and dresses. However, of these only robes and dresses also have [LBSTEP:MAX] (see below) and so I'm not sure if anything else would actually cover toes or not. Needs additional testing.

Testing in arena: in three 15x15 dwarves battles where both sides was equiped with iron battle axes and iron full armor and one of the teams was enforced with leather robes, team with robes was a victorious (2-3 survivors).

[LBSTEP]

This token, when applied to torso armor or pants, controls how much of the legs an item covers. Legs in this case are defined as [LIMB] body parts that end in a [STANCE] body part (eg, foot). Arms are [LIMB]s, but end in a [GRASP] hand instead. Because the upper and lower body are effectively zero steps from each other, torso armor can extend this way easily.

Both greaves and leggings have [LBSTEP:MAX] and so cover the entire leg to the best of their ability.
Mail shirts have [LBSTEP:1] and so can protect the upper legs. A range of other clothes (including cloaks) and leather armor also have this. As mentioned above, robes and dresses have [LBSTEP:MAX] and so cover the entire legs. These also have [UBSTEP:MAX] and so cover the entire body. Although not the strongest armor, a leather (or maybe adamantine?) robe or dress gives you maximum coverage.

[UPSTEP]

This token, when applied to gloves or shoes, determines how far up the limb the armor protects. As with [LBSTEP], this doesn't cover anything but the [LIMB] tag body parts, but it does cover arms as well as legs.

Low boots literally only cover the foot.
High boots have [UPSTEP:1], so cover the lower leg. If you consider the upper legs can covered by [LBSTEP] from above, you can effectively have an entire layer of chain armor on the legs from high boots and a mail shirt even before adding leg armor. This is why I go with greaves for a plate layer. Gauntlets have [UPSTEP:1], so cover the lower arms. Because there is no other protection for arms as there is for legs, you need gauntlets and mail shirts to protect your arms fully. Chausses are a very rare sock substitute, but they are the only items to have [UPSTEP:MAX] and so offer full leg coverage while being exactly the same size as regular socks. The perfect undergarment.


The whole method is pretty nifty with just two problems.

  • Faces can't be covered by head armor.
  • Throats cannot be protected by metal armor (except adamantine cloth).

In previous versions toes and fingers were not protected by armor. However as of 31.17 both are now protected by the relevant armor type, e.g gauntlets cover fingers and boots cover toes.

Other Restrictions

In fortress mode, "under" layers cannot be put on over "over" layers, so, for instance, a dwarf cannot put on socks unless it first removes its shoes. They can wear over layers without putting an under layer on first, which explains their fondness for "going commando" (trousers without loincloth). Dwarves will only put on the specific armor they are told to put on -- unless they are not told what to wear.

Also, if you do not tell dwarves to replace clothing with a uniform, they will wear it alongside the uniform and possibly come into conflict with layering and sizes/permits, making them unable to wear assigned items.

In adventurer mode, you have direct control over what armor you put on, and are only limited by permit and "one only" (shaped) restrictions. This means you can wear three suits of chain mail (total size 45) plus another suit of chain or plate on top of them. On top of this, you can add six cloaks.

Bugs

In adventurer mode, putting a pair of socks (or any under-layer foot wear) on before putting on a pair of boots (or any over-layer foot wear) will keep you from putting on the last boot. So the order sock, sock, boot, boot doesn't work, but changing the order to sock, boot, sock, boot does. This is a very minor bug.