Skyrim

File information

Last updated

Original upload

Created by

ndh

Uploaded by

ndh

Virus scan

Safe to use

About this mod

Small mod for debugging/reverse engineering: Prints the player's speed every 3 seconds. NOT intended for normal players, this is a tool for nerds only!

Permissions and credits

What it does


Displays the player's speed as a notification every 3 seconds.

Why the world needs it


As far as I know, the exact formula for the player's speed is unknown. It is somehow influenced by armor and weapons, but we don't know how. The purpose of this mod is to find out this formula.

My theory so far:
The weight of all worn armor and weapons is summed up. The run speed is decreased by weight*0.130%.
Carry capacity, level, and stamina have no influence.

Example: When wearing the full Daedric Armor plus some 2H sword, the total weight was 104, and the run speed was reduced by 13.52% from 370 to about 320.

Why the exact movement speed formula would be interesting to anyone


In short: To get animations right. Let's say a run animation is animated for a run speed of 370. This animation consists of two short jumps. Each jump has a duration and a number of z-positions over time. When the run speed is scaled down by the animation system, the run animation simply plays slower. That means the jump's duration increases, but the z-positions remain the same.

Now, these z-positions aren't arbitrary. They are governed by physics, namely gravity. The basic equation is z=-g*t^2, where t is time and g is the gravity acceleration. So what happens when an animation is scaled in time, but the z-positions aren't? Well, actually it changes gravity! Let's say we have the basic run animation, z0 = -g0 * t0^2. Now the time is scaled, t1 = f * t0. Let's take the example from above, where the speed is scaled by 100%-13% = 87%. That means the duration is scaled by 1/0.87 = 1.15, so the animation takes 15% longer. So f = 1.15, t1 = 1.15 * t0. Since the animation system doesn't change z, we have z0 = z1. That means -g0 * t0^2 = z0 = z1 = -g1 * t1^2. If we plug in t1 we get -g0 * t0^2 = -g1 * t1^2 = -g1 * (1.15*t0)^2 = -g1 * (1.15*1.15)*t0^2 = -(g1 * 1.32)*t0^2. So g1 = g0 * (1/1.32) = g0 * 0.76 = g0 * (1 - 0.24).

In other words: Increasing the animation duration by 15% means reducing gravity by 24%. That's a pretty big deal.

When looking at an animation, of course we can't compute the exact gravity constant in our head. But still, we're really good at seeing it. That's the only reason why we see how tall things are when they move: Think of these old Godzilla movies with people in suits, before special effects got good. Yes, they can build little houses, or try to move slower or play back the movie slower, to make the people in the suits look huge. But they can't change gravity. And we can see that, that's why it looks goofy.

What does that mean for Skyrim? Well, assuming that the animation for running at normal speed is physically correct, it means that the animation for players in heavy armor is wrong: Players in heavy armor move as if gravity was reduced by 24%.

How it works


It checks the position of the player once per second. Every 3 seconds, it compares the current position and the position 1 second ago, and estimates the player's speed. Both the xyz and the xy speed are printed on the screen.

Suggestions for improving the script are most welcome, because it kind of sucks... (Faster on-screen updates would be nice)