Closed mjducharme closed 2 years ago
I use IDA Pro to do my static analysis/reversing, but there are also other tools such as x64dbg, Ghidra and OllyDbg. The issue is probably in the UIUtilsQueueDialogSubs_Code
hook, since that's the only hooked function whose code differs from the SSE codebase's. I accounted for the most ostensible changes in register allocations, but it's possible that I missed something.
If you manage to fix it, feel free to open a PR.
EDIT: You might also need to update the VR offsets if the VR version was updated recently. Those in the code target RUNTIME_VR_VERSION_1_4_15
.
I've got a weekend, C++ experience (but not that much Visual Studio), a cheapo Windows VR headset, and I'd love to help port this to VR. If you're willing, I'd love your help porting this! I've used Fuz-Ro-D-oh
in nearly every Bethesda game I've played so far and I'd love to help you out.
(skyrim_vr_install_dir)/src/Fuz-Ro-D-oh-64
.sln
seemed to call for "Platform Tools v142"
skse64_common
"Depends" project is unloaded
~The referenced project '..\skse64\skse64_common\skse64_common.vcxproj' does not exist.
preceeded by several "cannot open source file" errors.~UIUtilsQueueDialogSubs_Code
is called when SkyrimSE.exe prepares the subtitles for whatever the next dialog happens next.1) Are SME_Prefix.h
, INIManager.h
, and the missing source files (see gist above) from some other dependency I need?
2) Do I need to retarget from the skse64 solution dependency to the sksevr solution dependency?
3) Is (project_root)/BuildIncrement.jse
a file I need to worry about?
4) How did you originally find these memory addresses for Skyrim64? I assume you hooked a debugger up to SkyrimSE.exe and triggered dialog several times and looked for specific addresses that triggered every time.
5) Are there are other tools or mods besides the ones I've listed that you use to help?
6) What is the [Depends]
folder? I'm not finding any reference to it.
7) In your debugger setup, you reference $(Skyrim64Path)
. Is this a Macro you set up? If so, how might I customize this to point to my SkyrimVR install?
Thank you for your work on Fuz-Ro-D-oh all these years!!
EDIT: I reread your comment and it sounds I'll need to do some static analysis of the binary. I found an old reddit thread that mentioned unpacking the executable so I'm working through that and IDA 7 Freeware.
EDIT 2: I found a bunch of guides for setting up a SKSE project. I'm going to follow those first. You can ignore my bits about setting up the VS Solution. I'd still like to know about your static analysis methodology for SkyrimSE so that I can try to extrapolate it to SkyrimVR.
You can just use the VC++ project for the VR version to build the plugin for VR. SME_Prefix.h
, etc are part of my SME-Sundries repo. BuildIncrement.jse
is just a script file used to increment the build number based on the date; you'll find it in the SME-Sundries repo. Modify the EnsVars.prop
file to set the paths to the necessary libraries. [Depends]
contains the FUZ silent sound files required by the plugin - They are placeholders that get played by the game when a voicefile-less line of dialog is detected. And yes, you can modify the Sryrim64Path
to point to the VR build of the game.
Alright! I was able to track down the differences in the kUIUtils_QueueDialogSubtitles
function and I created new offsets specifically for the VR variant. I've only tested for about 1 hour now but it looks pretty good so far. I'll give you a report on Sunday whether or not I've had any issues.
@drfuzzyness mind sharing your compiled dll temporarily? I can test as well, and I also have a friend who can.
Actually, nevermind, I see your code changes so I can just build on my environment.
For anyone else lurking, here's my build that incorporates the changes to the hook addresses.
Fuz Ro D'oh VR - Alpha 2.zip (Compiled as Release)
Place the plugin at (YourSkyrimVRGameDir)\Data\SKSE\Plugins\Fuz Ro D'oh.dll
or use a mod manager. Once I'm done testing and an official version is out, use the official version.
It works here too! Going to get my friend to try it out as well. He is playing VR tonight for several hours.
@drfuzzyness OK, so I found what appears to be a minor bug.
It does work - it displays the subtitles and doesn't crash. But - it displays all subtitles, including subtitles for dialog that it shouldn't appear for, dialog that is clearly audible that normally would not display on screen. The regular Fuz Ro D'oh LE/SE does not display this dialog.
It seems it is forcing all subtitles to be displayed instead of just displaying the subtitles for the dialogue that is missing .fuz files.
The trace for forcing subtitles might ~start~ end at this line:
I'll see what I can do tomorrow.
It also seems to not properly get a duration on certain short lines of text, but that might just be my imagination.
@drfuzzyness OK, so I found what appears to be a minor bug.
It does work - it displays the subtitles and doesn't crash. But - it displays all subtitles, including subtitles for dialog that it shouldn't appear for, dialog that is clearly audible that normally would not display on screen. The regular Fuz Ro D'oh LE/SE does not display this dialog.
It seems it is forcing all subtitles to be displayed instead of just displaying the subtitles for the dialogue that is missing .fuz files.
Are you using the Debug build? It has a flag that inverts the selection condition for testing purposes, i.e., dialogue that has valid sound files will be replaced with the silent voice file. Compiling in the Release config should "fix" that.
@shadeMe I was using the one he posted above, not sure if it is the debug or release. I was going to compile it myself but he gave the link just before I did. Although the name of the .zip file in that post has suddenly changed to Alpha 2 I see? It wasn't that last night. I'm not sure if anything has changed inside.
The version I linked is compiled as Release. I updated the link so I could move the directories around in the .zip file so it would be recognized by Vortex for my own sake.
I feel like an idiot but I think I figured out what I did wrong. I didn't include the actual silent audio files (.fuz
)!
This still leaves the bug where dialog subtitles are forced on all the time.
Closing this as VR support has been removed from the codebase.
I compiled the VR version of this and it seems to crash the game when entering dialogue. I imagine this is the same crash that caused you to pull this VR version from Nexus.
Although I haven't really dug through your code, I am guessing the issue is most likely with one or more of the VR memory addresses under the hookedAddresses namespace in Hooks.cpp. I have done some assembly language programming many years ago, as well as Windows development in C++ also many years ago. I was trying to see if I could find the problem.
Can you tell me what program you use to determine those offsets? I figure it must be a disassembler of some kind, but I haven't used those before, so I don't know where to start.