## Morrowind Equations

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
Epsilon
Posts: 40
Joined: 07 Jul 2012, 09:24

### Re: Morrowind Equations

HiPhish wrote:Great, looks like you beat me I have started a thread, so maybe you would like to share your findings:
http://forum.openmw.org/viewtopic.php?f=6&t=880

What does that script do and how would I use it? I never did anything with the Construction Kit, so I have no idea.

Another question: How is encumberance measured? Encumberance does affect jump height.
Posted the info over there in your thread. Catch me on the IRC! I'm "EppyMoon" on there. It's a lot less laggy than the forum.

Greendogo
Posts: 1449
Joined: 26 Aug 2011, 02:04

### Re: Morrowind Equations

@Modred11: I think I found where the 1.75 and .3 came from.

The 1.75 is probably fBaseRunMultiplier, and the .3 is probably fEncumberedMoveEffect.

While looking, I also found fAthleticsRunBonus = 1.0 which probably changes the bonus you get while running if it were anything other than 1.0.

The 5.0 that you multiply the Strength by to get the maximum encumbrance is called fEncumbranceStrMult.

There also seems to be some variables dealing with Fatigue and movement, though I didn't notice any difference when my fatigue was drained vs. when it was full in the timed trials. But nevertheless, they are:
5.0 = fFatigueRunBase
2.0 = fFatigueRunMult

1.5 = fFatigueSneakBase
1.5 = fFatigueSneakMult

7.0 = fFatigueSwimRunBase
0.0 = fFatigueSwimRunMult

2.5 = fFatigueSwimWalkBase
0.0 = fFatigueSwimWalkMult

Here are some that I can only conclude deal with your speed while swimming:
0.5 = fSwimRunBase
0.02 = fSwimWalkAthleticsMult
0.5 = fSwimWalkBase

Nandorianen
Posts: 10
Joined: 07 Aug 2012, 08:37

### Re: Morrowind Equations

I'm thinking you guys started from the wrong direction. GMSTs regulate most of the game's formulae, so it is logical to start with them, not with testing. Bethesda was pretty lazy with most of the formulae based on chance (skill + stat*0.2 + luck*0.1 vs the same for NPC or minus the cost), so it's pretty easy to figure out if you determine the GMSTs' effect correctly.
One thing almost everyone always forgets is the fatigue multiplier. Fatigue's effects are more omnipresent than luck's. It affects your chances to hit, block, cast, repair, pick locks, enchant, persuade, it even affects the static effectiveness of your mercantile skill and jumping height. What's even more important is the default GMST values, which give us multiplier 1.25 for full fatigue bar and 0.75 for empty bar. So when you test something with full stamina, thinking that you eliminated it's effects from the tests, you are actually doing tests with modified values. It was very misleading over the years. That's why you can see formulae like (skill*1.25 + stat/4 + luck/8) in many places. If you want to test things right, you need to set fFatigueBase to 1 and keep stamina at 100% at all times (with fFatigueReturnBase, for example) or also set fFatigueMult to 0 and forget about this completely.

I was doing some experimentation and data collecting over the years. I was hoping that Hrnchamd would help me figure out all the formulae and effects behind GMSTs, but he is too busy to do more than a few at a time (then he usually disappears for half a year). Still, his help is invaluable and I suggest you keep MCP and "Gameplay Mechanics" threads stickied. He figured racial speed differences mentioned in this topic some time ago, for example, and made a patch for it.

As for other GMSTs. There is MSfD, which covers some of them very loosely and often inaccurately. And there are other sources, such as forums and tests.
I have a file that I made for personal use, containing everything more or less solid that I found and/or tested myself about GMSTs and formulae. Of course, most of these are approximations, others may miss something, but I think it's a better start than nothing.
Spoiler: Show
Last edited by Nandorianen on 10 Aug 2012, 12:57, edited 4 times in total.

sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

### Re: Morrowind Equations

jackpot?

Kiesel
Posts: 16
Joined: 04 Aug 2012, 22:38

### Re: Morrowind Equations

Oh baby

Tarius
Posts: 574
Joined: 24 Oct 2011, 19:29

### Re: Morrowind Equations

fJumpAcrobaticsBase
fJumpAcroMultiplier
???? Basic Jump Height = (fJumpAcrobaticsBase + Acrobatics Skill * fJumpAcroMultiplier).
Disregard that, multiplier is something more complex.
Well, we know this isnt right since we have worked out a formula already. Unless of course we completely missed something.
I am a bigger fan of tons of control rather than taking the "user-friendly" approach.
-Okulo

