5

I have been plagued by a problem. I think something's out to kill me (although considering I'm playing Nethack, that "something" is "everything"). Specifically, I'm getting into trouble for something one of my past lives did (namely dying). That death left behind the bones level from hell.

For a level fairly early in the game (not even in the double digits), there are quite a few nymphs (at least four). Not five steps into this level and my armor, weapons, spellbooks, and rations are usually gone (along with my dignity). Invariably, I die on this level (again).

I know that I can go into the playground folder and delete the bones file so this cursed level won't plague me again. However, I don't know where the playground folder is for OSX. Barring that, is there any other way to remove the bones file?

4
  • 1
    Quitting after the bones are loaded instead of dying there will remove it, if you don't care about one more loss.
    – Wooble
    Dec 5, 2012 at 12:36
  • I could've sworn I tried that, but I'll give it another shot. If you care about getting more losses, you should not be playing Nethack.
    – Yuuki
    Dec 5, 2012 at 18:37
  • 1
    Depends on the current streak. Technically, the bones are destroyed as soon as the level is loaded at all; the problem is that you can leave fresh bones when you die. Loading the bones then leaving the level and dying elsewhere also solves the problem. If you live long enough after you know you loaded them to escape.
    – Wooble
    Dec 5, 2012 at 18:40
  • If the level isn't even in the double digits, then there's a 33%-50% chance each time you die there that no bones will be created, so just keep dying and eventually it'll go away.
    – jwodder
    Mar 1, 2014 at 22:14

1 Answer 1

1

There are two versions of NetHack Cocoa: a standalone version and a Mac App Store version. These store their data in different locations.

According to the source code, standalone NetHackCocoa should set HACKDIR (the internal variable that defines the location of the playground) to ~/Library/NetHackCocoa. You should find your bones file somewhere under there.

If you have the Mac App Store version, things are a little bit more complicated since Apple started enforcing sandboxing of apps. NetHackCocoa will run the same or very similar code, but get back a folder inside its Sandbox Bundle. According to Apple's documentation, Bundles are stored in ~/Library/Containers/ inside an app-specific folder named after the app's "bundle ID". Inside that Bundle will be a replication of the whole Library folder tree, for exclusive use of the app. In this case, your bones file should be in ~/Library/Containers/<bundle_id>/Data/Library/NetHackCocoa or something similar. You can't open a Bundle by double-clicking it, but you can right-click and choose "Show Package Contents", just like you can with an Application Bundle.

Bundle IDs are chosen by the app developer, so they should be something recognisable just by browsing that folder, but they can also be something unhelpful like "MatthewCarpenterMyApp". If you don't have many Mac App Store apps, it should be easy to find since there won't be many to look for. If you have a lot though, it is hopefully something helpful like "NetHackCocoa".

5
  • Unfortunately, it seems like I don't have a NetHackCocoa folder in my Library folder.
    – Yuuki
    Dec 5, 2012 at 6:09
  • Can't you just search for the folder? Or just nethack? My windows bone files start with "bon" so a dungeon level 8 bonefile looks like: "bonD0.8"
    – Ids
    Dec 5, 2012 at 11:19
  • @ids These parts of the file system aren't search-indexed because it's the equivalent of Windows\system, but moreso. Dec 5, 2012 at 17:44
  • @Yawus Are you looking in [home]/Library, not the global /Library or [home]/Library/Application Support/ ? (Even after reading the source, my reflex was still to look in AppSupport because that's really where it should be.) Dec 5, 2012 at 17:46
  • Also, what version of MacOS, and did you maybe download NetHackCocoa from the Mac App Store? Just realised either of those could easily change the folder the OS returns when that same source code runs. Dec 5, 2012 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .