Talk:Container

From NetHackWiki
Revision as of 19:07, 30 June 2012 by 68.204.59.230 (talk)
Jump to navigation Jump to search

Unlocking

Can you also polymorph to a gelatinous cube and eat it?

--LWM

I tried eating a large box and a chest as a polymorphed gelatinous cube, but I found out I couldn't do that at all. So I guess the answer is no. :/ —Shijun 07:10, 12 August 2008 (UTC)
Let me correct myself. You can't eat a container that has items in it. —Shijun 07:15, 12 August 2008 (UTC)

slashem polymorph trick

Will this anger a shopkeeper, if that is where the ice box happens to be? I'd think yes. Tjr 13:42, 29 April 2009 (UTC)


Does a food store buy ice boxes? Tjr 16:23, 21 May 2009 (UTC)

Nesting

It seems a little strange that chance of an explosion appears to increase after 7 layers. Is this correct? And is it the same for SLASH'EM? MrFroon 20:42, October 14, 2009 (UTC)

It makes sense from a game balance perspective: you could almost eliminate the risk of explosion otherwise. -Tjr 08:02, October 15, 2009 (UTC)

Destroying

Is there any reliable way to destroy boxes and chests? I know you can force with a blunt weapon, but this then relies on failure rather than success (you'd have to keep repairing the lock). This is for the gray stone-in-a-container so polymorph is out.--PeterGFin 10:41, January 11, 2010 (UTC)

To my knowledge, no. If I encounter a gray stone in a container, I will usually either leave it alone or count up my total weight so a loadstone would take me to a different burdoned status than a harmless stone. I have an Excel spreadsheet for this, perhaps I might share it in the future. -Tjr 12:03, January 11, 2010 (UTC)

green goblin

should there be some discussion of strategy w/bag of tricks? Just now learning they are basically just another monster generator, I think.

Bags of Tricks make reliable sacrificial generators. They can be a big help if you've found an altar on an early dungeon level but, due to the way the early location of it, monsters don't get generated too often or close enough to the altar. I guess you can use them as pet generators as long as you have a source of taming. --FJH 23:44, October 10, 2010 (UTC)

sporkhack iron safe

I'm playing sporkhack and found an iron safe? Any1 know anythimg of this? Should there be something in the article? There isn't, you know(btw: The last topic was mine, and I forgot to 4tilde).Slarty 18:00, November 2, 2010 (UTC)

Use a stethoscope or wand of opening to open it.Tjr 18:39, November 2, 2010 (UTC)

Nesting Figures

I just checked with the code and it appearst that the figures for repeated nesting where wrong. If I understand it right, the contents of an object are only checked, if the object itself is not a magic bag or wand of cancellation. So if you put a BoH that already contains another BoH into a third BoH, then the innermost bag does not get an extra chance to cause an explosion.

Zimmi 19:03, 14 January 2011 (UTC)

32k items question

I really don't think that todo belongs in the top of the article - the casual reader isn't going to know how to find the answer to that or be affected much by it. I think I may have an answer to it, also, but I'd like someone else a little better at coding to verify me. In pickup.c around line 2118, there's a loop that counts the number of items in the bag:


	for (curr = obj->cobj; curr; curr = otmp) {

	    otmp = curr->nobj;

	    if (Is_mbag(obj) && obj->cursed && !rn2(13)) {

		obj_extract_self(curr);

		loss += mbag_item_gone(held, curr);

		used = 1;

	    } else {

		cnt++;

	    }

	}

Now, cnt is earlier defined simply as an int; IIRC this should be 32- or 64-bit depending on your system. As for obj->cobj, in obj.h, around line 29, the quantity (quan) of items in it is defined as a long - so it seems the limiting factor would be cnt; of course, you'd have to put 4 billion+ objects in to hit that even on a 32-bit system. Anyway, does this look correct to people more code-fluent than I? -Ion frigate 10:10, 10 December 2011 (UTC)

In that particular situation, there's no issue with cnt. Even if you did have 4 billion objects, unless you had exactly 4294967296 objects in there you wouldn't have a problem. cnt is only used to check if the bag is empty, nothing else. If you had that exact number of items in a bag it would mistakenly think it was empty (it'd also take forever to discover this; looping up to 4 billion isn't exactly fast), but you could remedy this by putting one more item in.
The real question is in adding items to a bag, as there might be some other bit of code that would break if you exceed 32k or 4 billion. The items in a container are stored in a linked list, which on its own can hold any number of objects until you run out of memory. I can't figure out the exact code used for adding items to bags or taking them out, so there might be something troublesome in there. -- Qazmlpok 13:04, 10 December 2011 (UTC)

Bag of holding

My bag of holding has disappeared, I didnt put a wand of cancellation or bag of tricks into it so it didnt magically explode. I was fighting a demilich at the time, and think that she is responsible for this. I am trying to think of the was this could have happened, To my knowledge demilich will only steal important artifacts, and none were in the bag. Im also thinking perhaps a (summoned) nymph could have taken it, but I killed all the nymphs and did not find it. I went up a level and found another demilich but it was not carrying my bag.

And another thing, once I noticed it was gone, I looked in the messages for an explanation, and the small amount that was shown didnt have one, is there a way to get the full history? Or at least filter out useless messages for the history?

NetHack only remembers 20 messages, unless you change msghistory. A demilich is not covetous and will not steal anything; a master lich or arch-lich will only steal the Book of the Dead (and this Book is never inside a bag). Perhaps you dropped the bag and forgot about it, or you made a typo and exploded the bag, or a nymph stole the bag before polymorphing into a different monster. --Kernigh (talk) 02:56, 28 May 2012 (UTC)
Master and arch liches won't steal anything. Covetous is separate from having the AD_SAMU damage type, which lets monsters like the Wizard or your Quest nemesis steal any of the covetable items (even if they don't themselves covet them). All that coveting the Book of the Dead means is that higher-level liches will pick it up if they find it, will attack monsters who have it, and have that habit of warping to and from the upstairs.
Oh, and another possibility for this missing bag of holding is that a nymph stole it and dropped down a floor or two. -Ion frigate (talk) 18:56, 28 May 2012 (UTC)

BUC Status

There is no mention of any effects caused by BUC status. The BoH does, but not for the other types of containers. So the page doesnt answer the question I have. Can I safely use a cursed chest/box for my stash? I want to curse my stash box and put it on a burned Elbereth so that my pets and other mobs wont go on the square and pick it up.