Page 1 of 10

Morrowind Equations

Posted: 27 May 2012, 09:03
by hemite
I just recentley watched the 0.15 vid and I noticed towards the end the announcer said that the team will soon need the equations for combat and other skills. I'm still reading some of the engine code on my own but I still really want to help, so I found some equations regarding Combat and Armor on the UESP wiki.

http://www.uesp.net/wiki/Morrowind:Combat

The two equation segments from this article that particularly stand out are:
Combat in Morrowind is relatively straight-forward. Your chance to-hit is determined by the following formula: Chance to hit = Attacker's weapon skill * 1.25 + Attacker's Attack (e.g. Warrior = 10) - Defender's Sanctuary (e.g. Thief = 10) + (Attacker's Agility - Defender's Agility) * 0.25 + (Attacker's Luck - Defender's Luck) * 0.125
and
Armor is used to reduce damage from physical attacks. The strength of armor is known as Armor Rating, or AR. The AR for each piece of armor is BaseAR * ( ArmorSkill / 30 ). The AR for each unarmored slot, including shield, is UnarmoredSkill * UnarmoredSkill * 0.0065.
Total AR is Cuirass * .3 + (Shield + Helm + Greaves + Boots + RPauldron + LPauldron) * .1 + (RGauntlet/Bracer + LGauntlet/Bracer) * .05. In other words, Cuirass is 30%; Shield, Helm, Greaves, Boots, RPauldron, and LPauldron are 10% each; RGauntlet/Bracer and LGauntlet/Bracer are 5% each.
If anyone knows of any more equations please feel free to add links.

I apologize beforehand if this is in the wrong section or if this is a duplicate post. I attempted to check if there were similar posts made before. Cheers.

Re: Morrowind Equations

Posted: 27 May 2012, 09:20
by Zini
These formulae we already have, I think. See here.

What we mostly need right now, are the non-combat formulae. Anything related to movement (jump height, run speed and such) seem to be particular bothersome (and somewhat more urgent) at the moment. Any help with these would be welcome.

Re: OpenMW 0.16.0

Posted: 27 May 2012, 18:59
by Okulo
What is speed measured in?

Re: OpenMW 0.16.0

Posted: 27 May 2012, 19:32
by Zini
length units / seconds ?

Re: OpenMW 0.16.0

Posted: 27 May 2012, 19:46
by Okulo
Okay, so it's being counted in seconds... what's the length unit you want to have? Surely not feet, right? Got anything on that? Because I'd love to muck around in Morrowind and find the formula, but I'm going to need to understand the metrics you guys use.

Re: OpenMW 0.16.0

Posted: 27 May 2012, 19:47
by scrawl
The same as morrowind. One Cell is 8192 length units on one side.

Re: OpenMW 0.16.0

Posted: 27 May 2012, 20:04
by natirips
You could use

player->getpos x
player->getpos y
player->getpos z

in the console before and after moving. (easier than trying to walk exactly a portion of the cell size)

The length you moved (if you went in a straight line) is:
screenshot10.png
(3.74 KiB) Downloaded 1011 times
Divide that by time (in seconds) to get speed.

Re: Morrowind Equations

Posted: 27 May 2012, 20:18
by hemite
From what I understood the Morrowind Scripting for Dummies guide (MWSFD) has has partial refrence to GMST's and what they do. I think running speed and such are controlled by those. I assume a lot of the code from he guide can't be reused but maybe some of the formulas can. The guide can be found here:

http://planetelderscrolls.gamespy.com/V ... ods.Detail

I'll keep looking for more explicit formulas.

Re: OpenMW 0.16.0

Posted: 27 May 2012, 21:34
by Okulo
I think that was my plan too.

I'm currently looking for a program that holds the W key down for 1000 ms. Comparing the positions before and after walking for one second will yield a diagonal line. Just make that a right triangle and let loose the Pythagorean theorem and there we go I guess.

Is that what you said?

Re: OpenMW 0.16.0

Posted: 27 May 2012, 22:16
by scrawl
i'd use more than just 1 second, since it's a bit inaccurate due to the program's FPS. the longer you move, the more accurate it is.