Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for game [Fallout New Vegas - Epic Games Release] #1885

Closed
WilliamImm opened this issue Sep 27, 2023 · 30 comments
Closed

Add support for game [Fallout New Vegas - Epic Games Release] #1885

WilliamImm opened this issue Sep 27, 2023 · 30 comments

Comments

@WilliamImm
Copy link

WilliamImm commented Sep 27, 2023

  • Name: Fallout: New Vegas (Epic Games Store version)
  • Short name: newvegas
  • Nexus ID [optional]: https://www.nexusmods.com/newvegas
  • Executable: FallloutNV.exe
  • Launcher [optional]: Two: FalloutNVLauncher.exe (usual), or ../Launcher.exe (appears to be a passthrough)
  • Data path: Data
  • Documents path: My Games\FalloutNV_Epic
  • Saves directory [optional]: My Games\FalloutNV_Epic\Saves
  • Save extension [optional]: .fos
  • Epic Games Manifests:
    • Basegame: 5daeb974a22a435988892319b3a4f476
    • Dead Money: b290229eb58045cbab9501640f3278f3
    • Honest Hearts: 562d4a2c1b3147b089a7c453e3ddbcbe
    • Old World Blues: c8dae1ab0570475a8b38a9041e614840
    • Lonesome Road: 4fa3d8d9b2cb4714a19a38d1a598be8f
    • Gun Runners' Arsenal: 7dcfb9cd9d134728b2646466c34c7b3b
    • Courier's Stash: ee9a44b4530942499ef1c8c390731fce

Additional Details

Game data version for English is [Epic Games]/FalloutNewVegas/Fallout New Vegas English. FalloutNewVegas contains Launcher.exe and supporting files, including a configuration. Seemingly what's run to launch the game, configuration file can be altered to point at FalloutNV.exe proper to skip this launcher.

Game version is 1.4.0.1338 on Epic at time of this writing, compared to Steam 1.4.0.525. (CRC: 5E871578)

EOSSDK-Win32-Shipping.dll is present. Main differences in files appear to be DLLs in root folder besides this (no GDFFalloutNV.dll by default in Epic release, msvcp140 and vcruntime140 are present)

Does not modify registry by default.

Epic Games Patcher is an effective requirement for modded setups, as it allows for xNVSE to be used. Can check for presence by reading version number (should be 1.4.0.525 after patcher). Potentially suggest users run it if they haven't.

  • Alongside this, don't show xNVSE loader executable, it will never work with this version of the game.

#1828 shows potential launcher interference w/ this title.

@Silarn
Copy link
Member

Silarn commented Sep 28, 2023

Can you validate that ANY of those manifests would contain the proper game directory or is it safe to just use the base game manifest?

@Silarn
Copy link
Member

Silarn commented Sep 28, 2023

@WilliamImm
Copy link
Author

WilliamImm commented Sep 28, 2023

Can you validate that ANY of those manifests would contain the proper game directory or is it safe to just use the base game manifest?

All of these manifests contain a reference to the directory [Epic Games]/FalloutNewVegas within "InstallLocation". Therefore, it's safe to use any of these manifests to get a reference to this location.

The extra complication is that this isn't the basegame directory, for the English language install, the subdirectory "Fallout New Vegas English" is the basegame equalivant. Not the same if someone were to install a multilingual verison, eg: "Fallout New Vegas Spanish" is the Spanish version. Whole extra copies of the game - it seems what launches is determined by the EGS language settings and not by the executable that's run.

(Yes, the Epic Games patcher works with these versions too. Whether you want to support them right now is up to you!)

But yeah, thanks for the quick PR!

@Silarn
Copy link
Member

Silarn commented Sep 28, 2023

Is it possible to pull that language from an Epic manifest file?

@Silarn
Copy link
Member

Silarn commented Sep 28, 2023

Are there any other directories within FalloutNewVegas that aren't a valid game directory? I may just opt to select the first directory.

@WilliamImm
Copy link
Author

WilliamImm commented Sep 28, 2023

Are there any other directories within FalloutNewVegas that aren't a valid game directory? I may just opt to select the first directory.

No, all the subdirectories are game installs.

The manifest files do write a tag corresponding to each version. Eg, with both English and Spanish installed:

	"InstallTags": [
		"",
		"spanish"
	],

"" appears to correspond to the English version.

Mind, the installation of multiple versions at once is a bit of a contrivance, in practice I'm sure one would be installed at a time, especially as mod installation files would effectively need to be copied over between each and every language if someone really wanted to play multilingual. I think trying to support that is out of scope, first directory should be good enough for 99% of these installs.

