Daggerfall Mechanics thread: Volunteers welcome

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
ifkopifko
Posts: 170
Joined: Thu Apr 02, 2015 9:03 am

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by ifkopifko » Tue Jun 21, 2016 9:01 am

Hi there, very nice topic. I apologize for not reading it through completely, as I am a bit short of free time lately.

However, I took a shot at your wonderful excel sheets with the aim to improve precision. I think you have grabed it the wrong way, it seems like you should try to figure the "x" and "y" for the "gold cost" equation, as the "magicka cost" seems to be derived from the result.

Please, check the enclosed excell sheet, I have only tried three spells: Chameleon 1, Damage Health 1 and Wather Breathing 1.
At the top you can see a table with variables "offset, a, b". Disregard the offset value, it was not needed in the end. "a" and "b" are your "x" and "y" values in the equation for gold cost =x*starting+y*trunc(increase/level)
Magicka cost seems exactly = trunc(gold_cost/3.6694)
Don't ask about that number, dunno where it comes from, but it works perfectly for the three tested spells. :D Maybe it can be further improved in case it doesn't cut it for other spells.

You can also see some helper columns called "CHECK", used to figure out that weird 3.6694 number.

Where the gold cost equation is a bit off, like you noted in an above post, I suggest you double check that the recorded values are correct, because otherwise it fits "perfectly".

Hope it helps a bit...

Also, I did not understand what the folowing means:
Jay_H wrote:...If 60x+y=1208, and x+60y=500, I just have to solve for the variables... And I can find out the increase of each variable by testing 1-1-1, 1-60-1, and 60-1-1...
Maybe I can help if you elaborate a bit more on it.

EDIT: So this weird number 3.6694 seems to be related to skill_level. For skill 100 it seems to equal 40, and for skill 50 it seems to be 6.666.
Attachments
Spells edited.zip
(45.06 KiB) Downloaded 92 times

ifkopifko
Posts: 170
Joined: Thu Apr 02, 2015 9:03 am

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by ifkopifko » Tue Jun 21, 2016 1:35 pm

Ok, a new approach... hopefully a better one. :D

To get rid of that weird number 3.6694 etc and incorporate skill_level:
Magicka_cost will have it's own formula, similar to the gold cost. Its "x" and "y" will be called "c" and "d", but the ratio c/d is the same as a/b... so "d" is a function of "c", while "d" is dependant on the skill_level.
d=550-5*c

The reason for such a number (550) is because of the integer vs float division and trucating.

In case that my posts do not make any sense to you, just try to look at the updated excel sheets... for the three spells I have messed up with. :D

Cheers, and thanks for keeping me busy through the day. :D
Attachments
Spells edited 2.zip
(62.46 KiB) Downloaded 86 times

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H » Tue Jun 21, 2016 5:03 pm

This is excellent. With your explanation and a look through what you've added, it makes sense. My first guess wasn't that the magicka cost would be derived from the gold, but if that's the truth, then you've found it. Several of the functions you used are well beyond my understanding, so I'm glad more advanced users than myself are able to dig deeper into this.

I'm wondering about the specific numbers, not yet knowing how they correlate. The factor for spell skill 1 is 3.6694, for 50 is 6.666, and for 100 is 40. I would've expected the jump from 1 to 50 to be much larger than the jump from 50 to 100, since magicka cost is far more reduced from 1 to 50 than from 50 to 100. There's nothing to doubt about your math; it's all there. I just don't make sense of the result yet.

About the variable testing:
ifkopifko wrote:Also, I did not understand what the folowing means:
Jay_H wrote:...If 60x+y=1208, and x+60y=500, I just have to solve for the variables... And I can find out the increase of each variable by testing 1-1-1, 1-60-1, and 60-1-1...
Maybe I can help if you elaborate a bit more on it.
That was me thinking out loud about how to get to the specific values needed for each spell. I decided to do the whole thing yesterday, so my explanation was a little superfluous, but I wasn't planning on doing it so soon. That much is resolved for now, but thanks for the offer :)

ifkopifko
Posts: 170
Joined: Thu Apr 02, 2015 9:03 am

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by ifkopifko » Tue Jun 21, 2016 5:34 pm

Actually, I got rid of that strange number in the last version... now it seems that the dependence of magicka_cost on skill_level is linear, as described in my previous post. The equation for magicka_cost seems to be very similar to the gold_cost equation.

However, I fear we still don't have all the variables solved. I read on UESP that magicka cost of a spell is also dependant on the attribute governing the particular skill... I assume it means Willpower.

But I'm not a hardcore Daggerfall player (never used magic much), so there's a lot I do not understand. I have tried to solve a mathematical problem, but what exactly are the variables "starting", "increase" and "per level" values, and where do they come from?
And what is the difference between "Chameleon Normal" and "Chameleon True" for example?

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H » Tue Jun 21, 2016 6:04 pm

Heh, sorry, I had read your posts in reverse order. That's why I was stuck on those values; I thought they carried over. I'll have to try modifying Willpower to see whether that has an effect on magicka cost as well, since Willpower governs all magic skills in Daggerfall.

