Lyall / SoulHackers2Fix

A BepInEx plugin for Soul Hackers 2 that adds features such as ultrawide support and more.
MIT License
27 stars 0 forks source link

Slidey movement fix doesn't seem to work anymore #5

Closed Obi-Laws closed 1 year ago

Obi-Laws commented 2 years ago

I'm not really sure what happened here, but the very first time I booted the mod and played on my ultrawide, the slidey movement fix worked. I had set the game to 144 FPS with VSync off. Unfortunately, the game has a bunch of little issues playing at a high framerate and 21:9 like mouth movements on the dialogue sprites being hyperspeed, some UI elements being stuck in 16:9; like the battle transition; and the weird thing going on with the extra space on the sides in shops. These things just bug me personally and aren't anything I really expect a fix for (the UI thing I'm sure won't be at least) and that's fine, I just decided to switch back to playing on my TV at 16:9. However, I do still want to use the mod because I want to disable Chromatic Aberration and fix Ringo being in Slippy-Slidey Ice World. After switching back to the TV, Ringo's back to practicing for the roller derby.

I tried each of these things sequentially to troubleshoot:

  1. Re-installing the mod fresh - which generated a new/default cfg file but did not resolve the issue, whether I started the game on the ultrawide or the TV.
  2. Switching back to my ultrawide - also did not resolve the issue, whether I started the game on it or switched to it after the game had booted.
  3. Switching framerates between 60 and 144 with VSync both on and off on both displays - the issue persists, but gets worse at 144FPS (with VSync off so the game actually runs at that framerate), which I understand is normal behavior for the slidey movement bug.
  4. Toggling between true and false settings for each of the Boolean settings in the cfg file then restarting the game - none of these seem to have made a difference, the only thing I didn't try is setting "DisableChromaticAberration" to false.

I'm playing on Windows 10 (up to date), through Steam. On the ultrawide, my resolution is 3440x1440, refresh is 160Hz, which I lock at 144FPS. On the TV I play at 3802x2138, which is basically 4K but reduced a bit since my TV has overscan issues when outputting via PC, refresh is 60Hz, which I use VSync to lock to.

I have included an image of my SoulHackers2Fix.cfg file: SoulHackers2Fix cfg

Lyall commented 2 years ago

It sounds like the mod isn't even being loaded properly if none of the controls in the config are working. Can you upload your log? You can find it in <GameDir>\BepInEx\LogOutput.log.

Regarding the UI there's not much that can be done. It's all arted for 16:9. Things like the battle transitions, the shop UI and so on would have to be either stretched or remade to fill the screen. Either that or add some kind of hook to add black bars during those scenes.

Obi-Laws commented 2 years ago

Here's a copy of my log: LogOutput.log

Yeah, I figured there wasn't much to be done about the UI, it's just a personal preference thing. I mainly was just including the whole story to be thorough as to my actions when experiencing the issue.

Lyall commented 2 years ago

Hmm it looks like based on your log that it is all being loaded fine. The main issue is with the movement fix right? Can you try this build that adds some extra debug logging? Apologies for the weird link, GitHub's 25MB limit is stopped me from just uploading it here.

Edit: Oh also, remember to delete your config after copying over that new build. It makes a few changes to the structure of the configuration entries.

Obi-Laws commented 2 years ago