@Silarn
Copy link
Member

Silarn commented Sep 28, 2023

This does make use of some additional changes in gamebryo so I won't be able to just drop in a NV plugin dll, but I'll add it to the next beta build so you can test.

@Silarn
Copy link
Member

Silarn commented Sep 28, 2023

Just to be sure, AppData\Local uses the same FalloutNV_Epic directory, right?

@WilliamImm
Copy link
Author

Just to be sure, AppData\Local uses the same FalloutNV_Epic directory, right?

Yeah, it uses the same directory, just checked.

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

@WilliamImm Can you please test with the beta 11 release and let me know how it works? There's some evidence that there might be issues with USVFS hooking the application but it's not clear to me why that is.

@WilliamImm
Copy link
Author

WilliamImm commented Sep 30, 2023

@WilliamImm Can you please test with the beta 11 release and let me know how it works? There's some evidence that there might be issues with USVFS hooking the application but it's not clear to me why that is.

This mostly works, with the critical exception of plugin files not loading. Texture/loose file mods and NVSE plugins do work though. However, this only happens once -EpicPortal to the arguments of both New Vegas and Fallout Launcher. Add these to both executables if this is the Epic variant by default.

Without it, mods do not load at all, and weird issues with starting the game up are present, including EGS launching the launcher after the game was closed.

That being said, mod plugin files not loading is critical to fix before this is ready for primetime, for obvious reasons. The VFS behavior seems to be working fine, so I'm guessing it's a disconnect in hooking to point to the correct plugin loadorder w/in the game itself. This seems to line up what RJ is reporting in the Discord.

Tested with JIP LN NVSE Plugin, YUP, Ultimate Edition Title Screen Replacer, JSawyer Ultimate Edition, and Mod Configuration Menu - stuff that for the most part would be immediately obvious if not present.

Some other observations:

  • Whoops, Epic places a ".egstore" directory in the FalloutNewVegas folder. So my earlier assumption about there being only the game directories as subfolders there is incorrect. Skip over that for detection and instead focus on the first folder that has "Fallout New Vegas" in the title.. or explicitly block off the ".egstore" directory.
  • NVSE Launcher is displayed by default in executables, which is a noob trap for Epic installations. As mentioned in OP, only the post-Epic Games Patcher executable should be run to start xNVSE. Please remove this if the Epic variant is detected to avoid confusion, this only makes sense for non-4GB patched versions of the Steam version.

I've tested on both patched and non-patched versions, and can confirm this mostly working behavior if and only if -EpicPortal is enabled.

mo_interface.log
Failed attempts, without -EpicPortal
usvfs-2023-09-30_19-10-09.log
usvfs-2023-09-30_19-19-19.log

Semi-successful versions
usvfs-2023-09-30_19-35-16.log
usvfs-2023-09-30_20-15-59.log

@WilliamImm
Copy link
Author

mo_interface.log

Also, deux mo_interface.log, in case that helps.

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

Noted, and I can make those changes, but it does appear to be finding and loading those plugins:
15:16:05.357 <18992:22316> [D] ntdll_mess_NtCreateFile [inPathW=\??\D:\Epic Games\FalloutNewVegas\Fallout New Vegas English\DATA\YUP - Base Game + All DLC.esm] [rerouter.fileName()=D:\MO2_FNVEpicTest\mods\Yukichigai Unofficial Patch - YUP\YUP - Base Game + All DLC.esm] [DesiredAccess=80100080] [originalDisposition=1] [CreateDisposition=1] [FileAttributes=80] [res=0] [*FileHandle=00001148] [rerouter.originalError()=0] [rerouter.error()=0]

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

One thing I'm not seeing is an open of plugins.txt.

This is what I get in my Steam log and I don't see an equivalent one in your log:
20:18:45.266 <17796:21008> [D] hook_GetFileAttributesW [lpFileName=\??\C:\Users\USERNAME\AppData\Local\FalloutNV\Plugins.txt] [reroute.fileName()=C:\Games\ModOrganizer\Fallout NV\profiles\Blah\plugins.txt] [res=20] [originalError=0] [fixedError=0] 20:18:45.266 <17796:21008> [D] ntdll_mess_NtCreateFile [inPathW=\??\C:\Users\USERNAME\AppData\Local\FalloutNV\Plugins.txt] [rerouter.fileName()=C:\Games\ModOrganizer\Fallout NV\profiles\Blah\plugins.txt] [DesiredAccess=80100080] [originalDisposition=1] [CreateDisposition=1] [FileAttributes=80] [res=0] [*FileHandle=000017FC] [rerouter.originalError()=0] [rerouter.error()=0]

