0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
QueuedJar
Posts: 3
Joined: Sat Jan 19, 2019 5:22 am

0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by QueuedJar »

Resting regeneration and interruption chance have always felt a bit off to me in DFUnity and I've yet to see anyone discuss it, but I've finally come around to formally testing it. I created identical characters in both classic Daggerfall and DFUnity 0.7.32; Breton with default Battlemage class named Fabio with only the most fabulous of Breton headsprites (the one with the beard and earings, very critical for testing). Answered all of the interview question things equally so no stats were changed and retained basically identical level of all skills and tested this at level one in Privateer's Hold.

The character on both versions have 35hp, and after attacking a few rats I've gotten it down to halfway on both, so about 17/18 health needed to regen. I engage the old rest until healed on both versions. Daggerfall classic takes 6 hours to fully heal this amount, while Daggerfall Unity takes 10 hours to regen the same amount.

Magic is about right, with 110 magic points regening in 8 hours of rest in both versions.

I ran/jumped/flailed around to deplete enough stamina and see how much could regen in one hour. Stamina seems to regen much faster on Unity, with 25 stamina per hour compared to classic regening 15 stamina per hour.

Not sure exactly what enemy interrupting chance is tied to, but if I had to assume it would be luck. Both versions had the character at 50 luck, yet enemy spawning chances seem to be significantly higher on Daggerfall Unity than classic. When testing in classic it had been 32 hours of rest before the first enemy interrupted my rest, yet in Unity within 30 hours enemies had poked me awake 5 times, once even on the first hour of sleep (which I know is possible in classic as well, but has happened quite rarely in my experiences).

Not sure if this was intentionally all rebalanced to make the game more challenging, but to most players Daggerfall by itself is already pretty daunting, and such a slow health regen/high rate of interruption when trying to regen said health makes it a lot more difficult, and is the one issue I've had that's kept me from fully enjoying this wonderful port.

Thanks again to everyone involved with this project, I'll gladly answer any further questions, and have a lovely day.
Last edited by QueuedJar on Sat Jan 19, 2019 7:35 am, edited 7 times in total.

User avatar
Jay_H
Posts: 4070
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by Jay_H »

Welcome to the forums! :)

Though not a dev myself, I can still assure you no one here has tried to make Daggerfall Unity harder than classic :lol: Most of the calculations present are just approximations of what classic did. The monster spawning in particular is hard to replicate, so some adjustments were made. In classic, for example, you can hide in a closet and never get spawned on; in DFU you'll be unable to rest while a monster tries to spawn in, even if it has no room to.

Much of the credit for these things belongs to forum user R.D., so we'd have to wait for his feedback on why things are the way they are if he decides to offer it.

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

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by Interkarma »

Welcome the forums. :)

As far as I'm aware, random spawns and health recovery are coded based on formulas extracted directly from classic. But something to keep in mind is that classic has very loose timing management that is CPU bound, so the speed of a CPU or number of DOSBox cycles will yield different results on different systems. And randomness can be highly variable anyway. There's no one correct answer here.

Allofich/R.D. has tried to tune the end result to be reasonably equivalent to classic outcomes if running on the original 486 target platform, but there's obviously some interpretation required. It's more subjective a process than you might think.

I might move this one to General as it's more of a discussion around balancing and tuning than a bug directly. If Allofich feels something is actually amiss, I'll shift it back until addressed.

Edit: Regarding enemy interruption while resting, I remember raising this with Allofich a while back. I felt it was a bit high as well. But after testing in identical locations in classic vs. DFU, the interruption rates were very similar. Once exception was a spot in Privateer's Hold (centre of open area at bottom of throne room stairs) where nothing would spawn in classic. It's unknown why this would happen, but seems to be more of an issue in classic than intentional as far as we can tell. There's no evidence of "safe zones" or the like in the game data or decompiled code. I've been trying to dig out my test results in github comments but haven't been able to put my hands on it yet.

Edit2: For resting health regen rates, the Medical skill and Endurance are most involved, and Rapid Healing special plays a part too. You can see the full formula here.

BansheeXYZ
Posts: 555
Joined: Fri Oct 23, 2015 8:19 pm

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by BansheeXYZ »

