Item & Monster Specs

Any developer realated stuff
Maven
Posts: 138
Joined: Sat Apr 16, 2011 9:39 pm

Post by Maven »

Here's another interesting strategy we could use now that we know what determines who strikes first...

It's a minor inconvenience that my Monk always hits before my casters and Bard. Sometimes their area effect spells leave a monster or two wounded but not dead. If the Monk hits first, he always kills the monster he hits, but it's almost always one of the ones that the casters would have killed anyway. If the casters were to cast first, the Monk could kinda clean up behind them, and kill anything they left behind. I noticed that after my casters got faster than my Storm Giant, it was rather convenient.

So all we have to do is leave the Monk in the guild for a few thousand battles, until the casters get uber-fast, and then put him back in the party. In fact, we could almost determine the entire order of the fights if we wanted to go to that much trouble.

For example, the final confrontation, I am faced with
3 Demon Lords
2 Vampire Lords
1 Mangar

Suppose I have a Monk, Hunter, Bard, and 3 Archmages and I arrange the following sequence:
1) Monk kills one Vampire Lord
Hunter Kills one Demon Lord
2) Bard uses Flame Horn against remaining Demon Lords
3) One ArchMage casts Mind Blade
- This is guaranteed to kill one of the Demon Lords due to the Target Bug
Another Archmage casts Mind Blade
- This kills Mangar and the other Vampire Lord (Target Bug)
4) The last Archmage kills the last Demon Lord with DEST, STTO, or MIFI

Or, the Thor in the special slot and the Last Demon Lord (if he survives this long) could duke it out.

There are variations, but you get the idea. You would have to plan the fight depending on when your characters would hit, and whether they are likely to be resisted. This is a good argument for having Archmages with different battlecounts, just so you could depend on them attacking in a certain order.

Update:
Turns out it's not as easy to manipulate attack order as I had thought. I figured since Demon Lords max out the Initiative Roll at 155, and the Initiative Roll is capped at 255, we had quite a bit of space we could work with. The problem is that would require that we spread out our characters' Battle Count between 62,000 and 114,000 or thereabouts. Well, the Battle Count is capped at 65536.

Bummer
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

Maven wrote:There seems to be only one Rogue-specific byte. It's immediately following the SpellLevelsKnown fields in the .tpw file and the in-memory structure. I expect it is Hide In Shadows, Identify Traps, and Disarm Traps. All three? In any case, it seems to grow at half the rate of the CriticalHit for Hunters. I'm thinking straight random 1-16 on level-up.
Going back a ways with this one. According to ZeroZero's C64 work, there should be three separate bytes for this with the first one being DISARM TRAP. Did they really conflate all of these together for the DOS version?
Maven
Posts: 138
Joined: Sat Apr 16, 2011 9:39 pm

Post by Maven »

Well, there's only one byte in the save file that is specific to Rogues.

However, I couldn't get it to give me consistent results with anything I tried.

Hiding it shadows? Always works unless my Rogue is the only one in the party left alive. Then it never works. I couldn't figure out a way to get that to be useful. Maybe have three Rogues in the front of the party, and have them all hide in the shadows while the casters in the rear nuke stuff? In any case, it didn't seem to make any difference what the Rogue Byte was.

Disarm Traps? Even after I maxed out the Rogue Byte at level 32, I still set off traps sometimes when disarming. Identify Traps? Even after maxing out the Rogue Byte, I still couldn't always identify traps.

I can't see that the Theif Dagger [sic] does anything. It didn't seem to make any difference when I was hiding in the shadows, and it didn't seem to make any difference when examining, disarming, or opening traps. It didn't seem to make any difference when I ran over a trap, either.
brideck
Posts: 11
Joined: Wed Oct 19, 2011 7:48 am

Post by brideck »

So it seems like Rogues either got hopelessly busted when moved from APII/C64 to DOS, or they never really worked properly.

