Bag of holding

From NetHackWiki
(Redirected from Boh)
Jump to navigation Jump to search
( Bag.png
Name bag of holding
Appearance bag
Base price 100 zm
Weight 15
Material cloth
Monster use Will not be used by monsters.

A bag of holding is a magical tool that appears in NetHack. It is made of cloth, and is one of the most coveted items for general container use.

Generation

Bags of holding make up 150 (2%) of all tools that are randomly generated on the ground, in general shops or as death drops. Hardware stores can also stock bags of holding.

Bags of holding are generated uncursed, with the possible exceptions of bones levels and the items generated on some early traps. A randomly generated bag of holding may contain a single item inside[1][2]—this item will never be another bag of holding, a bag of tricks or a wand of cancellation.[3].

The prize at the end of Sokoban always has a 12 chance of being a bag of holding.

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.

Per commit 6c479f23, Sokoban Level 4a has a 34 chance of the prize being a bag of holding, while Sokoban Level 4b has a 14 chance of the prize being a bag of holding.

Description

Like other containers, the bag of holding can hold items beyond the 52-character limit, and it will also protect its contents from being broken when kicked, thrown or dropped from a great enough height (e.g. while levitating). A bag of holding additionally alters the weight of its contents dependent on the beatitude of the bag, with the normal weight represented by cwgt in the table below:[4]

BUC total weight
blessed 15 + (\frac{cwgt}{4} + 1)
uncursed 15 + (\frac{cwgt}{2} + 1)
cursed 15 + (cwgt \times 2)

In effect, a blessed bag of holding reduces the weight of its contents to 14, an uncursed bag reduces the weight of its contents to 12, and a cursed bag doubles the weight of its contents, which is then added to the bag's own base weight of 15 aum. A bag of holding's total weight is recalculated each time objects are transferred to or from that bag.[5]

In addition to doubling the weight of its contents, a cursed bag of holding may also make some of its contents vanish:[6] every time a hero loots, applies or tips the bag, there is a separate 113 chance per stack that each item inside disappears and is permanently lost.[7]

Explosion

A magical explosion will occur if certain items are put in a bag of holding, dealing 6d6 damage to the hero while destroying both the bag and that item along with all the contents of the bag and any other bags placed into it.[8][9] These items will cause a bag of holding to explode if placed inside it:

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.

Per commit 71754910, exploding bags of holding scatter their contents rather than destroying them outright: fragile items are destroyed, and if the explosion is caused by a bag of tricks, it is still lost along with the bag itself, while if it is caused by another bag of holding, that bag explodes as well per commit 9cdcf7b2.

Per commit 6fd51c29, 113 of an exploded bag's contents are lost (not counting fragile items that are destroyed after), and per commit ce1f4788, monsters hit by scattered items are angered.

Nesting bags

A bag that is placed inside another bag is considered "nested": if a nested bag containing an item that would make a bag of holding explode is placed inside a bag of holding, then there is a decreased chance that the latter bag of holding will explode. The chance of an explosion occurring then depends on the amount of nesting:[12]

Number of sacks Odds of explosion Success probability
0 1/1 0
1 2/2 0
2 3/4 0.25
3 4/8 0.5
4 5/16 0.6875
5 6/32 0.8125
6 7/64 0.890625
7 8/128 0.9375
8 9/128 0.9296875
n, where n>6 (n+1)/128

If a bag of holding is nested this way and the nested bags do not explode, the effect of the two bags will be cumulative as expected: if both are blessed, any items in the innermost bag will have their weight reduced to about 1/16. Per the table above, nesting bags of holding with more than 7 sacks in between makes the chance of an explosion more likely for each sack after the seventh.

Strategy

Bags of holding are useful for carrying large numbers of items, and are widely considered an essential part of an ascension kit. Though bags of holding will protect their contents from breaking, it will not prevent them from getting wet—to protect against this, you can apply grease to the bag or place it in a non-cursed oilskin sack to protect it from water damage, and a player wishing for a bag of holding should always specify a greased one.

Bags of holding can be informally identified by first curse-testing them (to avoid any item loss from a potential cursed bag of holding), then placing items into the bag once it is determined to not be cursed: if the hero is encumbered and places items in an unidentified bag of holding, or blesses an unidentified bag of holding that has items inside, the weight reduction may be enough to reduce their level of encumbrance.[5] For this reason, a player's heaviest non-worn items should usually be placed in a suspected bag of holding first once the bag is properly curse-tested.

Item management

Due to the risks of losing your most valuable items if your bag is cursed or else explodes, many players also carry a plain sack to store other items. The sack can be used to hold items that are rare or hazardous to a bag of holding—many players name this bag something like "Cancel" or "Don't ever put this in BoH!" and keep wands of cancellation and other precious items such as artifacts or a wand of wishing inside as a safety measure.

You can also store a bag of holding in a sack to prevent it from being affected by the curse items monster spell and increasing its weight, which in turn is likely to render the hero encumbered or worse depending on the amount of contents stored. As a trade off, it will require two turns to take that bag out and transfer items to or from it.

Handling cursed bags

If you find a bones pile with a bag of holding, it will probably be cursed and too heavy to lift. If you can still pick it up, then it can be uncursed by dipping it in a potion of holy water, reading a scroll of remove curse, or casting the remove curse spell. Otherwise, the best solution for a cursed bag of holding you cannot lift is to zap it with a wand of cancellation—the beam will only affect the bag and simply sets its beatitude to uncursed. Be sure to move any desired wands, tools and other enchanted or charged items out of the way beforehand.

If cancellation is not available, a solution is to try and lift the bag and then #tip it: this will still make items vanish, but at least you can get everything else out without being limited by your inventory.

You can also allow a gelatinous cube to eat the bag if one is present: the cube will only eat the container itself, leaving the contents (including organic items) in its inventory, which will land safely on the ground when you kill the cube. Just make sure you can secure all the items before they are damaged - and only do this if you have no need for the bag itself.

Avoiding bag explosions

Placing a bag of holding or bag of tricks inside your bag of holding can be avoided by being extremely careful in watching what letters you type when placing items into that bag. Wands of cancellation are tricky to identify, making them more risky that either type of bag (since the former can be type-named upon informally identifying it, while the latter can be auto-identified by applying or looting it). To be safe, do not put any unidentified wands inside the bag, unless you have engrave-tested them and confirmed that they do not make engravings disappear—this rules out cancellation, along with teleportation and make invisible.

It is usually best to avoid carrying more than one bag of holding or any bag of tricks when they are not in use, except perhaps while transporting them to a convenient stash location (since they cannot cause accidental explosions if they are not on your person). Many players prefer to leave wands of cancellation at their stash as well, but these can be useful against monsters, so one must balance the increased risk in combat with the risk of making a potentially game-ending mistake.

Handling nested bags of holding

As mentioned above, it is risky but possible to first put items that would ordinarily cause a bag of holding to explode into sacks or oilskin sacks, and then place them inside the bag of holding, without causing an explosion. The table in the linked section covers the number of sacks that is most reasonable to use for this purpose: in general, two nested bags of holding at most are useful, since the payload is limited by your ability to lift the innermost bag rather than by the outermost bag's weight, and you risk an explosion each time you re-insert the innermost nested bag in the outer bag. If you wish, you may choose to continue to nest the bags of holding further; the chance of success with certain configurations of sacks between the bags of holding is given below:

Number of bags of holding Sack spacing Success probability
2 7 0.9375
3 7,7 0.769042...
4 7,7,7 0.512570...
5 7,7,7,7 0.256222...
6 7,6,6,6,7 0.0935839...
7 7,6,5,5,6,7 0.0236287...
...
43 3,2,2, ... ,2 very small

For example, if you use 7 sacks between each of three bags of holding like this (H for bag of holding, s for sack): HsssssssHsssssssH (denoted as "7,7" in the table above), the chance of successful nesting would be 1-(8/128) for the first nesting, and then (1-(8/128)) * (1-(16/128)) for the second nesting; each of the two 'inner' bags of holding put into the outermost bag must pass its own independent roll for the nesting to succeed[8][9]—this gives the example scenario roughly a 23.1% chance that something will explode.

Some players either consider the 6.25% chance of explosion from nesting to be an acceptable risk, or assume from a test in wizard mode that it is safe. If you are confident you can withstand the explosion, you can risk it before you leave the main dungeon to increase your score or bring specific items to the demigod bar.[13]

History

The bag of holding first appears in NetHack 3.0.0.

From NetHack 3.3.0 to NetHack 3.4.3, including some variants based on those versions, Sokoban Level 4a always has a bag of holding as the prize, while Sokoban Level 4b always has an amulet of reflection.

Origin

The bag of holding is an iconic item from Dungeons & Dragons, and has appeared in numerous other modern fantasy works since then, sometimes under different names—magical bags with increased capacity also occur in other contexts within folktales, mythology and works of fantasy. In its original form in Dungeons & Dragons, the bag of holding is described as "opening into a nondimensional space", meaning that items inside not do not encumber the player at all, although unlike in NetHack the bag has a limited capacity and is much more fragile: it can be destroyed by being pierced with a sharp object (from within or outside), or by attempting to fill it beyond its maximum capacity.

Messages

An <object> has vanished!
You applied or #looted a cursed bag of holding, causing a known item(s) to disappear.[14]
You see <object> disappear!
As above, with an unidentified item(s) disappearing.[15]
As you put <object> inside, you are blasted by a magical explosion!
You caused a bag of holding to explode by placing a charged bag of tricks, charged wand of cancellation or another bag of holding inside, destroying both objects and their contents.[16]

Variants

SLASH'EM

In SLASH'EM, upgrading a sack or oilskin sack can produce a bag of holding. The Wallet of Perseus is an unaligned artifact bag of holding that has enhanced weight reduction.

Due to the ability to upgrade, the amulet of reflection is generally the more valuable Sokoban prize: there is still a 12 chance of each reward, even with the new levels introduced in the variant.

SLASH'EM has a 'showweight' option that explicitly displays the amount of weight the hero is carrying - informally identifying bags of holding is trivial with this option turned on. The Wallet of Perseus also enables informal identification of a bag of holding via the 'naming artifacts' trick.

NetHack brass

In NetHack brass, Sokoban offers a choice between 3 items, with one being a bag of holding.

GruntHack

In GruntHack, causing a bag of holding to explode does not destroy the contents of the bag, but scatters them and the hero throughout the dungeon via level teleport.

Sokoban in GruntHack also offers a choice between 3 prizes, with one being a guaranteed bag of holding.

SporkHack

In SporkHack, an exploding bag of holding scatters its contents nearby, rather than destroying them outright—this will still destroy the inserted object, and fragile objects such as potions and mirrors are broken as if they were thrown.

UnNetHack

In UnNetHack, exploding bags of holding react the same as in SporkHack, scattering most of its contents and destroying fragile items.

Sokoban in UnNetHack offers a choice between 3 prizes, with one being a guaranteed bag of holding.

AceHack

In AceHack, inserting a bag of tricks or a wand of cancellation inside a bag of holding will drain them of their charges rather than destroying any items inside. A hero can still destroy bags of holding by nesting them, but will receive a confirmation prompt when doing so. This also applies to NetHack 4, a 'successor' variant to AceHack.

NetHack Fourk

In NetHack Fourk, Sokoban now has set rewards for each of the possible maps that can appear as its final floor. Open at the Top, which is essentially a clone of Sokoban level 4a, always has a bag of holding as its prize.

xNetHack

In xNetHack, an exploding bag of holding behaves as in SporkHack and some other variants: 113 of the contents are destroyed along with the bag and inserted item, and the rest are scattered, destroying fragile items.

EvilHack

In EvilHack, an exploding bag of holding functions as in SporkHack and some other variants: 113 of the contents are destroyed along with the bag and inserted item, and the rest are scattered, destroying fragile items.

Sokoban in EvilHack offers 3 different type of prize item, and its prize tool has a 12 chance of being a bag of holding.

The Bag of the Hesperides is an artifact bag of holding similar to the Wallet of Perseus that repels water like an oilskin sack, confers protection when carried, and is made of intrinsically-fireproof dragonhide—it can only be obtained within the last floor of the Ice Queen's Realm, where it is placed inside a crystal chest within the pegasus cage.

Hack'EM

In Hack'EM, bags of holding behave as in EvilHack. The Wallet of Perseus is also given most of the same physical traits as the Bag of the Hesperides from EvilHack.

Encyclopedia entry

"Now, this third handkerchief," Mein Herr proceeded, "has also four edges, which you can trace continuously round and round: all you need do is to join its four edges to the four edges of the opening. The Purse is then complete, and its outer surface--"
"I see!" Lady Muriel eagerly interrupted. "Its outer surface will be continuous with its inner surface! But it will take time. I'll sew it up after tea." She laid aside the bag, and resumed her cup of tea. "But why do you call it Fortunatus's Purse, Mein Herr?"
The dear old man beamed upon her, with a jolly smile, looking more exactly like the Professor than ever. "Don't you see, my child--I should say Miladi? Whatever is inside that Purse, is outside it; and whatever is outside it, is inside it. So you have all the wealth of the world in that leetle Purse!"

[ Sylvie and Bruno Concluded, by Lewis Carroll ]

References