Talk:NetHack 3.0.0
Revision as of 16:05, 29 July 2006 by Ray Chason (talk | contribs) (What I know so far about keys and locks in 3.0.x)
Y'all have probably noticed that I haven't written up a new version in a while. The easiest thing to do is usually to copy the page for version N and modify it to be correct for version N+1. But 3.0.0 is such a quantum leap over 2.3e that there's a lot of possibility of error, which could then propagate into succeeding writeups and then I have to go back and correct them all. So I want to review this one with a fine-toothed comb and be sure I have it right before I write up 3.0.1.Ray Chason 03:33, 29 July 2006 (UTC)
- Keys have shapes that fit specific locks - this is interesting. Could you explain how this worked? Possibly in a History section on Unlocking tools. --Jayt 10:19, 29 July 2006 (UTC)
- Diving into the 3.0.0 source, I find this bit of code in src/objnam.c (which no longer exists in 3.4.3):
/* We want the player to be able to learn what key goes in what lock. */ const char *keystr[N_LOX] = { "round", "square", "triangular", "oval", "octagonal", "hexagonal", "cylindrical", "irregular", "conical", "wedge-shaped" }, *lockstr[N_LOX] = { "round", "square", "triangular", "oval", "octagonal", "hexagonal", "wide", "notched", "large round", "large square" };
- You could use a round key to open a chest with a round keyhole, but it wouldn't fit a square keyhole. Keys had the appearances noted above in keystr; chests and large boxes had the appearances in lockstr. I haven't figured out how this works for doors. It furthermore appears to be quicker to use the "right" key than a skeleton key. --Ray Chason 16:05, 29 July 2006 (UTC)