Chris-plus-alphanumericgibberish / dnethack

A variant of nethack 3.4.3
35 stars 13 forks source link

Hi there! #6

Closed NaturesWitness closed 11 years ago

NaturesWitness commented 11 years ago

Hello, was looking around the nethack wiki and saw this, looks like an awesome variant! One question though, what is the best way to compile this with your latest stuff? I'm on windows and usually use codeblocks for compiling, but couldn't figure out how to get this working. This isn't probably the best way to contact you I know, but Github chat is one of the few message board systems I kinda understand. I usually just do stuff on Cataclysm Dark Days Ahead but thought I'd take a break and play something else for a change.

Chris-plus-alphanumericgibberish commented 11 years ago

Hi! This system sends a notification to my email, so it's a fine way to get ahold of me.

I'm also on windows (windows 7). I use the MinGW method described on nethack wiki: http://nethackwiki.com/wiki/Compile. It's a bit arcane to set up, but works like a charm once you get it.

Let me know if it doesn't work :-).

Also, neat, Cataclysm. I've been meaning to check that out!

NaturesWitness commented 11 years ago

Wow thanks for the quick response! I'm out of town for a few days but when I get home I'll try and use my PC to compile this. I've been on a bit of a nethack spree lately, have it on my phone. If you get a chance check out cata it's a lot of fun. It has a much more "open" vibe than nethack, but you don't really have the sense of a clear goal that nethack does. But you DO get to build your very own flaming sword from everyday items found around the home (that's something I added).

NaturesWitness commented 11 years ago

Hmm can't seem to get this to run, it compiled ok but when I try to run it I get: Program initialization has failed cannot load tiles bitmap Any idea how I can fix this? Or, if you get a chance, could you update the prebuilt .zip file?

matkoniecz commented 11 years ago

I am not sure is it something that was fixed here, but in UnNetHack (and probably also NetHack) you need to manually move generated tiles files.

Maybe it is necessary also here.

NaturesWitness commented 11 years ago

I'm not sure how to do this, i looked around online and couldn't find any instructions. How do I generate the tiles file? And where do I move it?

Chris-plus-alphanumericgibberish commented 11 years ago

Hello, again!

Darn, I was hoping that problem would turn out to be limited to my computer. The good news is that I know what the problem is.

Now that I know that others have this problem also, I'll see if I can fix it. Are you able to compile regular nethack, though? It seemed to me that the problem started happening when I switched from windows Vista to Windows 7. I don't think vanilla compiles properly for me either....

Anyway, what's happening is: when the graphical version of nethack (and dnethack) compiles, one of the last steps is the creation of a bmp with all the tiles to be used in the game. This bmp is named tiles.bmp and is created in the src directory. This bmp is then incorporated into the final executable.

For some reason, tiles.bmp is being created with two extra bytes in the header. The resulting file doesn't match the bmp format, so you get that error message when the game tries to read it and can't.

I will upload an updated version of the prebuilt zip later tonight. Otherwise, fixing the tiles.bmp is actually pretty straightforward, in a completely non-straightforward kind of way.

As I said, the problem is an invalid header, so you can fix the problem by manually fixing the header using a hexeditor. I use HxD, which can be downloaded from http://mh-nexus.de/en/hxd/

Once you open the file, the first line will probably read: 42 4D 00 00 78 D8 04 00 00 00 00 00 78 00 00 00

Here, the problematic bytes are shown in brackets: 42 4D 00 00 [78] D8 04 00 00 00 [00 00] [78] 00 00 00 The header has two extra zeros, and the two 78s indicate the length of th

The header can be corrected as follows: 42 4D 00 00 [76] D8 04 00 00 00 [76] 00 00 00 (It will note that deleting two of the zeros will change the length of the file, and ask you if you're sure. Changing the length of the file is the whole point, though :-) ).

The line will actually read: 42 4D 00 00 76 D8 04 00 00 00 76 00 00 00 28 00 as two bytes from the next line will rap around to the first.

NaturesWitness commented 11 years ago

Hooray, it works! Thanks for the info on how to fix the header, I would have never figured that out on my own. One question though, is it possible to make the tiles bigger? They feel a little small, is there a fairly straightforward way to change them from 16x16 to something like 32x32? I'm assuming I can't just slap a differant nethack tileset onto this (besides I kinda like this one), It'd just be nice not to have to change my desktop resolution every time I want to play.

NaturesWitness commented 11 years ago

I actually figured out how to do this myself, I can't believe it! I scaled up the image, and set the options in defaults.nh to use the new image instead of the default one. I'll have to start a character now and give this game a whirl! Especially with the unbreakable artifact lances, I really want to try a Knight for the first time!

One idea did occur to me; Maybe when eating the corpse of a rat-type monster, if your character is a dwarf you should get the "This is delicious!" message instead of the "This tastes terrible!" message. This is a Discworld reference, in case you're not very familiar with the series. On the Disc, rat is a very popular dish with dwarfs (especially with ketchup), and this could be a fun little easter egg. I'm not sure if you're really looking for ideas from other people or not, I know this isn't a crowd-based project like Cataclysm.

Chris-plus-alphanumericgibberish commented 11 years ago

Well, it isn't crowd-based but I'm always interested in new ideas. This motivated me to open up a YANI(1) page in my area of the nethack wiki, which I had intended to do for a while but hadn't gotten around to yet. You can also drop by the #dnethack irc channel on freenode.net, and should probably check out unnethack and the #unnethack channel (where I also hang out, and which is a lot more lively than my channel :) ).

1) Yet Another New Idea, the traditional way to mark new ideas in nethack circles.