Daggerfall Mechanics thread: Volunteers welcome

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H »

Yeah, I wish there was another way. If we had the original code, even Unity would be unnecessary; we could just modify the game code however we want, likely implanting it with an HD engine when the time came. For 19 years I wished that was possible, but now we have Unity to make up the difference.

I don't intend to perfectly duplicate Daggerfall's formulas by the time we're finished. It'd take far too long to work down every variable, especially the blind and conjoined variables. I also recognize this topic isn't strictly necessary in many regards; for example, Interkarma could just use the base combat formula given by the Daggerfall Chronicles and I'm sure that'd have at least an 85% fidelity to vanilla, beyond the perceptivity of the average player; or just substitute in any general formula for Spellmaker and item costs. Sooner or later, though, someone would stop and say, "Wait, this isn't what Daggerfall really played like." That's what I hope to catch prior to a full release. We could whittle everything down over a period of years (months?) through natural gameplay, but some precision testing will get us close enough, maybe like a 96% fidelity to vanilla, where we can stop and say, "Any further testing provides conflicting results, so there's nothing we can do now." That is what I call "finished." Sooner or later it'll get done, and I prefer sooner.

Thankfully, the testing I've done so far hasn't taken nearly as long as it might sound. I estimate that everything recorded in the first post has so far taken me four hours, which sounds like a lot, but I feel like I'm getting a lot done. I'm just using an editor called DaggerEd, which lets me modify nearly everything in a character, and a test character who I'm attaching to this post. I can test, for example, 100 willpower vs a Vampire Ancient for 3 tries, and then reduce Willpower to 1 and see the difference in a matter of minutes. A series of 10 tests can take as little as 5 minutes. Recognizing and isolating the variables, and being creative enough to find a test for them, is the most difficult part, so the time commitment is minor. Also, we're far enough away from release that a gradually accumulated testing time should be enough to reach sufficient fidelity. Daggerfall appears to be remarkably consistent in its programming, too, which could make the work much simpler than it sounds.

Above all, I guess this is just a way I feel I can give back to Interkarma and the other programmers while they're bringing DFU to life. If everyone works in unison, it all seems to feel easier.

EDIT: One concrete example is the falling damage testing I did. I think it took me about 15 minutes, and it looks like I tested every possible variable. Now the only part remaining is using a stopwatch to correlate air time and damage taken, after which a high-fidelity formula could be written within minutes. This is what's really great about it: a little work tends to go a long way. Shops and the combat formula will most likely be the most time-intensive parts of the matter, with spell cost formulas in a distant third.
Attachments
TESTSAVE0.zip
(36.27 KiB) Downloaded 184 times

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Narf the Mouse »

I'm fairly sure Medical decreases rest time to heal; Rapid Healing (General) decreases rest time to heal; Regeneration heals you slowly over game time (I remember checking and seeing my HP go up while traversing the dungeon fairly well enough to be sure enough to post it here). Both Rapid Healing (General) and Regeneration, when taken together, can reduce your 1st-level time to heal to full from near-zero from around half a day or more to a few hours at most.

Athleticism seems to provide a minor boost to run/climb, although I have no certain data; just intuition from having played a lot. Which might be confirmation bias. Possibly also swim.

Mercantile goes up by single item; it goes up much "faster" if you buy/sell one item at a time, rather than a bunch (that is, select an item, buy or sell; rather than select a bunch of items, buy or sell). I'd rate this as "beyond a reasonable doubt".

Luck does seem to have an effect on the acquisition of higher-level gear from corpses, but this may be confirmation bias. I know I've sometimes left PH with little more than Iron, and other times, with more than one Elven.
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H »

Very good, I'll have to check the impact Medical has on healing rate as well. Regeneration provides a fixed amount of health, regardless of level or max health, whereas Rapid Healing appears to be in proportion to max health. Many of my characters with Regeneration have rested to full in 2 hours or so in Privateer's Hold, but by the time they're level 8 or 10 the gains are actually lower than with Rapid Healing. More testing awaits... Thanks for the tips.

