デス エンド リクエスト

デス エンド リクエスト

データを表示:
KingKrouch 2020年12月20日 10時40分
2
2
2
2
Death end re;Quest port fix thread (EnigmaFix) (COMING WHEN IT'S DONE)
So I've been spending the last four days working non-stop on reverse engineering how the game handles resolutions, the framerate cap, alongside a bunch of other stuff, and I just wanted to say that I am working on a mod that aims to improve many different aspects with the port. It will likely be a DLL that you just drag and drop into the game's "resource/bin" directory

As of right now, I got up and running:

  • Custom Aspect Ratios and custom internal resolution support (UI scaling is being figured out. All of the in-game resolution options will run at their advertised resolutions instead of upscaled/downscaled from 1080p, and the 4K Native option will likely be replaced with a custom resolution option. Fullscreen mode will likely ignore the chosen resolution by the game and use whatever the desktop is running at, since it's a borderless window that stretches).
  • Adjustable resolution for stuff such as ambient occlusion and shadow cascades (Thanks to Durante's GameManipTutorial on GitHub and RenderDoc) (I've managed to get to a point where these things are functional inside of the plugin without needing renderdoc, i just need to expose these things as actual options that can be adjusted, alongside finding a fix for shadows being sharper the higher the shadow resolution is).
  • Skipping opening videos, which can be disabled with a config file.
  • Field of View for overworld exploration and combat (As of right now, I'm working on fixing the FOV being affected during in-game cutscenes, this is about half-way finished).
  • An IMGUI based options menu that allows adjusting graphical options and FOV in real-time.

Things I want (and/or plan) to get up and running:
  • A first person mode with strafing (as using third-person movement with a first-person camera leads to some jank).
  • More generous camera clamping.
  • Finding out what is causing 2D stuff to update faster, and also providing an accessibility option to disable flickering effects used in character portrait's World Odyssey forms.
  • Finding a fix for the player speed and camera transition issues, which don't use delta timing.
  • Adjustable draw distance
  • No camera boom-arm lagging with mouse movements during battles, mouselook stays on during overworld exploration similar to how DERQ2 behaves, and mouse inversion using the same settings as the in-game options (Although I plan on adding overrides for just mouse inputs in the imgui UI if you prefer having different inversion options from controllers)

This will likely be a long journey, and quite a challenge, but once I get the basics situated, I plan on adding support for Death end re;Quest 2, and other IF games that use Orochi 4/Mizuichi (Although from what I've looked into, Neptunia VIIR and Dragon Star Varnir handles stuff such as internal resolution differently, so those will be harder to get working with this). I wanted to challenge myself with more than a simple UE4-based game fix, and I think that CH's games deserve better ports.

Looking forward to sharing more details on an actual download soon, but I'm still figuring out a lot of stuff.

EDIT: While I can't finish this at the moment, due to reasons I've stated on Page 5, I can at least release the source code in case anyone is interested in what I had so far. Turns out, managing five different games is a pain in the ass, and I don't see myself spending another 200 hours in this. For those looking for a way to compile it, you can use Visual Studio 2022, just open it as a CMake project. Never got around to figuring out the .lib linking errors when compiling with MinGW in CLion.

https://github.com/KingKrouch/EnigmaFix/
最近の変更はKingKrouchが行いました; 2024年8月30日 11時03分
< >
1-15 / 95 のコメントを表示
For those wondering about optimization related stuff to make the game run better, I am unsure on how I would go about that at the moment.

The game seems to scale pretty similarly performance wise no matter the resolution that I use, so it's likely an optimization issue that goes deeper than GPU-bound stuff.
Wow, awesome! I've been wanting to get back to my playthrough and eventually tackle DeRQ 2, but I run 1440p and I didn't want to play it at a non-native resolution. Looking forward to this!
Theswweet の投稿を引用:
Wow, awesome! I've been wanting to get back to my playthrough and eventually tackle DeRQ 2, but I run 1440p and I didn't want to play it at a non-native resolution. Looking forward to this!

Yeah, arbitrary resolutions work without much issues, setting aside the scaling issues reported at 1080p (Which are seemingly non-existent with the 4K native mode), and the minimap being broken.

I will probably hook the currently used resolution, and adjust the game's internal resolution based on that.

The second game is actually much easier to get running in 21:9 (for example), with the only thing really being an issue is the map being offset (although it's nowhere as severe as the first game). That just requires a value to be adjusted for the fullscreen mode to remove pillarboxing (Which isn't present above 2560x1080 anyways), and then a single aspect ratio value that controls the occlusion culling and aspect ratio of save crystals and walls needs to be adjusted.

Because AMD's Radeon Software's custom resolution support is kind of dodgy (It only supports custom resolutions below your native screen resolution, with the exception of VSR, which is a separate option), I am unable to take proper 7680x2160 or 7680x4320 screenshots.
nnn 2020年12月26日 8時10分 
Very nice, I might actually buy the game now.
nnn の投稿を引用:
Very nice, I might actually buy the game now.

It will probably take a bit to release something that I'm confident in, but once it's available, I will publicly announce a download link. There's a lot of work to be done.
iriyap 2020年12月26日 13時26分 
Sounds awesome! I'm not a big fan of the excessive post-processing in this game (bloom, DoF etc), so I might as well wait for your patch before taking the plunge I guess.
iriyap の投稿を引用:
Sounds awesome! I'm not a big fan of the excessive post-processing in this game (bloom, DoF etc), so I might as well wait for your patch before taking the plunge I guess.
From my time looking at the captured frames in RenderDoc, it seems like when the post-processing option is disabled in-game, it disables any calls relating to Yeebis, which explains why the gamma and lighting looks dark and incredibly off when it's disabled, as it relies on those. That is just what the final deferred rendering output (Characters use forward rendering) looks like, although disabling post-processing doesn't disable TAA.
最近の変更はKingKrouchが行いました; 2020年12月26日 18時12分
omg!! this might be the thing ive been waiting for i hope all goes well and you publicly give a download link when finished and maybe even do it for other games using the same engine like dragon star varnir maybe?!
This sounds fantastic, I've been meaning to attempt a DLL injection myself just to learn how to do it but I haven't gotten around to it. Would you be willing to share any sources/tutorials you used like the GameManipTutorial you mentioned?
Lelouch の投稿を引用:
This sounds fantastic, I've been meaning to attempt a DLL injection myself just to learn how to do it but I haven't gotten around to it. Would you be willing to share any sources/tutorials you used like the GameManipTutorial you mentioned?

For resolution related stuff, I searched for values being modified when the resolution changes between the 1080p and 4K Native mode.

For some internal resolution stuff, for example, at 1080p, I found that by looking for "80 07 00 00" strings in a hex editor, and searching for those AOBs in Cheat Engine if they end with 38 04.

I've also dug around the disassembler in Cheat Engine to find opcodes that access other values nearby. I've also poked around how the framelimiter works in Ghidra, which has something that allows you to view psuedocode (Which is somewhat similar to what appears in the disassembler.

For modifying the vertex shader command lists to see what they do, and what values to modify, I used SpecialK to inject into the game's exectuable, and I used the shader editor to modify those. I simply checked the checkbox near the respective vertex shader, and I pasted in the command list parameters that RenderDoc spit out, while modifying some of those values to offset stuff. For example, here are some results (Although some stuff such as character portraits should be shrunk manually to prevent clipping, the minimap needs to be modified to work properly, and the screen bounds for stuff like mouse menus need to be modified):

https://steamcommunity.com/sharedfiles/filedetails/?id=2348016328

Another interesting thing that I managed to find was a 0.5 float value in CE that was affecting a lot of things, and thanks to that, I found some minimap offset stuff, some FOV related stuff, and other things (Although I have no clue on how I exactly did this).

Another interesting tidbit is that the game handles aspect ratio with it's internal resolution, but some stuff, such as save crystals and objects, seemingly are using a separate render target, which requires adjusting the aspect ratio value according to the internal resolution to get looking correct.
最近の変更はKingKrouchが行いました; 2021年1月3日 6時07分
As a late Christmas gift, here's a Cheat Engine table that people can use to play around with what I have so far for the first game, setting aside graphics injection related stuff. This download will probably be taken down once I can get around to releasing a proper mod. The aspect ratio pointer seems to only activate when you load into the game, and adjusting the internal resolution only applies when you adjust resolution settings.

https://drive.google.com/file/d/1dp5vyFkLsjHnoLzQwLNEh1TpxjQpyEtv/view?usp=sharing
最近の変更はKingKrouchが行いました; 2021年2月8日 12時26分
KingKrouch の投稿を引用:
Lelouch の投稿を引用:
This sounds fantastic, I've been meaning to attempt a DLL injection myself just to learn how to do it but I haven't gotten around to it. Would you be willing to share any sources/tutorials you used like the GameManipTutorial you mentioned?

I've also dug around the disassembler in Cheat Engine to find opcodes that access other values nearby. I've also poked around how the framelimiter works in Ghidra, which has something that allows you to view psuedocode (Which is somewhat similar to what appears in the disassembler.

For modifying the vertex shader command lists to see what they do, and what values to modify, I used SpecialK to inject into the game's exectuable, and I used the shader editor to modify those. I simply checked the checkbox near the respective vertex shader, and I pasted in the command list parameters that RenderDoc spit out, while modifying some of those values to offset stuff. For example, here are some results (Although some stuff such as character portraits should be shrunk manually to prevent clipping, the minimap needs to be modified to work properly, and the screen bounds for stuff like mouse menus need to be modified):
Sounds like you put a lot of work into it, good for you. I hadn't heard of Ghidra before you mentioned it, I'll give that a look.
Do you plan to use Special K as your injector and just add on whatever you plan to overlay?
最近の変更はLelouchが行いました; 2021年1月4日 18時08分
Lelouch の投稿を引用:
Sounds like you put a lot of work into it, good for you. I hadn't heard of Ghidra before you mentioned it, I'll give that a look.

Ghidra is a disassembler that is FOSS (Free Open Source), and is also maintained by the CIA, as it's used for reverse engineering software and for security researchers who reverse engineer malware, but it's definitely a good and cheap alternative to IDA Pro (Which costs thousands for a license). I personally use it alongside Cheat Engine to find out how things tick (and what to modify), and I'd like to look into incorporating x64dbg into my workspace as well, once I get around to figuring out how to use that (As I'd like to figure out a full intro skip, including the legal screens which don't use video files).

Lelouch の投稿を引用:
Do you plan to use Special K as your injector and just add on whatever you plan to overlay?

My plans is to have it run independently. I was just using SpecialK to debug shader related stuff, and stuff like VSync, window modes (If I can figure things out, I might look into a proper exclusive fullscreen mode instead of a borderless mode). I'd ideally like to find something that changes the scale and position of the UI in the game rather than relying on an exorbiant amount of shader parameter modifications (Which can get messy real quick, especially when dealing with an abundance of float4 values) which still don't affect mouse coordinates.

As for resolution support in the second game, from my time looking around disassembled code, it seems to actually render at the resolutions that the in-game options list now (could have been added in a patch, but from what I've seen, it operates on a switch statement like system), and from my time digging around in Ghidra, that game handles internal resolutions differently. Getting custom resolution support in that game will likely be easier, but I've gotten much farther in looking at the first game, so things have naturally progressed further. I'd like to either go about finding a way to make each resolution option behave similarly to how the second game does things, alongside replacing the 4K Native option with a custom resolution option that will read from an INI. Fixing the stretching in fullscreen mode and having it run at whatever the desktop's current resolution is (instead of stretching the image) would be nice to figure out too.

There's a lot of work to be done, but my plan is to have a working build (That works in a DLL wrapper, and that has support for multiple games) with some basic functionalities in a few months (To be generous, as my schedule is kind of unpredictable). I'm still new to a lot of stuff, such as hooking and graphics programming related stuff, despite my experience with modding UE4 games, and I wanted to challenge myself.
An update of sorts:

So I've made some more progress in terms of finding what resolution is being selected in the options menu (It's seemingly using an integer range), alongside the currently saved value. This will help with modifying the internal resolution values to match up with the resolution value selected in-game, rather than upscaling/downscaling from 1080p. My plans are to also replace the 4K Native option (As 3840x2160 will likely run at 4K instead) with a custom resolution option that will read a custom resolution from an INI file.

Another thing that guess I can add to the planned feature list is possibly re-implementing surround sound support (possibly), as Neptunia VIIR and Dragon Star Varnir supports it, but every IF port past those two (that use Orochi 4) seemingly don't have the option for it. I recently got a Sound BlasterX G6, and I've been playing quite a bit with it's surround sound solution. Maybe there could be a way to get it running in more than 4.1 surround sound if the engine supports it. That's a big maybe though, as I'd need to look into that individual aspect of VIIR and Varnir, and then reverse engineer it, and then find equivalent functions in the other games.

Anyways, Here's a small preview of the centered UI (Although more work has to be done to get it running properly) with a scale value (for the pause menu window) in Cheat Engine, and manually modifying the vertex shader's command buffer for the rest: https://i.imgur.com/Vun12CX.png

I'd like to figure out individual coordinates of things, so I could maybe do both a centered UI (for those with multimonitor/32:9 setups) and spanned UI option (for those with 21:9 displays). Some things may require me to figure out how to add pillarboxing/letterboxing though, such as VN sequences and still images.
Edu 2021年2月8日 10時40分 
Hi, can you share the cheat engine table again please? the google drive link isn't working anymore.
< >
1-15 / 95 のコメントを表示
ページ毎: 1530 50

投稿日: 2020年12月20日 10時40分
投稿数: 95