Page 11 of 11

Re: CBM64 Bard's Tale 1 Disassembly

Posted: Wed Dec 30, 2020 1:03 pm
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...

Re: CBM64 Bard's Tale 1 Disassembly

Posted: Wed Dec 30, 2020 2:18 pm
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 :)

Re: CBM64 Bard's Tale 1 Disassembly

Posted: Wed Dec 30, 2020 6:03 pm
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.

Re: CBM64 Bard's Tale 1 Disassembly

Posted: Thu Dec 31, 2020 1:00 am
by Darendor
I figured as much.

So the magic system is pretty much hard-coded into the game, then.

Re: CBM64 Bard's Tale 1 Disassembly

Posted: Thu Dec 31, 2020 8:50 am
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.