Lyall / HundredHeroesFix

A BepInEx plugin for Eiyuden Chronicle: Hundred Heroes that adds custom resolutions, ultrawide/narrower support and more.
MIT License
24 stars 4 forks source link

[Feature Request] Disable DOF on Cutscenes too #14

Closed RhanCandia closed 6 months ago

RhanCandia commented 6 months ago

Hi there. Thank you for the work you are putting in here. Really appreciate it.

I was wondering if it is also posible to make it so that when we disable DOF on settings, let’s also disable it on cutscenes.

A setting like:

/**
 * Also disable DOF in cutscenes
 * when in-game DOF is off
 * /
disableCutsceneDOF=true

Thank!

Lyall commented 6 months ago

Added for the next release. It seems like an oversight by the devs. The depth of field setting is only applied either straight after you change it in the settings menu or when a scene loads. The fix here is to check if depth of field is enabled/disabled when a Cinemachine Brain is enabled.

Given that this seems like a bug/oversight by the developers, I'll be enabling it by default.

Lyall commented 6 months ago

Fixed in v0.9.6.

RhanCandia commented 6 months ago

Fixed in v0.9.6.

Can confirm. No more DOF when in cutscenes. Thank you!

RhanCandia commented 6 months ago

@Lyall I just got into a new area and noticed the DOF is still active in new area cut scenes. It doesn't happen often, so it doesn't bother me much. But I'm letting you know in case you have time to also cover it on your fix. Thanks again!

Lyall commented 6 months ago

Okay I've switched to a different method of disabling dof. It looks like there's a shared profile for certain volumes and if you don't disable it there then it stays on. Can you give this version a try?

HundredHeroesFix_v0.9.7.zip

RhanCandia commented 6 months ago

@Lyall It looks like it worked on new area cutscenes.

https://github.com/Lyall/HundredHeroesFix/assets/7951366/dcd358c1-399c-4605-ad82-ebad06b4528e

It still works everywhere including the story cutscenes.

But something is different in the New Game Scene.

https://github.com/Lyall/HundredHeroesFix/assets/7951366/c698d249-1ec9-476e-8f1b-20bd5b404b8a

There's a DOF in the first few seconds but it goes away completely so it partly works? Maybe there's something different in the new game sequence.

EDIT: Please don't mind the washed-out colors. The recording software didn't realize I was playing on HDR.

RhanCandia commented 6 months ago

I was curious so I cloned your repo to play around with it. Looks like the game is using a 2021.3 version of the URP that does not ship with TAA. I wanted to try it, but it was really impossible.

I am not a game developer, but is this how it really goes with games? The game came out 2024 but they committed to using the 2021 version of Unity (must be what they started with when development started)? Really curious because in the web application world we usually try to upgrade to the latest versions of the libraries as much as we can.

Lyall commented 6 months ago

But something is different in the New Game Scene.

There's a DOF in the first few seconds but it goes away completely so it partly works? Maybe there's something different in the new game sequence.

After looking at this, it's not actually depth of field in that scene in particular. It's a combination of radial blur and a screen edge blur post-process pass.

image

I could add support for disabling it when DoF is disabled but as I said, it's technically not DoF so I'm not sure on that. What do you think?

I was curious so I cloned your repo to play around with it. Looks like the game is using a 2021.3 version of the URP that does not ship with TAA. I wanted to try it, but it was really impossible.

I am not a game developer, but is this how it really goes with games? The game came out 2024 but they committed to using the 2021 version of Unity (must be what they started with when development started)? Really curious because in the web application world we usually try to upgrade to the latest versions of the libraries as much as we can.

I'm not a game dev by trade but I would have to assume that sticking with the version of Unity they chose makes sense, at least while bug-fixing and DLC work is happening. Once that winds down, then they could look at upgrading the Unity build. Unity's not just a singular library or something, it's the entire foundation the game is standing on. If they upgrade it then who knows what individual parts of the engine might cause issues or work slightly differently.

RhanCandia commented 6 months ago

I could add support for disabling it when DoF is disabled but as I said, it's technically not DoF so I'm not sure on that. What do you think?

Honestly, my only pain points when playing is the gameplay, cutscenes, and occasionally the new are cut scene DOFs. The only place I've seen this is in the opening sequence of the game. So, I guess it's not really a problem anymore.

I'm not a game dev by trade but I would have to assume that sticking with the version of Unity they chose makes sense, at least while bug-fixing and DLC work is happening. Once that winds down, then they could look at upgrading the Unity build. Unity's not just a singular library or something, it's the entire foundation the game is standing on. If they upgrade it then who knows what individual parts of the engine might cause issues or work slightly differently.

Ah, makes sense. How do you know which functions to hook by the way? Like for the auto battle speed up and the dialogs.

Lyall commented 6 months ago

Honestly, my only pain points when playing is the gameplay, cutscenes, and occasionally the new are cut scene DOFs. The only place I've seen this is in the opening sequence of the game. So, I guess it's not really a problem anymore.

Sounds good. I'll leave it at fixing the depth of field bug for now then. I can always come back to this if it's a problem.

Ah, makes sense. How do you know which functions to hook by the way? Like for the auto battle speed up and the dialogs.

Using tools primarily, like Unity Explorer and il2cppdumper. Then it's just a matter of looking in the right place and figuring out where you should be patching stuff.

Lyall commented 6 months ago

This should (hopefully) be fixed properly in v0.9.7!