I just tried resting at both 15k cycles and 150k cycles (cpu speed) in dosbox, and the regeneration amounts were the same. These results don't seem to be CPU bound.

Next thing to do will be to test two identical starting characters and see if there's a difference like the OP states.

Edit: My barbarian with 70 endurance and 21 medical healed 6hp per hour in both DFU and classic.

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

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by Interkarma »

BansheeXYZ wrote: Sat Jan 19, 2019 8:38 am I just tried resting at both 15k cycles and 150k cycles (cpu speed) in dosbox, and the regeneration amounts were the same. These results don't seem to be CPU bound.
My comment around CPU timings was not in relation to health regeneration. I'm sorry that was unclear. :) My second edit links the formula for resting health regeneration. This should be the same in classic and DFU as far as I'm aware.

Allofich is the best one to comment here as he's the one who reverse engineered most of the formulas from classic. He has deeper knowledge here than myself. From a prior conversation with him, I understand the rate of random spawns during rest is tied to CPU speed. If this is incorrect, then the misunderstanding is on my end alone.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by King of Worms »

In my opinion, the rest enemy spawn rate is ridiculously high. And it messes up with gameplay, especially on lower levels. Impossible to finish 1st dungeon, because the interuptions of rest make it impossible to heal. You fight more than u regen.

I spend much time on original. My guess the spawn rate was 50% lower.

BansheeXYZ
Posts: 555
Joined: Fri Oct 23, 2015 8:19 pm

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by BansheeXYZ »

King of Worms wrote: Sat Jan 19, 2019 9:34 am In my opinion, the rest enemy spawn rate is ridiculously high. And it messes up with gameplay, especially on lower levels. Impossible to finish 1st dungeon, because the interuptions of rest make it impossible to heal. You fight more than u regen.

I spend much time on original. My guess the spawn rate was 50% lower.
I think it only seems that way because classic has these mysterious pockets of safeness where you can sleep infinitely. And like Interkarma said, no one has found anything in the code to indicate this was by design, which means it's a bug of sorts.

QueuedJar
Posts: 3
Joined: Sat Jan 19, 2019 5:22 am

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by QueuedJar »

BansheeXYZ wrote: Sat Jan 19, 2019 12:18 pm I think it only seems that way because classic has these mysterious pockets of safeness where you can sleep infinitely. And like Interkarma said, no one has found anything in the code to indicate this was by design, which means it's a bug of sorts.
I've speculated that there might be some sort of safe space mechanic as well. I thought that maybe you were more safe when behind a closed door when not in a big hallway, or maybe sleeping near a light made you more safe, but if it isn't clear on how it's done. Consulting the Daggerfall Chronicles simply states that "(In Privateer's Hold) there are only a few places for the PC to rest." And pretty much simply suggests it's hard to find places to rest and doesn't indicate anything specific.

Al-Khwarizmi
Posts: 177
Joined: Sun Mar 22, 2015 9:52 am

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by Al-Khwarizmi »

To be honest, I have always thought that the safe space mechanic was intentional. I used it to my advantage in classic (but I didn't think I was using an exploit, just playing the game normally looking for safe places to rest), and it made sense to me, I mean, why not? It makes perfect sense that not every place would be equally safe to rest, enemies are bound to have their routines and their places where they hang out more, and others that they never visit.

OTOH,
BansheeXYZ wrote:And like Interkarma said, no one has found anything in the code to indicate this was by design, which means it's a bug of sorts.
However, there must be something in the code that does this, regardless of whether it's a feature or a bug. Why the fact that it hasn't been found would indicate that it's a bug?

Finally, even if you're right and it's really a bug, I wonder if it would be a good idea to (try to) implement it anyway. In general I'm in favor of not implementing bugs (such as falling into the void or things like that), but in this case the game will feel different without this, and not necessarily better. I think looking for safe zones to rest added depth to the game instead of removing it, be it bug or not.

User avatar
mikeprichard
Posts: 1037
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.7.32 Win 10 x64: Resting enemy interruption chance and regen rates not classic parity

Post by mikeprichard »

Agree with Al-Khwarizmi here. I never thought those "safe areas" in dungeons were unintended; in fact, they also made perfect sense to me within the logic of the game world. That said, I obviously don't have the knowledge of the game code others here have.

Post Reply