How to control 'SpeedMult' properly?

Post » Thu May 09, 2013 10:35 pm

As it is multiplier instead of an value, how do you set it up back after you decreased it?

player.modav speedmult -100
player.modav speedmult 100

Would this end at correct value? What if I cut it by small numbers?

-1 -3 -2

Then increase by +6 - ends messed up or not?

What if something will edit SpeedMult in between of my edits? Then I increase my saved multiplier value on top of other multipliers from outside (or other mods)?

I dont understand how it can be multiplier when its input is in form of float or even int (casted as float). And probably messed everything up. Who will explain?

Thanks in advance.

User avatar
Cameron Wood
 
Posts: 3384
Joined: Wed Oct 31, 2007 3:01 pm

Post » Thu May 09, 2013 10:10 pm

As long as you are using ModAV, you're in "safe" territory, since it kind of works like a "bonus" to add or a "bonus" to take off. As long as you Add and Minus the same amounts overall, then it will always come back to "0" (except SpeedMult begins at 100)

So...

1. Player's Starting AV SpeedMult = 100

2. Player.ModAV SpeedMult 5 = SpeedMult is now at 105 (100 + 5 = 105)

3. Player.ModAV SpeedMult 10 = Speed Mult is now at 115 (105 + 10 = 115 )

4. Player.ModAV SPeedMult -15 = Speed Mult is now at 100 (115 - 15 = 100

If another Mod edits your Speed Mult, then YES, your Speed Mult will be even higher -- so if you add 5, and they add 20, your total will be 25; but if a Mod is doing this, it should take into account the fact they have increased it, and so decrease it again later. That means you only need to remember the changes YOU made.

You can have multiple ups and downs at the same time, and the Game will work them all out and give you a total value.

It's a Multiplier, I guess, because it represents the PErcentage of the PCs base Movement Speed (it starts at 100, because you're at 100% of your movement speed; 200 = 200% of your base movemenet speed).

I hope that helps? :)

User avatar
James Smart
 
Posts: 3362
Joined: Sun Nov 04, 2007 7:49 pm

Post » Fri May 10, 2013 7:11 am

If its percentage like you say, then I understand now, thanks!

I firstly thought that it works like real multiplier:

newVal = oldVal * 1.2

oldVal = newVal / 1.2

which isnt true. and if it would get multiplied from outside in between, then something would explode for sure!

User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am


Return to V - Skyrim