View Single Post
Old 11-10-2015, 08:59 AM   #145
Vanshilar
Abandonia nerd

 
Join Date: Mar 2009
Location: Los Angeles, United States
Posts: 81
Default

So one thing from digging into the saved files. Something I noticed from playing is that it's hard to hit Admin 8 and 9 through tasks (I almost always end up getting them from plots instead). So I looked at how the ability point (Adm/Mil/Pol) increase system works.

Basically, when a task is successfully completed, it adds points toward increasing the ability points. The exceptions are Scout, which seems to not increase points, and Merchant, which preliminarily (still testing it) seems to only add half (round down) the number of points (so if you committed 5 to Merchant, you'll gain the equivalent of if you had committed 2). The points for a task in its own area is doubled. So if you "Gather Food" with 4 points in Adm, 3 in Mil, and 1 in Pol, hereafter referred to as (4, 3, 1), you'll gain (8, 3, 1) toward increasing your ability points -- the points for Adm is doubled because "Gather Food" is an Adm task. When the accumulated points for an area is equal or greater than the threshold needed for the next value, you'll gain an ability point and that amount is deducted from the accumulated points. Thus, any overflow beyond what you needed is carried over to help with the next ability point.

To reach each level, the points needed are:

Code:
Point Adm  Mil  Pol
1       0    0    0
2      20   20   20
3      20   20   20
4      30   20   20
5      40   30   20
6      60   50   40
7      90   60   40
8     125   80   50
9     140   90   70
10   9000 9000 9000
You can't really hit 9000 so yeah you're limited to 9 points max. By the way, these values are 0x198F1 to 0x1992C in CASTLES2.EXE. I don't have any special insight into the .EXE file, I simply looked for those values in the .EXE once I had pretty much figured out most of the above table.

Anyway, the big problem seems to be that the programmers used signed rather than unsigned 8-bit integers for your accumulated points. This isn't a problem for Mil or Pol. However, for Adm, once you reach Adm 7, you need 125 or higher to hit Adm 8. But because it's a signed integer, if you reach 128, the game thinks that's actually -128, and so you won't be able to move to the next Adm point. Same for any number above 128, until you reach 256, at which point it becomes 0. So to reach Adm 8, your accumulated points needs to reach between 125 and 127. Since this is hard to control precisely, more likely than not you'll skip over this window, until the number wraps around again for another shot. Thus, it's difficult to reach except via plots. And for Adm 9, because you *can't* hit 140 using a signed 8-bit integer, you're out of luck; you'll only get it through plots.

To fix this is pretty simple; you can simply edit those values in CASTLES2.EXE to something like (say) 105 and 110. Since you can only gain a maximum of 16 to your accumulated points from one task (at Adm 8), this will prevent this problem. This is simply a matter of changing byte 0x198FF from 0x7D to 0x69, and byte 0x19901 from 0x8C to 0x6E. It's also possible that the CD version of the game fixed this bug; I'm using the diskette version.

If anyone has a different experience (i.e. had no problem getting Adm 8 and/or Adm 9 from tasks), please let me know and more importantly, have a save game if possible so that I can take a look at it. It's also helpful if you know what version of the game you have (diskette or CD). Thanks.

Last edited by Vanshilar; 11-10-2015 at 10:05 AM.
Vanshilar is offline                         Send a private message to Vanshilar
Reply With Quote