Morrowind Equations

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
Okulo
Posts: 672
Joined: 05 Feb 2012, 16:11

Re: OpenMW 0.16.0

Post by Okulo »

True. I'll do ten seconds and multiple tests. That should at least increase its accuracy a bit.
User avatar
natirips
Posts: 52
Joined: 26 Apr 2012, 10:48
Location: Solar System/~Zagreb
Contact:

Re: OpenMW 0.16.0

Post by natirips »

Okulo, if you're using X window system (testing MW over WINE) you can use libXtst to keep a key pressed for some time. Example here: https://sites.google.com/site/natirips/ ... ects=0&d=1 . That program mashes the spacebar, but I think it's pretty easy to adapt it to your needs.

P.S.: Yes, I did use XFlush() improperly, it should be used after every XTestFakeKeyEvent(). This way one of the usleep() calls is pointless loss of CPU time during context switch; delays just add-up. /P.S.

Now you just need a keyboard scanner or something to trigger that thing.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: OpenMW 0.16.0

Post by sirherrbatka »

Set virtual desktop in wine. Launch morrowind in virtual desktop. Go to key binding, set key, change window focus to any other window, go back to morrowind, omg it works (for me). (how to change key binding in wine)

As I said speed is based on 3 values.

You can also just set you perfectly fine and skip calculations with setpos (allows to set your rotation as well).
Dalunatic
Posts: 3
Joined: 28 May 2012, 13:08

Re: Morrowind Equations

Post by Dalunatic »

"fMinWalkSpeed" = 100.0000
This is the minimum walking speed of the PC, regardless of stats, skills or encumbrance

"fMaxWalkSpeed" = 200.0000
This is the maximum walking speed of the PC, regardless of stats, skills, or encumbrance The actual walking speed of NPC’s (and the PC) is set by checking various factors (Speed, Athletics, etc.) and assigning a value between fMinWalkSpeed and fMaxWalkSpeed based on that – The two settings dictate the spectrum of Walk Speeds

"fEncumberedMoveEffect" = 0.3000
This sets how encumbrance affects walking and running speed, within the min/max limits set by other values.

"fBaseRunMultiplier" = 1.7500
Exactly as it says. Changing the value will increase/decrease base running speed. Dictates how much faster Running is than the current Walk Speed

"fAthleticsRunBonus" = 1.0000
Sets how Athletics affects running speed.

"fStromWindSpeed" = 0.7000
UNSURE - Determines altered walk speed during an ash or blight storm, but I’m unsure how – Might be a separate value from that entirely – might determine speed of storm particles /sprites(Dust, etc.) Interesting (possibally related) note, while treading water in an ash storm, I noticed I was moving slightly.

"fStromWalkMult" = 0.2500
Determines altered walk speed during an ash or blight storm, but I’m unsure how uses the getwindspeed to lower the PC movement speed during storms...

"fSneakSpeedMultiplier" = 0.7500
Multiplied by base walking speed to see how fast you move while sneaking.

These values were taken from "Morrowind Scripting for Dummies 9.0". Read the "Game Settings" section for more of these variables.

How the movement formulas was in oblivion can be found here: http://www.uesp.net/wiki/Oblivion:Movement_Formulas

As a side note: I believe the movement speed is measured in game units per second. 1 game unit is 1,42cm and if you multiply that with the minimum movement speed of 100 you get a speed of 1,42m/s or 5.112km/h. I'm also quite certain that the Height of the players race is a factor in the Movement Speed formula.

Edit: I guess i have enough free-time to propose a hypocritical formula.

Let's assume that the Morrowind MS formula is similar to the Oblivion one. First we calculate the Base MS like this:

Base MS = fMinWalkSpeed + ( fMaxWalkSpeed - fMaxWalkSpeed ) * Speed / 100

This means that the Base MS at 0 Speed is 100 and as Speed approaches 100 the Base Ms approaches 200. At the vanilla game settings we can simplify it to:

Base MS = 100 + ( 200 - 100 ) * Speed / 100

So for every point in the Speed attribute we get 1 point of Base MS beyond the Minimum of 100.

Then we need to Multiply the Base MS with several Multipliers. We don't know exactly which these are, or how to calculate them all. But following the Oblivion formula and using the Variables we found in "Morrowind Scripting for Dummies 9.0" we can at least try. Here we go:

Absolute Movement Speed = Base MS * Encumbrance Mod * Movement Type Mod * Storm Mod * Sneak Mod * Height

The Encumbrance Mod seems to differ from Morrowind to Oblivion. But using the UESP page on Encumbrance I learned that the amount slowed is related to the ratio of your Encumbrance and your Max Encumbrance:

Encumbrance Mod = fEncumberedMoveEffect * ( Max Encumbrance / Encumbrance )

Contrary this next one seems to fit with the Oblivion Formula really well:
If Running:
Movement Type Mod = fBaseRunMultiplier + fAthleticsRunBonus * Athletic / 100
If Walking:
Movement Type Mod = 1

Sigh, this one is going to be hard. All we got really is 2 variables fStromWindSpeed and fStromWalkMult. I'm just going to be lazy and say that fStromWindSpeed has nothing with it to do and state that your movement speed gets reduced to 25% during sandstorm. So:
If in Sandstorm:
Storm Mod = fStromWalkMult
If not in Sandstorm:
Storm Mod = 1

I believe that this one is quite obvious.
If Sneaking:
Sneak Mod = fSneakSpeedMultiplier
If not Sneaking:
Sneak Mod = 1

Last but not least we got the height of the race which varies from 1.1 to 0.9.

Edit 2: Change a word for clarification.

Edit 3: It seems like the author of "Morrowind Scripting for Dummies" has been misspelling some things, I'm sure it's supposed to be fStormWalkMult and not fStromWalkMult. Or maybe it was the developers who made these mistakes.
Last edited by Dalunatic on 28 May 2012, 15:55, edited 3 times in total.
User avatar
Okulo
Posts: 672
Joined: 05 Feb 2012, 16:11

Re: Morrowind Equations

Post by Okulo »

Well, looks like others have found some info already. I've been calculating the distance I would walk in five seconds on level 10. I wrote a little macro for it that pushes the W button, waits 5000ms, then releases it, just to make sure I am as accurate as possible.

My results? I walk in one direction, I walk 548.60 units. A few degrees to the left I walk 547.52 units. In the other direction I walk 544.75 units.

It might only be 1% off, max, but still. What the hell.
Edit: I guess i have enough free-time to propose a hypocritical formula.
A formula that does not practice what it preaches? =P
User avatar
Okulo
Posts: 672
Joined: 05 Feb 2012, 16:11

Re: OpenMW 0.16.0

Post by Okulo »

natirips wrote:Okulo, if you're using X window system (testing MW over WINE) you can use libXtst to keep a key pressed for some time. Example here: https://sites.google.com/site/natirips/ ... ects=0&d=1 . That program mashes the spacebar, but I think it's pretty easy to adapt it to your needs.
I'm a proud to be a Windows user between some obnoxious Linux/Mac elitists that reside here. But thanks anyway.

I've been calculating the distance I would walk in five seconds on level 10. I wrote a little macro for it that pushes the W button, waits 5000ms, then releases it, just to make sure I am as accurate as possible.

My results? I walk in one direction, I walk 548.60 units. A few degrees to the left I walk 547.52 units. In the other direction I walk 544.75 units.

It might only be 1% off, max, but still. What the hell.
Dalunatic
Posts: 3
Joined: 28 May 2012, 13:08

Re: Morrowind Equations

Post by Dalunatic »

Okulo wrote:Well, looks like others have found some info already. I've been calculating the distance I would walk in five seconds on level 10. I wrote a little macro for it that pushes the W button, waits 5000ms, then releases it, just to make sure I am as accurate as possible.

My results? I walk in one direction, I walk 548.60 units. A few degrees to the left I walk 547.52 units. In the other direction I walk 544.75 units.

It might only be 1% off, max, but still. What the hell.
Edit: I guess i have enough free-time to propose a hypocritical formula.
A formula that does not practice what it preaches? =P
lol, I meant hypothetical but I'll leave it as it is.

And I'm guessing your results is because of some weird engine bug.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: OpenMW 0.16.0

Post by Zini »

Let's continue this discussion exclusive in the dedicated thread.

EDIT
BY YOUR COMMAND!
sir
User avatar
natirips
Posts: 52
Joined: 26 Apr 2012, 10:48
Location: Solar System/~Zagreb
Contact:

Re: Morrowind Equations

Post by natirips »

Okulo wrote:My results? I walk in one direction, I walk 548.60 units. A few degrees to the left I walk 547.52 units. In the other direction I walk 544.75 units.

It might only be 1% off, max, but still. What the hell.
It probably has to do with rounding and Cartesian coordinate system not being optimized for precision under all possible angles when using finite precision variables.
User avatar
xXShaddowTXx
Posts: 46
Joined: 29 May 2012, 08:02
Location: Reno, Nevada, United States of America
Contact:

Re: Morrowind Equations

Post by xXShaddowTXx »

Nobody has asked Gstaff at Bethsoft if it is possible for them to share the formulas for the project?
Post Reply