Isn't there at least one of the platforms where non-Rogues can successfully identify traps on chests with no real penalty? I swear I used to do that as a kid.
drifting
Posts: 152
Joined: Wed Dec 07, 2011 10:21 pm

Post by drifting »

The rogue ability byte (it's actually a word in the DOS version) in the character file is never used by the program outside of increasing it at level up.

Disarming traps is a straight check against the character's luck in the DOS version.

Detecting traps is a 1 in 4 random check.

The hide in shadows code is broken. A rogue will always successfully hide unless he is the first character in the party and there are no other characters available to hit in melee range.

The hide in shadows code looks like this:

Code: Select all

if not itemEquipped(luck_shield):
  hide success

if character.hideInShadows < random_16_bit_number
  hide success
Two things of note here:
  • The luck shield check is backwards. It should only succeed if the Luck Shield is equipped. The test is wrong in the code
  • The character.hideInShadows value is always zero. It is not modified or even accessed by any other code other than the hide in shadows check.
brideck wrote:Isn't there at least one of the platforms where non-Rogues can successfully identify traps on chests with no real penalty? I swear I used to do that as a kid.
In at least the DOS and Amiga versions any character class can identify traps.
Maven
Posts: 138
Joined: Sat Apr 16, 2011 9:39 pm

Post by Maven »

So I have an issue. My Instant Ogre seems to be doing more damage than I expected. My data on the Ogre says it does 6d4 damage. I have seen my Instant Ogre do as little as 7 damage, and as great as 43 damage.

So is my Instant Ogre more buff than ogres that I encounter? That brings up other questions, then.

I saw the data on Joe Sword and Dummy and Thor. But how about the Wind Dragon and the Wind Warrior and the Storm Giant? Are they more buff than the ones in the monster table, as well?

How about if I use a Spell Bind to fill my special slot? Would the monster get copied directly, or would its stats change when it got to my side?
drifting
Posts: 152
Joined: Wed Dec 07, 2011 10:21 pm

Post by drifting »

Maven wrote:So I have an issue. My Instant Ogre seems to be doing more damage than I expected. My data on the Ogre says it does 6d4 damage. I have seen my Instant Ogre do as little as 7 damage, and as great as 43 damage.

So is my Instant Ogre more buff than ogres that I encounter? That brings up other questions, then.

I saw the data on Joe Sword and Dummy and Thor. But how about the Wind Dragon and the Wind Warrior and the Storm Giant? Are they more buff than the ones in the monster table, as well?

How about if I use a Spell Bind to fill my special slot? Would the monster get copied directly, or would its stats change when it got to my side?
So in DOS BT1, the damage dice used by a monster melee attack is hard coded to 4. When a monster is summoned to the party the dice used is changed to 8. So when monsters are summoned the melee attack becomes Xd8 instead of Xd4. That is the case for all monsters in BT1.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

It would appear to be 6D6+1 damage, as opposed to 6D4.
User avatar
toper
Posts: 46
Joined: Thu Oct 03, 2013 12:08 am
Location: Temple: N+4 E+13 U:-3

Post by toper »

drifting wrote: Determining items drop at what level
This is based entirely on where you are. The "monster level for random encounters" for the current level you are on is used to determine what can drop. There are two arrays that are use to determine which item to drop (and also what type of monster to fight. The algorithm is the same.)

Code: Select all

seg019:1F8E monsterRandomMask db 15,15,31,31,31,31,31,31; 0
seg019:1F9E monsterLevelOffset db 0,8,8,16,32,48,64,81 ; 0

The code to get the random item is like this:
newItemNumber = (random() & monsterRandomMask[monsterLevel]) + monsterLevelOffset[monsterLevel]
if (newItemNumber == 0)
  newItemNumber = 1
For example, the first level of the Castle has a monster level of 3. So the monsterRandomMask would be 31 and the monsterLevelOffset is 16. So that level would drop items with an index between 16 and 47.
Couple of questions:

Has anyone made a list of *all* items (or all monsters) found in every dungeon so that non-programmers (like myself) could have a look? I've seen lists of some of the more desirable items, but not a full list.

I've seen it said various times that item drops are completely random, so why are items (like the ever elusive WizWands) so rare in the game? I've seen a post from Flanimal, where he was looking for one for over a month... there has to be something in the drop table that sets rarity of items. Unless he was looking in the wrong dungeon, a random WizWand shouldn't take that long to find.

And what of items in the item list that aren't *really* available in a random drop? The 'eye' is available in the level 3 catacombs, but the hundreds of thousands of ghouls I've slaughtered over the decades... have never, nor will ever, drop one.... because its not available as a random drop... there has to be a piece of code, or bit, or something that says that key quest items (Silver shapes, keys, crystal sword, eye) are not available for random drops.

RANDOM THOUGHT:

Wondering if the Witch King *really* does drop the eye?? Maybe the dungeon itself does?
Something along the lines of this... (which would occur on the game clock, ticks, cycles, whatever you want to call it... )

Get ready to laugh at my crappy programming/logic example:

Code: Select all

Enter Catacomb 3
  WitchKing.alive set to TRUE
  Eye.Given set to FALSE
Cycle Check:
  WitchKing.Alive
    if TRUE exit 
    if FALSE
        if Eye.Given=TRUE exit
        if Eye.Given=FALSE Give.Eye and set Eye.Given=TRUE exit
   end if
Now the Dungeon itself is issuing the eye, and its not *really* a drop at all by ANY creature including the Witch King, but only issued on two very specific conditions, Death of the Witch King, and that you haven't already received one during this visit. That removes the eye from the drop table, sets its rarity, and insures you aren't filling your characters pockets with multiple eyes on single trips to Cat.3

There will still have to be some flag set to the Eye, so that it is never randomly dropped, but the above check, *does* make the item available... in a condition agreeable to the quest.
drifting
Posts: 152
Joined: Wed Dec 07, 2011 10:21 pm

Post by drifting »

toper wrote: Couple of questions:

Has anyone made a list of *all* items (or all monsters) found in every dungeon so that non-programmers (like myself) could have a look? I've seen lists of some of the more desirable items, but not a full list.

I've seen it said various times that item drops are completely random, so why are items (like the ever elusive WizWands) so rare in the game? I've seen a post from Flanimal, where he was looking for one for over a month... there has to be something in the drop table that sets rarity of items. Unless he was looking in the wrong dungeon, a random WizWand shouldn't take that long to find.

And what of items in the item list that aren't *really* available in a random drop? The 'eye' is available in the level 3 catacombs, but the hundreds of thousands of ghouls I've slaughtered over the decades... have never, nor will ever, drop one.... because its not available as a random drop... there has to be a piece of code, or bit, or something that says that key quest items (Silver shapes, keys, crystal sword, eye) are not available for random drops.
The random drop-ability is entirely based on the index of the item. According to the formula, items with an index higher than 111 will not be randomly dropped. (The formula says 112 but the start index is -1). Those items are: Onyx Key, Crystal Sword, Stoneblade, Travelhelm, Death Dagger, Mongo Fgn, Lich Fgn, Eye, Master Key, Wizwand, Silvr Square, Silvr Circle, Silvr Triang, Thor Fgn, Old Man Fgn, Spectre Snare.

From what I can tell, the Wizwand is never dropped in the DOS version. It is outside the range of random item drops (Item #120) and is not given out as the result of a dungeon special square.
toper wrote: RANDOM THOUGHT:

Wondering if the Witch King *really* does drop the eye?? Maybe the dungeon itself does?
You are correct. The Witch King does not drop the eye. The dungeon square code gives the Eye to the party after you win the battle.
toper wrote: Something along the lines of this... (which would occur on the game clock, ticks, cycles, whatever you want to call it... )

Get ready to laugh at my crappy programming/logic example:

Code: Select all

Enter Catacomb 3
  WitchKing.alive set to TRUE
  Eye.Given set to FALSE
Cycle Check:
  WitchKing.Alive
    if TRUE exit 
    if FALSE
        if Eye.Given=TRUE exit
        if Eye.Given=FALSE Give.Eye and set Eye.Given=TRUE exit
   end if
Now the Dungeon itself is issuing the eye, and its not *really* a drop at all by ANY creature including the Witch King, but only issued on two very specific conditions, Death of the Witch King, and that you haven't already received one during this visit. That removes the eye from the drop table, sets its rarity, and insures you aren't filling your characters pockets with multiple eyes on single trips to Cat.3
Essentially correct. The game only gives the Eye if the party won the battle with the Witch King
toper wrote: There will still have to be some flag set to the Eye, so that it is never randomly dropped, but the above check, *does* make the item available... in a condition agreeable to the quest.
User avatar
toper
Posts: 46
Joined: Thu Oct 03, 2013 12:08 am
Location: Temple: N+4 E+13 U:-3

Post by toper »

drifting wrote: The random drop-ability is entirely based on the index of the item. According to the formula, items with an index higher than 111 will not be randomly dropped. (The formula says 112 but the start index is -1). Those items are: Onyx Key, Crystal Sword, Stoneblade, Travelhelm, Death Dagger, Mongo Fgn, Lich Fgn, Eye, Master Key, Wizwand, Silvr Square, Silvr Circle, Silvr Triang, Thor Fgn, Old Man Fgn, Spectre Snare.

From what I can tell, the Wizwand is never dropped in the DOS version. It is outside the range of random item drops (Item #120) and is not given out as the result of a dungeon special square.
Okay... that makes a lot of sense to me now. I almost feel embarrassed it took me this long, but when it comes to programming, I never really went father than "hello world" in basic :(

So... to get a full list of encounters, and drops, all I really need is just to know what the monster level is for each dungeon level.. there are 8 random masks and 17.1 maps (the .1 being the City at night, which I'm guessing just adds 1 to the encounter to remove Kobolds, and add Jade Monks?)

Does that mean torches don't drop at night as well?

And is there a list of what each maze MonsterLevel is?

sorry for asking such silly questions... I tried searching "monster list" and came back with 4 pages of answers on the forums... bounced around a few of them but found no "here is the List:" list.... :(

All the years I played this game, I got pretty good at mapping, but *never* really tracked monster encounters or treasure drops... at all.... now I'm getting pretty interested in all the little details.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

In BT1 C64 version, the logic usually is as follows for non-random drops:

1. Some condition must be met (won a certain fight, have another item, have a certain char in the party etc etc)

2. One party mem must have a free item slot. Item is given to the first free slot. Sometimes it also checks, that noone in the party already has such an item (unique item)

3. Flag is set, so that you cannot get the same item again until you leave and return to that dungeon.

E D I T

The monster level list, as for the C64:

Cellars: 0
Sewers 1: 1
Sewers 2: 1
Sewers 3: 2
Catacombs 1: 2
Catacombs 2: 3
Catacombs 3: 3
Castle 1: 3
Castle 2: 4
Castle 3: 4
Tower: 5
The Tower 1: 5
The Tower 2: 6
The Tower 3: 6
The Tower 4: 7
The Tower 5: 7

I don't know (haven't checked yet), if the game checks for the day time and shifts the monster occurances a bit to the higher at nite time
drifting
Posts: 152
Joined: Wed Dec 07, 2011 10:21 pm

Post by drifting »

ZeroZero wrote: I don't know (haven't checked yet), if the game checks for the day time and shifts the monster occurances a bit to the higher at nite time
In the DOS version the monster level is 0 for daytime and 1 for nighttime.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Does that mean, that inside dungeons the monster level does not change with daytimes?
drifting
Posts: 152
Joined: Wed Dec 07, 2011 10:21 pm

Post by drifting »

ZeroZero wrote:Does that mean, that inside dungeons the monster level does not change with daytimes?
Not in the DOS version. The only effect day/night has inside a dungeon is the rate of random encounters increases at night.
Post Reply