DOS32A causes regression in Breaking and Entering behaviour

Off topic discussion. Talk about gaming and life in general. Be awesome to each other.
Post Reply
YumekoMakai
Posts: 6
Joined: Mon Oct 23, 2023 7:28 pm

DOS32A causes regression in Breaking and Entering behaviour

Post by YumekoMakai »

Hey all.

My current playthrough of Classic Daggerfall recently had the character's legal reputation set to revered after being caught Breaking and Entering. I thought this was strange, since this behaviour was explicitly mentioned by Bethesda to have been patched in 1.06.200 (of course, I'm running the latest patch myself):
Illegally bashing down doors no longer gives you a revered legal reputation when you are caught.
The UESP Article on Reputation also mentions that the expected behaviour is:
In the latest v213, your reputation will drop below -100 if you commit this crime. It is also not possible to yield to the town guards if they try to arrest you. They will kill you on the spot
I then booted up x86box with a setup I have for testing, patched but still using the original DOS Extender in FALL.EXE. I bashed down a door and got caught, and the behaviour matched what was detailed in the UESP article: my character would instantly die if I surrendered, and my reputation was set to Hated.

I proceeded to install DOS32A onto that copy of the game and repeated the test. When I was accosted by the Guards after bashing the door, my reputation was set to Revered and while my HP would drop to 1, I wouldn't die from the Guards if I surrendered.

This was repeatable in each case: the DOS32A FALL.EXE exhibited the broken behaviour always, while the original always worked as described by UESP.

It's interesting to me since DOS32A is recommended to avoid save game corruption, but it evidently has an impact on some of the game logic. Curious if anyone has any insight on this? Thanks all!

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: DOS32A causes regression in Breaking and Entering behaviour

Post by Interkarma »

I can't shed any light on this, but it is very interesting!

YumekoMakai
Posts: 6
Joined: Mon Oct 23, 2023 7:28 pm

Re: DOS32A causes regression in Breaking and Entering behaviour

Post by YumekoMakai »

Yeah, I'd be surprised if anyone knew as of right this moment. It's obscure behaviour — you can find posts on Reddit and the like about people getting revered reputation, but no actual pointers towards the cause of it (DOS32A).

It's pretty obvious that the final official behaviour is bugged anyway, since you instantly die and lose up to 200 reputation with the region you were caught in. That's equivalent to up to 10 murders!

I suspect that the behaviour is just very memory dependent. Nothing else I can think of is affected by the change in extender, but maybe it's just subtle all over the place.

User avatar
MrFlibble
Posts: 411
Joined: Sat Jan 27, 2018 10:43 am

Re: DOS32A causes regression in Breaking and Entering behaviour

Post by MrFlibble »

YumekoMakai wrote: Wed Oct 25, 2023 4:02 am It's interesting to me since DOS32A is recommended to avoid save game corruption, but it evidently has an impact on some of the game logic. Curious if anyone has any insight on this?
YumekoMakai wrote: Wed Oct 25, 2023 12:27 pm It's pretty obvious that the final official behaviour is bugged anyway, since you instantly die and lose up to 200 reputation with the region you were caught in. That's equivalent to up to 10 murders!

I suspect that the behaviour is just very memory dependent. Nothing else I can think of is affected by the change in extender, but maybe it's just subtle all over the place.
I was not aware of this bug before, but as you say the problem lies with the original code, not DOS/32A. I've just tested this in DOSBox and I can fully corroborate your findings.

It looks like the only thing that using DOS/32A changes is that once the player's health drops to 1, the player character no longer takes any damage, whereas with the original extender any further damage results in instant death.

I have just played around with different types of illicit behaviour, and it looks that in the case of breaking and entering, the game just skips the court dialogue screen and forgets to reset the guards, because if you commit a different crime and then the court releases you, you get back to the street with 1 HP left (as opposed to doing jail time which leaves you with full health).

I've never observed any other ways in which DOS/32A would affect game logic, but it does indeed seem to fix almost all memory-related crashes -- at least, I've not had one while using it, whereas vanilla DF does crash for apparently no reason from time to time (again, played in DOSBox in both cases).

As for the reputation going up, I can only drawn an analogy with other games that have a limit to a certain value because of the memory size (in bytes) where this value is stored. IIRC, in Dune II, if your credits go over a certain value the game goes into overflow and will produce a negative number, effectively giving the player infinite credits. I can suppose that here, the reputation goes so low beyond the threshold it actually counts as the highest reputation possible instead. Again, this must be an error in the original game logic.

YumekoMakai
Posts: 6
Joined: Mon Oct 23, 2023 7:28 pm

Re: DOS32A causes regression in Breaking and Entering behaviour

Post by YumekoMakai »

Hey Flibble. Thanks for being my second opinion on this. :)

Yeah, underflow was probably always the likely explanation; it's just really curious that Breaking and Entering specifically causes these issues and how it's handled differently between extenders.

Part of me was trying to determine whether I should be playing with the original extender, but you're probably right in that this is the only behaviour affected since it's just inherently handled incorrectly. Save corruption avoidance is usually a better deal than some bugged behaviour in one crime.

Also curious about the development methodology that happened with the patch — did they just test to see if your reputation went down instead of up? I doubt they were intentionally abusing extender behaviour!

Just one of those Daggerfall bug things, but this one is super intriguing to me. Wish I had the knowledge to investigate it deeper, just to settle that curiosity.

User avatar
MrFlibble
Posts: 411
Joined: Sat Jan 27, 2018 10:43 am

Re: DOS32A causes regression in Breaking and Entering behaviour

Post by MrFlibble »

YumekoMakai wrote: Sat Oct 28, 2023 12:38 pm Also curious about the development methodology that happened with the patch — did they just test to see if your reputation went down instead of up? I doubt they were intentionally abusing extender behaviour!

Just one of those Daggerfall bug things, but this one is super intriguing to me. Wish I had the knowledge to investigate it deeper, just to settle that curiosity.
Unfortunately I, too, do not have enough knowledge to fathom any realistic understanding of why swapping the extender produces this effect. I can only guess that the devs must have "fixed" the revered reputation problem in such a way that changing the extender breaks this fix.

BTW, I have an unpatched install of the game for testing (or rather, simple curiosity I guess), so I loaded my saved game and tried bashing some doors. Surrendering to guards is broken there as well (i.e. my HP was reduced to 1 and I got no court hearing), but I only got the "undependable" reputation (from "common citizen") when hit by a guard.

My guess is that getting the "revered" status was an accidental result of Bethesda fixing something else in a subsequent patch, and further it seems likely they received a bug report that only mentioned the reputation gain and not that you couldn't surrender properly, and fixed just that -- and by the looks of it, in some hacky way if the reputation loss is not disproportionate to the crime and even breaks back to "revered" when a more robust memory manager is in play.

I really wish someone would go through the vanilla binary and fix this and the other annoying errors by byte hacking -- I believe this should be quite realistically possible in a number of cases. Some time ago, when enthusiasts reverse-engineered Dune II, they not only produced the code for a source-port accurate engine recreation, but also provided enough info to fix certain bugs in the original DOS version, and also aid in modding the DOS version of that game. I wonder if the folks who did DF reverse-engineering for DFU such as Ferital could have some additional insights?

Post Reply