Movement research

Everything about development and the OpenMW source code.
Locked
User avatar
lgromanowski
Site Admin
Posts: 1147
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Github profile: https://github.com/lgromanowski
Contact:

Movement research

Post by lgromanowski » 15 Aug 2011, 09:18

Zini wrote: Split off from a thread in the "Discuss the Site" board:
btw Zini, I would like to be assigned to get the formulas
What we need next are the formulae regarding walking and running. How is the speed influenced by attribute, carried weight and magic effects? How is walking and running changing fatigue? How fast fatigue regenerates when not running? Is that depending on attributes/skills/magic effects too?
Will require a lot of experimenting.
Hircine wrote: The only formulas i have found so far regarding Morrowind are combat related

for movement, we will have to take measurements on vanilla Morrowind (get debug text happening)

and setup an experiment, i am currently installing Morrowind at the moment so i will begin this soon.

here is the combat formula found on UESP:

Code: Select all

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
i will probably have something within the next 2 hours.

can we have this thread renamed to "Morrowind Formulas"?
there will be too many threads if we have one for each formula.
the next best thing would to have a subforum for Game Variables like formulas etc.
Zini wrote: I would rather like to keep it this way. As you said there are too many formulas and if we discuss them all in a single thread it will become rather chaotic. Instead I would like to have a thread for each broad category (movement, combat and such). But for now, what we really need is movement. Combat implementation will not be on the list for a long time.
Hircine wrote: Data:
R = Run, F = Forward
W = Walk, B = Backwards

from what i can gather Speed, Strength and Encumbrance are the only attributes to determine true movement speed. i have ruled out all othe attributes.
this was done at Athletics 15 and on land only.
At first i Didn't realise that the caius cosades stuff weighed something, the difference is like .08 on the velocity.

First value is movement value. second is velocity.
SPD 0,STR 40, ENC 0.4

RF .86 / 180.39
RB .84 / 135.29
WF .80 / 94.94
WB .65 / 71.21

SPD 10, STR 40, ENC 0.4
RF .94 / 198.43
RB .92 / 148.82
WF .88 / 104.44
WB .71 / 78.33

SPD 10 STR 10 ENC 0.4
RF .94 / 198.07
RB .92 / 148.56
WF .88 / 104.25
WB .71 / 78.19

SPD 0 STR 1 ENC 0.4
RF .84 / 176.17
RB .82 / 132.13
WF .78 / 92.72
WB .63 / 69.54

(I finally realised about the encumbrance)
SPD 1 STR 1 ENC 0
RF .86 / 182.3
RB .85 / 136.73
WF .81 / 95.95
WB .66 / 71.96


SPD 20 STR 20 ENC 0
RF 1.03 / 216.60
RB 1.01 / 162.45
WF .96 / 114
WB .78 / 85.5

SPD 20 STR 20 ENC 50
RF .87 / 184.11
RB .86 / 138.08
WF .82 / 96.9
WB .66 / 72.67

SPD 40, STR 20, ENC 50
RF 1.02 / 214.79
RB 1 / 161.1
WF .95 / 113.05
WB .77 / 84.79

SPD 20, STR 40, ENC 50
RF .95 / 200.35
RB .93 / 150.27
WF .89 / 105.45
WB .72 / 79.09


SPD 1 STR 1 ENC 0 (Athletics 30)
RF .93 / 196.7
RB .92 / 147.52
WF .81 / 95.95
WB .66 / 71.96

Athletics Does Not Affect Walking.

if i have missed something out( a skill/variable) please let me know.
hopefully from this data we can determine a formula. i suck at math, but will attempt to get something from this. :)

EDIT: Put slashes in to seperate the data a bit more.
Hircine wrote:
Zini wrote:I would rather like to keep it this way. As you said there are too many formulas and if we discuss them all in a single thread it will become rather chaotic. Instead I would like to have a thread for each broad category (movement, combat and such). But for now, what we really need is movement. Combat implementation will not be on the list for a long time.
Fair enough.

EDIT: reposting this to make sure i get everything.
What we need next are the formulae regarding walking and running. How is the speed influenced by attribute, carried weight and magic effects? How is walking and running changing fatigue? How fast fatigue regenerates when not running? Is that depending on attributes/skills/magic effects too?
Will require a lot of experimenting.
Zini wrote: Nice start.

From a scientific point of view, I would vary only one parameter per test series, i.e. keep str and enc the same and do 3 runs with different speed (you need at least 3 different values to get any meaningful results).

Also, does strength affect the speed at all? Maybe it just reduces the negative impact of enc. You can test this my making two runs with the same speed and str, but one with enc 0 and one with higher enc.
mate wrote: I've been lurking for a while, and I'd love to help out (not a coder). If there are any formulas you need, make a list and I'll look into them. Cheers
Zini wrote: Well, Hircine has nailed the measurement phase of the research. Once he has re-run it with better test-parameters, we should be ready to start figuring out the formulae. Maybe you want to work together with him on that part.