Don't worry about what you don't know. The "starting," "increase," and "per-level" values refer to the Spellmaker in the Mages Guild. Spells can be modified based on Duration, Chance of success, and Magnitude of power. In this example, using the Open spell, only Chance can be modified:
Image
If an Open spell is cast with 100 chance, it will open any door, period, as far as I understand.

Now, there are three boxes in the Chance section, each with a 1 inside them. The first is the flat value, or what I call the starting value. The starting value will never change. The second value is the increase value, or what the game would call the "increase per level," but I changed the name because it would be confusing (though I did confuse it on the right side of the spreadsheet). The third box is the "per levels" box.

The chance for the Open spell being made is derived from the relationship between those three numbers. The second box is multiplied by the character's level and divided by the third box, and the first remains static. This means that if a level 6 character uses an Open spell that has numbers of (3-5-1), the Chance will result in (3+5(6)/1), or a 33% chance of functioning. A level 2 character who uses an Open spell with numbers of (20-8-4) will result in (20+8(2)/4), or a 24% chance of functioning.

That's what's represented throughout the spreadsheet as the 1-1-1, or 1-60-1, or so on. 60 is the maximum modifier for Duration, and 100 is the maximum modifier for Chance and Magnitude. (Magnitude looks funnier since it uses a range for the first two numbers, but I just simplified that into a single number.) On the right side of the spreadsheets for most spell effects, I created equations to reduce all other variables than that which I was trying to resolve. Starting and Increase values individually affect spell cost differently per spell as they rise, so I had to find out what the difference was with each increased point in each one. That's why you see a bunch of 59s and 99s on the right side, and then the sum of the remaining magicka and gold: that's me taking 1 away from 60 or from 100, and then taking an equivalent amount from the magicka and gold sums to be able to divide 59 or 99 in, and get an individual unit for each one. I usually don't have such faith in my own math but the results were very consistent each time. For example, if you go into the Create Item page:
Image
I had to do the formula three times: one with the initial values (1-1-1), one with a maximum Starting value (60-1-1), and one with a maximum Increase value (1-60-1). I didn't bother with the third box since that appears to have the same effect in every spell.

I was able to get the values for 1-1-1, and then subtract it from the values for 1-60-1 and 60-1-1, leaving me with 0-59-0 and 59-0-0. With subtractions made from the magicka and gold costs as well, I just divided the magicka and gold sums by 59, which left me almost always with meaningful integers -- a very clean division, which is a good sign. The "incremental" is how much magicka or gold increases with each numerical rise in Starting or Increase values. In this case, for every point that the Starting value rises, the spell costs 60 more gold and 9 more magicka; for every point the Increase value rises, the spell adds 120 gold and 18 magicka to the cost.

Sometimes the result would end in a fraction like 4.202020, with a repeating end term, which to me is also a good sign. The third outcome was a number ending in .2033898, which was a very constant number where the ending was not a .202020. I feel like my math was good, even if it doesn't make that much sense out of context. Still, if I have made a mistake, it'd be better to find it out sooner.

For your second question, "Chameleon Normal" refers to a Chameleon spell that will stop functioning as soon as the PC hits an enemy with an attack, or if its duration ends. "Chameleon True" refers to a Chameleon spell that does not stop functioning regardless of combat, until its duration ends. The spells Invisibility and Shadow also use "Normal" and "True" variants.

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H » Wed Jun 22, 2016 8:34 pm

