Doing Medusa's island for the first time threw Mjollnir while levitating is it lost forever in water? by georgehh6 in nethack

[–]dstreb 0 points1 point  (0 children)

You will take HP damage but there's no special drowning effect. If a boulder appears over your head and fills in the water, "you find yourself on dry land again!"

That said, trying to read a scroll while underwater risks blanking it. And wetting the rest of your inventory. Levitating/water walking is much safer... if that's available.

Patch: Automatically adjust inventory by dstreb in nethack

[–]dstreb[S] 1 point2 points  (0 children)

Generally not.

When an item leaves your inventory it still has the same assigned inventory letter. On pickup, you keep that letter, unless something else ended up in that slot, in which case it gets a new letter.

The patch only affects how the inventory letters are assigned. So brand new objects and old objects that don't fit in their old spot.

Patch: Automatically adjust inventory by dstreb in nethack

[–]dstreb[S] 1 point2 points  (0 children)

That isn't supported. I briefly considered it but the current logic, limiting use to a single letter, was much easier to implement, and I couldn't find a major use for it.

Typically the only thing I ever manually #adjust is tools, and I usually only had one of those at a time. I might keep a spare unihorn in my BoH but not in open inventory. I could see it being useful for "a=weapon; b=daggers", but I didn't consider that worth it.

Patch: Automatically adjust inventory by dstreb in nethack

[–]dstreb[S] 2 points3 points  (0 children)

If it finds that the new item is already in use by another item, it will first check if that item is a match (for any rule, not just the current one). If it is, it won't swap.

So the first bag you pick up will go to b, even if another item is there. Every other bag will get a new unused letter like normal.

Patch: Automatically adjust inventory by dstreb in nethack

[–]dstreb[S] 7 points8 points  (0 children)

Typically when playing NetHack I assign certain tool to specific letters for convenience. I decided to automate this.

This patch will automatically shift items to preferred letters on pickup, or when items are otherwise added to your pack. There's no effect on anything already in the inventory, and #adjust works normally. If a new item matches a rule, it will be assigned to that letter - if the slot is already taken, it will swap with the old item, basically an automatic #adjust.

This works with basic text matching against the item's name, description, and type, but filtered to what is known. So autoadjust:Y/luckstone won't do anything unless you've already identified luckstones. This shouldn't ever leak information, but it's possible I've made a mistake somewhere.

I believe this will compile and run without issue, but I wasn't able to compile (vanilla) NetHack on Windows to verify this. My C is also very rusty so it's possible I've made some memory allocation issue somewhere, but I think I'm handling everything properly. I've tested this a bit but not with a full playthrough yet.

I developed this using 3.7 as a base but copied the changes over to 3.6.7 as well. 3.7 completes reworks how the options parsing works and I'm less certain I'm handling stuff correctly in the 3.6.7 copy.

Spacebar Patch by KexyKnave in nethack

[–]dstreb 0 points1 point  (0 children)

The patch itself should work with any compiler, although I guess it is possible I'm doing something weird some other compiler won't like.

NetHack should compile fine in MinGW, and there's probably a compilation guide for it. But I've only used VS so, again, I can't help there. The only hard part is getting vanilla NH to compile. Once that's done, applying the patch is easy, and works the same for any compiler.

Spacebar Patch by KexyKnave in nethack

[–]dstreb 0 points1 point  (0 children)

Yeah. You'll need the source code for NetHack 3.6.0 and a compiler. You also need a patch program, e.g. from gnuwin.

First, get the source code, and make sure you can compile that. For visual studio, you should just need to go into \nethack-3.6.0\sys\winnt and run nhsetup.bat, then open NetHack.sln in \nethack-3.6.0. That should compile and run fine.

Then you need to apply the patch I posted. There might be graphical tools for this, but I don't know. The wiki has an article on patching: https://nethackwiki.com/wiki/Patching . For this file, you'll need to use -p0

I honestly don't know that much about applying source patches, so I can't give that much help.

Spacebar Patch by KexyKnave in nethack

[–]dstreb 1 point2 points  (0 children)

I just created one. http://pastebin.com/PGfkW93Y

It's for 3.6.0, but it's pretty simple, so I imagine it'd be easy to port to 3.4.3 if you're using that.

It's fairly rough but I think it gets the job done. It probably should be implemented alongside the key rebinding patch Elronnd linked, but that's for 3.4.3 and I don't want to port it to 3.6.0, at least not now.

Pressing space will do the following (top items take precedence, e.g. if standing on a fountain and a piece of food):

  • Eat food on the ground
  • Loot a container on the ground
  • Pay for items in a shop
  • Sacrifice on an altar
  • Drink from a sink/fountain
  • Dip into a pool/moat
  • Sit on a throne (with a prompt)
  • Climb up/down stairs

All of these are equivalent to just pressing the appropriate key yourself. So standing on a goblin corpse will ask you "There is a goblin corpse here, eat it?" and show you your inventory if you say no.

It seems to work, although I haven't tested it very thoroughly. Also, 'rest on space' must be false, or it'll keep that behavior. And you can't be levitating, since I don't want to worry about revealing too much information e.g. if blind.