Reply 20 of 24, by Sardonyx
Namrok wrote on 2020-10-22, 15:05:Turbo Pascal you say... […]
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.