Morrowind Equations

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
Myckel
Posts: 72
Joined: 16 Jun 2012, 09:48

Re: Morrowind Equations

Post by Myckel »

Greendogo wrote: This is against everything I've been taught about speed in MW over the years.
I think there is a lot of misinformation about Morrowind mechanics spread through the interwebs. More about how people think it works, but never measured it.
modred11
Posts: 6
Joined: 05 Jul 2012, 04:18

Re: Morrowind Equations

Post by modred11 »

Greendogo wrote:Edit: Wow, so height has nothing to do with speed. This is against everything I've been taught about speed in MW over the years. The higher the race's weight is, the higher their speed. That's really weird.
+1 to that. I'm holding out hopes that height will still come in to the effect of sandstorms. But... I mean, moving diagonally increases your speed... sooo... Not much hope.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Morrowind Equations

Post by Greendogo »

modred11 wrote:... I mean, moving diagonally increases your speed... sooo....
FAIL Bethesda, jeeze
modred11
Posts: 6
Joined: 05 Jul 2012, 04:18

Re: Morrowind Equations

Post by modred11 »

Greendogo wrote:If you're right about the movement formulas, then they should stack up to my in-game measurements.

I've taken the liberty of running many timed trials on a present course of 50 statics approximately 256 game units across each (to cut down on error). Basically, I would run this course and time myself until I would get to the end. I adjusted weight, speed and athletics to try and find the formulas, however I did this several weeks ago and I ran out of time and never came back to it. So I'm going to drop my results and my testing environment here for all to look at and fiddle with.

Link to the results on Google Docs

