Item & Monster Specs

Any developer realated stuff
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Lol, if we get all info together, we can remake the game.... with an full open engine
Caracas
Posts: 89
Joined: Thu Jan 20, 2011 9:16 am
Location: Belgium

Post by Caracas »

Does anyone know what happens in the 47 file?
It seems to get loaded once when launching the game.

EDIT: hmm, might just be the intro picture
Caracas
Posts: 89
Joined: Thu Jan 20, 2011 9:16 am
Location: Belgium

Post by Caracas »

Strange thing i found at $152E:

Code: Select all

B8 02 00 50 8B 5E FA 8A 47 41 2A E4 50 B8 D4 00 50 9A ED 1E 00 00 83 C4 06
B8 02 00 50 8B 5E FA 8A 47 40 2A E4 50 B8 DB 00 50 9A ED 1E 00 00 83 C4 06
B8 02 00 50 8B 5E FA 8A 47 42 2A E4 50 B8 E2 00 50 9A ED 1E 00 00 83 C4 06
B8 02 00 50 8B 5E FA 8A 47 43 2A E4 50 B8 E9 00 50 9A ED 1E 00 00 83 C4 06
4 sequences of 25 bytes with 2 differences:
byte 10 is 41 in the first serie, 40 in the 2nd, 42 in the third and 43 in the fourth.
This might correspond with the $F1, $F0, $F2 and $F3 in the short names of the spell list

2nd difference in byte 15 of the series: $D4 in the first, $DB in the 2nd, $E2 in the third and $E9 in the fourth.. each time 7 bytes difference, might correspond with spell level
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

Some interesting stuff in that monster data table, Maven.

You can even see that there's a bug where the 4th set of Sorcerer/Wizard stats are flip-flopped:

Code: Select all

17  23 02 21 00 0b 0b 0c Sorcerer        Sorcerers
18  23 02 21 00 01 19 22 Wizard          Wizards
...
25  25 04 32 00 0b 0c 0d Sorcerer        Sorcerers
26  25 04 31 00 04 1b 22 Wizard          Wizards 
...
36  27 06 42 00 0e 10 11 Sorcerer        Sorcerers
37  67 06 41 00 04 1d 23 Wizard          Wizards 
...
// Note how the spell lists and damage dice have been reversed
45  c9 08 41 00 06 1d 23 Sorcerer        Sorcerers
46  a9 08 42 00 10 11 12 Wizard          Wizards
...
52  2b 0a 52 00 12 15 16 Sorcerer        Sorcerers
53  4b 0a 51 00 25 24 1f Wizard          Wizards 
...
69  ed 10 52 00 15 16 18 Master Sorcerer Master Sorcerers 
70  2f 12 61 00 25 26 26 Master Wizard   Master Wizards 
Are you sure that the formula for determining monster hit points is correct? I used to try to collect that stuff empirically, and I have a couple examples that don't fit the mold. Kobolds with 1 hp, Hobbits with 2 hp, Hobgoblins with 1 hp, etc. I tried to be careful about it, but I wonder if I somehow damaged them without killing them before using SPBI.

Another interesting thing is what doesn't seem to be in the monster data. Unless it's reusing some of these bytes there isn't an obvious mechanism for things like THAC0, initiative, and spell resistance. It'll probably take some delving into the combat engine to figure out how that stuff works.

And just so I'm not completely useless, here are my educated guesses for the monster and item spell attacks. They seem to be in order per the way spells are stored internally (Co/So/Ma/Wi) so there are limited options as to what the blank ones could be. I just haven't played recently enough to be able to remember what spells some of those low-level spellcasters use. We'd have to find whatever table maps these codes to specific spell routines to verify them.
  • Monsters:
    // Co spells
    01 - ARFI
    // I think FRFO & BASK are in here, can't recall what the other spell that gets used is. MAST?
    02 -
    03 -
    04 -
    05 - WAST
    06 - INWO
    07 - POST
    // This almost has to be WROV
    08 - WROV?
    09 - SHSP
    0A - INOG
    // So spells
    0B - MIJA
    0C - PHBL
    0D - HYIM
    // WIWO & WIWA are definitely among these
    0E -
    10 -
    11 -
    12 -
    // This one's interesting because it's only used by Magician (I, II). If the pattern holds that means he's actually using a fairly high-level So spell.
    13 -
    14 - WIOG
    15 - MIBL
    16 - WIDR
    18 - WIGI
    // Ma spells
    19 - WIST
    1B - MAGA/OGST?
    1C - MIMI
    1D - STFL
    1E - SPTO
    1F - DRBR
    20 - STTO
    21 - DEST
    // Wi spells
    22 - SUDE
    23 - LESU
    24 - SUPH
    25 - PRSU
    26 - GRSU
