Giter VIP home page Giter VIP logo

noobhack's Introduction

nethack is hard

NetHack is hard. noobhack makes it easier. It remembers stuff about the Mazes of Menace that would otherwise be tedious for you.

how does noobhack help me?

  • Found a rare bookshop but don't have the means to pay, the cunning to steal, or the muscle to murder? noobhack remembers features about the dungeon so you can come back later when you're a dragon riding badass.
  • Know how to price-identify, but can't be bothered to calculate it yourself? noobhack automatically price identifies items for you when the shopkeeper makes his offer. Subverting the plutocratic corporate shopkeepers fat cats.
  • Hear a sound in the dungeon and not sure what it means? noobhack translates noises and remembers the important ones.
  • &tc. and so forth...

awesome! how do i get started?

Installing noobhack is easy for the gentleman adventurer who uses pip.

$ pip install noobhack

Or for those old buggers amongst us, easy_install works just as well.

$ easy_install noobhack

Start noobhack by typing

% noobhack

This will start a normal game of nethack. You can play nethack without ever consulting noobhack, but if you want to consult the helper console simply press tab. To dismiss it press tab again.

You can also open the map mode by typing the backtick key '`' and dismiss it again by pressing the same. When in map mode, you can scroll the map with the 'h', 'j', 'k', and 'l' keys (just like walking in the game)

but explanations are boring, show me screenshots!

Map Map 2 DEC Graphics Price ID 2 Price ID Selling Price ID

does noobhack work on public servers like nethack.alt.org (NAO)?

Yup, you can start a remote game by doing something like:

% noobhack -h nethack.alt.org

but, noobhack doesn't do (pudding farming | automatically solve sokoban | ascend for me)!

Fret not, noobhack allows you to write your own plugins!

more plugin documentation coming soon

isn't this cheating?

Some people might (and I suspect will) consider noobhack cheating. However, before you start chuggin' a gallon of haterade, consider this:

  • noobhack doesn't actual know anything other than what it sees on screen.
  • I spent more time working on noobhack than most people spend ascending.
  • ...
  • Screw you, it's not cheating.

noobhack's People

Contributors

cjyate avatar miton avatar samfoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

noobhack's Issues

Error in shop identification causes crash

Hi, I've just found a little problem during item identification in a shop.

If an item goes into inventory slot "A" when I pick it up, when I push the Identify button I get a crash.
I've tested a couple of other items by adjusting in the inventory, and it seems it's specifically the knapsack position "A" that causes this problem. The following trace info is given at the command prompt:

Traceback (most recent call last):
File "/usr/local/bin/noobhack", line 322, in
curses.wrapper(hack.run)
File "/usr/lib/python2.6/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/local/bin/noobhack", line 315, in run
self._game(window)
File "/usr/local/bin/noobhack", line 285, in _game
self.helper.redraw(window, self.options.crumbs)
File "/usr/local/lib/python2.6/dist-packages/noobhack/ui/helper.py", line 262, in redraw
if self._things_to_buy_identify() is not None:
File "/usr/local/lib/python2.6/dist-packages/noobhack/ui/helper.py", line 196, in _things_to_buy_identify
count = int(count)
ValueError: invalid literal for int() with base 10: 'A'

need to refresh screen once per keystroke when playing through screen

When I use screen to remap the movement keys, I need to press control-r (refresh screen) once per keystroke in order for the display to be updated properly. The farlook command ";" is a good way to demonstrate this quirk: the cursor as displayed always seems to lag one keystroke. Strangely, GNU screen with an empty config file doesn't exhibit this bug, but a screen config with only remapping commands does. I have no idea in which software the bug is.

Commands to start session:
nohup xterm -fa Monaco -fs 14 -fg white -bg black &
unset PYTHONPATH ; export PYTHONPATH=pwd:$PYTHONPATH:scripts/noobhack
screen -S playtjr -c ~/.screenrc-pacifist ./scripts/noobhack --crumbs -h nethack.alt.org

Simple .screenrc-pacifist to reproduce this bug:
bindkey 'h' stuff 'mh'

NAO config file:
http://alt.org/nethack/userdata/t/tjr3/tjr3.nh343rc

Steps to reproduce:
Start up a game as above, then farlook to the left, using the "h" key to move the curor. I would expect the highlighted square to move n times when hitting "h" n times, but it does only n-1 times.

Problems Installing - fix suggested