Link to the test environment.
Link to useful mod for adjusting skills and attributes on the fly.
After downloading both plugins, activate them and start a new game. Go to the right, next to the door out of the Census and Excise office in Seyda Neen. You may use the Qube to adjust your stats or to get items to weigh you down. You can put unwanted stuff into the chest behind the starting rug. In order to do a timed race, get a stop-watch ready and click on the rug (it's really a door that will reset your view to directly down the hall), and then when you're ready, push autorun (Q by default) and start the timer at the same time. When you get to the end stop the timer right when you hit the door. Entering the door at the end will reset your view to the starting line.
I converted your timed trials to velocity in terms on units / sec and checked them against my formula, and it seems correlate. My formula is about 2 units per second off though. I didn't check the last table of your tests cause it's late and I'm lazy, but the one above it is a similar test so it should be fine.

There's one test that's way off, at 1% encumbrance, with a speed of 250, athletics at 100, weight at 1.0, while running; you got a velocity of ~891.489065, whereas my formula expected a velocity of 962.21125, a difference of 70.722185. That's a huge discrepancy.

The two possibilities I see are:
The test's wrong
or There's another variable my formula doesn't account for

the ~2 units / sec velocity difference makes me suspect the variable thing, because I had a similar discrepancy with all my tests until I accounted for encumbrance. If there is another variable I suspect it was added in bloodmoon / tribunal... but only more tests will tell.

Here's my testing the formula against your tests

http://pastebin.com/6RchUCxy
Spoiler: Show
and my original notes and tests I wrote whilst making the formula

http://pastebin.com/D9h8EjxY
Spoiler: Show
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Morrowind Equations

Post by Greendogo »

There's a lot there, I'll have to give it a look tomorrow, as it's 3am here :D

I'm glad Athletics is coming together though!
Epsilon
Posts: 40
Joined: 07 Jul 2012, 09:24

Re: Morrowind Equations

Post by Epsilon »

I'm kind of a newbie here, but I've been playing with the acrobatics thing. I hacked together a script to figure out jump peaks. It's actually not that heavy on CPU usage, which is surprising given that it executes every frame.

Code: Select all

Begin showjumpheight
short doonce = 0
short holdoff = 0
float prevz = 0
float curz = 0
float calcz = 0

If (doonce == 0)		; Should help prevent script-b0rk on first jump.
	set curz to ( player->getpos z )
	set prevz to ( player->getpos z )
	set doonce to 1
EndIf

set curz to ( player->getpos z )

If (curz < prevz)
	If (holdoff == 0)
		If (curz > 143)	; Prevents spam while walking.
			set calcz to ( prevz - 142.1413422 )	; Based on ground level - saves calculation time.
			MessageBox "Jump peak was: %.7f", calcz
			set holdoff to 1
		EndIf
	EndIf
EndIf

set prevz to curz

If (curz < 142.15)	; Waits for player to hit level ground. Also a horrible hack.
	if (holdoff == 1)
		set holdoff to 0
	EndIf
EndIf

End
This script, or a script like it, would probably be useful in a testing cell for people working on other movement-based things - walking and swimming, probably. Make the script, and slap it onto an activator in the cell. Hopefully this helps someone!

And I hope to have something useful for acrobatics (complete with proof) within a couple of days, depending on schoolwork load.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Morrowind Equations

Post by sirherrbatka »

Thank you! That's nice script.
Epsilon
Posts: 40
Joined: 07 Jul 2012, 09:24

Re: Morrowind Equations

Post by Epsilon »

Final utility script and Google Docs spreadsheet with all information collected!

(Just to clarify, this is for Acrobatics stuff.)

Spreadsheet:
https://docs.google.com/spreadsheet/ccc ... WkxU0d1QXc

Any values in the spreadsheet have been rounded to the nearest hundredth or thousandth. It should be obvious which are which. I hope. >_>

Code: Select all

Begin showjumpheight

; This has kind of evolved into an all-purpose testing script. Go figure.

short doonce = 0			; Prevents wonkiness with first jump with script on.
short holdoff = 0			; Prevents peak from continually recalculating.
short healthcheck = 0		; Checks fall damage on landing.
float prevz = 0				; Previous z location
float curz = 0				; Current z location
float calcz = 0				; Calculated z delta.
float calchealth = 0		; Calculated health delta.

If (doonce == 0)		; Should help prevent script-b0rk on first jump.
	set curz to ( player->getpos z )
	set prevz to ( player->getpos z )
	set doonce to 1
EndIf

set curz to ( player->getpos z )

If (curz < prevz)
	If (holdoff == 0)
		If (curz > 143)	; Prevents spam while walking.
			set calcz to ( prevz - 142.1413422 )	; Based on ground level - saves calculation time.
			MessageBox "Jump peak was: %.7f", calcz
			set holdoff to 1
		EndIf
	EndIf
EndIf

set prevz to curz

If (curz < 142.15)	; Waits for player to hit level ground. Also a horrible hack, because I think multiple frames process while jumping.
	if (holdoff == 1)
		set holdoff to 0
		set healthcheck to 1
	EndIf
EndIf

If ( ( Player->GetFatigue ) > 300 )		; Second hack to keep fatigue at a desired level.
	Player->ModCurrentFatigue -1	; Continually knocks back fatigue to desired level.
EndIf

If ( healthcheck == 1 )
	set calchealth to ( 100 - ( player->GetHealth ) ) ; Yet another hack. Make sure you've got 100 health for this to work properly.
	MessageBox "Damage on landing was %.7f", calchealth
	set healthcheck to 0		; Prevents continual spam of health calculation. May need to wait a frame here somewhere and somehow.
EndIf

End
I'm running on no sleep, so I probably won't get around to formula stuff tonight.

Note: Encumbrance, Strength, Luck, and Agility don't affect fall damage. Strength, Luck, and Agility don't affect jumping ability.

If anyone can suggest anything I missed testing/getting values for, please let me know!
HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: Morrowind Equations

Post by HiPhish »

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.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Morrowind Equations

Post by Greendogo »

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.
Encumbrance is the total weight of the items you are carrying in your inventory. For the purposes of Athletics, it is placed over your total available encumbrance (Strength x 5) to establish a PERCENT ENCUMBERED (Enumbrance / (Strength x 5)). I would imagine it appears in the Acrobatics formula the same way, with the percent encumbered instead of using the encumbrance by itself, but you'll have to test to make sure.
Post Reply