Mangar's Tower Level 5 mystery square (spoilers)

Any developer realated stuff
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Here's some trivia for today:

It requires at least 2,160,000 XP and exactly 176,000 GP to afford an "arch mage" in this game. Your other characters (except for a monk) will be level 22 at least by the time you build one.

Character data (and party data) are stored on the character disk, starting at track 00, sector 0C on the Apple 2e version. Unlike in the other versions of BT I've seen, XP and GP are serialized, i.e., stored, as decimal digits, rather than as hex values. There's room for 2 characters (or parties) per sector.

A Character record starts with the character's name, in ascii, terminated by FF.

XP is stored in eight bytes startting at byte 18 hex. (byte 24 in the decimal system).

For example, if a character has 2,314,100 xp, those bytes will be:

Code: Select all

00 02 03 01 04 01 00 00
It's kind of ridiculous how long it took me to figure that out. :roll:

Gold is stored in eight bytes at byte 28 hex (40 decimal) of a character record, using the same "encoding."

This means the maximum amount of XP you can store on the disk is 99,999,999. That's most likely higher than what the game engine can actually process, but theoretically it's enough to get a paladin to level 491. The game system should utterly break down long before that, though.
Death and drek? WTF?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

The mystery square at 17N, 4E on the third level of Harkyn's Castle exists in the Apple 2e version. It's marked as special, but has no noticeable effect--so far.
Death and drek? WTF?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

I wrote elsewhere that I thought PHDO was disallowed on the 3rd level of Harkyn's Castle. It is not. You can PHDO anyplace you like.
Death and drek? WTF?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

More BT trivia:

The number of items in the game is equal to the number of bytes in a sector on an Apple ][e diskette. I imagine porters of the game might have found that amusing. The last item in the game is The Spectre Snare.

EDIT: The above is not the case. There are 127 items, and 256 bytes in a sector. I was seeing the consequences of of an 8-bit value overflowing and "rolling over." So the Spectre Snare appeared, as I expected, but had all sort of corrupt data associated with it. The first byte is 00, as I guess Carnford wanted to start counting items from 1. ;)

