Scroll Lock and Rogue

In the recent mailbag article on the Scroll Lock key, at http://www.straightdope.com/mailbag/mscrolllock.html, Una states:

I beg to differ!

For one, Rogue was originally a Unix-based game. It was only ported to MS-DOS after it caught on in the Unix world. (Much in the same way that Crowther & Wood’s Adventure started out on the PDP-7 or PDP-11 and later found its way onto home computers.)

For another, the Scroll Lock key in my old old old copy of PC Rogue 1.1 (which required the brand-new-at-the-time MS-DOS 2.0 operating system to run) does not “scroll” your movement through the ASCII dungeon. It toggles Fast Play mode on and off. When the mode is off, pressing one of the arrow keys causes your character to move one “square” (i.e. one ASCII character position) in the direction you pressed. When the mode is on, pressing one of the arrow keys causes your character to keep moving in that direction until something interesting happens (you see a monster move, you run into a wall or a door, something shoots at you, etc.). Moving with Fast Play mode engaged was subtly different from holding down the SHIFT key and pressing an arrow key, which caused your character to move in that direction until he ran into a wall or got attacked.

Incidentally, there was a little “bug” (perhaps intentional) in that old version of PC Rogue that allowed me to cheat royally. Food rations were considered weapons with a +4096 to-hit bonus and a +4096 damage bonus. If you were wielding a food ration when you took a swing at a monster, you would never miss, and you’d always do more than enough damage to instantly vaporize said monster.

I loved that little trick so much I decided to take advantage of it and test the limits of the game. Normally, you’re supposed to retrieve the Amulet of Yendor on dungeon level 26, then return to the surface and win the game. I retrieved the amulet on level 26 and kept going down. I discovered that monsters gained an extra “hit die” (1-8 hit points plus a +1 to hit you) and an extra point of Armor Class (-1 for you to hit them) for every level I descended. Eventually around level 1000 or so, monsters got so many hit points from all these extra hit dice that the +4096 damage of a food ration wasn’t enough, and I had to hit them twice with a food ration to kill them. At around level 2000, I started having to hit them three times, and they started (sporadically) being worth negative experience points when you killed them. (The experience point value calculation used a 16-bit signed integer, which “wrapped” around at 32,767 – add 1 to 32767 and you get negative 32768.) By level 3000, monsters were worth positive experience points again, but now they required four hits with food rations to kill. Finally, a little while after level 4000, the monsters’ armor classes got so high that even the vaunted +4096 to-hit bonus of the food ration was not enough to overcome them, and every time I swung at a monster I missed – so it was impossible to kill anything from then on.

Oh – and, as I predicted, when you went below dungeon level 32767, the dungeon level numbers “wrapped” around, and you found yourself on level -32768. Unfortunately, this meant you were now “above” the lowest level on the dungeon you’d previously explored, so the game generated no new items for you – no new gold, no new weapons, no new armor, no new potions, no new food. Even with a ring of slow digestion on each hand, you quickly starved to death.

I spent several woman-months playing Epyx Rogue back on a monochrome IBM laptop. And then on a Tandy (hey kids, remember President Reagan? Tandy computers? Jordache stirrup pants? Madon - oh wait, she’s still around, isn’t she?)

The Scroll Lock key did toggle fast play, but I considered that “scrolling” through the dungeon. This at least is a case where I had personal experience with it, but I call it “scrolling”. I guess some people might not.

And if you’re so smart, what’s the wizard’s password on Epyx Rogue? Huh? Huh?
[sub]Please tell me…I never found it. Although I did discover a different cheat which got me to level 50 or so until I lost patience with it…[/sub]

Dunno. Many many times, I typed “D” to engage Wizard Mode in PC Rogue, and typed out some new clever guess when it asked me for the wizard’s password. And every time, it merely responded with, “Hmmm, were you ever as smart as Ken Arnold?”.

Of course, when a build of Hack (later renamed NetHack) came out for the PC, going into Wizard Mode was a simple matter of putting a -D on the command line.

I used to play Rogue for hours when I was bored in school, on my HP 200LX palmtop. Rogue was one of the few truly spiffy games that would run on a monochrome CGA-compatible 186-based DOS computer (but on the plus side, the whole thing was the size of a thick checkbook and would fit in my pocket, so it was all good) without playing goofy music (I’m looking at you, Commander Keen!) and alerting teachers. Tracer, you’re my new hero for mentioning that food ration trick. Of course, you’re also evil and bad, because now my Rogue addiction will flare up again and I’ll be reduced to wandering around on the street dressed in cursed leather mail and begging for slime-molds.

