It requires at least 2,160,000 XP and exactly 176,000 GP to afford an "arch mage" in this game. Your other characters (except for a monk) will be level 22 at least by the time you build one.
Character data (and party data) are stored on the character disk, starting at track 00, sector 0C on the Apple 2e version. Unlike in the other versions of BT I've seen, XP and GP are serialized, i.e., stored, as decimal digits, rather than as hex values. There's room for 2 characters (or parties) per sector.
A Character record starts with the character's name, in ascii, terminated by FF.
XP is stored in eight bytes startting at byte 18 hex. (byte 24 in the decimal system).
For example, if a character has 2,314,100 xp, those bytes will be:
Code: Select all
00 02 03 01 04 01 00 00
Gold is stored in eight bytes at byte 28 hex (40 decimal) of a character record, using the same "encoding."
This means the maximum amount of XP you can store on the disk is 99,999,999. That's most likely higher than what the game engine can actually process, but theoretically it's enough to get a paladin to level 491. The game system should utterly break down long before that, though.