Hi, really love the mod and was making some changes to it. One strange bug I'm running into is that jumping always sets runActionState into the max running speed for some reason. Any idea if this is easily fixable in the current code or is there a jump listener needed maybe? Edit: seems its an issue with the ShouldClearAnimationSpeedModifiers. Jumping clears them but they never get set back to what they should be afterwards
Did you debug it to see that it sets the runActionState to max running speed or does it just happen visually? Because as far as I remember, jumping is excluded from the movement system. That's because I am mainly playing with the animation speed modifier to achieve this effect and if I use the same for jumping, we would have a floating Geralt (because he will be spending more time in the air if it is slow motion).
P.S. Somewhere in the code I listen for events and disable the movement system temporarily, you can look into that. The game is not installed on my PC for now, so I cannot check it in more depth.
You're absolutely right, it's the anim speed modifiers getting defaulted that causes the issue, internally the runActionState isnt affected. I'm currently trying to fix it with a custom timer to reapply the previous modifiers. Edit: I managed to fix the issue but I had to repurpose the RunReleaseTimer as the new one I tried to add just refused to work, I don't know if there's a trick to adding these timers. I might share the file, I currently got the following changes working:
No more speed decay, speed stays at what you set
Speed is saved when idle, if you were slow jogging when you stopped, you'll start from that speed
I don't think you need a timer for that. I've already added a isJumping property to the MovementSystem. Look into what happens at movementSystem.ws line 167. Instead of simply returning true, you can also set isJumping to true as well. If you follow the logic of the code, you can see that we either clear the animation modifiers or update them. So, it is the place the load the previous state.
But the thing is, I never remove the state when jumping, so it should continue from where it was before. As the speed is only reset when idle and the only way to maximize the speed of character is to send multiple sprint button inputs as there is no other way to increase the speed state in movementSystem.ws.
So, I don't think this is an issue with this mod. Do you have any other mods that change the locomotionDirectController.ws or r4Player.ws? I suspect that another mod triggers sprint input via jumping or it is possibly just another mode that changes the animation speed modifier.
Ah you're right, I didn't realise the animation updater was used that way. I did manage to fix the anim speed mult through that instead of a separate timer, which is nice (by setting isJumping to true in ShouldClear function and then checking for it in the animation update functions). As far as mod conflicts, the only other thing I had installed was blood & steel. I tried removing it but the issue remained so for now, I'll have to keep the fix in place I guess. Really cool mod btw, thanks for this, really enjoyed tinkering with it (and playing the game too)
I want to start walking with fast walk and when i decrease from running, I want to start back with fast walk and I don't want to start with slow walk. How can i access Btw your mod is amazing.
You can changevar walkSpeedSteps: int; default walkSpeedSteps = 1; to: var walkSpeedSteps: int; default walkSpeedSteps = 0; in movementSystem.ws line 8 using a text editor.
This script change will result in only 1 walk stage which will be default and you can directly start jogging while holding the sprint button.
There are two slow walks. It should work like this, 1. If you stop tapping the sprint button but keep moving the character, the speed will go back to the second walk stage (slightly faster) 2. If you stop tapping the sprint button and stop the movement input, the character will stop and when you start moving again, it will be the first walk stage (slightly slower) 3. If you want to keep the current speed, instead of tapping, just hold the sprint button. It means that if you tapped the sprint button a couple of times and Geralt starts jogging, holding the sprint button down will keep the speed steady. If you want to prevent the slow-down to the second walk phase (which is the walk, not the slow walk), then go into the `\scripts\local\movementSystem.ws` and change the line 71 which is: if (runActionState == walkEndStep) RemoveRunReleaseTimer();to: if (runActionState == runStartStep) RemoveRunReleaseTimer() You can replace the `runStartStep` to `runEndStep`, `sprintStartStep`, or `sprintEndStep`. Whatever you choose, which part of the code dictates when to stop the auto-slow feature.
I've noticed that after a dialog/cutscene, exiting combat or jumping, even though geralt is idle he will start at the walkEndStep speed instead of the walkStartStep speed. Is there a variable that can be changed so after dialogs and combat geralts speed is walkStartStep from idle?
Hmm, it's probably because I pause the whole movement system and let it continue from where it was left off. If you do the following, not only it will start from the phase 1, but when you stop tapping spring, the speed will go all the way back to the walkStartStep as well.
In content\scripts\local\movementSystem.ws and change the line 71 which is: if (runActionState == walkEndStep) RemoveRunReleaseTimer(); to: if (runActionState == walkStartStep) RemoveRunReleaseTimer();
On PC in RDR2 we dont need to hold SHIFT to maintain speed, we only have to press SHIFT to make the speed faster. Is it possible to add a feature for this mod to control the speed with SHIFT and walk keys, like switching gears in a car? So press SHIFT to speed up, press the walk key to speed down.
It is already somehow supported. You can go into movementSystem.ws and change the conditional where it stops decreasing the speed. It is the conditional in line 71 which is: if (runActionState == walkEndStep) RemoveRunReleaseTimer(); If you change this to: if (runActionState == runStartStep) RemoveRunReleaseTimer(); Here is what happens: You still tap a couple of times to increase the speed, but when the speed increases beyond the runStartStep, if you release the spring button, it will only go back to the speed in runStartStep. So, it will be somewhat similar to gear system but it automatically resets to 0 when you completely stop. You can also use one the following values change the fallback speed: runStartStep, runEndStep, sprintStartStep, and sprintEndStep.
When you release the sprint, the speed decreases but it gets stuck on fast walk, why does it not decrease back all the way to slow walk? For me this is a deal breaker and I don't understand why it would be so.
Just that the inconsistent speed is breaking immersion for me.
Is there a way to tweak this so that it goes back all the way to slow walk?
(Also, when interacting with NPCs or going into menu, the initial state of walking is not slow, it is fast walk... why is this happening and can I change this?)
> Is there a way to tweak this so that it goes back all the way to slow walk?
Yes, there is a way. Just go into content\scripts\local\movementSystem.ws (open it in VSCode or Notepad++) and change the line 71 which is: if (runActionState == walkEndStep) RemoveRunReleaseTimer();to: if (runActionState == walkStartStep) RemoveRunReleaseTimer();
Basically, by default, there are two walk speed states (start and end), this code dictates at which state the speed decreaser stops executing. walkStartStep is the slowest possible walking speed.
So I ran into a really weird bug. At the very start of the game from the moment Geralt gets out of the bath to the moment Ciri asks if you want to run the walls the mod, instead of having you slowly work up to a run, has you getting slower and slower. Like the more you press the sprint key the slower you get until you can't move at all and the only way to fix it is to smash/spam all the buttons. It works as intended AFTER she asks if you want to run the walls but before that it has the oppsite effect. I tested this with all my mods installed (Corvo bianco collection, floren econmy, BIA, Blood and steel, chill out, Free cam, reputation, primal needs, no stair rolling, spawn companions, witcher eye, lore collection and grammar of the path) and without any other mods and it still happened.
Try this one out then and take a look at the previous comment. You can easily customize the states by changing some values in the main file. If you don't want to, you can take a look at this mod by FumioShwartz.
I believe that I fixed the lipsync issues by resetting the state manager whenever Geralt is not in active movement. There might be some lipsync issues here and there that I am not aware of, but it should be mostly okay.
I'd like to have the vanilla walking speed without holding the sprint button, where in the script(s) should I change to achieve that?
My suggestion for the mod would be to only have 1 walk state with the vanilla speed (right now there's 2, one that is slower than the default and the default when holding sprint). Rockstar games for example defaults to a walk state, jog if holding sprint, then actual sprinting if pressing the button constantly. The game already has a slower walk speed (at least with a gamepad) when you just slightly nudge the movement stick (noticeable in interiors) so slowing the walking speed down even more for when the stick is fully pressed/nudged seems redundant?
I am unable to try it out but you can try to change: var walkSpeedSteps: int; default walkSpeedSteps = 1; to: var walkSpeedSteps: int; default walkSpeedSteps = 0; in movementSystem.ws line 8 but it can cause some side effects.
There is actually a hidden feature there which is when you start tapping sprint button and go further than the faster walking speed, when you release the tap, it will only go back to the faster walking speed and not the slower walking speed. So, when you press and hold the sprint button, it should start jogging if you haven't been completely idle in between. I kind of liked that because I found gamepad stick slow walking hard, so, in this setup, it is kind of easily controllable to walk slower (which is only the default after completely stopping movement). In other words; 1. Left stick: Slow walking 2. Tap and hold sprint: slow jogging 3. Release sprint: fast walking 4. Tap/Hold Sprint: slow jogging 5. Release left stick: Idle 6. Go to step 1
Your suggestion partially solved it I think. I did the hidden feature you mentioned and the fast walk speed seemed to be retained even after doing actions like stopping completely and doing certain actions that normally sets it back to slow walk. The slow walk did however return if I started sprinting (tapping sprint button), then let Geralt slow down (stop tapping, while still moving). While slow walking, jumping also seemed to trigger the fast walk once Geralt landed.
Interestingly with that script change it behaved closer to GTA/Red Dead Redemption where holding sprint now switched to a jog rather than to the faster walk.
111 comments
Edit: seems its an issue with the ShouldClearAnimationSpeedModifiers. Jumping clears them but they never get set back to what they should be afterwards
P.S. Somewhere in the code I listen for events and disable the movement system temporarily, you can look into that. The game is not installed on my PC for now, so I cannot check it in more depth.
Edit: I managed to fix the issue but I had to repurpose the RunReleaseTimer as the new one I tried to add just refused to work, I don't know if there's a trick to adding these timers. I might share the file, I currently got the following changes working:
But the thing is, I never remove the state when jumping, so it should continue from where it was before. As the speed is only reset when idle and the only way to maximize the speed of character is to send multiple sprint button inputs as there is no other way to increase the speed state in movementSystem.ws.
So, I don't think this is an issue with this mod. Do you have any other mods that change the locomotionDirectController.ws or r4Player.ws? I suspect that another mod triggers sprint input via jumping or it is possibly just another mode that changes the animation speed modifier.
var walkSpeedSteps: int; default walkSpeedSteps = 1;
to:var walkSpeedSteps: int; default walkSpeedSteps = 0;
in movementSystem.ws line 8 using a text editor.This script change will result in only 1 walk stage which will be default and you can directly start jogging while holding the sprint button.
1. If you stop tapping the sprint button but keep moving the character, the speed will go back to the second walk stage (slightly faster)
2. If you stop tapping the sprint button and stop the movement input, the character will stop and when you start moving again, it will be the first walk stage (slightly slower)
3. If you want to keep the current speed, instead of tapping, just hold the sprint button. It means that if you tapped the sprint button a couple of times and Geralt starts jogging, holding the sprint button down will keep the speed steady. If you want to prevent the slow-down to the second walk phase (which is the walk, not the slow walk), then go into the `\scripts\local\movementSystem.ws` and change the line 71 which is:
if (runActionState == walkEndStep) RemoveRunReleaseTimer();
to:if (runActionState == runStartStep) RemoveRunReleaseTimer()
You can replace the `runStartStep` to `runEndStep`, `sprintStartStep`, or `sprintEndStep`. Whatever you choose, which part of the code dictates when to stop the auto-slow feature.In content\scripts\local\movementSystem.ws and change the line 71 which is:
if (runActionState == walkEndStep) RemoveRunReleaseTimer();
to:if (runActionState == walkStartStep) RemoveRunReleaseTimer();
Is it possible to add a feature for this mod to control the speed with SHIFT and walk keys, like switching gears in a car? So press SHIFT to speed up, press the walk key to speed down.
if (runActionState == walkEndStep) RemoveRunReleaseTimer();
If you change this to:if (runActionState == runStartStep) RemoveRunReleaseTimer();
Here is what happens: You still tap a couple of times to increase the speed, but when the speed increases beyond the runStartStep, if you release the spring button, it will only go back to the speed in runStartStep. So, it will be somewhat similar to gear system but it automatically resets to 0 when you completely stop. You can also use one the following values change the fallback speed: runStartStep, runEndStep, sprintStartStep, and sprintEndStep.For me this is a deal breaker and I don't understand why it would be so.
Just that the inconsistent speed is breaking immersion for me.
Is there a way to tweak this so that it goes back all the way to slow walk?
(Also, when interacting with NPCs or going into menu, the initial state of walking is not slow, it is fast walk... why is this happening and can I change this?)
Yes, there is a way. Just go into content\scripts\local\movementSystem.ws (open it in VSCode or Notepad++) and change the line 71 which is:
if (runActionState == walkEndStep) RemoveRunReleaseTimer();
to:if (runActionState == walkStartStep) RemoveRunReleaseTimer();
Basically, by default, there are two walk speed states (start and end), this code dictates at which state the speed decreaser stops executing. walkStartStep is the slowest possible walking speed.
My suggestion for the mod would be to only have 1 walk state with the vanilla speed (right now there's 2, one that is slower than the default and the default when holding sprint). Rockstar games for example defaults to a walk state, jog if holding sprint, then actual sprinting if pressing the button constantly. The game already has a slower walk speed (at least with a gamepad) when you just slightly nudge the movement stick (noticeable in interiors) so slowing the walking speed down even more for when the stick is fully pressed/nudged seems redundant?
Thanks for this mod, it fits really well.
var walkSpeedSteps: int; default walkSpeedSteps = 1;
to:var walkSpeedSteps: int; default walkSpeedSteps = 0;
in movementSystem.ws line 8 but it can cause some side effects.There is actually a hidden feature there which is when you start tapping sprint button and go further than the faster walking speed, when you release the tap, it will only go back to the faster walking speed and not the slower walking speed. So, when you press and hold the sprint button, it should start jogging if you haven't been completely idle in between. I kind of liked that because I found gamepad stick slow walking hard, so, in this setup, it is kind of easily controllable to walk slower (which is only the default after completely stopping movement). In other words;
1. Left stick: Slow walking
2. Tap and hold sprint: slow jogging
3. Release sprint: fast walking
4. Tap/Hold Sprint: slow jogging
5. Release left stick: Idle
6. Go to step 1
Interestingly with that script change it behaved closer to GTA/Red Dead Redemption where holding sprint now switched to a jog rather than to the faster walk.
Thanks for taking your time to help!