Greendogo
Posts: 1449
Joined: 26 Aug 2011, 02:04

### Re: Morrowind Equations

Cool

Nandorianen
Posts: 10
Joined: 07 Aug 2012, 08:37

### Re: Morrowind Equations

Tarius wrote:
fJumpAcrobaticsBase
fJumpAcroMultiplier
???? Basic Jump Height = (fJumpAcrobaticsBase + Acrobatics Skill * fJumpAcroMultiplier).
Disregard that, multiplier is something more complex.
Well, we know this isnt right since we have worked out a formula already. Unless of course we completely missed something.
Fatigue mult, for one. I'll post some info in acrobatics thread.

Nandorianen
Posts: 10
Joined: 07 Aug 2012, 08:37

### Re: Morrowind Equations

Tested armorer. Formula on the wiki is incorrect. Looks like it was tested with apprentice's hammer (quality 0.8).
Chance to repair: (Skill + STR*0.1 + LUC*0.1) * Quality * Fatigue Mult. Let's call the resulting number X.
Judging by other formulae, I'd say that STR*0.1 is a typo. It should be STR*0.2 for consistency.

Next, it's VERY likely, looking at the Hrnchamd's discoveries, that it continues like this:
Set X to min(X, 100).
Roll d100 (0, 99), win if roll < X.
Repair by (X - roll) * fRepairAmountMult.

This GMST is set to 3 in vanilla. So with 100% chance to repair we'll get from 3 to 300 durability. With 50% and closest success (49) we'll get 3, with 50% and best success we'll get 150. It also means that increasing your chances beyond 100% is pointless. If you already have 100 STR and 100 LUC, you only need 80 skill for a better chance. However, with better skill you can use inferior apprentice's hammer with no problems. Or repair while being tired.
I'll update my GMST-post with this.

As a side note, there are other formulae on the wiki with incorrect numbers. Namely, hit chance (adjust for Fatigue Mult, include blindness) and picklock chance (see spoiler in main GMST post above for formula). Also it would probably be better to include console/script values so as to not forget them later. They are listed in MSfD and function like magical effects (setattackbonus, setcastpenalty and the like).

Nandorianen
Posts: 10
Joined: 07 Aug 2012, 08:37

### Re: Morrowind Equations

There are also some less obvious formulae to find. They are discussed on UESP's talk pages (here and here).
First, there is a damage formula. It is simple, but in vanilla Morrowind it is hardcoded, ignoring GMSTs, specifically created to tune it. MCP fixes this, including them in the formula.

There is also damage formula for ranged weapons. It adds bow's/crossbow's damage to ammunition before considering multipliers. Tricky thing is, it considers throwing weapons to be both ammunition and something you shoot it from. So the base damage for some 10-dmg throwing star would be 20, not 10. This should be considered. It's obviously just lazy coding, but if you do this normally, you'll lose some compatibility with unmodded Morrowind.

Then there is willpower, which supposedly helps resist paralysis and silence. I made some tests and discovered an estimated formula. It also seems that you can't resist silence spells.

Next, there is knockdown/staggering mechanic. I posted some testing results and conclusions on the talk page for combat. Formula is very unclear and hard to test. Again, it's best to look at the code.

AI will need some research too. How exactly Alarm/Fight/Flee settings work in various situations, how they correspond to distance, disposition and other things.

Lastly, there is a question about creatures. Looking at formulae where the game compares skills of both sides, we mostly think of a situation "player vs NPC". However, there are also creatures with a weird skills. Instead of the usual 27, they have 3: combat, stealth, magic. They are used in formulae instead of normal skills, but it is unclear, how exactly they are chosen. For example, mudcrab's chance to hit is clearly determined by his combat skill. But what about skeleton archer's? They could use combat skill, because this is a combat formula, or they can use stealth skill, because dev's considered marksman to be rogue skill. If it is stealth skill, then what would happen if we set marksman to "magic" specialization in CS? While last Hrnchamd discoveries (see block formula) lead me to believe that CS's specializations are irrelevant and, say, marksman and hand-to-hand are combat skills, this still needs some research.
Moreover, this skills are not only used as skills. They are also key parts in creature's combat AI. The higher creature's magic skill, for example, the more likely it is to cast spells instead of attacking in melee, while high stealth makes them try to shoot you. However, it is unclear how exactly this affect their behaviour. Will they choose magic over melee every if magic skill is higher even by 1? What will they choose if all skills are equal? Again, needs some research.

Hope it's not very rude to multipost here.