On the Apple ][e character disk, Garth's inventory is stored on track 02, sector 0F. The first byte is 00. The rest of the bytes are used for inventory, one per item in the game. An FF indicates that the item is infinite in stock. Any other number is treated as the number of items remaining to sell. This is why the cheat of sneaking any old random disk with data on it into the drive when shopping at Garth's will seem to fill up his inventory--every random byte except for 00 will cause an item to be for sale.

Addendum and warning: if you use the phony chardisk cheat, you must remember to remove the diskette before actually purchasing anything, or the data on your phony disk will be corrupted. The sequence of events should be: First enter Garth's. Now substitute your surrogate character disk, select a character, and press the button to buy from Garth. Do not press B to go backwards in the list, as it may fail and crash the game (though it should not fail on the Apple ][e). Scroll to the item you want to purchase. Next, put your real character disk back in the drive. Finally, buy the item.
Death and drek? WTF?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Horpner wrote:The mystery square at 17N, 4E on the third level of Harkyn's Castle exists in the Apple 2e version. It's marked as special, but has no noticeable effect--so far.
Does the disk drive spin?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Horpner wrote:I wrote elsewhere that I thought PHDO was disallowed on the 3rd level of Harkyn's Castle. It is not. You can PHDO anyplace you like.
The APAR and PHDO spells are "linked"; meaning if you can do one, you can do the other.

I still believe this is a mistake on MC's part. :?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Darendor wrote:
Horpner wrote:The mystery square at 17N, 4E on the third level of Harkyn's Castle exists in the Apple 2e version. It's marked as special, but has no noticeable effect--so far.
Does the disk drive spin?
No, it doesn't.
Death and drek? WTF?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Darendor wrote:
Horpner wrote:I wrote elsewhere that I thought PHDO was disallowed on the 3rd level of Harkyn's Castle. It is not. You can PHDO anyplace you like.
The APAR and PHDO spells are "linked"; meaning if you can do one, you can do the other.

I still believe this is a mistake on MC's part. :?
I walked through this level fairly, to see what it's like without APAR or PHDO, and I'm starting to sway to your point of view. The evil little group of teleporters at the top center of the screen will fail to have their extremely annoying effect without preventing easy cheats.
Death and drek? WTF?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

I've beaten Mangar with this group, and have a new theory about the magical mystery square.

I tried out Darendor's theory about spell-binding Mangar and walking onto that square. Unfortunately, it's impossible to do. But the reason why is interesting. A spell-bound Mangar attacks your party immediately with deathstrike and other spells. He's a total ass once you get him in your party.

I also discovered that if I used the Snare on him with Thor in my party, Mangar dies, or disappears or something. Maybe that's what the clue means.

Based on how that Magical Mystery Square behaves, I've decided that its bug involves a teleport trap. I think it's meant to teleport you down a level or two if you step there, forcing you to waste time working your way back up. But due to a bad implementation, the trap fails because teleportation is disallowed on the next two levels down. The easiest implementation of a teleport that crosses levels would be to simply call the APAR routine with set parameters. But the scheme falls victim to the code that prevents the player from engaging in illegal telports. This explains why the level re-loads itself--that's the effect you get when you try to teleport to a level that disallows it.

The Amiga version gets stuck in a tight loop that locks up the game, casting APAR over and over again. The other versions somehow avoid having that happen.

Finally, on the Amiga version, Kylearan teleports you to The Adventurers Guild after you win. On this version, he merely kicks you one square south into the anti-magic square--the bastard.

In this version of the game, the thor fgn can be used only in battle. That explains why he's programmed to disappear after a single battle.

It's much harder to hit monsters in this version. I literally could not hit the greater demons and vampire lords in this battle with my level 33 PA, WA or HU. But everything falls easily to the MIFI spell.
Death and drek? WTF?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Horpner wrote:This means the maximum amount of XP you can store on the disk is 99,999,999. That's most likely higher than what the game engine can actually process, but theoretically it's enough to get a paladin to level 491. The game system should utterly break down long before that, though.
I've tried this out, and the game actually can handle my Hunter having 99,999,999 experience. Moreover, it didn't "roll over" when he killed a skeleton and some gnomes. It went right over 100 million. Examining the data again, it looks like the exp might take up as many as 12 bytes, allowing XP to get as high as 999,999,999,999. When I tried it, it worked! That sets maximum theoretical level of my hunter at 5,000,0011. Any body care to spend several days (real-time) in the Review Board leveling him up? Exp really does roll over back to zero if you gain any when you have 999,999,999,999. It was pretty funny, because I had the patience to level him up to 273rd, and when I went back to the review board with only 29 XP they refused to listen to my pleas and demanded 53 million experience before I could level up again.

Gold is stored as 12 decimal digits as well, most likely. There appears to be room in the data file.
Death and drek? WTF?
User avatar
Marco
Posts: 81
Joined: Mon Dec 10, 2007 7:45 pm
Contact:

Post by Marco »

Darendor wrote:I had a bit of a brainstorm...

Notice how this square only has the drive run when you walk onto it from the north and not the south? Well it seems to me that the game is checking the party for something acquired after you've gone over this square. (*SNIP*)
I had not noticed that. Last time I played around with this square, the drive was running every time I walked over it -- even if I just stood on the square and turned in place. This was the case on the Apple II version (which of course is on emulator, but drive accessing events are displayed on my Apple II emulator of choice, AppleWin). I'm fairly sure this was the case on the PC version, though I actually haven't fired it up in a couple of years. I have been over this square on the Apple IIGS version, and I'm pretty sure the drive was accessed, but I don't remember if it did so each time, or only the first time you walked over it. It's been almost 20 years since I've played the GS version, and I never did get it working properly on emulator. I'm now very curious about the Commodore 64 version, since I've never tried this one out. I did not know that this square crashed the Amiga version of the game. It could just be something related to a corrupt disk image -- there's plenty of those floating around. Just look at the Apple version of BT III.

At any rate, the other two mystery squares (Sewer level 2 and Harkyn level 3) do not access the disk. Again, the versions I have experience with are the Apple II, Apple IIGS, and PC.

Marco.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Horpner wrote:Based on how that Magical Mystery Square behaves, I've decided that its bug involves a teleport trap. I think it's meant to teleport you down a level or two if you step there, forcing you to waste time working your way back up. But due to a bad implementation, the trap fails because teleportation is disallowed on the next two levels down. The easiest implementation of a teleport that crosses levels would be to simply call the APAR routine with set parameters. But the scheme falls victim to the code that prevents the player from engaging in illegal telports. This explains why the level re-loads itself--that's the effect you get when you try to teleport to a level that disallows it.
On the C64 version, the disk drive only spins once, then if you say rotate on the square it behaves like a teleport special (i.e. Teleport to say 7N, 7E for instance), only it teleports you to where you are - almost like a spinner only you remain facing the same direction. And why would it try to teleport you down a level? I don't get it.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Horpner wrote:The Amiga version gets stuck in a tight loop that locks up the game, casting APAR over and over again. The other versions somehow avoid having that happen.

Finally, on the Amiga version, Kylearan teleports you to The Adventurers Guild after you win. On this version, he merely kicks you one square south into the anti-magic square--the bastard.

In this version of the game, the thor fgn can be used only in battle. That explains why he's programmed to disappear after a single battle.

It's much harder to hit monsters in this version. I literally could not hit the greater demons and vampire lords in this battle with my level 33 PA, WA or HU. But everything falls easily to the MIFI spell.
On the C64 version, a square that teleports you to the entry stairs lies north of Kylearan. And also on the C64 version the Thor Fgn also only can be used during battle and disappears after combat.

Hum.
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Darendor wrote:On the C64 version, the disk drive only spins once, then if you say rotate on the square it behaves like a teleport special (i.e. Teleport to say 7N, 7E for instance), only it teleports you to where you are - almost like a spinner only you remain facing the same direction. And why would it try to teleport you down a level? I don't get it.
The idea is that you're supposed to figure out that you can go around that square by taking one of the doors to the south of where you get teleported in. Otherwise, you'd keep getting sent back to level 3 or 4. I'm guessing it would be level three, since that would be far more annoying.
Death and drek? WTF?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Now that we've been examining the contents of the dungeon disk, maybe we could figure out what that special square is all about finally.....
Post Reply