Alternatively, you could start looking into fatigue. How fast it does regenerate and how fast you are losing it while walking/running. As usual skills and attributes need to be considered, maybe as well as encumbrance, maybe even in relation to strength or endurance (or willpower?).
Hircine wrote:
Zini wrote:Nice start.

From a scientific point of view, I would vary only one parameter per test series, i.e. keep str and enc the same and do 3 runs with different speed (you need at least 3 different values to get any meaningful results).

Also, does strength affect the speed at all? Maybe it just reduces the negative impact of enc. You can test this my making two runs with the same speed and str, but one with enc 0 and one with higher enc.

yeah strength would most likely mean a reduction of neg impact of enc.

I will do another run tomorrow. and actually plan it out rather than "yeah that sounds good." :P

Its a total of 4 variables (from what i gather)

Speed, Strength, Encumbrance and Athletics. Ill do up a Excel document so it has better meaning(and easier to follow).

So you have Speed + Athletics to give the Highest achievable speed with 0 ENC. and ENC decreases highest. Strength would decrease the negative impact of ENC.

with the magic effects, i think all of them would affect any of these particular variables. so as long as your comparing with the end result of the attribute. Total(Base + Magic modifier + equipment + w/e) it should be fine.

when we have figured out the formula for movement, we have to match that to the speed of the rendering :) cause moving X in OpenMW may not be the same as moving X in Vanilla. (unless you guys know something i don't, which wouldn't surprise me as being a non-coder)


@Mate, the only formulas that seem to be readily available (calculated by members of the modding community) are ones related to combat or alchemy.

PM me if you have any formulas, that you have found either from a website or have managed to calculate yourself. thanks.

@Zini's Ninja Post. Once i have the Movement done, i have a look at doing a measurement for the fatigue, i would imagine its two formulas as you have stated, Gaining and Losing. Agility, Strength, Willpower, Endurance all will probably have a say in it.

Another thought i had, i have seen many Oblivion formulas around, (movement i think was included) so it might be worth looking at oblivion's formulas (only those that are advertised on websites) and then comparing it with our data.
Hircine wrote: For my Test

There will be 4 sections with 3 Tests in each so each would be like

Sec 1 Test 1
Var1 25
Var2 25
Var3 25
Athletics 25


Sec 1 Test 2
Var1 25
Var2 25
Var3 25
Athletics 50

Sec 1 Test 3
Var1 25
Var2 25
Var3 25
Athletics 75

would that be suitable for each section/test?
the one we want to look at will be variable and the others static.

I ask, just so we are in agreement before i do a whole bunch more work and so i don't have to repeat anything.
Zini wrote: Looks good for me. But the str and enc test probably need to be a bit elaborated. I suggest at least making a str series with enc==0 and one with enc!=0.
Star-Demon wrote: Not to think too hard about it (coming from a guy who's almost done with engineering math...)

but I'd just pick a nice formula that is faithful to the game then just playtest the heck out of it.

So, after that...

Currently, the speed constant we use is 300.

Now, let's take that as a running speed at about 60 Speed.

So - let's use algebra to get a speed value of 50.

Then we make a graph - Speed to speedconstant should be linear.
Hircine wrote: by doing all this testing Star, we get like a near perfect formula to use, that we just have to adapt to how everything is rendered.

by doing this we get that faithful to the game formula. and from it there shouldn't be much tweaking in the way of 'the formula' its just tweaking the rendering side of things.


@zini, no problemo. will add that to my tests.
Star-Demon wrote: Nuts! We should saddle users with doing that work for us! :P :P :P
Hircine wrote: hehehehehe :P

I think i will remove the encumbrance for trying to test Athletics and Speed.
so it will be like a constant 25 for Spd, Str and 0 for ENC.

here is my excel document before doing all the data, let me know what you think.

(i wanna do this write the first time and not waste 2 hours on testing)

<!-- ia0 -->MorrowindMovementData.zip<!-- ia0 -->
Zini wrote: In the second column one of the values is wrong. Also the last column seems redundant. You are already doing a suitable comparison series in the Strength column.

P.S.: If you don't mind, avoid OOXML file formats in the future. These make us Open Source people rage. If you must use xls, but generally ods is preferred.
Hircine wrote:
Zini wrote:In the second column one of the values is wrong. Also the last column seems redundant. You are already doing a suitable comparison series in the Strength column.

P.S.: If you don't mind, avoid OOXML file formats in the future. These make us Open Source people rage. If you must use xls, but generally ods is preferred.

k. won't happen again. EDIT: found out regular office can save ODS.
not on my linux machine atm. :P

tah for helps
sir_herrbatka wrote:
These make us Open Source people rage.
... and there is a reason to feel angry. :evil:

Sry, no more offtopic.
ap0 wrote: Don't forget to edit the wiki about this : http://openmw.org/wiki/index.php?title=Formulae
Guest wrote: Has anyone tried contacting Bethesda about these formulae? Perhaps it would either be in their interest as a business or maybe even on a personal nostalgic level for OpenMW to exist, and might be able to save us some time.
Hircine wrote: yeah we could. but its more fun this way :) and it gives me something to do.
and honestly i doubt they would give anything up. legal department would like nahhhhh.