Can you super double check the plugins.txt file location path?

Maybe manually install one and enable it in the launcher and see what file is created. (You can revert it after checking the files.)

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

Another relevant difference:
Yours:
15:16:02.341 <18992:22316> [D] hook_GetFileAttributesW [lpFileName=C:\Users\USERNAME\AppData\Local] [reroute.fileName()=C:\Users\USERNAME\AppData\Local] [res=10] [originalError=1008] [fixedError=1008]

Mine:
20:18:41.544 <17796:21008> [D] hook_GetFileAttributesW [lpFileName=C:\Users\USERNAME\AppData\Local] [reroute.fileName()=C:\Users\USERNAME\AppData\Local] [res=10] [originalError=0] [fixedError=0] 20:18:41.544 <17796:21008> [D] hook_GetFileAttributesW [lpFileName=\??\C:\Users\USERNAME\AppData\Local\FalloutNV] [reroute.fileName()=C:\Users\USERNAME\AppData\Local\FalloutNV] [res=10] [originalError=0] [fixedError=0] 20:18:41.544 <17796:21008> [D] hook_CreateDirectoryW [lpPathName=C:\Users\USERNAME\AppData\Local\FalloutNV\] [reroute.fileName()=C:\Users\USERNAME\AppData\Local\FalloutNV] [res=0] [callContext.lastError()=183]

There's some kind of error when it tries to access AppData\Local.

@WilliamImm
Copy link
Author

That might explain why the plugins aren't loading. The location should be C:\Users\USERNAME\AppData\Local\FalloutNV_Epic\plugins.txt. I've tested with the same version of Mod Organizer 2 on my Steam install to confirm that, yeah, it does load plugins. Log file from there uploaded below for cross referencing.

usvfs-2023-09-30_22-45-33.log

Accoding to MS system error codes, 1008 corresponds to "ERROR_NO_TOKEN". That help any?

@WilliamImm
Copy link
Author

Quick screenshot of the FNV Epic appdata with plugins.txt, for extra proof.

Quick screenshot of the FNV Epic appdata with plugins.txt

@WilliamImm
Copy link
Author

And to double check, manually running it through the launcher and adding mods there, C:\Users\USERNAME\AppData\Local\FalloutNV_Epic\plugins.txt is indeed where the game loads enabled plugins from.

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

Can you try running as admin to see if it makes a difference? It seems to be failing to load the file and I'm not sure why.

@WilliamImm
Copy link
Author

That made no difference. Here's my log for that attempt.

usvfs-2023-09-30_23-06-51.log

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

Does the launcher show the plugins?
image

@WilliamImm
Copy link
Author

Yeah, it does. This behavior happens without admin.

Launcher plugin window

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

It shows them enabled as well. Assuming those aren't present in the default plugins.txt, that means the launcher is reading and updating the plugins.txt as expected. So, bizarrely, the game is not. Can you try dropping the profile plugins.txt into AppData before running the game just to see if the plugins will load with that?

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

I'd also recommend temporarily disabling any antivirus while testing this just to rule out any interference from that.

@WilliamImm
Copy link
Author

WilliamImm commented Sep 30, 2023

...wait. I tested a hypothesis from RJ over on Discord. He was theorizing that the patched version checks FalloutNV in AppData\Local, not FalloutNV_Epic.

By copying over the MO plugins.txt over to FalloutNV in AppData, it works. I'm gonna test with the unpatched version, my hypothesis is that both unpatched and patched versions do this.

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

By patched, I'm assuming you mean a patched version of the EXE? But the launcher doesn't, so that feels like a patcher bug to me.

@WilliamImm
Copy link
Author

WilliamImm commented Sep 30, 2023

It's not a patcher bug, the unpatched version does this too. I checked with the 1.4.0.1338 (Vanilla epic) exe.

The actual plugin.txt path is C:\Users\USERNAME\AppData\Local\FalloutNV\plugins.txt, same as Steam/GOG. It's only the My Games profile that is different.

Whyyyyyyyyy. Why the inconsistency. At least plugins are working.

@WilliamImm
Copy link
Author

Turns out we discovered a pretty major Bethesda-introduced bug with the EGS version, since the vanilla launcher is affected by this too. Yeesh.

Virtualizing both directories works for now, but barring an unlikely Bethesda fix, gonna talk with lStewieAl to see if the patcher can resolve this inconsistency.

@Silarn
Copy link
Member

Silarn commented Sep 30, 2023

@WilliamImm
Copy link
Author

It occus to me that the TTW plugin needs matching updates too, so.. made #1891 for tracking that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants