Tales of the Unknown: The Bard's Tale

(aka: Bard's Tale 1)


Bard's Tale 1 Hacking

Editing Apps - Raw Data Editing Guides

Character File data guide

For the PC/DOS version

Note that all data values are stored in little-endian format. That is, least significant bytes are stored first for multi-byte values. Examples:
* A byte value of 35 would be stored as hex [23]
* A 2-byte int value of 350 (which is 0x015E in hex) would be stored instead as [5E 01]
* A 3-byte value of 1,056,816 (which is 0x102030 in hex) would be stored as [30 20 10]
* A 4-byte segment holding the same value of 1,056,816 (a hex value of 0x00102030) would be stored as [30 20 10 00]

Details:

Character/Party Name
This segment has a 15 byte length for a string, however in the PC version the 15th character may cause a word to wrap and throw off mouse interaction on screen. It is best to have a maximum name length of 14 characters.
* The 14 byte string must be followed by a null byte [00] to identify the end of the string. ("BRIAN THE FIST" demonstrates the maximum safe name length)
Char or Party
This byte tells the game what format of character file is being read. Valid values include:
[01] = Character data follows. (info listed below applies to Character data)
[02] = Party list data follows.
Status / Race / Class
These values are two bytes, but valid values are small enough to only need the first byte - the 2nd should always be [00].
Status: The current state of the character. Valid values include:
[00] Alive
[02] Dead
[04] Old
[08] Poisoned
[10] Stoned
[20] Paralyzed
[40] Possessed
[80] Nuts
Race: One of these valid values:
[00] Human
[01] Elf
[02] Dwarf
[03] Hobbit
[04] Half-Elf
[05] Half-Orc
[06] Gnome
Class: One of these valid values:
[00] Warrior
[01] Paladin
[02] Rogue
[03] Bard
[04] Hunter
[05] Monk
[06] Conjurer
[07] Magician
[08] Sorceror
[09] Wizard
Current: ST / IQ / DX / CN / LK
These 2-byte integers represent the character's current attribute rating. The values should not exceed the max values (see below). These may be altered by temporary condition effects, such as Withering.
Max: ST / IQ / DX / CN / LK
See above. These 2-byte integers represent the character's maximum attribute rating.
Base AC
This 2-byte integer contains the base character armor class rating. Inventory items and other temporary effects may alter the AC from this base value.
Max/Current: HP
These 2-byte integers contain the character's hit point counts. Current should never exceed Max.
Max/Current: SP
These 2-byte integers contain the character's spell point counts. Current should never exceed Max.
8x Inventory slots
These 8 pairs of bytes define the character's current inventory list. Each pair consists of two bytes:
Status:
[00] Unequipped
[40] Unidentified
[80] Equipped
Item Index:
[00] - [7F] Reference to an item in the item catalogue, between 0 and 127. Example: An equipped Wargloves would appear stored as [80 5B]. An unindentified Travelhelm would be seen as "Helmet" in-game, and stored as [40 73].
Experience
This 4-byte long integer contains the character's current experience point count. If XP greatly exceeds that needed for the current skill level, the Review Board will allow repeated advancement until more points are needed.
Gold
This 4-byte long integer contains the amount of gold in the character's possession.
Current/Max: Level
These 2-byte integers both contain the character's skill level. The Current value cannot exceed the Max, and may be altered temporarily by in-game effects.
Sorcerer/Conjurer/Magician/Wizard
These single byte values contain the spellcaster levels - in this specific order. Odd that it's not Co Ma So Wi, but this is the order they are stored.
Values may be between [00] and [07].
Rogue: Chance to hide
This application of this byte value is hazy, but contains the chance a Rogue has for a successful Hide attempt.
Hunter: Chance to critical hit
As with the Rogue, this byte value is hazy, but contains the chance a Hunter has to successfully land a critical hit.
Bard: Songs remaining
This single byte contains the number of remaining songs a Bard may sing before his throat runs dry.
Melee attacks per round
This 2-byte integer contains the total amount of attacks (hits) a character deals during an attack round. The highest 'safe' value before exceeding positive numbers in combat and being displayed as negative is 32766 (0x7FFE in hex, stored as [FE 7F])
Battles fought and won
This 2-byte integer contains the incremental counter of number of battles survived. The higher this number, reportedly the better the chance at a higher initiative (earlier actions) in combat.

Data Reference files

Thanks to...

- The initial creators and compilers of the above resources
- The dedicated decompilers at the Brotherhood.de forums