BTII - Character Details
Posted: Mon Jan 18, 2021 1:41 pm
The game stores characters in memory accordingly:
$B800: Character slot 0
$B880: Character slot 1
$B900: Character slot 2
$B980: Character slot 3
$BA00: Character slot 4
$BA80: Character slot 5
$BB00: Character slot 6
I loaded my character in slot #6 and discovered the following:
My notes on this so far:
- BB10 to BB13 use a combined value, probably bitfields, to store the character's six stats: The 5 we see on the screen, plus their initiative value. Seting these 4 bytes to FF changes the 5 visible stats to 31, and presumably maxes out the initiative value too.
- The experience and gold fields are stored sequentially.
- B330 to B33F I'm not sure about. I suspect it relates to the character's inventory somehow.
- You can set an item's charges to FF and give it unlimited charges. Dragonwand that never runs out? Hell yes.
- This particular character is a Destiny Nut, but I couldn't figure out which flag indicates that.
Edit: Corrections regarding level as per drifting.
$B800: Character slot 0
$B880: Character slot 1
$B900: Character slot 2
$B980: Character slot 3
$BA00: Character slot 4
$BA80: Character slot 5
$BB00: Character slot 6
I loaded my character in slot #6 and discovered the following:
Code: Select all
.C:bb00 D4 C8 NOOP $C8,X Character Name: BB00-BB0F
.C:bb02 C5 A0 CMP $A0
.C:bb04 D6 C9 DEC $C9,X
.C:bb06 D3 C9 DCP ($C9),Y
.C:bb08 CF CE FF DCP $FFCE
.C:bb0b FF FF FF ISB $FFFF,X
.C:bb0e FF FF
.C:bb10 94 ISB $94FF,X Combined ST and IQ stat
.C:bb11 92 JAM Combined IQ and Dx stat
.C:bb12 94 Combined Cn and Lk stat
.C:bb13 8C STY $8C,X Combined Lk and ?? stat (Initiative?)
.C:bb14 00 BRK EXP: BB14-BB1F
.C:bb15 00 BRK
.C:bb16 00 BRK
.C:bb17 00 BRK
.C:bb18 00 BRK
.C:bb19 01 03 ORA ($03,X)
.C:bb1b 08 PHP
.C:bb1c 05 08 ORA $08
.C:bb1e 01 08 ORA ($08,X)
.C:bb20 00 BRK GOLD: BB25-BB2F
.C:bb21 07 00 SLO $00 [Level; if not equal to b823 then "drained"][???]
.C:bb23 07 00 SLO $00 [Level; if not equal to b823 then "drained"][???]
.C:bb25 00 BRK
.C:bb26 00 BRK
.C:bb27 00 BRK
.C:bb28 00 BRK
.C:bb29 01 09 ORA ($09,X)
.C:bb2b 06 08 ASL $08
.C:bb2d 07 07 SLO $07
.C:bb2f 09
.C:bb30 01 ORA #$01 DEC01
.C:bb31 1E DEC30
.C:bb32 01 DEC01
.C:bb33 1E ASL $1E01,X DEC30
.C:bb34 01 DEC01
.C:bb35 3B ORA ($3B,X) DEC59
.C:bb36 01 DEC01
.C:bb37 0F ORA ($0F,X) DEC15
.C:bb38 0A ASL A DEC10
.C:bb39 00 BRK DEC00
.C:bb3a 35
.C:bb3b 08 AND $08,X
.C:bb3c 00 BRK
.C:bb3d C2
.C:bb3e 00 NOOP #$00
.C:bb3f 0F
.C:bb40 07 Sorcerer spell level
.C:bb41 07 SLO $0707 Conjuror spell level
.C:bb42 07 Magician spell level
.C:bb43 07 SLO $07 Wizard spell level
.C:bb44 00 BRK
.C:bb45 00 BRK
.C:bb46 00 BRK
.C:bb47 00 BRK
.C:bb48 00 BRK
.C:bb49 00 BRK
.C:bb4a 00 BRK
.C:bb4b 00 BRK
.C:bb4c 00 BRK
.C:bb4d 00 BRK
.C:bb4e 00 BRK
.C:bb4f 08 PHP
.C:bb50 01 Status of slot #1 01 = Equipped, 00 = Unequipped, F0 = Unidentified
.C:bb51 3F ORA ($3F,X) Inventory slot #1 Mage Staff
.C:bb52 00 BRK Status of slot #2
.C:bb53 7E Inventory slot #2 The Scepter
.C:bb54 00 Status of slot #3
.C:bb55 5F ROR $5F00,X Inventory slot #3 Ring of Power #17
.C:bb56 01 Status of slot #4
.C:bb57 5A ORA ($5A,X) Inventory slot #4 Speedboots
.C:bb58 F0 Status of slot #5 Unidentified
.C:bb59 59 BEQ $BBB3 Inventory slot #5 (Crystal Sword)
.C:bb5a 00 BRK Status of slot #6
.C:bb5b 57 Inventory slot #6 Dragonwand #35
.C:bb5c 00 SRE $00,X Status of slot #7
.C:bb5d 00 BRK Inventory slot #7
.C:bb5e 00 BRK Status of slot #8
.C:bb5f 00 BRK Inventory slot #8
.C:bb60 00 BRK
.C:bb61 00 BRK
.C:bb62 00 BRK
.C:bb63 00 BRK
.C:bb64 04 Archmage spell level
.C:bb65 00 NOOP $00
.C:bb66 00 BRK
.C:bb67 00 BRK
.C:bb68 FF #charges on inventory item #1 FF=Unlimited
.C:bb69 FF #charges on inventory item #2
.C:bb6a 11 ISB $11FF,X #charges on inventory item #3 11>17D
.C:bb6b FF #charges on inventory item #4
.C:bb6c FF #charges on inventory item #5
.C:bb6d 23 ISB $23FF,X #charges on inventory item #6 23>35D
.C:bb6e 00 BRK #charges on inventory item #7 No item
.C:bb6f 00 BRK #charges on inventory item $8 No item
.C:bb70 82
.C:bb71 00 NOOP #$00
.C:bb72 00 BRK
.C:bb73 09
.C:bb74 00 ORA #$00
.C:bb75 00 BRK
.C:bb76 00 BRK
.C:bb77 00 BRK
.C:bb78 00 BRK
.C:bb79 00 BRK
.C:bb7a 00 BRK
- BB10 to BB13 use a combined value, probably bitfields, to store the character's six stats: The 5 we see on the screen, plus their initiative value. Seting these 4 bytes to FF changes the 5 visible stats to 31, and presumably maxes out the initiative value too.
- The experience and gold fields are stored sequentially.
- B330 to B33F I'm not sure about. I suspect it relates to the character's inventory somehow.
- You can set an item's charges to FF and give it unlimited charges. Dragonwand that never runs out? Hell yes.
- This particular character is a Destiny Nut, but I couldn't figure out which flag indicates that.
Edit: Corrections regarding level as per drifting.