VOGONS

Common searches


Temple of Apshai Trilogy

Topic actions

Reply 20 of 24, by Sardonyx

User metadata
Rank Newbie
Rank
Newbie
Namrok wrote on 2020-10-22, 15:05:
Turbo Pascal you say... […]
Show full quote

Turbo Pascal you say...

This might be old hat here, but once upon a time I made an attempt to play the DOS version of Wizardry 1 in dosbox. The RNG seemed totally FUBARed. I was going out of my mind, all my characters were constantly losing stats every time they leveled up. I never once successfully raised a dead character. My experience wasn't mapping to any of the blogs or discussion I saw about Wizardry on other platforms. I went looking through what these chances were supposed to be. Even found this old document called the "Wizisystem" I think that exhaustively detailed all the formulas Wizardry uses. At the end of my quest, I found a github repository of someone that had decompiled the pascal code Wizardry was written in for the Apple II, and double checked the formulas myself.

Then I noticed the rand function for Pascal on the Apple II was different from the rand function for Pascal in MSDOS. If memory serves, one returns 0-255, and the other returns 0.0-1.0. Or something like that. I'm more or less convinced whoever ported it to MSDOS fucked this up, as certain RNG outcomes seemed clamped to one end actually playing it.

Makes me wonder if something similar happened here.

I hadn't heard of that story about Wizardry, but that definitely happens. I ran into it as a kid during that era while typing in BASIC programs from magazines. Subtle details like that are easy to miss, though you'd hope they'd be caught in testing.

I'm not sure how Apshai (or the DunjonQuest engine in general) calculates experience. If it is random, it's conceivable it's accidentally calculating 0.0-1.0 and then rounding down (which would basically always be 0).

The treasure values in silver are broken though and those are a fixed table. The Copper Ingot, for example, should be worth 20 silver. In the DOS version, the Innkeeper pays out 450 when a character returns with it. Looking through the Treasure Key there is only one item worth 450 silver - the Gold Ingot. Could be a coincidence, but that seems like something that someone read incorrectly while implementing. The game displays the item as a "Copper Ingot" and it's in the right place, but the silver value is wrong.

It's surprising to me it was released in this state. It should have been immediately obvious how broken it is, from just a few minutes of testing, to anyone who knows the game. I could understanding missing an item valuation here or there, but the fact that character progression is completely broken should really have caught someone's attention.

Reply 21 of 24, by Sardonyx

User metadata
Rank Newbie
Rank
Newbie
NewRisingSun wrote on 2020-10-22, 21:22:
Sadonyx wrote:

Is there any chance the game executable is looking for something on the disk (weak bits, half tracks, etc.) and running differently if it doesn't find them?

No. When I say that the keydisk protection scheme "wraps" the program file, I mean that the keydisk checking routine replaces the protected program's original starting point. It looks for the specially-formatted track, and if it finds it, executes the protected program normally by branching to the protected program's original entry point, and if it does not find it, just bails out to DOS. So by the time you see the title screen, the protection is already gone and done.

And the game behaves identically even with a protected disk image in an emulator that supports protected disk images. 😀

Makes sense, thanks for the explanation 😀

Reply 22 of 24, by newtmonkey

User metadata
Rank Oldbie
Rank
Oldbie
Namrok wrote on 2020-10-22, 15:05:

This might be old hat here, but once upon a time I made an attempt to play the DOS version of Wizardry 1 in dosbox. The RNG seemed totally FUBARed. I was going out of my mind, all my characters were constantly losing stats every time they leveled up.

I never once successfully raised a dead character. My experience wasn't mapping to any of the blogs or discussion I saw about Wizardry on other platforms. I went looking through what these chances were supposed to be. Even found this old document called the "Wizisystem" I think that exhaustively detailed all the formulas Wizardry uses. At the end of my quest, I found a github repository of someone that had decompiled the pascal code Wizardry was written in for the Apple II, and double checked the formulas myself.

Then I noticed the rand function for Pascal on the Apple II was different from the rand function for Pascal in MSDOS. If memory serves, one returns 0-255, and the other returns 0.0-1.0. Or something like that. I'm more or less convinced whoever ported it to MSDOS fucked this up, as certain RNG outcomes seemed clamped to one end actually playing it.

Makes me wonder if something similar happened here.

I played through Wizardry 1-5* (DOS) within the last couple of years, and noticed that (like you said above) you more often than not drop stats on level up. I was curious why—and especially why it gets MUCH worse in Wizardry III and then is fine with Wizardry V. Well, according to the "Where Are We?" application (https://www.eskimo.com/~edv/lockscroll/WhereAreWe/) that hooks into these games to provide an automap and real-time statistics, you have roughly a 33% chance of any given stat below 18 dropping a point when leveling up. This isn't so bad in Wiz I since you likely have rerolled a few times to get 18 in your key class stats ... but when you import a party into Wizardry III it caps all your stats to the class minimums, which are often below 18—so it gets much worse. This was apparently corrected in Wizardry V (DOS) as you rarely ever suffer stat loss upon level up.

*Excepting Wizardy IV

Last edited by newtmonkey on 2022-04-02, 14:05. Edited 2 times in total.

Reply 23 of 24, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
newtmonkey wrote on 2020-10-23, 09:36:

I played through Wizardry 1-5 (DOS) within the last couple of years

Off-topic, but – you played Wizardry IV!? O.O

Well, according to the "Where Are We?" application (https://www.eskimo.com/~edv/lockscroll/WhereAreWe/) that hooks into these games to provide an automap and real-time statistics

Wow, that's neat. I'm going to have to remember that one.