This page describes how to easily hack a
Macintosh port of the classic game "Rogue" to stop it from deleting your
save files.
I'm certain it will come in handy for the four people who actually play it. | ||
|
IntroductionNot to mention that one misstep forces you to start over from the beginning. "Rogue," like many of its descendants, allows you to save the game only grudgingly -- it allows you to save only so that you don't have to play through at one sitting; forces you to quit whenever you save; and immediately deletes your save-file the next time that you reload. The net result is that you only get one chance at life in a game where basically everything is deadly. It's like the "hardcore" mode of Diablo II, except there's no "normal" mode, and everything's five times as hard. This handy little hack addresses that, giving you the ability to at least permanently save the game.
Why Is This Necessary?Actually, no. Rogue is awfully strict about saved games. It stores (among other information) the name of the save file, the date it was created, and the time it was last modified within the file itself. If any of those (or other information) differ from that of the file itself, the save file will fail to work. This means that any copy of the file will automatically fail (different creation time; different name). Any hacked saved file will fail (different modification time, unless you've taken the precaution of hacking that too). Stopping Rogue from deleting the save file is the easiest way to bypass these barriers; the save file itself won't actually change, so all of the checks will remain valid.
You Will Need:
To Work!
Let's rename it to something a little more dignified:
... That's better. Alright, now we're going to open up ResEdit, and open that copy we've just made:
Double-click on the "CODE" resource. Double-click on the file with ID 1, the one labeled "Source."
ResEdit will open up the hex editing screen:
"Hex editing" refers to the process of handling the raw data stored on the computer, by the way. "Hex" is short for hexadecimal, or base 16 -- the way the code is displayed in the central column. Here's where you have to be careful, because you're messing around with the instructions the game sends your computer. Stay with me, though, and you'll be fine. Choose "Find Offset" from the menu --
-- and type 004B7A (those 0's are zeroes):
ResEdit will scroll down and highlight the letters "4E". Use the mouse to select not only that, but also the following six letters, so 4E56 FFDE is highlighted:
... and type 7001 4E75 to replace them. (Those 0's are also zeroes.) The window should look like this:
That's it! Save the file and quit out of ResEdit! You've hacked Rogue! "Uh, wow! What did I just do?" You told the game to return from subroutine (4E75) after putting the value 1 (01) into the return register (70). This aborts the process that usually deletes the save file, and fakes the program into thinking the file was deleted successfully. (The code you replaced was the beginning of the process that does the work. The rest of the subroutine is still there, but will never get called.)
How To Use This New Toy
But Isn't This Cheating?If it is, it's not a very good cheat, though, is it? It doesn't double your strength, give you Genocide Scrolls, raise your level, restore your HP, identify your magic items (well, OK, it can do that), or start you off at level 26 right next to the Amulet of Yendor. I prefer to think of it as "evening the odds." Considering that there are people who have played for decades without ever once winning, I don't think a little odds-tweaking is such a sin. Alternately, here's something to think about: What is the purpose of restricting saved games in the first place? It seems apparent that the function of that is to enhance realism -- to more accurately simulate the way life seems to work by enforcing a "you only live once" paradigm. After all, when real-life spies get shot by real-life counteragents, they don't rewind the clock half an hour, replay those events, and duck to the left instead of the right, thus surviving the previously fatal bullet. However, putting this paradigm in a game is an enterprise doomed to failure. The only way to actually enforce this is to make a game that only allows its user to play it once. But that realistically can't be done: A game that uninstalls itself after play can be re-downloaded; a secret file placed on your hard drive can be discovered, or wiped out by a system reinstall; nearly any scheme can be defeated by having someone install the game on multiple computers (buying additional copies if necessary); and even some sort of hypothetical system where every person alive could only buy one copy of the software, and every copy is tracked by (i.e.) social security number, can be defeated by buying someone else's unused copy on the black market, and having them set it up for you. Even Rogue acknowledges this: The game doesn't end when you die. It just resets you to the start conditions and lets you keep right on playing. If you die on Level 2 of the dungeon, the only effect of not being able to save is to cost the player about 5 minutes. Even a high-level death has no greater incidental cost than the time it takes to get back to where you were: unlike a game of, say, Solitaire, every game of Rogue is theoretically winnable, since it's all generated on the fly, and it's impossible to rule out the possibility that every subsequent random decision will be in the player's favor. In other words, you will always (eventually, if you simply keep playing) reach a game where luck favors you. You will always, given sufficient time, be able to get back to where you were. Sure, you might reach Level 22 with a +3/+3 Vorpal Longsword instead of a Wand of Lightning, but when it comes right down to it, every Level 22 character looks a lot like every other Level 22 character. The only practical difference that restarting from a saved game instead of from scratch makes is that you save a heck of a lot of time. Saving time has no game effect; you don't get bonus points for clearing three levels in ten minutes. So what makes reloading a Level 22 character any different from using a program like Rog-O-Matic to automatically play through until it reaches Level 22, then hand control over to you? What makes that any different from hiring 1,000 people to play repeatedly until they can give you a Level 22 character? What makes that any different from sitting down yourself for several months and getting 50 characters to Level 22 before saving the game for later use? Only the time you spend. I may not be able to claim the moral high ground for hacking Rogue to save me time, but personally, I'd rather have the time than the moral high ground. Your mileage may vary. Questions? |
Up to misc index |
Please report errors or broken links to us via the Contact page. Page created Feb 15, 2002 . Design (c) 2000 Tad "Baxil" Ramspott. |