Yeah, the main issue is with the movement fix. The disabling of the Chromatic Aberration, and the motion blur too in this build (very nice btw, does the radial blur toggle in the game settings not turn off all the motion blur? I didn't notice), is working fine. If I enable the ultrawide fix/custom resolution, it scrunches my game into an ultrawide aspect ratio even on the TV, so that works as well.

Here's a link to a couple short videos I took, one with the mod installed and one without, because I got paranoid and started thinking the fix was working but just wasn't meant to completely remove the slide, but they seem pretty similar to each other: https://imgur.com/a/aOFN37e

I also wanted to point out I have model mod installed for Ringo's weapon, in case that might cause a conflict but I think that's unlikely, especially considering I installed it after noticing this issue.

Here's a copy of the log for this one: LogOutput.log

Lyall commented 2 years ago

Yeah, the main issue is with the movement fix. The disabling of the Chromatic Aberration, and the motion blur too in this build (very nice btw, does the radial blur toggle in the game settings not turn off all the motion blur? I didn't notice), is working fine. If I enable the ultrawide fix/custom resolution, it scrunches my game into an ultrawide aspect ratio even on the TV, so that works as well.

The motion blur toggle was just something I was experimenting for the next release, but as you said, I think it's unnecessary given the in-game toggle. I'm fairly sure that it's only radial blur that's in use, though I do need to more research on that.

As for the movement fix issue, based on reading your log, the fix seems to think that your framerate was set to 60 during that session and therefore doesn't change anything.

[Info   :SoulHackers2Fix] DEBUG: MovementFix: currFPS = 60, PlayerMoveMotionBlendTime = 0.1.
[Info   :SoulHackers2Fix] DEBUG: MovementFix: new PlayerMoveMotionBlendTime = 0.1.

Are you set to higher than 60 FPS in game? The logic behind the fix is that it reads your in-game FPS cap to adjust the motion blend time of the player character. If it can't read your game settings FPS or it's set to uncapped then it defaults to using your screen refresh rate instead.

Obi-Laws commented 2 years ago

I was locking my FPS to 60 in the game settings, it didn't make sense to me to let it run above that even if VSync would lock it to 60 on my TV anyway. Interestingly, messing with the FPS settings did produce a change. After setting the FPS to unlimited with VSync still on, the game ran at 60 but the sliding was noticeably reduced. Edit: After a little more experimentation and re-reading what you said about uncapped framerates, this was probably placebo.

I tried setting it to 144 and turning VSync off to see what would happen, and after a few seconds of the sliding being pretty egregious, Ringo quite literally stopped mid-slide and then would no longer slide at all. This stuck for a few minutes, even after switching VSync back on, and then it suddenly stopped working again and Ringo started sliding again. Looking at the log, I can see it reacting to my change to 144 FPS, it alters the motion blend time, and then that sticks for a while until it checks my FPS again and sees it back at 60 and then sets it back to 0.1 and the sliding comes back.

[Info   :SoulHackers2Fix] DEBUG: MovementFix: currFPS = 144, PlayerMoveMotionBlendTime = 0.1.
[Info   :SoulHackers2Fix] DEBUG: MovementFix: new PlayerMoveMotionBlendTime = 0.041666664.

Then a few lines later

[Info   :SoulHackers2Fix] DEBUG: MovementFix: currFPS = 60, PlayerMoveMotionBlendTime = 0.041666664.
[Info   :SoulHackers2Fix] DEBUG: MovementFix: new PlayerMoveMotionBlendTime = 0.1.

I can say that the motion blend time for 144FPS works fine at 60FPS to remove the sliding.

As for the movement fix issue, based on reading your log, the fix seems to think that your framerate was set to 60 during that session and therefore doesn't change anything.

So, to clarify, is the fix only meant to reduce sliding at framerates higher than 60?

Here's a copy of the log LogOutput.log

Edit 2: After playing for a couple more hours, I've had it set to 144FPS/VSync On in the settings (so the game is running at 60FPS) and the sliding has not come back, the log still shows as reading the FPS as 144. I have no clue why VSync seems to have made a difference in what framerate the plug-in was reading earlier but not now.

Lyall commented 2 years ago

So, to clarify, is the fix only meant to reduce sliding at framerates higher than 60?

Yes, the fix operates on the assumption that the base value (0.1) is for 60fps (this could be wrong but seems sensible to me). So if you're running at 120fps for example it runs the calculation 0.1 / (120/60) and set's the motion blend time to 0.05. If you're running at 60 then the calculation returns a value of 0.1, the default value.

So am I right in thinking that you want to be able to adjust the sliding at 60fps too? I think in that case what I could do is in the next release expose the 0.1 figure for motion blend time and allow people to adjust it in the config. And if people don't want to adjust it themselves they could set it to 0 for auto and the fix will calculate it for them.

On another note do you think the sliding is too much even in the vanilla game at 60fps? It could well have been a figure that was targeted for 30fps but it's hard to say without asking the devs.

Obi-Laws commented 2 years ago

I think in that case what I could do is in the next release expose the 0.1 figure for motion blend time and allow people to adjust it in the config. And if people don't want to adjust it themselves they could set it to 0 for auto and the fix will calculate it for them.

I think the ability to adjust it manually with a 0 setting for auto would probably be the best option.

On another note do you think the sliding is too much even in the vanilla game at 60fps? It could well have been a figure that was targeted for 30fps but it's hard to say without asking the devs.

The sliding is still noticeable at 60fps for me, though it's not as bad as it is at higher framerates. I have noticed an issue with the analog stick sensitivity when playing on controller where, because of the slide, the tiniest input to the left or right while releasing the stick causes Ringo to slide off to the left or right when coming to a stop and it's generally just kind of annoying. I think it's probably a weird interaction between the sliding and the dead zones or sensitivity the Steam Controller API sets, but even after playing around with them I couldn't get it to stop happening. Either way, some people may not be as put off by it as I am.

Looking at gameplay footage of the console ports, the sliding is still present in the game at 60fps on PS5, to the same degree it appears on PC. I think they maybe just weren't familiar enough with Unity to know to change it and didn't find it intrusive enough to the game to notice it since there's no platforming or any kind of gameplay where precision movement matters.

Looking at games Atlus has put out over the last couple years: the Persona games use their own engine, Persona 5 Strikers was developed by Koei Tecmo; who have more experience with Unity from the Musou games; and SMT 5 was made in Unreal. So this looks to be the first game developed in-house at Atlus in Unity. If the motion blend time the game uses at 60fps is the default the engine sets, it wouldn't surprise me if it's just a case of the devs leaving the default value/calculation because they didn't know any better.

Lyall commented 1 year ago

The latest build (v0.0.5) should let you adjust the movement blending value in the config now. Lower values will result in less motion blending and therefore the character will come to a stop faster.

I'm still going to stick with the assumption that the 0.1 figure is for 60fps for the automatic calculation, since that's what the PS5 version runs at and surely they wouldn't ship that version with a glaring bug like that (right?!).

Knowing Atlus I'd imagine this game was actually developed with a target of 30fps and the motion blend time is set for that. Realistically I would think that they should be using delta time to allow the figure to dynamically adjust based on framerate but judging by other parts of this PC version they probably just didn't even think of that.

It's kind of akin to many older games that would tie the game speed to the framerate, whereas most modern games now use delta time and interpolation to make their games run at the correct speed no matter the framerate.

Obi-Laws commented 1 year ago

Fair enough, I'd believe they maybe didn't test higher framerates so much and built everything around the lowest common denominator. Either way, thanks so much for your help and all the hard work! I'll mark this issue closed.