Difference between revisions of "Monster carrying capacity"

From NetHackWiki
Jump to navigation Jump to search
(rewrite article based on my reading of the source code and testing in wizard mode)
(Weighty monsters: special rules)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A monster's carrying capacity is determined by the following procedure:
+
A monster's '''carrying capacity''' is calculated based on its weight or size relative to a human.{{refsrc|src/mon.c|1185|version=NetHack 3.6.6}}
  
<math>\text{maxload} = 1000 \times \frac{{\text{cwt}}}{1450}</math>,
+
==Weighty monsters==
 +
If the monster has non-zero weight, its carrying capacity is
  
where cwt is the monster's [[weight]], if cwt is not 0.  If the monster is [[strong]] and weighs less than a human (1450), then the monster's carrying capacity is set to 1000.
+
<math>\frac{{1000 \times \text{monster weight}}}{\text{weight of human}} (\times \frac{1}{2} \text{if not strong})</math>.
  
For a monster with a cwt of 0, its carrying capacity depends on its [[physical size]]:
+
The weight of a human is 1450 for this calculation.{{refsrc|include/permonst.h|34|version=NetHack 3.6.6}}  If a [[strong]] monster would have less than 1000 carrying capacity based on this calculation, then its carrying capacity is set to 1000.
  
<math>\text{maxload} = \text{msize} \times 1000</math>,
+
This can be simplified to <math>\frac{\text{weight}}{2.9}</math> if the monster is not strong, and <math>\frac{\text{max}(\text{weight}, 1450)}{1.45}</math> if the monster is strong.
  
where msize is 0 for tiny, 1 for small, 2 for medium, 3 for large, 4 for huge, and 7 for gigantic.
+
Some monsters have special rules for their carrying capacity:
  
Finally, if the monster is not strong, then its carrying capacity is divided by 2:
+
* [[Nymph]]s have functionally unlimited carrying capacity, although they won't pick up [[boulder]]s or [[statue]]s.{{refsrc|src/mon.c|1294|version=NetHack 3.6.6|comment=The function returns before the nymph's actual carrying capacity is checked.}}
 +
* [[giant (monster attribute)|Giant]]s can carry any number of boulders.{{refsrc|src/mon.c|1290|version=NetHack 3.6.6}}
  
<math>\text{maxload} = \frac{\text{maxload}}{2}</math>.{{refsrc|src/mon.c|1185|version=NetHack 3.6.6}}
+
==Weightless monsters==
 +
If the monster has zero weight, its carrying capacity is
  
Note that despite the source code comment mentioning [[corpseless]] monsters, the formula based on monster size is only used for monsters with a cwt of 0.  Thus, a corpseless [[lich]], with medium (2) size and 1200 weight, has a carrying capacity of 413, not 500.  A [[wraith]], with medium size and 0 weight, has a carrying capacity of 500.
+
<math>\frac{1000 \times \text{monster size}}{\text{size of human}} (\times \frac{1}{2} \text{if not strong})</math>.
  
In effect, the carrying capacity of a non-zero-weight monster is <math>\frac{\text{cwt}}{2.9}</math> if a monster is not strong, and <math>\frac{\text{max}(\text{cwt}, 1450)}{1.45}</math> if a monster is strong.
+
The numerical value used for monster size is that used for [[physical size]]: 0 for tiny, 1 for small, 2 for medium, 3 for large, 4 for huge, and 7 for gigantic.  Humans have medium (2) size.{{refsrc|include/monflag.h|165|version=NetHack 3.6.6}}
  
A few monsters' carrying capacity:
+
==Notes==
 +
Despite the source code comment mentioning [[corpseless]] monsters,{{refsrc|src/mon.c|1196|version=NetHack 3.6.6}} the formula based on monster size is only used for monsters with a ''weight'' of 0.  Thus, a corpseless [[lich]], with medium (2) size and 1200 weight, uses the formula for weighty monsters and has a carrying capacity of 413, not 500.  A [[wraith]], with medium size and 0 weight, uses the formula for weightless monsters and has a carrying capacity of 500.
  
{|class="prettytable"
+
==Examples==
 +
 
 +
{|class="prettytable sortable"
 
! Monster
 
! Monster
! [[kitten]]/[[little dog]]
+
! Weight
! [[housecat]]/[[dog]]
+
! Strong?
! [[hobbit]]
+
! Size
! [[large cat]]/[[large dog]]
+
! Carrying capacity
! [[pony]]
+
|-
! [[dwarf]]
+
|[[kitten]] || 150 || No || 1 (small) || 51
! [[horse]]
+
|-
! [[warhorse]]
+
|[[housecat]] || 200 || No || 1 (small) || 68
 +
|-
 +
|[[large cat]] || 250 || Yes || 1 (small) || 1000
 +
|-
 +
|[[little dog]] || 150 || No || 1 (small) || 51
 +
|-
 +
|[[dog]] || 400 || No || 2 (medium) || 137
 +
|-
 +
|[[large dog]] || 800 || Yes || 2 (medium) || 1000
 +
|-
 +
|[[pony]] || 1300 || Yes || 2 (medium) || 1000
 +
|-
 +
|[[horse]] || 1500 || Yes || 3 (large) || 1034
 +
|-
 +
|[[warhorse]] || 1800 || Yes || 3 (large) || 1241
 +
|-
 +
|[[lich]] || 1200 || No || 2 (medium) || 413
 +
|-
 +
|[[wraith]] || 0 || No || 2 (medium) || 500
 +
|-
 +
|[[air elemental]] || 0 || Yes || 4 (huge) || 2000
 +
|-
 +
|[[mind flayer]] || 1450 || No || 2 (medium) || 500
 +
|-
 +
|[[Archon]] || 1450 || Yes || 3 (large) || 1000
 
|-
 
|-
|Capacity || 52 || 69 || 173 || 1000 || 1000 || 1000 || 1034 || 1241
+
|[[dragon]] || 4500 || Yes || 7 (gigantic) || 3103
 
|}
 
|}
  
 
==References==
 
==References==
 
<references/>
 
<references/>
 +
 +
{{nethack-366}}

Latest revision as of 16:16, 5 February 2023

A monster's carrying capacity is calculated based on its weight or size relative to a human.[1]

Weighty monsters

If the monster has non-zero weight, its carrying capacity is

\frac{{1000 \times \text{monster weight}}}{\text{weight of human}} (\times \frac{1}{2} \text{if not strong}).

The weight of a human is 1450 for this calculation.[2] If a strong monster would have less than 1000 carrying capacity based on this calculation, then its carrying capacity is set to 1000.

This can be simplified to \frac{\text{weight}}{2.9} if the monster is not strong, and \frac{\text{max}(\text{weight}, 1450)}{1.45} if the monster is strong.

Some monsters have special rules for their carrying capacity:

Weightless monsters

If the monster has zero weight, its carrying capacity is

\frac{1000 \times \text{monster size}}{\text{size of human}} (\times \frac{1}{2} \text{if not strong}).

The numerical value used for monster size is that used for physical size: 0 for tiny, 1 for small, 2 for medium, 3 for large, 4 for huge, and 7 for gigantic. Humans have medium (2) size.[5]

Notes

Despite the source code comment mentioning corpseless monsters,[6] the formula based on monster size is only used for monsters with a weight of 0. Thus, a corpseless lich, with medium (2) size and 1200 weight, uses the formula for weighty monsters and has a carrying capacity of 413, not 500. A wraith, with medium size and 0 weight, uses the formula for weightless monsters and has a carrying capacity of 500.

Examples

Monster Weight Strong? Size Carrying capacity
kitten 150 No 1 (small) 51
housecat 200 No 1 (small) 68
large cat 250 Yes 1 (small) 1000
little dog 150 No 1 (small) 51
dog 400 No 2 (medium) 137
large dog 800 Yes 2 (medium) 1000
pony 1300 Yes 2 (medium) 1000
horse 1500 Yes 3 (large) 1034
warhorse 1800 Yes 3 (large) 1241
lich 1200 No 2 (medium) 413
wraith 0 No 2 (medium) 500
air elemental 0 Yes 4 (huge) 2000
mind flayer 1450 No 2 (medium) 500
Archon 1450 Yes 3 (large) 1000
dragon 4500 Yes 7 (gigantic) 3103

References