So I've been away for a while. I tend to shift between games, sometimes strategy, sometimes RPG. After Uukrul I did Rise of Nations for a while (and am still doing some of it now). Currently I'm looking at Castles II: Siege and Conquest. I haven't really looked at Uukrul in a long time. But some comments about past posts:
It's stored in this strange manner where everything is in these particular two values and based off adding all the values together. Well, I feel like I read about it somewhere before but I can't remember where it's called
Ufthu = 1
Drutho = 8
Golthur = 64
Fshofth = ??? (haven't figured it out yet)
So if you wanted Ufthu level 3, Drutho level 2 and Golthur level 1, you would do
1 x 3 + 8 x 2 + 64 = 83
which in Hexadecimal would be 53
What throws me off is when the value gets bigger than FF and I have to use the 2nd field, which always seems to screw things up for me. Must be an Endian storing thing.
I assume the Magician Rings work the same way.
Yeah basically it's just storing multiple fields within one byte. Back then space was a premium so games tended to store multiple things together, especially if they didn't need the entire set of 256 possible values for a byte. So in trying to figure things out, sometimes it's more useful to think in terms of bits rather than in terms of a byte, which consists of 8 bits. In this case, possible values only range from 0 to 6, which only needs 3 bits to store. So the first 3 bits are for Ufthu, the next 3 bits are for Drutho, the last 2 bits plus the first bit of the second byte is for Golthur, then the next 3 bits for Fshofth. Or you can think of it as a two-byte field (in little endian, i.e. small byte first), in which case the value is:
1 * Ufthu +
8 * Drutho +
64 * Golthur +
512 * Fshofth
so level 6 in all spells would be a total of 3510, which would be stored in hex (little endian) as 0xB6 0x0D.
The magician disciplines are the same, i.e. terms of a two-byte field, the values are stored as:
1 * fire +
8 * frost +
64 * protection +
512 * healing +
4096 * knowledge
so level 6 in all disciplines would be a total of 28086, or 0xB6 0x6D in hex.
BTW I'd be wary of bumping up the stats past their allowable values -- not that you can't, but it's unclear how this game (or any game) might handle them. I think in Curse of the Azure Bonds there were definitely some weird effects if the stats were past 25 (I think), and you also have to consider that the field may be signed, which means that too high of a number might make it negative as far as the game was concerned. So it's possible for example that setting Intelligence to too high of an allowed value may have had some unintended side effects.
So I know this is a somewhat late addition to Vanshilar's good work, but I've been playing with Uukrul in a memory editor on and off for a while now. Some things (Psychic/Virtue points, health, etc) are pretty easy to find. Some, however, always eluded me.
What memory editor do you use? I use HxD editor to open up the memory of a game opened in DosBox, but it's a pain looking for (for example) the values that changed when I did something. I'm not sure if there's an easier way. It's good though if I already know what the values are for the field I'm looking for, such as character names.
What I've found is that for many of the game's values, the game stores them in memory in the REVERSE byte order that you'd expect. It also seems like it's not quite a standard hex.
For example, looking at my Priest's experience right now, it's hex value is
29 10 53 00
But the decimal value as displayed by the game is 531029.
Yeah it's called
endianness -- basically, due to how a computer read/writes to/from memory, many programs (especially from the DOS era) have the "little" values stored first, even though we (humans) read the "big" values first. In Uukrul, in a lot of cases they seem to have converted the numeric values into ASCII values and then stored
those values instead, rather than storing them in hexadecimal form, but maintaining the endianness. No idea why. So it's basically in ASCII decimal, little endian form. But yes, some things like money, experience, etc. are stored in this way, while other things like HP and stats are stored in the traditional hexadecimal way (though still in little endian).
Fortunately, it's rather easy to find once you find it on one character - from the byte that holds the first letter of the characters name, the experience value goes from +21 to +24 (decimal) bytes from that address . You can edit as needed and walk in to get all your rings the first time you find the temples/circle.
If it's in the same format as the save game file, that region of memory probably looks something like this:
(format is the number of bytes, then what that field does)
1 Number of letters in the character's name
11 Character's name
2 Unknown
2 Gender (0 = female, 1 = male)
2 Title (0 = Berserk, 1 = Warrior, 2 = Guard, etc.)
2 Current HP (in hexadecimal, little endian)
2 Max HP (in hexadecimal, little endian)
4 Experience (in ASCII decimal, little endian)
2 Skill level (in hexadecimal, little endian)
2 Virtue/Psychic points (in hexadecimal, little endian)
2 Dexterity (in hexadecimal, little endian)
2 Piety (in hexadecimal, little endian)
2 Intelligence (in hexadecimal, little endian)
2 Vitality (in hexadecimal, little endian)
2 Strength (in hexadecimal, little endian)
2 Number of items carried (in hexadecimal, little endian)
36 Item information for up to 18 items (2 bytes of data per item)
2 Current encumbrance (in hexadecimal, little endian)
2 Max encumbrance (in hexadecimal, little endian)
2 Current armor (in hexadecimal, little endian)
2 Shield armor bonus (in hexadecimal, little endian) (guessing on this one, it may store something else for the second byte)
2 Spells available (using format above)
2 Prayers available (using format above)
2 Unknown
3-4 How many times character has received level-ups; note this is what determines the XP needed for the next level
This is how the information is stored in the save files (from byte 0x0080 to byte 0x01FF), and since save files are typically (or at least sometimes) just directly a memory dump, it's probably the same way in memory.
3) Intelligence does not affect the rate of ring acquisition, despite what the book implies. Ring awards are based on experience, NOT directly on level. This is why you'll sometimes get new rings in the middle of a level. Got to the Circle, and tested. I get the Copper ring of Fire at 900 experience. This happens regardless of my Intelligence value. So it does not appear that a higher Intelligence grants you rings at an earlier experience total.
Yeah, that was what I found too. Sometimes what the manual says doesn't line up with how the game works, unfortunately.
I'll keep fooling around and see what else I can dig up. If people have suggestions for experiments, feel free to post and I'll try them.
I kind of forget...is food consumption something that is constant? I.e. every 4 steps or something. If so, you can essentially count up how many turns you did by how much food decreased. Not particularly important, though, but might be nice to have some rates.
Anyway, lately I've been focusing on figuring out the save game format for Castles II: Siege and Conquest. I've put some of what I've figured out here:
http://www.shikadi.net/moddingwiki/Castles_II:_Siege_and_Conquest_Save_Game_Format
I've also been looking into its game mechanics, but I'm not sure where is an appropriate venue for that info. Despite this site's name, are there people here who play strategy games like Castles II: Siege and Conquest and would be interested in exploring its mechanics? I'm not sure if it's worth starting a thread to talk about the game.
Additionally, I did start working on figuring out Uukrul's save game format a while back, so I have some of it figured out. The save game is 2560 bytes long, fixed size, so it's just a matter of figuring out what field each byte corresponds to and it's not all *that* long (for Castles 2 the save file is 11682 bytes long). Should I post what I got on that site and/or elsewhere for Uukrul as well? It's a wiki so anybody else can also add to it as they figure out how the save game works. The save game does have a checksum of sorts (bytes 0x024E and 0x024F) to prevent people randomly changing its contents, but (for example) figuring out how that is calculated would make editing the save game file a lot easier.
For me, the difference between Castles 2 and Uukrul is that I played Castles 2 growing up, so I've beaten it multiple times using multiple strategies so I can give input on not just how the game works but also how to beat it, and I"m familiar with most aspects of the game already. For Uukrul, being a game that I found only relatively recently, I haven't really played it through so there's bound to be large gaps in my knowledge about how the game works. So I'd be a lot more help for a game like Castles 2 compared with something like Uukrul.