Bit 7 of the item code indicates whether an item is used in combat (0) or out of it (1). The remaining bits again seem to be references to a table ordered like the monster one was... with one possible exception.
  • Items:
    // Co spells
    10 - MAFL
    11 - WOHL
    12 - WAST
    13 - INWO
    14 - GRRE
    15 - INOG
    16 - MALE
    17 - FLAN
    18 - APAR
    // So spells
    // Does the Dag Stone produce a green flame on apple II and/or allow you to see secret doors?
    19 - CAEY?
    1A - DIIL
    1B - MIBL
    1C - SOSI
    // Ma spells
    1D - SCSI
    1E - AREN
    1F - STFL
    // I seem to recall that Arc's Hammer makes a blue flame on Apple II
    20 - STSI?
    22 - YMCA
    23 - REST
    // Wi spells
    // Common knowledge says that the Exorwand is DISP; strangely, that would be out of order
    24 - DISP?
    25 - LESU
    26 - PRSU
    27 - ANDE
    28 - SPBI
It would also be interesting to learn exactly what effect the Luckshield and Thief's Dagger have. I assume it's something to do with repelling spells and hiding in the shadows respectively, but beyond that I haven't read a good account anywhere.
tpth
Posts: 128
Joined: Tue Feb 02, 2010 6:39 am

Post by tpth »

@brideck; I'm sure I remember reading somewhere that there is no separate THAC0 value in Bard's Tale. Instead, the chance to hit is instead determined, curiously enough, by reference to your AC - the lower your AC is, the better your chance to hit a monster is. Presumably this is the same for monsters, which explains the lack of a THAC0 variable in these tables.
tpth
Posts: 128
Joined: Tue Feb 02, 2010 6:39 am

Post by tpth »

Yeah, here it is: http://dlh.net/cheats/pc/deutsch/bards+ ... weise.html

Right at the start... "AC: armor class of the monster. Believe it or not, at least in the PC versions of Bard's Tale I and II, this is actually used to determine your chance of hitting, not just of being hit! If you don't believe it, try taking off all your armor (Monks don't count) and attacking a high-level monster."
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

tpth wrote:Yeah, here it is: http://dlh.net/cheats/pc/deutsch/bards+ ... weise.html

Right at the start... "AC: armor class of the monster. Believe it or not, at least in the PC versions of Bard's Tale I and II, this is actually used to determine your chance of hitting, not just of being hit! If you don't believe it, try taking off all your armor (Monks don't count) and attacking a high-level monster."
Wow, I've never seen that before. Crazy.

I'm not sure that's precisely right, although the idea is probably correct. In the DOS version, I just took guys with AC -2 & -3 out to the Samurai statue (AC 4) to see if I could defend all day long without getting hit, and it's not very often, but I am getting hit some.

Edit:

I actually just found out the hard way that Barbarians (AC 6) could still hit me even when I bumped my AC to -5. Maybe there's something that can be rolled to still always hit, like rolling a 20. Either that or the spread is much wider than what he reported for BT2.

2nd Edit:

Okay, so for monsters attacking PCs a difference of 13 is a sure miss (e.g. AC -9 is safe against the Samurai) and a difference of 0 is a sure hit. In 100 swings, the Samurai never missed me at AC 4, but started to miss when I had AC 3.

The relationship does not seem to be the same for PCs attacking monsters. I had AC 7 (armed with a short sword) and could not hit a Stone Giant (AC 3) to save my life, which seems patently unfair. I'll have to do some experiments to see when you start hitting, and (in a futile effort to tie back into the original topic) I can investigate whether the magical bonus in weapons actually gets applied to the hit roll.

3rd Edit:

Well, that was an unexpected result. It's acting like there's no hit roll at all for PCs (at least in the DOS version). I took my AC 7 guy to the Samurai (AC 4) and still couldn't hit him to save my life. I ran away, equipped a buckler (to AC 6), and suddenly could not miss. So it seems like all you have to do is get your AC within 2 of the enemy and it's an auto hit.