I just tested it on a Dispel Daedra spell, and having 1, 50, or 100 Willpower gave the same magicka cost in each case. We can rule out Willpower affecting spell costs now. For me we're at the close-enough stage where I'll move on to other things (we can scale magicka costs based on what we've already seen; it's not a precise formula but it'll give us very close results). If anyone has any variable they want tested, let me know and I'll give it a try. The mathematics from here on in Spellmaker are beyond me but if anyone wants to delve further in, I'm happy to help in what I can.

I've begun with combat testing now. My baseline is a character with perfect stats at level 15 vs a Barbarian, right-to-left swings only, Dwarven Mace. I've attached the save file to this post. I'm just hitting the enemy until it's dead, and then counting how many hits were successful. These are the results of the first 10:

10/11
10/10
12/13
11/12
11/11
12/12
10/10
11/11
10/10
11/13

This provides a 95.58% accuracy rate -- quite close to Daggerfall Chronicles' cited 97%. I'm going to change to 1000 Agility and 500 in weapon skill to see if there really is a hard limit on hit success. The 97% may just be based on limits of 100 in every attribute and skill, or it may be hard-coded into the game.

Tested with the same character, putting Agility to 1:

10/10
10/11
10/10
11/11
12/13
11/11
11/11
11/11
11/11
11/11

108/110, or a 98.18% success rate. Agility could be irrelevant to the combat formula, and at least appears irrelevant for To-Hit.

Agility back to 100, weapon skill at 50:

10/13
11/14
10/10
10/12
10/12
11/13
10/11
10/10
11/12
10/12

103/119, 86.55%.

With 1 weapon skill:

9/19
10/15
11/24
10/19
11/24
9/26
11/27
12/24
10/20
10/29

103/227, 45.37%.

Removing Bonus to Hit Human:

9/9
12/12
10/10
10/10
10/10
11/11
10/10
10/10
11/12
10/10

103/104, 99.04%. With all due respect to Daggerfall Chronicles, I believe we need to determine the To-Hit formula from scratch. The only variable to have any effect yet is weapon skill. (This only makes me think how much more awesome Daggerfall will be once we get the variables working.)

Reducing strength to 1:

In one test, 59/142, 41.55%. Strength governs Blunt Weapon, so this is a pleasant surprise. I'll have to test 1 Strength and 1 Blunt Weapon when I feel patient.

Phobia to Human added, Bonus to Hit Human removed:

10/10
11/12
9/9
11/12
11/11
10/10
11/11
11/11
11/11
11/11

106/108, 98.15%. Predictable due to the lack of Bonus to Hit's functionality.

Adrenaline Rush removed:

10/10
11/12
11/12
10/10
11/11
10/11
12/12
10/10
11/10
11/11

107/110, 97.27%. Didn't expect a change. This was just a curiosity.

Adrenaline Rush on, character at 2% health:

10/11
12/12
10/10
10/10
11/11
11/11
11/11
10/10
10/10
10/10

105/106, 99.06%. Not statistically significant, but I should be testing this where there's more room for improvement. I'll try it again later with less weapon skill.

Luck 1:

11/11
10/10
10/10
10/11
11/11
10/10
10/10
11/11
11/11
10/10

104/105, 99.05%. Luck appears to have no influence.

Using a Mithril Saber (Long Blade), set Agility to 1:

8/8
9/9
9/9
8/8
9/9
9/9
8/8
9/9
9/9
9/9

87/87, 100%. Agility is not used in To-Hit.

Using a Daedric Saber (Long Blade), set Strength to 1:

45/51
34/38
39/47

118/136, 86.76%. Not nearly the same impact as on Blunt Weapon. Perhaps there's some dual modifier where Strength both acts as Blunt Weapon's governing attribute and as a combat modifier.

Using a Daedric Mace, set Strength to 1:

39/66 in one test, 59.09%. Blunt Weapon is far more impacted by a loss of Strength than Long Blade is.

Using a Daedric Mace, set Strength to 1, Adrenaline Rush activated at 2% health:

16/21
20/23
15/21
18/25
9/16

78/106, 73.58%. A marked increase. My first guess would be that Adrenaline Rush adds a flat 25% to the net calculation. This would also seem to confirm the 97% hit maximum, since the previous test with Adrenaline Rush on in good conditions failed a few times.
Attachments
Combatsave.zip
(39.43 KiB) Downloaded 78 times

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by LypyL » Thu Jun 23, 2016 2:42 pm

Jay_H wrote: How much does the weapon status affect the formula? I have vague memories of sheathed being +25 and unsheathed being -40 or something, but that could be entirely conjecture on my part.
I honestly have no idea :) The chronicles unfortunately are filled with that kind of thing.
In one test, 59/142, 41.55%. Strength governs Blunt Weapon, so this is a pleasant surprise. I'll have to test 1 Strength and 1 Blunt Weapon when I feel patient.
Try testing the effect of strength on other weapons as well (and maybe test different stats on each weapon where it makes sense). With a strength of 1 and 100% skill in long blade I have about a 50-60% chance to hit. Increasing strength to 100 changes makes it very close to 100%.

edit: Nevermind, just got to the end and noticed you did touch on this. My results seem to be a touch different than yours (I used a character with all 1s for stats except for strength 100, and 100 for weapon skill).

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H » Thu Jun 23, 2016 5:31 pm

It sounds like other factors may be involved then. We should also bear in mind statistical irregularity; something with a 60% success rate could poll in at 40% for one person and 85% for another, if we don't test enough. I'll give Strength 1 a few more tries with Blunt Weapon to see if I can get something more like your results, and then try modifying things like Speed.

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

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Narf the Mouse » Fri Jun 24, 2016 5:19 am

AFAIK: The help text (right-click) for Agility seems to state a [-5, 5] modifier range; presumably, -5 for 0 to 9, and +5 for 90 to 100. I know it caps at +5 at 100; however, I have not tested 0 to 9, and only recall a -1 at 40. If that's a flat percent modifier, then could it be lost in the noise?
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: 3093
Joined: Tue Aug 25, 2015 1:54 am

Re: Daggerfall Mechanics thread: Volunteers welcome

Post by Jay_H » Fri Jun 24, 2016 5:31 am

There's some possibility that the setup I've been using has nullified some elements. If everything together produces a theoretical 145% To-Hit chance (which the game caps at 97%), and I reduce Agility such that To-Hit drops 30% or so, it'll still be 115%, or a capped 97%. Part of the reason I was testing at the highest levels possible is that it's a real grind for me to keep two numbers in my head, increasing one or the other about once a second, for a hundred or two attempts at a time; the 97% successes were easy since I didn't need to increase column B at all, only column A :) But a more sensible approach is to reduce to about 80% and then try modifying things, which I plan to do once I get another chance.

Post Reply