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 figured out the format of player.u0? Looking at it in a hex editor, it doesn't seem to be just a simple sequence of numbers, unfortunately.
This question / problem has been solved by Mishiranuimage
I haven't, but here is something to consider:

The game was originally written in Applesoft BASIC for the Apple ][. In Applesoft BASIC, any variable whose name does not end with a $ or % is a floating point variable; therefore, it is quite likely that the game uses single precision floating point to store your stats.

(For those curious, $ indicates a string and % indicates an (16-bit signed) integer, but % isn't used often in actual code.)

So, maybe you could search for your stats as floats rater than ints?
I'm suspicious of that. Food may be a float, since it decrements fractionally in dungeons, but player qualities/stats always have integer values despite the lizard man spell's dividing them by two after it multiplies them by five.

What I should really do is compare saves with minimal changes between them; probably starting by seeing the effect of spending one piece of Gold. But I'm not quite motivated enough.
avatar
Document: I'm suspicious of that. Food may be a float, since it decrements fractionally in dungeons, but player qualities/stats always have integer values despite the lizard man spell's dividing them by two after it multiplies them by five.

What I should really do is compare saves with minimal changes between them; probably starting by seeing the effect of spending one piece of Gold. But I'm not quite motivated enough.
Floating point numbers are sometimes used even when it doesn't make sense for numbers to be fractional.

According to your post in the other thread, it is possible to get stats over 9 million. In Applesoft BASIC, the largest value an integer variable can store is 32767, so the variable could not possibly be a 16-bit integer; hence, the only possible data type would be a float.

Also, there is a function that can truncate the values, allowing them to remain as integers.

Anyway, I found the actual source code online, and the corresponding line of source code is:

1695 PRINT "YOU HAVE BEEN TURNED": PRINT "INTO A LIZARD MAN": FOR Y = 0 TO 4:C(Y) = INT (C(Y) * 2.5): NEXT : GOTO 1090
In other words, the game (at least the original version) doesn't "multiply by 5 and divide by 2"; it actually multiplies by 2.5 (which will yield an exact result unless the number gets too big to be exactly represented). I note that C is a float (because int variable names must end with %), and so is the loop index Y.

There *are* a few integer variables in the game's source code, but they appear to be used only for the big arrays (like dungeon data) where it was necessary to conserve RAM, but not for scalar values like your stats.

Conclusion: The original version did, in fact, use floats to store your stats, and it is hence likely that the remake does as well.
Huh. The 1998 version still seems to use integers in some places, since it only seems to recognize 32-bit integers as lucky numbers. But the behavior there is a bit weird too, and there's the evidence of the save file. I guess the best approach might be to look for floats, then; thanks for the correction.
Post edited January 26, 2017 by Document
avatar
Document: Huh. The 1998 version still seems to use integers in some places, since it only seems to recognize 32-bit integers as lucky numbers. But the behavior there is a bit weird too, and there's the evidence of the save file. I guess the best approach might be to look for floats, then; thanks for the correction.
I don´t know if you mean this Game https://www.gog.com/game/akalabeth_world_of_doom

but the Gog User COREYROTH says that he is the Person wich ported the PC Part of the Game. So it maybe a good Idea to ask him. Some Info about the Game is in the First (his) review of the Game on the Gog Game Page.

I hope that helps you
Post edited January 29, 2017 by Gleacer
A bit late to the conversation, but I just started playing Akalabeth, and got interested in the format of the Save Game file. This is what I have figured out so far, by experimentation:

The data is arranged in 4 byte words:

Hex
address : Value
00 to 03 : Hit Points
04 to 07 : Strength
08 to 0B : Dexterity
0C to 0F : Stamina
10 to 13 : Wisdom
14 to 17 : Gold
18 to 1B : Food
1C to 1F : Rapiers
20 to 23 : Axes
24 to 27 : Shields
28 to 2B : Bows & Arrows
2C to 2F : Amulets
30 to ?? : Name (up to the first Space character)
48 (to 4B): Class - 46 (ascii F) for Fighter and 4D (ascii M) for Mage
4C to 4F : ? - always 0
50 to 53 : Difficulty Level
54 to 57 : Position X
58 to 5B : Position Y
5C ... : ?
68 to 6F : ? - always 0
70 to 73 : Quest target - see below
74 to 77 : 01 = First quest given by L.B.
78 ... : ?

Within the 4 byte words, the bytes are arranged in 'Little-endian' format, i.e. the first byte is the least significant value - see Wikipedia: Endianness for more about that (can't post a link to the page).

The values translate straight from hex to decimal integers, I haven't seen any evidence of floating point values.

The Class value in address 48 can be overwritten by a long Name.

The value in 70 (to 73) is the Number of The Beast ... that you have to kill in the quest given to you by Lord British:
1=Skeleton, 2=Thief, 3=Giant Rat, 4=Orc, 5=Viper, 6=Carrion Crawler, 7=Gremlin, 8=Mimic, 9=Daemon, A=Balrog.
When you complete each quest, the value becomes negative. e.g. for an Orc:
pre kill value = 04 00 00 00, post kill = FC FF FF FF ( -4 ).

I gave up trying to figure out the rest. The value in 78,79 seems to increase steadily as you go deeper in the dungeon and kill more greeblies, but it's not a simple kill count.


dtgreene, you mentioned that you found the source code - I'd be very interested to see that. Could you point me to it please?
Post edited April 13, 2017 by Mishiranu