I'm working on spell cost formulas right now. Sometimes I think I could be a programmer, but instances like this tell me I never should be. Does anyone recognize how a coherent formula could exist that adheres to the pattern shown here? (Click to make bigger)
Image
Linear formulas are pie for me but entering exponentials and non-changing values is throwing me for a loop. It's pretty likely I'm going to just have to get the data and let someone more mathematically-inclined make the final calculation, since I keep getting lost on small details.

EDIT: I've replaced the image with one that adds percentage change, so that demystifies it... a little. And a good lesson has already been learned: scaling up "Per X Levels" provides a uniform decrease in both gold and magicka cost. Huzzah!

EDIT2: I really don't know what's happening now. The same formula, applied in two different places, actually breaks in some instances and provides zero change. It would both make sense and be fair to smooth out the percentage change so that a distributed change occurs at each point, rather than the jumping percent change that currently occurs in the formula; perhaps we can call it a bug fix.

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by LypyL »

Great stuff! I love this thread.
Jay_H wrote: I'm working on spell cost formulas right now. Sometimes I think I could be a programmer, but instances like this tell me I never should be. Does anyone recognize how a coherent formula could exist that adheres to the pattern shown here? (Click to make bigger)
The thing about that is you only here about the success stories 99% of the time, giving you the impression that programmers are wizards, and not the times when they're smacking their faces into the walls over and over again because they missed something obvious :D

Usually with daggerfall, I find myself going through a series of "I think I got it!...no wait" before finding anything useful :lol:
EDIT2: I really don't know what's happening now. The same formula, applied in two different places, actually breaks in some instances and provides zero change. It would both make sense and be fair to smooth out the percentage change so that a distributed change occurs at each point, rather than the jumping percent change that currently occurs in the formula; perhaps we can call it a bug fix.
What's your method for gathering the data out of curiosity?

Also, be careful with DaggerED - I noticed that it was editing parts of the save file that it isn't supposed to when comparing the edited save file with an original using a hex editor. It probably won't have any effect on your testing, but something to keep in mind.

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H »

So far I've been using the Spellmaker inside a Mages Guild. For now it's an Incense Mages Guild, and I have 1 personality, 1 mercantile, and 1 in every magic school. After I'm done getting what I can, I'm going to change some of those variables to see if spellmaker costs change, and how much the magicka cost decreases as spell skill increases.

Thanks for the warning about DaggerEd. I noticed that it changed my Argonian to be a female the first time and added a Magicka=2xInt trait to every new character, but it's been consistent otherwise (I also created a spare character with Low Tolerance to Disease and opened it in DE just to make sure it was reading that correctly, and it was). I'll watch for any other changes in my characters as I move along.

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Narf the Mouse »

I think that's the result of trying to do multiplication and division operations using integers rather than floats. forex: 3 / 2 = 1 in integers (on any computer I've programmed on that I can recall).

The intervals of 80, for example, look like the result of (x / y) * 80, possibly with an accumulator. The upside is that we can (and I suggest we do) use floats to get a much more precise result.

Or use integers and fixed-point arithmetic. On second thought, that would solve any platform-problem differences (how CPUs solve floats is inconsistent, and not specified by (most?) standards). Well, aside from the docs for that CPU, but that's a different question...
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H »

I'm grateful to be surrounded by people more expert than myself. :)

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Narf the Mouse »

Jay_H wrote:I'm grateful to be surrounded by people more expert than myself. :)
There's always more to learn. :) Even if you know the subject already; forex, each time I've read through the linear algebra section of a game programming book, I've learned at least one thing I didn't know before.
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

User avatar
EpicSpellsword404
Posts: 50
Joined: Mon Sep 21, 2015 12:26 am

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by EpicSpellsword404 »

Thanks for the long reply. Anyway, I'm pretty sure there's no haggling or anything for the spellmaker, it depends only on the spell. Also, Athletecism makes you jump higher. I think it's the same as having a Jumping spell up all the time because I remember casting jump with a character that had Athletecism and it had no noticable effect.

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H »

Very good! Thanks for the leads, I'll have to include them in testing.

Post Reply