Minor issue that's unlikely to come up normally: something weird happens when movement speed is really slow. You can see this with Balance Your Burdens, with a very high encumbrance, close to max. With encumbrance of 129.99/130, movement speed on land and in the water is ridiculously slow, but I can move much faster when wading.
I'm not sure why this happens. It seems like it shouldn't, since the code just sets movement speed to somewhere between land speed and swim speed, depending on how immersed you are. Unless maybe there's some kind of rounding error working with such low speeds?
Okay I see why it does this now. swimSpeed is what your swim speed would be without Balance Your Burdens, which, at very close to max encumbrance, is much higher than it actually will be when in the water, so you speed up when wading.
Really fixing the conflict would require detecting the presence of Balance Your Burdens and adjusting the swimSpeed term accordingly. But this really isn't a big deal - players using both mods won't notice this under normal circumstances.
I've noticed three relatively minor issues, in addition to the issue below where you can still move when encumbered. I've only been able to fix one of them.
1. When emerging from water, I notice that my speed is very briefly full land speed for a fraction of a second as soon as I'm no longer swimming, before the mod considers me wading and slows me down. This is pretty noticeable for me, and seems to be caused by multiplying mobile.height by 0.9 when calculating maxPosition (there's a brief period when .isSwimming is false but scalar > 1). I solved this by removing the "*0.9" term, so maxPosition takes into account the full mobile.height.
2. At least for the player, this only seems to work while *running* while wading. When I walk (or sneak) while wading, there's no slowdown for me. This seems to be because, at least for the player, mobile.swimRunSpeed and mobile.swimSpeed are identical (and also seem to be identical to landSpeed as long as I'm not running, though my actual speed is slower when I'm actually swim-walking). Not sure how to fix this.
3. Swift Swim doesn't seem to affect wading speed. This seems to be because the Swift Swim effect doesn't actually modify the player's swimRunSpeed or swimSpeed (apparently the swimming speed increase is done some other way).
A recent update to MWSE fixed two of the above issues. mobile.swimSpeed and mobile.swimRunSpeed now seem to report correctly, so the mod now works while walking. And those attributes are affected by swift swim, so swift swim modifies the player's speed while wading as intended.
I still remove the *0.9 multiplier from the maxPosition calculation so I'm not briefly at full speed when coming out of the water. And the issue where you can still move while encumbered is fixed by adding a check for landSpeed <= 0.
So, basically, after making these two changes to the code the mod seems to work perfectly:
1. Remove the *0.9 multiplier in the line where maxPosition is calculated.
2. Immediately after the line where landSpeed is defined add:
That's great news! Thanks. Been meaning to ask, what race do you play as? I think I tested the mod for both High and Wood elves to check for race heights back in the day and don't remember encountering the problem. > where you can still move while encumbered is fixed by adding a check for landSpeed <= 0 I personally used `if mobile.encumbrance.normalized >= 1` but this works too, not sure which one is best.
Yeah I tested it as a female Altmer. Haven't tried with other races.
And using an encumbrance check might make more sense. The speed check does have the benefit of also applying when the player is standing still and there's no need to adjust speed anyway.
After brief testing as a male Bosmer it does seem to depend on race/height. I didn't experience this issue with the 0.9 multiplier being so short (though it also seems fine without it).
This would go well with a mechanic that increases shock damage and radius in water, with the opposite for fire spells. And for fully submerged actors: no fire damage whatsoever, no ability to perform unarmed attacks, automatic sheathing of shields and weapons that aren't spears and short blades, and sinking with more than 50% encumbrance. But I've no idea how much of that is possible or already done by Ashfall.
The mod Ashfall has great system that adds a wetness meter, where your character can get wet in both water and rain, and this will make you more weak to shock damage.
awesome mod, feels very natural. a small quirk i found is when your character is encumbered you are still able to wade through shallow water at a very reduced speed whereas you can't move on land or swimming like normal. i don't know if you might be able to just add a check if the player is encumbered or something to stop them from moving even when wading in shallow water.
19 comments
I'm not sure why this happens. It seems like it shouldn't, since the code just sets movement speed to somewhere between land speed and swim speed, depending on how immersed you are. Unless maybe there's some kind of rounding error working with such low speeds?
Really fixing the conflict would require detecting the presence of Balance Your Burdens and adjusting the swimSpeed term accordingly. But this really isn't a big deal - players using both mods won't notice this under normal circumstances.
1. When emerging from water, I notice that my speed is very briefly full land speed for a fraction of a second as soon as I'm no longer swimming, before the mod considers me wading and slows me down. This is pretty noticeable for me, and seems to be caused by multiplying mobile.height by 0.9 when calculating maxPosition (there's a brief period when .isSwimming is false but scalar > 1). I solved this by removing the "*0.9" term, so maxPosition takes into account the full mobile.height.
2. At least for the player, this only seems to work while *running* while wading. When I walk (or sneak) while wading, there's no slowdown for me. This seems to be because, at least for the player, mobile.swimRunSpeed and mobile.swimSpeed are identical (and also seem to be identical to landSpeed as long as I'm not running, though my actual speed is slower when I'm actually swim-walking). Not sure how to fix this.
3. Swift Swim doesn't seem to affect wading speed. This seems to be because the Swift Swim effect doesn't actually modify the player's swimRunSpeed or swimSpeed (apparently the swimming speed increase is done some other way).
I still remove the *0.9 multiplier from the maxPosition calculation so I'm not briefly at full speed when coming out of the water. And the issue where you can still move while encumbered is fixed by adding a check for landSpeed <= 0.
So, basically, after making these two changes to the code the mod seems to work perfectly:
1. Remove the *0.9 multiplier in the line where maxPosition is calculated.
2. Immediately after the line where landSpeed is defined add:
if landSpeed <= 0 then return end
Also this mod works great with Immersive Run Fix and Realistic Movement Speeds. All three seem to work together just as expected.
Been meaning to ask, what race do you play as? I think I tested the mod for both High and Wood elves to check for race heights back in the day and don't remember encountering the problem.
> where you can still move while encumbered is fixed by adding a check for landSpeed <= 0
I personally used `if mobile.encumbrance.normalized >= 1` but this works too, not sure which one is best.
And using an encumbrance check might make more sense. The speed check does have the benefit of also applying when the player is standing still and there's no need to adjust speed anyway.
Edit: Just checked it out and I am super impressed with how smooth the transition is. This just feels so natural! Definitely a keeper.