It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Has anyone tried to determine an ideal "lucky number" for Akalabeth?

Ideal would be giving Strength, Dexterity and Stamina of 24, and Wisdom of 4 or 5. By my calculations, the probability of that is about 1/96809; low enough to deter me from trying a manual search, but maybe there's another way? Is there a way that Dosbox could be scripted to run the game repeatedly with different numbers and store the results?

Edit: I guess if you really wanted ideal stats, it's probably possible to just edit player.u0 in Akalabeth 1998 to set them to 9999999. (And it's easy enough to use the amulet in-game to get the critical three to 9999792.) But I'm not sure how to do that either; and in any case I'm still moderately curious.
Post edited March 26, 2017 by Document
No posts in this topic were marked as the solution yet. If you can help, add your reply
I just always used the same "lucky number", then wrote down the sequence of resulting dice rolls. That let me use the amulet to jack up my stats pretty quickly.

That probably should've been the moment when I stopped playing because it just wasn't fun anymore. The joys of being a completionist...
avatar
Document: Has anyone tried to determine an ideal "lucky number" for Akalabeth?

Ideal would be giving Strength, Dexterity and Stamina of 24, and Wisdom of 4 or 5. By my calculations, the probability of that is about 1/96809; low enough to deter me from trying a manual search, but maybe there's another way? Is there a way that Dosbox could be scripted to run the game repeatedly with different numbers and store the results?

Edit: I guess if you really wanted ideal stats, it's probably possible to just edit player.u0 in Akalabeth 1998 to set them to 9999999. (And it's easy enough to use the amulet in-game to get the critical three to 9999792.) But I'm not sure how to do that either; and in any case I'm still moderately curious.
I just go random and get a different dungeon. stats can be rolled again and again.(probably a cheat) the number I use sometimes as an Ultima II joke is 666(Satan) the coordinates for Earth in that game. the number is the devil's paradise for a reason. for one thing no ladders on certain levels. namely 1 and 2 that go down! so you MUST use the amulet and turn in to a Lizard man or risk turning into a toad to go down! if you have a wisdom of 100 or some such it seems not any less likely of turning into a toad. as a wizard you have more control. you cannot use bows nor rapiers and even wizards can backfire depending on this for ranged attack.(I refer to the 1998 version, not the offshoot offered directly from Galaxy that is not LB's original either!) I have also used my age resulting in crappy dead ends in dungeons that lead nowhere and no ladders on level 4 and 5. I believe LB probably wanted players to use a number from 1-10 but I could be wrong. 13 results in an imediate fight with a mimic a deamon and a balrog, no little guys! it isn't hard to do, just keep plunging starting shallow and going deep you gain HP when you surface depending on what and how many you kill. use the amulet to turn in to a lizardman I think that is a necessity not a cheat. LB wanted us all to be Lizardmen on our test of Knighthood.
It's actually possible to manipulate the RNG in this game. Here is one way to use it to break Akalabeth:
* Start the game with the same settings (including lucky number) every time. Play as a mage so you have some control over the amulet.
* Work out a sequence of moves that gets you to the dungeon with an amulet. Remember this sequence.
* Once in the dungeon, use the amulet to transform. Note what happens in this instance.
* If you turn into a lizardman, you can now force this to happen by repeating the exact same sequence of keystrokes. (Make sure the lucky number and difficulty are the same.)
* If you do not, start over, use the same key strokes, but skip a turn before using the amulet. If that doesn't work, try skipping another.

In any case, because the sequence of random numbers is the same for any given lucky number, you can manipulate the RNG by taking advantage of that fact.

The speedrun of this game uses a method of this sort, though the player did not try to hunt for the ideal lucky number.

By the way, I found the BASIC source code and the game literally does the BASIC equivalent of srand(lucky_number);. In other words, the lucky number is used to seed the RNG, meaning the player has control over the random seed in this game.

(Note that different versions of the game may have different RNG algorithms, so the same lucky number may give you different results in different versions.)
avatar
iiago: I just always used the same "lucky number", then wrote down the sequence of resulting dice rolls. That let me use the amulet to jack up my stats pretty quickly.

That probably should've been the moment when I stopped playing because it just wasn't fun anymore. The joys of being a completionist...
(Oops, didn't read this before posting.)

The speedrun of the game does this.

By the way, people have managed to manipulate the RNG in more complex games, including Dragon Warrior 1 and the NES version of Ultima 3.
Post edited April 17, 2020 by dtgreene
avatar
neosapian: even wizards can backfire depending on this for ranged attack.
Been a while since I played, but I didn't remember that happening. I guess I'll have to watch for it if I ever go back.
avatar
neosapian: it isn't hard to do, just keep plunging starting shallow and going deep you gain HP when you surface depending on what and how many you kill.
It gets slightly harder when you start running into Gremlins.
avatar
neosapian: use the amulet to turn in to a lizardman I think that is a necessity not a cheat. LB wanted us all to be Lizardmen on our test of Knighthood.
I don't remember needing it last time I played. I just made sure to start with decent stats, map the dungeons so I could navigate efficiently, and watch my food and health. I'm sure it'd be harder on the slower Apple II version; but without a save system, becoming a lizard man (let alone a 13th-order one) was harder too.
avatar
dtgreene: The speedrun of this game uses a method of this sort
Any link? I hope "speed" was calculated by number of turns rather than clock time spent.
avatar
dtgreene: By the way, I found the BASIC source code and the game literally does the BASIC equivalent of srand(lucky_number);. In other words, the lucky number is used to seed the RNG, meaning the player has control over the random seed in this game.
So you might be able to just find the source code, find the compiler that was used, and loop the relevant parts til you find the seed that produces the right numbers?
avatar
dtgreene: The speedrun of this game uses a method of this sort
avatar
Document: Any link? I hope "speed" was calculated by number of turns rather than clock time spent.
https://www.youtube.com/watch?v=Jbapd77NaTI

(It's worth reading the video description, as it has an explanation of the run.)

Speed was actually measured via clock time. Thing is, to do this run, you basically memorize an input sequence that gives you victory and input it as fast as you can (but not faster than the game can process it).
avatar
dtgreene: By the way, I found the BASIC source code and the game literally does the BASIC equivalent of srand(lucky_number);. In other words, the lucky number is used to seed the RNG, meaning the player has control over the random seed in this game.
avatar
Document: So you might be able to just find the source code, find the compiler that was used, and loop the relevant parts til you find the seed that produces the right numbers?
The original Apple 2 version was written in Applesoft BASIC, so to analyze the game in this way you'd need to either emulate an actual Apple 2 or reverse engineer the RNG that Applesoft BASIC used.

According to
[url=https://tcrf.net/Akalabeth:_World_of_Doom_(DOS,_1996]https://tcrf.net/Akalabeth:_World_of_Doom_(DOS,_1996[/url])
the unofficial port was written in QBASIC (or might have been QuickBASIC, since it mentions "compiled"), so one would need to know the RNG for that port to anaiyze this way.

By the way, if you have the GOG version installed, look in the data directory and you'll find a file called AKLABETH.BAS
Guess what that file contains?