I also tested AC 7 with a +1 weapon (crystal sword) and could not score a hit, so it seems like the magical plus is only on damage.

There are a couple spells that talk about increasing accuracy in the description (BASK, WROV). They don't seem to actually increase hit chance, so they're really just another damage buff. Seeker's Ballad on the other hand does the equivalent of raising your hit chance by 1, so if you have AC 7 it acts as though you really have AC 6.

All of this of course means that spells that boost your AC are actually increasing your accuracy, too, if you happen to be at a threshold where it makes a difference.
Maven
Posts: 138
Joined: Sat Apr 16, 2011 9:39 pm

Post by Maven »

This is amazing stuff. Figuring out the to-hit system was on my list of things to do, but I never got to it. It seems like after level 9 or so it didn't matter--I was hitting every time anyway. Now I know why.

But I think there are some other things that might be issues in the equation. I tried the test at the Samurai, and my Conjurer needed a lower Armor Class to hit the Samurai than my Bard did. I don't know whether it's a Character Class thing, or a Race thing (is Bard's Tale racist?) or maybe some other item that was equipped or something.

Who knew it would be so simple? Or so not-intuitive? It's a good thing the Seeker's Ballad has a light component, or it would be completely useless. Just use the Traveller's Tune instead and you get better Armor Class as well as better To Hit.

Edit 1:
So I did more testing on my level one characters.
Level 1 Hobbit Monk with Dex 14 needs AC7 to Hit a Samurai.
Level 1 Human Monk with Dex 15 needs AC7 to Hit a Samurai.
Level 1 Hobbit Conjuror with Dex 14 needs AC 4 to Hit a Samurai.

So I think it's the Class and not the Race that makes the difference.

Also, Traveller's Tune stacks. If I start out with AC9, and I play it twice so that my AC is 7, I can hit the Samurai. Also, if I drop into the Catacombs for a sec to play the Traveller's Tune, and my AC drops to 7, I can hit the Samurai.

Seeker's Ballad also stacks. If I play it twice, I can hit the Samurai with AC9. However, dropping into the Catacombs doesn't give it double effect.

Ogre Strength, Battle Skill, and Wrath of Valhalla were all useless. Mithril Might, and Kylearan's Invisibility Spell, however, rock!
tpth
Posts: 128
Joined: Tue Feb 02, 2010 6:39 am

Post by tpth »

I know, I couldn't quite believe it when I read that either. I only stumbled across it fairly recently, when I was playing through BT1 on a C64 emulator - all through my childhood, I'd vaguely wondered how the to-hit mechanics worked, but had never thought the equation was linked to your AC.

I think it must work the same way in BTCS, too, because I remember years and years ago I tried to make a game and could never figure out how to alter a monster's chance to hit the party.
tpth
Posts: 128
Joined: Tue Feb 02, 2010 6:39 am

Post by tpth »

And yeah, it also makes a bard an immensely powerful character, since he can just keep cranking up your AC until you can hit monsters you'd never normally be able to hit (while also reducing their chance of hitting you). Who knew?!
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

Maven wrote: So I did more testing on my level one characters.
Level 1 Hobbit Monk with Dex 14 needs AC7 to Hit a Samurai.
Level 1 Human Monk with Dex 15 needs AC7 to Hit a Samurai.
Level 1 Hobbit Conjuror with Dex 14 needs AC 4 to Hit a Samurai.

So I think it's the Class and not the Race that makes the difference.
Aha, this makes good sense. It feels like they wanted to implement a real to-hit system (maybe d12 based, like the monsters), but decided that it didn't mesh well with the massive amounts of monsters they throw at you. Random misses equal wasted rounds after all.

My guy who needed an AC6 to hit the Samurai was a Paladin. With a little experimentation we can quickly throw together a table for the other classes. I'd guess that a Bard or Rogue probably fits in the middle at AC5, but we'll have to check.

Also on my list is figuring out how the magic system works. Hits vs no effect vs repelled spells, etc. That might take some code cracking though and I'm not sure I'm up for the task at the moment.

Edit:

My predictions turned out to be spot on. The attack rates are as follows:
  • +0 Magic-User
    +1 Bard/Rogue
    +2 Warrior/Paladin/Hunter
    +3 Monk
Why the monk needs that kind of hit bonus is beyond me, seeing as how their natural AC boosts are also going to aid their chance to hit.
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

This may actually be common knowledge, but I've seen the question asked in a few different places wondering if the game tracks your AC below -10. Now that we know how monster attacks work I can say that the answer is definitely no, again at least not in the DOS version.

I just verified by taking a lvl 38 Monk with -12 AC worth of gear (on top of his naturally LO AC) and observing that he still gets hit at a decent rate by the Golem statues (AC -3) outside the castle. This makes sense, as it explains why you get pounded so badly on Mangar level 5 no matter what gear you have.

This also means that you should conserve on item slots by only taking what gear you need to get to -10, then you can pick up more sweet stuff on the top floors of Mangar's. For instance, a Warrior could make do with Dex 18 + Diamond Plate, Diamond Shield, and Wargloves. I know that as kids my brother and I would often have all of our characters loaded to the gills thinking it was helping. If you're planning on transferring chars to BT2 or 3, you will of course want to equip everything you can since they do track higher ACs.
Maven
Posts: 138
Joined: Sat Apr 16, 2011 9:39 pm

Post by Maven »

Thanks for doing those two tests, Brideck. They were both on my list of things to determine.

Also, initiative. Who swings first? Seems to be Hobbit Monks usually hit first in my party. I wonder if it's the Hobbit or the Monk or both?

The magic thing as well. I do know some things about it. For example, after I have just switched classes and I'm level 1 Sorceror or Wizard, I have lots more repels and half damage on Shock Sphere, Dragon Breath, and Repel Dead. After I've leveled a couple of times it's not as bad.

Another thing... has anyone else noticed that if you hit the Samurai twice in the same round, he dies? Doesn't seem to matter how much damage you do. So a very effective method to level up early is to create two Hobbit Monks with max dex and go hit the Samurai repeatedly.
Caracas
Posts: 89
Joined: Thu Jan 20, 2011 9:16 am
Location: Belgium

Post by Caracas »

Doesn't it say somewhere in the manual that when creating chars, you have to pay close attention to the stats because:
- str lets you hit harder
- con gives you more hit points
- dex lets you attack faster
- int gives you more spell points
- luck lets you escape combat more easily

I used to reroll like 500 times when creating chars to get as high stats as possible when creating new chars, noteably:
- con, str and dex for my warrior/paladin/monk (first 3 slots in my party)
- dex, con for my bard (either bard or spellcaster in slot 4)
- int, dex, con for my spellcasters (always 2 spellcasters in slots 5 and 6)

The Half Orc gets you the highest combo of con/str/dex, but can't be a paladin or monk
If I created a paladin or monk, that would always be a dwarf
Bard is alway a Hobbit (because of dex).
Gnomes are always spellcasters.

Repels and spell damage reduction seems to be indeed linked to actual char level of the spellcaster. When I switch my spellcaster to Wizard and get the Repel Dead spell, I usualy go down to the catacombs to repeatably kill the ghouls and wights, but I have to let my bard breath on them with a horn or hope my Red Dragon breathes on them, because my new wizards do no damage at all, eventhough their stats are pretty much maxed out at that point.
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

Caracas wrote:Doesn't it say somewhere in the manual that when creating chars, you have to pay close attention to the stats because:
- str lets you hit harder
- con gives you more hit points
- dex lets you attack faster
- int gives you more spell points
- luck lets you escape combat more easily
Str seems to just be a damage boost. +1/atk at 17, +2/atk at 18

Con/Int might give similar boosts to HP/SP when you level up. I really need to do some research in that space. I've never paid attention at all to the span of boosts you can get when you level up. Does it differ by class at all?

Dex makes some sense based on what Maven said, as hobbits have much higher dex on average than the other races. But how are these values compared to the monsters? There must be some way of calculating a dex for them.

Luck -- you mean running away? In that case, does only your party leader matter as I've read is the case with the Speedboots? It might play a role in trap evasion, too, unless that's just level-based and/or completely random. I always thought it might factor into save vs spells, etc., but it makes sense that it's level-based.

Finding the exact relationship between level numbers and stats and some of these things seems like it's going to be difficult without figuring out the code.
Post Reply