I had problems installing the software. I modified the setup.py file and seem to have fixed the problem

For what it's worth I'm using Python 2.6.7 on Debian wheezy/sid

Not sure whether I can commit the change directly, so here's my patch:

--- setup.py 2011-08-20 00:10:19.000000000 +0100
+++ ../setup.py 2011-08-20 00:03:36.000000000 +0100
@@ -9,7 +9,7 @@
description="noobhack helps you ascend at nethack",
long_description=open("readme.md", "r").read(),
requires=["vt102 (>=0.3.2)"],

  • packages=["noobhack"],
  • scripts=["noobhack/noobhack"],
  • packages=["noobhack", "noobhack.game"],
  • scripts=["scripts/noobhack"],
    license="Lesser General Public License v3.0"
    )

New version should read:

from distutils.core import setup

setup(
name="noobhack",
version="0.3",
author="Sam Gibson",
author_email="[email protected]",
url="https://github.com/samfoo/noobhack",
description="noobhack helps you ascend at nethack",
long_description=open("readme.md", "r").read(),
requires=["vt102 (>=0.3.2)"],
packages=["noobhack", "noobhack.game"],
scripts=["scripts/noobhack"],
license="Lesser General Public License v3.0"
)

Highlighting/colouring text

Hi Samfoo,

Something I saw in Interhack but I thought was quite nice was the ability to highlight specific words (e.g. "blessed" in an inventory). This is an improvement on the 'standard' menucolors patch, which only lets you specify colours for the whole line (if I remember correctly).

I've put a little mod together which adds some lines to the ui.py _redraw_row function, in order to colour the text based on regular expressions. An additional file is included (colorpatterns.py) that specifies the regex patterns and colors/styles to use.

Hopefully you can get the code mods from https://github.com/CJBrew/noobhack/tree/inline_highlights. I would have submitted a pull request but I don't know whether you like the idea or not... ;-)

If you look at colorpatterns.py it should be fairly obvious how this work could be extended. I've only put in a handful of definitions, as I suspect this is something that might be left user-definable (or perhaps configured to your own tastes..!)

cheers

Chris

No colors on NAO

Games on nethack.alt.org don't render in color with noobhack.

./scripts/noobhack --crumbs -h nethack.alt.org

Document some minor things please

Please document some minor things:

  1. You can't use the MSGTYPE option to configure away the messages "welcome (back) to nethack" and "restoring save file".

  2. The installation & first run aren't fully coverend in the readme:
    sudo easy_install vt102 #done, worked
    unset PYTHONPATH
    export PYTHONPATH=pwd:$PYTHONPATH:scripts/noobhack
    cd ~/Downloads/samfoo-noobhack-499e536/
    ./scripts/noobhack --crumbs -h nethack.alt.org

  3. How do you get around this runtime error if you're trying to convert to noobhack in the middle of a game? (I copied a file from a fresh game.)

  4. Presumably, noobhack gets mixed up if you have several NAO accounts.

  5. Neither DECgraphics nor IBMgraphics seem to work. I'm using an xterm on OS X and am playing on NAO.

  6. An exhausting list of keystrokes it uses, because I remap movement keys with GNU screen to avoid accidentally breaking pacifist conduct

  7. How reliably does it detect dungeon branch change? E.g. if you branchport into the quest and end up in one of the rooms-and-corridor levels?

Pets don't get highlighted

OPTIONS=hilite_pet
doesn't seem to have any effect.

I start it this way:
nohup xterm -fa Monaco -fs 14 -fg white -bg black &
screen -S playtjr -c ~/.screenrc-pacifist ./scripts/noobhack --crumbs -h nethack.alt.org

Mac OS X 10.5.8. Screen remaps some keys, has no effect on the actual bug.

And use this config file:
http://alt.org/nethack/userdata/t/tjr3/tjr3.nh343rc

Support multiple save files.

Right now if you have multiple accounts on NAO, or you'd like to play a local game without destroying your NAO save you can't. It should be reasonable to name games via the command line and use these names for save files.

e.g.

noobhack --game "nao wizard" should save a different save file than noobhack --game "pastafaria"

Map forks incorrectly

I'm sure you'll have seen this problem already -- I'm finding the map tends to fork incorrectly.

I am usually playing on NAO (if that makes any difference) and it may be that coming out of the game and going back in causes an issue. I'm not sure how to reproduce the problem reliably.

Here's an example...
http://postimage.org/image/2e33oo938/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.