on another note. my computer toting windows died. (PSU or mains power issue)

going into town to fix it. hopefully will be able to upload the results in about 9-10 hours time.
Hircine wrote: I had a poke around in the construction set (i have only done a little data recording)

and i have got this is as a preliminary velocity calculation.


VEL = ((MinWalk (x 1.75 if running) ) + (SPD * 0.95) + (ATH * 1.18, if running)) )* (1+(100-(100*BaseMovement))/100))

The Encumbrance modifies BaseMovement Factor side of things i have still yet to work this out.

BaseMovement factor is the number on the left of my previous data entries.
Benbat wrote: Hum, I think you have an issue with parentheses. ^^
If like me, you have difficulty to read it, the formule is equivalent to :

VEL = MinWalk (x 1.75 if running) + SPD x 0.95 + ATH x (1.01 - BaseMovement) (x 1.18 if running)

Not sure for the second if running.
Star-Demon wrote: Does VEL = a speed value in game, or a speed value that we have to pass to OGRE?

Or can we just assign VEL to Vel_Z and pass it to moveRel(Vel_X, Vel_Y, Vel_Z)

Otherwise, looks like it's coming along.
Hircine wrote: Here i will organise it into steps.

VEL =
MinWalk (x 1.75 if running) - MinWalk is 100 by default. so its 175 if running.
+(SPD x 0.95)
+(ATH x 1.18), if running

x 1+(100-(100*BaseMovement))/100

since basemovement changes a lot i still need to calculate how that is calculated. but basically you multiply the whole thing of the inverse of the basemovement.

"(1.01 - BaseMovement)" won't work.

example. Running with a speed of 25, Ath of 25 and 0 enc
gives
(175 + 23.75 + 29.69) x inverse? (im not sure what the correct terminology is) of the magical movement factor of 0.96. we are multiplying by 1.04, not 0.96.

this gives us the velocity of 237.577 (close to the value that Morrowind gives) i would imagine that their speed and athletics values are much more accurate. (mines only 2 dec points atm.)

@star. Velocity is a game value. i believe it has something to do with the In-game measurement system so velocity would be x units per hour or something. what we have to do is match vanilla velocities with ogre. so everything moves the same speed.

I don't think its going to be as exact as parsing the VEL value directly to ogre. it will need tweaking. since Morrowind's Rendering system and Ogre would have different ways of measuring distance.
Star-Demon wrote:
Hircine wrote: what we have to do is match vanilla velocities with ogre. so everything moves the same speed.
Oh, okay - this is what I was describing earlier in the thread. This is pretty much a two phase process. The second is as we've both said - we'll find a nice calculation then find a way to make it manifest in our OGRE world.
Hircine wrote:
Star-Demon wrote:
Hircine wrote: what we have to do is match vanilla velocities with ogre. so everything moves the same speed.
Oh, okay - this is what I was describing earlier in the thread. This is pretty much a two phase process. The second is as we've both said - we'll find a nice calculation then find a way to make it manifest in our OGRE world.

yep.
gus wrote:
@star. Velocity is a game value. i believe it has something to do with the In-game measurement system so velocity would be x units per hour or something. what we have to do is match vanilla velocities with ogre. so everything moves the same speed.
I think there is no need as Ogre and Bullet use the same unit than Morrowind.
By the way, Ogre has nothing to do with movement/velocity,etc that's the job of the physic engine ;)
Hircine wrote: @gus,

if thats so, than probably no need to 'tweak'.
just need to get the full formulas to work stuff out.
Star-Demon wrote: Heh. We really should make system flowcharts when it comes to input to manifest or following the path of events or data.

It's slowly coming together for me - but just slow.
Dragatus wrote: I tried downloading the archive with the test results to finally make good on my promise to help, but it seems to be corrupted. Re-download didn't help. The Wiki also seems to be experiencing some errors, but what I can do is point out that

(1+(100-(100*BaseMovement))/100)) = 1+(1-BaseMovement) = 2-BaseMovement

As for the effect of Strength and Encumberance my untested hypothesis is that movement rate is determined based on relative encumberance, what percentage of your maximum Encumberance you have filled. So 20 STR and 50 Encumberance should produce the same result as 40 STR and 100 Encumberance.

Finally I would like to know what exactly the numbers in the post on the first page represent and how I might go about obtaining some of my own.
Zini wrote: Sorry for not replying earlier. Our wiki has an extended downtime (technical problems of the worst kind) and therefore this is not the best time to work on the research aspect.
best regards,
Lukasz

Locked

Who is online

Users browsing this forum: No registered users and 1 guest