Stan's NetHack Page |

Nested Looting Patch

Download: nloot-343.diff [13K, 2003/12/16] (older versions)


This patch provides nested looting. If you apply or #loot a container an additional option, "a - Apply something from the <container>", is given, which lets you apply any lootable objects (which includes unidentified bags of tricks) from inside the container. If there is only one lootable object, the option changes to "a - Apply the <object> inside" saving you another keystroke.

Presently it works with menu looting. If there's an interest in this I will provide an interface with traditional looting as well.

As discussed in rgrn there are various issues with nested looting and game balance. Currently the patch acts as follows.


My initial plan was to make nested looking take something like 1 turn per nesting level. I could not come up with a satisfying mechanism to do this though, so it takes 1 turn in total (per leaf container).

Why you ask? Well, paralyzing the player was not an option, since this would make nested looting immune from "real" paralyzing, such as the one from a priest. Occupying the player (as does digging, etc.) would work and I actually wrote a version like this. The problem here is that there's no mechanism to differentiate between events that _make_ you stop (getting paralyzed, stunned, etc.) and events which stop an occupation, because the player _might_ want to interrupt it (a newt appearing). One often wants to use bags while some creatures are around and in this case it would mean having to tell nethack to continue (un)packing by applying the same sack again or through a new continue command. None of these are elegant; moreover they render the patch, which was supposed to save keystrokes and limit real world tediousness, useless.

I do believe that the time currently required for looting nested containers is exaggerated. It is the result of the turn granularity of operations. Nevertheless, having nested looting take only 1 turn creates a balancing problem with the next topic.

Container Cursing and Unblessing

Initial design was to mark used bags/boxes as open (say through an alias of the corpsenm flag) throughout a multi-turn operation. Cursing of open containers can be adjusted in a way providing the same chances for typical mid-/endgame issues as getting one's bag of holding cursed/unblessed while out of a sack.

With 1-turn nested looting this obviously cannot be achieved. I am looking for YANIs for a better handling of container curses...

It has to be said however that the chances of a player getting his BoH cursed during a game are very minimal if he keeps it in a sack. The reason why BoH's get cursed is that almost no one keeps them there. This is not because they think it's bad strategy. It's mainly because of RW tediousness and perhaps the time system granularity. If nethack provides convenient nested looting then BoH's just won't be cursed as often--not because the game got much easier but because it got a better interface.

Nesting Bags of Holding & Magical Explosions

If a player loots a bag of holding within other bags of holding there is a chance of a magical explosion which is the same as the chance there is in the step-by-step version of the procedure. An explosion will of course also destroy any enclosing containers together with their contents. Bags of holding do not feel comfortable inside others and simply opening them and letting their magical fields interfere may result an explosion.

Thanks To

Seraphim, Roger Broadbent, Rob Ellwood

Stan's NetHack Page | | email: Stanislav Traykov <>