Progressive Running 2.0

by Maoman

Start off running slow then rapidly accelerate to full speed while the key is held; useful when your run speed is very high and you want to move precisely

Utilities
4 months ago
2.0
1.35K
Transportation Character

b Possible fix for Jerky movement.

4 months ago

Hi, I've been looking into the issue with the jerky movement when you initially start walking. I think the issue lies in how it's calculating the movement speed modifier each tick.

Looking at the code, on line 224 you are checking for not walking, then on line 225 checking for having stopped walking this tick. If you were to insert an else statement here for the second if, it seems to fix the issue.

https://i.imgur.com/FfODnw7.png

Hope it makes sense or just ask :)

4 months ago
(updated 4 months ago)

This doesn't seem to make any difference on my end. Set your initial_speed_factor to 0.1 to really exaggerate the effect for debugging.

https://i.imgur.com/MuJWIXs.png

4 months ago

Sorry, it's a bit hard for me to explain, but basically every tick you are setting the speed modifier back to 0, which means normal (max) speed. When you start moving, the game moves your character one tick before your code reads the is moving part, which then sets the code to apply the movement speed modifier of -0.9. This doesn't take effect until the second tick, which is the problem. In your code you need to set this value earlier by setting it while not moving, so that when you do start moving, the progressive running starts from -0.9 instead of 0. The place in the code I mention putting an else statement is where this might fit in properly. The code I added was more of a pseudocode implemention, rather than a direct use case.

I'll do some more testing to see if I can fix it, but I'll have to spend some time learning the source code :)

4 months ago
(updated 4 months ago)

I think I fixed it! Though it required removing the RPG mod compatibility, as there's likely something wrong in that calculation. I'll mess around with it some more, but if I can talk to you on discord or something, I can show you what I did.

Before fix:
https://streamable.com/8utd8w

After fix:
https://streamable.com/kmo93f

4 months ago
(updated 14 days ago)

I've fixed the movement speed issue. It will not work with RPG system however, as there's no remote interface to grab the running speed level modifier from. (Was it even working properly anyways?)

Here's what you do. I marked the additions with -- MODIFIED:

https://i.imgur.com/G7NuIgK.png

https://i.imgur.com/lw7Ko51.png

https://i.imgur.com/WEEVB6J.png

https://i.imgur.com/bp9rqp7.png

https://i.imgur.com/dz56JI0.png

And here's the source code if you'd rather just grab this :)
https://puu.sh/KEURs/4a8db414a8.txt

19 days ago

Nice I always preferred the original Progressive Running Mod. Will definitely check this one out.

Was this fix ever applied? (Cant tell from the dates.)

14 days ago

Sadly it wasn't fixed yet. I think the author might want to get it working with RPG system as well, but if you don't care about that you could apply the patch yourself. I've been using it since then myself and it has worked perfectly.

7 days ago

Sorry I have just been too busy for minor fixes, I'm only checking in occasionally for major breaking bugs. Maybe when IRL slows down a bit I'll come back and take another look at this.

New response