- 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.
Difference between revisions of "v0.34:Size"
(→Mechanics: tweak) |
(→Bugs: technically, the fix is part of DFHack (but it's enabled in the LNP)) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{quality|Masterwork|01:36, 12 July 2013 (UTC)}} | {{quality|Masterwork|01:36, 12 July 2013 (UTC)}} | ||
{{av}} | {{av}} | ||
+ | {{buggy}} | ||
'''Size''' is a measure of how big a [[creature]] or [[item]] is, measured in cubic centimeters. It is essentially volume, but is called size in creature [[raw file]]s, and is so translated to item definitions as well. Size, along with the underlying [[material]]'s [[density]], is used to calculate an item's [[weight]]: | '''Size''' is a measure of how big a [[creature]] or [[item]] is, measured in cubic centimeters. It is essentially volume, but is called size in creature [[raw file]]s, and is so translated to item definitions as well. Size, along with the underlying [[material]]'s [[density]], is used to calculate an item's [[weight]]: | ||
Line 10: | Line 11: | ||
== Bodysize == | == Bodysize == | ||
− | Creature-specific size is known internally as '''bodysize'''. When it comes to creatures, size is a rough stand-in for [[weight]]: standard flesh weights one gram per cubic centimeter. However, in the infinite complexity of Dwarf Fortress there are a number of ''other'' [[material]]s animals internalize ([[ivory]], [[hair]], [[horn]], [[shell]], etc.) which have their own densities, shifting a creature's actual weight relative to its size, sometimes significantly (elephant tusks weigh a ''lot''). Bodysize also determines average [[butcher]]ing yields, (along with morphology) how much [[damage]] they can absorb, and (along with morphology and attack definition [[creature token|token]]s) how much damage they can inflict in melee. On | + | Creature-specific size is known internally as '''bodysize''' (from the {{tt|[BODY_SIZE]}} [[creature token|token]]). When it comes to creatures, size is a rough stand-in for [[weight]]: standard flesh weights one gram per cubic centimeter. However, in the infinite complexity of Dwarf Fortress there are a number of ''other'' [[material]]s animals internalize ([[ivory]], [[hair]], [[horn]], [[shell]], etc.) which have their own densities, shifting a creature's actual weight relative to its size, sometimes significantly (elephant tusks weigh a ''lot''). Bodysize also determines average [[butcher]]ing yields, (along with morphology) how much [[damage]] they can absorb, and (along with morphology and attack definition [[creature token|token]]s) how much damage they can inflict in melee. On {{tt|[HUMANOID]}} creatures, size also directly determines what kind of equipment a creature can wear: large, small, normal, or none at all. |
The actual size of a creature is the result of three different effects, one basic and two modulatory. First and most basic is the average maintained across an individual species of creature. The second is the [[age]] of the creature: most creatures are not born anywhere near their maximum size, and instead must grow into it; some, like most species of snake, grow through their entire lifetime, and probably will not live long enough to reach it. The third is inheritance: version 0.31.1 introduced [[genetics]], allowing creatures to inherit part of their size from the appearance, specifically the height and girth, of their parents. | The actual size of a creature is the result of three different effects, one basic and two modulatory. First and most basic is the average maintained across an individual species of creature. The second is the [[age]] of the creature: most creatures are not born anywhere near their maximum size, and instead must grow into it; some, like most species of snake, grow through their entire lifetime, and probably will not live long enough to reach it. The third is inheritance: version 0.31.1 introduced [[genetics]], allowing creatures to inherit part of their size from the appearance, specifically the height and girth, of their parents. | ||
Actual creature sizes go from 1 (small insect [[vermin]]) to 200000000 ([[giant sperm whale]]s, the largest creature in the game). See [[List of creatures by adult size]] for details. The average size set for a dwarf is 3000, 15000, and 60000, the size of a baby, child and adult respectively. | Actual creature sizes go from 1 (small insect [[vermin]]) to 200000000 ([[giant sperm whale]]s, the largest creature in the game). See [[List of creatures by adult size]] for details. The average size set for a dwarf is 3000, 15000, and 60000, the size of a baby, child and adult respectively. | ||
+ | |||
+ | == Sample list of creature sizes == | ||
+ | {| width=100% class="sortable" style="text-align:center" | ||
+ | ! width="25%" style="text-align:left" | Name | ||
+ | ! width="25%" | Size at birth | ||
+ | ! width="25%" | Size at maturity | ||
+ | ! width="25%" | Notes | ||
+ | |- | ||
+ | | style="text-align:left" | [[Adder]] | ||
+ | | 15 | ||
+ | | 150 | ||
+ | | Smallest (non-vermin) creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Rabbit]] | ||
+ | | 50 | ||
+ | | 500 | ||
+ | | Smallest domestic animal | ||
+ | |- | ||
+ | | style="text-align:left" | [[Cat]] | ||
+ | | 500 | ||
+ | | 5000 | ||
+ | | | ||
+ | |- | ||
+ | | style="text-align:left" | [[Kobold]] | ||
+ | | 1000 | ||
+ | | 20000 | ||
+ | |- | ||
+ | | style="text-align:left" | [[Dwarf]] | ||
+ | | 3000 | ||
+ | | 60000 | ||
+ | |- | ||
+ | | style="text-align:left" | [[Deer]] | ||
+ | | 14000 | ||
+ | | 140000 | ||
+ | |- | ||
+ | | style="text-align:left" | [[Giant eagle]] | ||
+ | | 7981.4 | ||
+ | | 228040 | ||
+ | | Smallest giant creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Polar bear]] | ||
+ | | 40000 | ||
+ | | 400000 | ||
+ | |- | ||
+ | | style="text-align:left" | [[Water buffalo]] | ||
+ | | 100000 | ||
+ | | 1000000 | ||
+ | | Largest domestic creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Rhinoceros]] | ||
+ | | 300000 | ||
+ | | 3000000 | ||
+ | |- | ||
+ | | style="text-align:left" | [[Giant moose]] | ||
+ | | 255465 | ||
+ | | 4257750 | ||
+ | | Largest giant-type land-based creature (males) | ||
+ | |- | ||
+ | | style="text-align:left" | [[Elephant]] | ||
+ | | 500000 | ||
+ | | 5000000 | ||
+ | | Largest natural land-based creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Cave dragon]] | ||
+ | | 6000 | ||
+ | | 15000000 | ||
+ | | Largest cavernous creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Sperm whale]] | ||
+ | | 500000 | ||
+ | | 25000000 | ||
+ | | Largest natural creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Dragon]] | ||
+ | | 6000 | ||
+ | | 25000000 | ||
+ | | Largest land-based creature | ||
+ | |- | ||
+ | | style="text-align:left" | [[Giant sperm whale]] | ||
+ | | 4000000 | ||
+ | | 150000000 | ||
+ | | Largest creature, period | ||
+ | |} | ||
== Mechanics == | == Mechanics == | ||
− | * '''Constructed items''': [[item definition token|Item definition files]] for [[industry|industry-crafted]] items are specific to various classes of items: for instance, [[ammo]] has its own [[ammo token|ammo definition tokens]], as does [[armor token|armor]], as do [[tool token|tool]]s, and so on. A | + | * '''Constructed items''': [[item definition token|Item definition files]] for [[industry|industry-crafted]] items are specific to various classes of items: for instance, [[ammo]] has its own [[ammo token|ammo definition tokens]], as does [[armor token|armor]], as do [[tool token|tool]]s, and so on. A {{tt|[SIZE]}} token is a field required in all of these definitions. |
+ | |||
+ | Bars lack a defined size token in the raws. They have a size of 600 cm<sup>3</sup>, which can be deduced from the equation listed above using their weight and the densities of their corresponding materials. This is consistent with 5 bars fitting inside a [[Container#Quick_Reference|3000-capacity bin]]. The dimensionless unit of '150' products per bar, primarily of use for soap, suggests that each use of soap should diminish the size of the item by 4cm<sup>3</sup> (i.e. 600cm<sup>3</sup>/150). Whether this is true is currently untested.{{verify}} | ||
+ | |||
* '''Inorganic items''': [[Stone]]s, [[gem]]s, and [[ore]]s appear to have a default, hard-coded size that is applied to all items of that class; thus there is no direct [[inorganic material definition token]] for it. | * '''Inorganic items''': [[Stone]]s, [[gem]]s, and [[ore]]s appear to have a default, hard-coded size that is applied to all items of that class; thus there is no direct [[inorganic material definition token]] for it. | ||
− | * '''Plants''': There is no size [[plant token]]. This may change with the upcoming overhaul of plants in | + | * '''Plants''': There is no size [[plant token]]. This may change with the upcoming overhaul of plants in {{DF:Next}}. |
− | * '''Buildings''': The | + | * '''Buildings''': The {{tt|[DIM:#:#]}} [[building token]] defines the by-[[tile]] size of a [[workshop]] or [[building]]. |
− | * '''Creatures''': The [[creature token]] version of | + | * '''Creatures''': The [[creature token]] version of {{tt|[SIZE]}} is the <tt>[BODY_SIZE:#:#:#]</tt> token, which accepts three variables. The first number is age in years; the second additional age is in days. The third number is its size in cm<sup>3</sup>. Multiple ages and multiple {{tt|[BODY_SIZE]}} tokens are used to constrain a creature's [[age]]-based growth pattern and final size. Genetics is accounted for by a {{tt|[BODY_APPEARANCE_MODIFIER]}} token tagged for {{tt|LENGTH}} and/or {{tt|HEIGHT}}. For instance, genetic variance in the [[anaconda]] is defined so: {{tt|[BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]}}. Each interval value is genetically inherited, and each interval value has an equal chance of occurring; the numbers are the percentage of the base size a creature in the interval will be. |
+ | |||
+ | ==Bugs== | ||
+ | |||
+ | Due to a bug, 90% of creatures do not "grow" correctly, resulting in severely undersized dwarves, reduced [[military]] effectiveness, poor [[meat industry]] returns, under-performing [[war animals]], [[pressure plate]] triggering problems, etc. Creatures that are spawned "full-grown" (migrants, invaders, wildlife, merchant trade animals, etc.) are the correct size. [[Utility:DFHack|DFHack]] contains a fix for this bug (<code>fix/growthbug</code>), which is enabled in the current version of the [[Utility:Lazy Newb Pack|Lazy Newb Pack]].{{bug|6334}} | ||
{{Category|Modding}} | {{Category|Modding}} |
Latest revision as of 00:49, 16 January 2014
This article is about an older version of DF. |
This feature has one or more outstanding bugs. Please view the Bugs section for details. |
Size is a measure of how big a creature or item is, measured in cubic centimeters. It is essentially volume, but is called size in creature raw files, and is so translated to item definitions as well. Size, along with the underlying material's density, is used to calculate an item's weight:
- Weight (in Γ) = Density (in kg/m3) * Size *10 (in cm3) / 1,000,000 (cm3/m3)
Size has a large number of important ramifications on the game, many of them through its affect on overall weight, but as material properties go, its implementation in the game is somewhat underwhelming - witness the incredible compression of matter, space, and time that is the garbage dump. This is mostly because when even dragons occupy a single square, size becomes a little difficult to contextualize. It doesn't help that a thirty five to forty foot bronze colossus fits in a basic wooden cage (although, a fire man fits it too, so).
Size directly affects such things as which weapons your dwarves can equip, butchering returns, and combat effectiveness, both for creatures (elephants are very hard to kill because there's so much tissue to them, but they have a surprisingly hard time landing a hit on, say, cavys) and for weapons. Through weight, the size of an item has a large number of further ramifications in the game, such as carry time, pressure plate activation, impact momentum, weight restrictions, and so forth. Changing this value too much can lead to fun.
Bodysize[edit]
Creature-specific size is known internally as bodysize (from the [BODY_SIZE] token). When it comes to creatures, size is a rough stand-in for weight: standard flesh weights one gram per cubic centimeter. However, in the infinite complexity of Dwarf Fortress there are a number of other materials animals internalize (ivory, hair, horn, shell, etc.) which have their own densities, shifting a creature's actual weight relative to its size, sometimes significantly (elephant tusks weigh a lot). Bodysize also determines average butchering yields, (along with morphology) how much damage they can absorb, and (along with morphology and attack definition tokens) how much damage they can inflict in melee. On [HUMANOID] creatures, size also directly determines what kind of equipment a creature can wear: large, small, normal, or none at all.
The actual size of a creature is the result of three different effects, one basic and two modulatory. First and most basic is the average maintained across an individual species of creature. The second is the age of the creature: most creatures are not born anywhere near their maximum size, and instead must grow into it; some, like most species of snake, grow through their entire lifetime, and probably will not live long enough to reach it. The third is inheritance: version 0.31.1 introduced genetics, allowing creatures to inherit part of their size from the appearance, specifically the height and girth, of their parents.
Actual creature sizes go from 1 (small insect vermin) to 200000000 (giant sperm whales, the largest creature in the game). See List of creatures by adult size for details. The average size set for a dwarf is 3000, 15000, and 60000, the size of a baby, child and adult respectively.
Sample list of creature sizes[edit]
Name | Size at birth | Size at maturity | Notes |
---|---|---|---|
Adder | 15 | 150 | Smallest (non-vermin) creature |
Rabbit | 50 | 500 | Smallest domestic animal |
Cat | 500 | 5000 | |
Kobold | 1000 | 20000 | |
Dwarf | 3000 | 60000 | |
Deer | 14000 | 140000 | |
Giant eagle | 7981.4 | 228040 | Smallest giant creature |
Polar bear | 40000 | 400000 | |
Water buffalo | 100000 | 1000000 | Largest domestic creature |
Rhinoceros | 300000 | 3000000 | |
Giant moose | 255465 | 4257750 | Largest giant-type land-based creature (males) |
Elephant | 500000 | 5000000 | Largest natural land-based creature |
Cave dragon | 6000 | 15000000 | Largest cavernous creature |
Sperm whale | 500000 | 25000000 | Largest natural creature |
Dragon | 6000 | 25000000 | Largest land-based creature |
Giant sperm whale | 4000000 | 150000000 | Largest creature, period |
Mechanics[edit]
- Constructed items: Item definition files for industry-crafted items are specific to various classes of items: for instance, ammo has its own ammo definition tokens, as does armor, as do tools, and so on. A [SIZE] token is a field required in all of these definitions.
Bars lack a defined size token in the raws. They have a size of 600 cm3, which can be deduced from the equation listed above using their weight and the densities of their corresponding materials. This is consistent with 5 bars fitting inside a 3000-capacity bin. The dimensionless unit of '150' products per bar, primarily of use for soap, suggests that each use of soap should diminish the size of the item by 4cm3 (i.e. 600cm3/150). Whether this is true is currently untested.[Verify]
- Inorganic items: Stones, gems, and ores appear to have a default, hard-coded size that is applied to all items of that class; thus there is no direct inorganic material definition token for it.
- Plants: There is no size plant token. This may change with the upcoming overhaul of plants in the next version.
- Buildings: The [DIM:#:#] building token defines the by-tile size of a workshop or building.
- Creatures: The creature token version of [SIZE] is the [BODY_SIZE:#:#:#] token, which accepts three variables. The first number is age in years; the second additional age is in days. The third number is its size in cm3. Multiple ages and multiple [BODY_SIZE] tokens are used to constrain a creature's age-based growth pattern and final size. Genetics is accounted for by a [BODY_APPEARANCE_MODIFIER] token tagged for LENGTH and/or HEIGHT. For instance, genetic variance in the anaconda is defined so: [BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]. Each interval value is genetically inherited, and each interval value has an equal chance of occurring; the numbers are the percentage of the base size a creature in the interval will be.
Bugs[edit]
Due to a bug, 90% of creatures do not "grow" correctly, resulting in severely undersized dwarves, reduced military effectiveness, poor meat industry returns, under-performing war animals, pressure plate triggering problems, etc. Creatures that are spawned "full-grown" (migrants, invaders, wildlife, merchant trade animals, etc.) are the correct size. DFHack contains a fix for this bug (fix/growthbug
), which is enabled in the current version of the Lazy Newb Pack.Bug:6334