CBM64 Bard's Tale 1 Disassembly

Any developer realated stuff
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: CBM64 Bard's Tale 1 Disassembly

Post by Darendor »

So...

Is each individual spell hard-coded into the game engine to work in a specific way?

I mean, damage spells could follow a template of sorts with variable ranges, damages, special effects, and what have you, but spells like APAR, SCSI, ZZGO, DIIL, DISB and so on have very specific uses...
DMan
Posts: 19
Joined: Mon May 14, 2012 12:06 am

Re: CBM64 Bard's Tale 1 Disassembly

Post by DMan »

drifting wrote: Tue Dec 29, 2020 10:53 pm
DMan wrote: Tue Dec 29, 2020 11:33 am Does anyone have the data values for the spell effects table (not the spell point cost or spell code names)? I’m assuming there’s a table (or tables) for attributes such as range, effect, combat/non-combat and self/party. Trawled through all of these Dev threads and can’t find reference to it.

I’m currently involved with disassembling the ZX Spectrum version of BT. These threads have been extremely useful in identifying most of the data - same data values, just (in a lot of cases) partially packed in the ZX source code.
In the DOS version of BT1, there are two tables for spells. BTII adds a third table that is the range of the spell.

This one's a bitmask for casting the spells. I'd have to dig in deeper to get all of the bits but I know 10h is the "combat only" flag for spells

This one holds all of the other data for the spells. The meaning of the values depend on the spell being cast.
Many thanks drifting! Exactly what I was after - found it in my disassembly :)
drifting
Posts: 152
Joined: Wed Dec 07, 2011 10:21 pm

Re: CBM64 Bard's Tale 1 Disassembly

Post by drifting »

Darendor wrote: Wed Dec 30, 2020 1:03 pm So...

Is each individual spell hard-coded into the game engine to work in a specific way?

I mean, damage spells could follow a template of sorts with variable ranges, damages, special effects, and what have you, but spells like APAR, SCSI, ZZGO, DIIL, DISB and so on have very specific uses...
They reused spell functions wherever possible. Unique spells like APAR, SCSI, and ZZGO all have their own functions. DIIL and DISB actually use the same function. Damage spells, healing spells, and summoning spells are examples of functions that serve multiple spells.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: CBM64 Bard's Tale 1 Disassembly

Post by Darendor »

I figured as much.

So the magic system is pretty much hard-coded into the game, then.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: CBM64 Bard's Tale 1 Disassembly

Post by Darendor »

I would expect the code for the spells is sequentially listed one after another then, in the same order as the spell point costs.
Post Reply