Most rogues seemed to have some sort of cheat. In the UNIX version I played on an old 3B20, using an arrow as a weapon also gave some gigantic hit bonus. I went under the level of the Amulet also, but I must say I never went quite so deep as tracer.

That version didn’t use arrow keys - you moved with the same controls one would use in vi, l for right, etc.

tracer, by the way, how did you get all the way down to level 32767 (and beyond) when you couldn’t hit any of the monsters after level 4000? Just by fleeing from monsters? Doesn’t seem like that would be enough to get you past 28,000+ levels … but it would be cool if it was. So, what’s the scoop?

How did I get down below level 4000?

Well … er …

… I found where the level number was stored in the save file, and used a binary editor to change it to 0x7FFF (decimal 32767).

Incidentally, this gave me another option for surviving the dungeon depths – in one place in the save file, all of the monsters that can appear are spelled out as letter names in order of the level they first appear on. If I replace any of those letters with a space character, that monster doesn’t appear at all.

Okay, tracer, you’re now my hero. I looked at the Rogue saved files once, and it was pretty unintelligible (I also couldn’t figure out why each saved file would need to take up 40K, which was nearly the size of the game executable – but perhaps that was peculiar to my version of Rogue), so … well, I’m very impressed.

The original PC Rogue just blankly flushed its global variables to disk by leveraging a couple internal variables that the linker manufactured for the executable. Since DOS didn’t have an executable linker (it just had copious amounts of ass, so if you needed ass you had a surfeit) it would have been much harder to do that trick, but it could be done by centralising the globals and sticking two fake variables at the ends.

It was mostly unintelligible for me, too, but that didn’t matter.

Since I’d descended to, say, level 2079, all I had to do was look for the two-byte representation of 2079 in the save file. 2079 in decimal is 81F in hexadecimal, and since the Intel CPU is little-endian, the memory representation of it would be 1F 08. So I looked for 1F 08, changed it to FF 7F – the Rogue save files didn’t have a checksum or anything to prevent a cheater like me from getting away with this – and ran the program with that newly-altered save file. If I’d picked the correct 1F 08, I’d be on level 32767. If I’d picked the wrong 1F 08, I’d still be on level 2079, so I’d quit the game and change a different 1F 08 in the save file until it worked.

Oh – and since DOS’s copy mechanism preserves the timestamp of the original file, I could make as many backup copies of the files as I wanted to and PC Rogue couldn’t tell that I’d cheated. (Unix versions of Rogue typically compare the timestamp on the save file with a timestamp stored in the file itself, and if the file’s timestamp is later the program assumes the user was cheating and quits.)

I hacked my copy of Rogues so all the monsters did zero damage. The monster damage was stored in ASCII in the executable, so it was easy.

Manduck: That wouldn’t prevent the monster from doing, say, Vampiric permament-hit-point-draining or Medusan confusion, though, would it? Those become pretty important down below level 1000.

tracer, you are correct and that was a source of frustration for me.

Manduck: For the ornery monsters that do more than just plain old damage points (V, M, A, etc.), there’s a way you can hack the PC Rogue save file so that those monsters never appear at all.

There’s one place in the file that lists the monsters’ capital letter names in the order they appear as you descend through the dungeon, e.g. EHIBSKORQZCALWYFTNUPGXVMJD (or something like that), with X,V,M,J, and D being last because you don’t encounter them until you get down close to level 26.

If you replace any of these monster letter-names with a space character (hexadecimal 20), that monster will never appear!

Now ya tell me :smiley: I haven’t played Rogue in a good 12 years. Thanks, though.

BTW, didja also notice what happens when you drink a potion of raise level when you’re already 20th level? Your experience level goes back to 1st level, but your hit points don’t go down. Kill one monster and, boom, you’re back to 8th+ level with a huge gob of extra hit points!

Just be careful not to quaff a potion of raise level at 20th level when you’re down so deep that the monsters are worth negative experience points. You’ll stay at 1st level for a long time. And at 1st level, your hit point recovery rate is abysmally slow. (At 20th level, your hit point recovery rate is so high that you actually heal faster without a ring of regeneration!)