Norbyte / bg3se

Baldur's Gate 3 Script Extender
Other
1.15k stars 67 forks source link

Since Hotfix #27: Excessive load times with load times increasing dramatically with addition of SE mods #458

Closed ADPhoenix closed 1 month ago

ADPhoenix commented 1 month ago

I have attempted solutions to common problems

Yes

I have checked that my game version is supported

Yes

OS

Windows 11

Platform

Steam

Description

Load times for the game, Character Creation, and Savegame load are all excessive. These issues increase in severity when activating multiple mods that rely on SE.

Even with zero mods active, Game Launch to the Main Menu takes approx. 5 minutes, Character Creation load (from the Main Menu) takes approximately 2-3 minutes, and loading a Savegame (from the Main Menu) takes approximately 30 seconds.

Activating mods that rely on SE increases these slowdowns. I have had game load take 10 minutes, new character load take 5 minutes, and savegame load take 1-2 minutes when mods are active.

This is a new-ish (less than 1 year old) full tower desktop PC running Windows 11 Home 64-bit on a Ryzen 7 7700X CPU at 4.5GHz, 32GB RAM, and a GeForce RTX 4070. Given the system's power, even when zero mods are active the load times seem excessive.

Indications

The biggest indication that this is an issue with SE rather than a mod or the game is that it is an issue even when no mods are active, and the issue worsens when there are active mods that rely on SE.

Diagnostic Files

DxDiag_20241003.txt BG3 Diagnostic Data.zip

Note that my BG3 Diagnostic Data.txt file is larger than the 25MB filesize limit, so I have compressed it into a ZIP file, thus reducing the filesize down to less than 6MB.

Steps to Reproduce

  1. Install and update BG3
  2. Install the latest BG3 Script Extender from https://github.com/Norbyte/bg3se/releases
  3. Launch BG3 Mod Manager
  4. Ensure zero Active Mods (alternatively, activate several mods that rely on SE; I recommend doing both and comparing the difference in load times) [NOTE :: I currently have 10 mods installed that are classified by BG3 Mod Manager as Overrides that might technically be always active, namely: BetterMapAssets, BG3ShadowSorcerer_ClassIcon_BlueShadowLord, EnhancedWorldTooltips, HighlightEverything, HumanoidTagScratchFix, ImprovedUIAssets, ImprovedUIDialog, NoPickpocketInvestigation, Patches_for_VFX_Heads, and Trips_Shader]
  5. Export Load Order
  6. Launch BG3
  7. Time Game Launch/Load
  8. Start New Game, skipping video cutscenes
  9. Time Character Creation Load
  10. Load/Continue Savegame
  11. Time Savegame Load

Expected Behavior

I believe that what should be happening, especially with zero active mods, is that the time it takes for the game to launch to the point of being able to access the Main Menu, the time it takes to go from the Main Menu to the Character Creation interface when starting a New Game (and skipping the video cutscenes), and the time it takes to load a Savegame from the Main Menu should all be less than they are. In particular, Game Launch should take less than 2 minutes, New Character should take less than 1 minute, and Savegame Load should take less than 15-30 seconds. Additionally, with active mods, these load times should not increase by more than +100% (thus, for example, a maximum of 6 minutes to go from the game not running to full access to the Character Creation interface).

Actual Behavior

Game Launch with zero mods ~= 5 minutes Game Launch with active mods ~= 10 minutes New Character with zero mods ~= 2-3 minutes New Character with active mods ~= 5 minutes Savegame Load with zero mods ~= 30 seconds Savegame Load with active mods ~= 1-2 minutes

asdfawsdgfesdfhrstgh commented 1 month ago

Same exact issue here.

hawchangJA commented 1 month ago

Does this happen with bg3se v20 too?

ADPhoenix commented 1 month ago

This is with v20. I have no idea if this happens with earlier versions of SE. I've been using v20 since early September. It is worth noting, however, that this was not an issue with Patch 7, nor with Hotfix 26, but only began to be an issue with Hotfix 27 (hence the title of this issue).

SkebbZ commented 1 month ago

Same issue here. Similar hardware as @ADPhoenix : AMD Ryzen 7 7700X at 4.5GHz, 32GB DDR5@6000MHz, RTX 3080 10GB, Windows 11 Pro, Steam version. What CPUs are you all on?

I'm also getting a number of yellow LUA VM reset warnings during loading, maybe 3 when the game starts and again when I load a save.

Also having the message from #439.

When pressing ESC, I get #445

Script Extender Logs.zip Logs attached from starting the game, pressing continue, waiting for load and then quitting game. Not sure why it generated two runtime files, but it could be because of the VM reset thing I mentioned? Modlist: modsettings.zip

OmniZenn commented 1 month ago

Experiencing the same thing

blzz commented 1 month ago

I have this pretty badly too and it makes me not play currently. I went as far as taking this happenstance as the time to upgrade to Windows 11, figuring a redownload of the game and fresh setup with all %AppData% and settings possibly fixing the problem.

All I took over with me was my /Mods/ folder.

10-15mins loading into main menu. 20 mins loading into Saves.

Aahzmandius commented 1 month ago

But... but what happens when you get rid of DWrite.dll and your SE mods, and just load up the game with hundreds of supported mods?

ADPhoenix commented 1 month ago

But... but what happens when you get rid of DWrite.dll and your SE mods, and just load up the game with hundreds of supported mods?

With a known working mod set, minus all mods that require SE (20 mods), for a total of 322 loaded mods, and with DWrite.dll deleted from my game directory: Game launch from not running to the Main Menu takes approximately 4.5 minutes, Main Menu to Character Creation takes approx. 15 seconds. So I suppose when I gave my "Expected Behavior" I overestimated how quickly the game would launch, but otherwise was conservative. SE is drastically slowing things down.

C0wpuncher commented 1 month ago

Had the same issue recently. I always run heavy on mods but its never really been too noticeable until recently. Its agonizingly slow. Clocked at 8 minutes to get to main menu screen.

SkebbZ commented 1 month ago

Had the same issue recently. I always run heavy on mods but its never really been too noticeable until recently. Its agonizingly slow. Clocked at 8 minutes to get to main menu screen.

I would say it increased the loading times by several orders of magnitude after hotfix 27 specifically.

Game launch went from like 10 seconds to 3+ minutes, with the exact same mod list.

Aahzmandius commented 1 month ago

But... but what happens when you get rid of DWrite.dll and your SE mods, and just load up the game with hundreds of supported mods?

With a known working mod set, minus all mods that require SE (20 mods), for a total of 322 loaded mods, and with DWrite.dll deleted from my game directory: Game launch from not running to the Main Menu takes approximately 4.5 minutes, Main Menu to Character Creation takes approx. 15 seconds. So I suppose when I gave my "Expected Behavior" I overestimated how quickly the game would launch, but otherwise was conservative. SE is drastically slowing things down.

So... the problem with hotfix 27 is vanilla behavior that should be fixed in the vanilla game?

Without SE, the game suddenly taking 4.5 minutes to load up when it previously didn't do that even heavily modded with "supported" mods...

Dunno, just seems like it's not SE's responsibility to fix the base game's problems.

ADPhoenix commented 1 month ago

But... but what happens when you get rid of DWrite.dll and your SE mods, and just load up the game with hundreds of supported mods?

With a known working mod set, minus all mods that require SE (20 mods), for a total of 322 loaded mods, and with DWrite.dll deleted from my game directory: Game launch from not running to the Main Menu takes approximately 4.5 minutes, Main Menu to Character Creation takes approx. 15 seconds. So I suppose when I gave my "Expected Behavior" I overestimated how quickly the game would launch, but otherwise was conservative. SE is drastically slowing things down.

So... the problem with hotfix 27 is vanilla behavior that should be fixed in the vanilla game?

Without SE, the game suddenly taking 4.5 minutes to load up when it previously didn't do that even heavily modded with "supported" mods...

Dunno, just seems like it's not SE's responsibility to fix the base game's problems.

Sorry, what part of "SE is drastically slowing things down" did you miss?

Going from 322 mods with no SE to 342 mods with SE absolutely should not more than double the load times. The fact that this problem didn't exist prior to Hotfix 27 suggests pretty strongly that something was changed in the vanilla game that isn't playing well with SE, but as long SE devs intend to continue maintaining SE, it is SE's responsibility to be as compatible as possible with the vanilla game. If you want to say that Larian should make it so that Load times are less than 4.5 minutes when there is no SE, that's perfectly fine (I'd be inclined to agree with you), but that doesn't mean that it isn't an SE problem that such load times more than double when SE is present.

At best, this is a dual problem, both with the game itself and with SE. And if that's the case, it would be reasonable for SE devs to work together with Larian to resolve both sides of the issue. But even if Larian refuses to address the issue from their end, SE should at least try to improve the issue as much as possible on the SE side of the equation. If nothing else, understanding the point(s) at which the vanilla game and SE aren't getting along could help Larian improve the vanilla game to address the problem on their side of it.

Simply blaming Larian and the vanilla game and then washing your hands of the issue is really not the look you seem to think it is.

C0wpuncher commented 1 month ago

I'm not accusing anybody of anything but I used to run about 1300 mods and it never took anywhere near this time. it was bad enough I started browsing mods to see if one was the cause with no success. Something has changed on some update and it wasn't that bad previously when patch 7 rolled out, but after the hot fix something is dragging it down. I can't see what it's checking at the time of slowdown but it's on the front end of mod loads. during the configuration phase. It hangs for a long time before starting up.

AtilioA commented 1 month ago

At best, this is a dual problem, both with the game itself and with SE.

This is clearly a vanilla issue, and SE should not attempt to address it if Larian is expected to fix it.

Additionally, there are no 'SE devs' or SE team β€” it's just one person. Please respect his time and energy.

C0wpuncher commented 1 month ago

At best, this is a dual problem, both with the game itself and with SE.

This is clearly a vanilla issue, and SE should not attempt to address it if Larian is expected to fix it.

Additionally, there are no 'SE devs' or SE team β€” it's just one person. Please respect his time and energy.

It looks more like its struggling to locate libraries as that is the line it hangs on which I don't see how that is a vanilla issue. Some format changed so it needs to change to locate it.

TheLegendofSaram commented 1 month ago

same here

thesquareular commented 1 month ago

same problem here. fresh reinstall, hotfix #27

hawchangJA commented 1 month ago

This is a place to report and resolve bg3se issues, so why don't you stop posting "same" without any additional information? No need to say "yes" to this comment either.

asdfawsdgfesdfhrstgh commented 1 month ago

This is a place to report and resolve bg3se issues, so why don't you stop posting "same" without any additional information? No need to say "yes" to this comment either.

Check the original post of this thread. The variables are the exact same. No additional information to add. SE needs fix. Simple as that.

Aahzmandius commented 1 month ago

Why would anyone change things in response to an issue (in the base game)... ...that is going to be fixed soon, because it (the base game) has to be fixed, because it is obviously an issue (in the base game).

While we're at it let's go comment on each mod in our load orders, because they each technically add an additional +1 second to load times suddenly.

Meanwhile before hotfix 27, the game would open a mod's .pak file once, grab what it needed, then close it and move on.

After the update, it seems to open the .pak file to take a peek at everything inside, closes it, and then it opens and closes it again every time it wants to load those catalogued modded files from inside the mod. It's an obvious base-game problem that should be fixed in the base game, not SE's responsibility to patch, when SE is a script extender.

More useful to go rabble at Johnathon Larian for spinning up people's drives so unnecessarily.

SkebbZ commented 1 month ago

Why would anyone change things in response to an issue (in the base game)... ...that is going to be fixed soon, because it (the base game) has to be fixed, because it is obviously an issue (in the base game).

While we're at it let's go comment on each mod in our load orders, because they each technically add an additional +1 second to load times suddenly.

Meanwhile before hotfix 27, the game would open a mod's .pak file once, grab what it needed, then close it and move on.

After the update, it seems to open the .pak file to take a peek at everything inside, closes it, and then it opens and closes it again every time it wants to load those catalogued modded files from inside the mod. It's an obvious base-game problem that should be fixed in the base game, not SE's responsibility to patch, when SE is a script extender.

More useful to go rabble at Johnathon Larian for spinning up people's drives so unnecessarily.

bilde Hopefully we see an update soon, there are some builds newer than public it seems. Probably in testing. Ref https://steamdb.info/app/1086940/patchnotes/?all

Norbyte commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only)

Load time went back from 3m to 1m for me after this change

ADPhoenix commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only)

Load time went back from 3m to 1m for me after this change

I can confirm this workaround. SE in place and Load Order with 351 active mods, including 21 SE-reliant mods (yes, I added a couple more items to my Load Order), and full Load Time from "game not running" to Character Creation interface took approx. 3 minutes where before it would have been 15m.

SkebbZ commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only)

Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

ADPhoenix commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

Not sure about the additional errors. I didn't notice any in my attempt, but I honestly was only paying attention to A) did the game still load to the point of Character Creation and B) how long did it take to get there.

As for editing for the DX11 version, I cannot confirm if this works or not (haven't tried it), but comparing the surrounding hex data context, there is only one Offset that seems to have the same full surrounding data: 0x3ef33e8. You can try making the change there and see if it works or not, but I would highly recommend making a backup of the original bg3_dx11.exe file before you do so.

SkebbZ commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

Not sure about the additional errors. I didn't notice any in my attempt, but I honestly was only paying attention to A) did the game still load to the point of Character Creation and B) how long did it take to get there.

As for editing for the DX11 version, I cannot confirm if this works or not (haven't tried it), but comparing the surrounding hex data context, there is only one Offset that seems to have the same full surrounding data: 0x3ef33e8. You can try making the change there and see if it works or not, but I would highly recommend making a backup of the original bg3_dx11.exe file before you do so.

I guess those errors could be related to me never running the Vulkan exe before and some cache files. Anyway, I edited it for the DX11 exe file (the line below where you mentioned) and it returned to about 20 seconds loading, all of the errors I got from the Vulkan one went away. Exact spot: 0x3EF33F0 or 3EF:33F0 in my editor format. Changed the same numbers Norbyte mentioned there. Changed files (Steam version ONLY) https://easyupload.io/yefjlm (Now redundant with hotfix 28)

ruvaldak commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

Not sure about the additional errors. I didn't notice any in my attempt, but I honestly was only paying attention to A) did the game still load to the point of Character Creation and B) how long did it take to get there. As for editing for the DX11 version, I cannot confirm if this works or not (haven't tried it), but comparing the surrounding hex data context, there is only one Offset that seems to have the same full surrounding data: 0x3ef33e8. You can try making the change there and see if it works or not, but I would highly recommend making a backup of the original bg3_dx11.exe file before you do so.

I guess those errors could be related to me never running the Vulkan exe before and some cache files. Anyway, I edited it for the DX11 exe file (the line below where you mentioned) and it returned to about 20 seconds loading, all of the errors I got from the Vulkan one went away. Exact spot: 0x3EF33F0 or 3EF:33F0 in my editor format. Changed the same numbers Norbyte mentioned there. Changed files https://easyupload.io/yefjlm

I can confirm that this works for me as well.

ADPhoenix commented 1 month ago

I guess those errors could be related to me never running the Vulkan exe before and some cache files. Anyway, I edited it for the DX11 exe file (the line below where you mentioned) and it returned to about 20 seconds loading, all of the errors I got from the Vulkan one went away. Exact spot: 0x3EF33F0 or 3EF:33F0 in my editor format. Changed the same numbers Norbyte mentioned there. Changed files https://easyupload.io/yefjlm

Sorry, when I was looking for the data context I checked for the full 8-byte section that needed to be edited plus the 8-byte sections immediately before and immediately after. I meant to give the actual location to be edited, but apparently gave the address for the 8-byte section immediately before it. My bad. Thank you for posting the correct address for everyone, and thanks for confirming it works :)

asdfawsdgfesdfhrstgh commented 1 month ago

I guess those errors could be related to me never running the Vulkan exe before and some cache files. Anyway, I edited it for the DX11 exe file (the line below where you mentioned) and it returned to about 20 seconds loading, all of the errors I got from the Vulkan one went away. Exact spot: 0x3EF33F0 or 3EF:33F0 in my editor format. Changed the same numbers Norbyte mentioned there. Changed files https://easyupload.io/yefjlm

Sorry, when I was looking for the data context I checked for the full 8-byte section that needed to be edited plus the 8-byte sections immediately before and immediately after. I meant to give the actual location to be edited, but apparently gave the address for the 8-byte section immediately before it. My bad. Thank you for posting the correct address for everyone, and thanks for confirming it works :)

You're a life saver! Works great so far. Back to reasonable load times again

Dangertitz00 commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

Not sure about the additional errors. I didn't notice any in my attempt, but I honestly was only paying attention to A) did the game still load to the point of Character Creation and B) how long did it take to get there.

As for editing for the DX11 version, I cannot confirm if this works or not (haven't tried it), but comparing the surrounding hex data context, there is only one Offset that seems to have the same full surrounding data: 0x3ef33e8. You can try making the change there and see if it works or not, but I would highly recommend making a backup of the original bg3_dx11.exe file before you do so.

Can confirm this also works for me! You guys are my heroes!

makoto-kokoroki commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

Not sure about the additional errors. I didn't notice any in my attempt, but I honestly was only paying attention to A) did the game still load to the point of Character Creation and B) how long did it take to get there. As for editing for the DX11 version, I cannot confirm if this works or not (haven't tried it), but comparing the surrounding hex data context, there is only one Offset that seems to have the same full surrounding data: 0x3ef33e8. You can try making the change there and see if it works or not, but I would highly recommend making a backup of the original bg3_dx11.exe file before you do so.

I guess those errors could be related to me never running the Vulkan exe before and some cache files. Anyway, I edited it for the DX11 exe file (the line below where you mentioned) and it returned to about 20 seconds loading, all of the errors I got from the Vulkan one went away. Exact spot: 0x3EF33F0 or 3EF:33F0 in my editor format. Changed the same numbers Norbyte mentioned there. Changed files https://easyupload.io/yefjlm

I can confirm that this works for me as well.

I would just like to say if you own the game on GOG: you must read as this is only for the steam version (i did not read :^)

Petey322 commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only)

Load time went back from 3m to 1m for me after this change

I am feeling adventurous, how does one go about doing this?

SkebbZ commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

I am feeling adventurous, how does one go about doing this?

I already posted the edited files above

If you want to do it yourself, you need a Hex Editor like 010

ADPhoenix commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

I am feeling adventurous, how does one go about doing this?

I already posted the edited files above

If you want to do it yourself, you need a Hex Editor like 010

Or HxD :)

ADPhoenix commented 1 month ago

I would just like to say if you own the game on GOG: you must read as this is only for the steam version (i did not read :^)

I imagine that the GOG version of the game needs basically the same edit, you just need to find the location at a different Offset.

Search for 5C5F5E5D5BC3CCCC48895C241848896C24205648. That's how I found the location for the dx11 Steam version. How you search for hex values like that might depend on your hex editor that you use, but in HxD go to the Search menu, Find, Hex-values tab, enter it there, select Search direction of "All", then click "Search all" ("search all" will search the entire file rather than just trying to find the match nearest your current cursor location, and it will list out all matches so you can know how many it finds... if GOG is like the Steam versions, it should only find 1).

Once you have that full Offset location, you should just need to edit the middle segment from 48 89 5C 24 18 to C3 CC CC CC CC just as with the Steam version.

If anyone does this and can confirm it also works for the GOG version, please post the offset location for everyone else :)

makoto-kokoroki commented 1 month ago

I would just like to say if you own the game on GOG: you must read as this is only for the steam version (i did not read :^)

I imagine that the GOG version of the game needs basically the same edit, you just need to find the location at a different Offset.

Search for 5C5F5E5D5BC3CCCC48895C241848896C24205648. That's how I found the location for the dx11 Steam version. How you search for hex values like that might depend on your hex editor that you use, but in HxD go to the Search menu, Find, Hex-values tab, enter it there, select Search direction of "All", then click "Search all" ("search all" will search the entire file rather than just trying to find the match nearest your current cursor location, and it will list out all matches so you can know how many it finds... if GOG is like the Steam versions, it should only find 1).

Once you have that full Offset location, you should just need to edit the middle segment from 48 89 5C 24 18 to C3 CC CC CC CC just as with the Steam version.

If anyone does this and can confirm it also works for the GOG version, please post the offset location for everyone else :)

I found what you quoted at '5C5F5E5D5BC3CCCC48895C241848896C24205648.' and replaced it successfully with the other notation.

I am happy to report that doing so let me load into the game quite fast on the GOG version! So GOG users can indeed use this 'fix'. πŸ’―

JoshFanti commented 1 month ago

I attempted the above fix to change the bytes for the bg3.exe but it now just sits stuck at 92%

Petey322 commented 1 month ago

I attempted the above fix to change the bytes for the bg3.exe but it now just sits stuck at 92%

I couldn't even find 0x3f2ea10

Xyrhoshi commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

Is there a similar one for dx11 version? Or does this work for both? Seems to work for Vulkan exe at least, load speed back to normal. Did see some new errors on launch though:

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "G:\SteamLibrary\steamapps\shadercache\1086940\fozpipelinesv6\steamapprun_pipeline_cache".

And a bunch of yellow warnings I've never seen before about missing icons/portrait resources.

Not sure about the additional errors. I didn't notice any in my attempt, but I honestly was only paying attention to A) did the game still load to the point of Character Creation and B) how long did it take to get there. As for editing for the DX11 version, I cannot confirm if this works or not (haven't tried it), but comparing the surrounding hex data context, there is only one Offset that seems to have the same full surrounding data: 0x3ef33e8. You can try making the change there and see if it works or not, but I would highly recommend making a backup of the original bg3_dx11.exe file before you do so.

I guess those errors could be related to me never running the Vulkan exe before and some cache files. Anyway, I edited it for the DX11 exe file (the line below where you mentioned) and it returned to about 20 seconds loading, all of the errors I got from the Vulkan one went away. Exact spot: 0x3EF33F0 or 3EF:33F0 in my editor format. Changed the same numbers Norbyte mentioned there. Changed files (Steam version ONLY) https://easyupload.io/yefjlm

I replaced my .exes with your patched ones and it worked like an absolute charm. You are a life saver, thanks a lot!

GreatOldOneBob commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only)

Load time went back from 3m to 1m for me after this change

This worked for me, but I have a side question. How do you figure out a solution like this. Like... where does one even start with that kind of troubleshooting?

C0wpuncher commented 1 month ago

In case you're feeling adventurous, an untested fix is to change the bytes in bg3.exe at offset 0x3f2ea10 from 48 89 5c 24 18 to c3 cc cc cc cc. (Steam version only) Load time went back from 3m to 1m for me after this change

This worked for me, but I have a side question. How do you figure out a solution like this. Like... where does one even start with that kind of troubleshooting?

It interrupts the bullcrap that bg3.exe is doing in the background. c3 tells the cpu to stop and return to the stack as it seems to be performing a lot of checks which is eating up the time. it can crash the program but it seems the crap its doing isn't useful to its function. the cc sections consume cycles to bypass processing of data.

he did good work.

J0-o commented 1 month ago

https://pastecode.io/s/3ng63ta6

Baked up a quick batch script to automated the hex edit. Or just grab the exes above.

stuffinhere commented 1 month ago

I would just like to say if you own the game on GOG: you must read as this is only for the steam version (i did not read :^)

I imagine that the GOG version of the game needs basically the same edit, you just need to find the location at a different Offset. Search for 5C5F5E5D5BC3CCCC48895C241848896C24205648. That's how I found the location for the dx11 Steam version. How you search for hex values like that might depend on your hex editor that you use, but in HxD go to the Search menu, Find, Hex-values tab, enter it there, select Search direction of "All", then click "Search all" ("search all" will search the entire file rather than just trying to find the match nearest your current cursor location, and it will list out all matches so you can know how many it finds... if GOG is like the Steam versions, it should only find 1). Once you have that full Offset location, you should just need to edit the middle segment from 48 89 5C 24 18 to C3 CC CC CC CC just as with the Steam version. If anyone does this and can confirm it also works for the GOG version, please post the offset location for everyone else :)

I found what you quoted at '5C5F5E5D5BC3CCCC48895C241848896C24205648.' and replaced it successfully with the other notation.

I am happy to report that doing so let me load into the game quite fast on the GOG version! So GOG users can indeed use this 'fix'. πŸ’―

I have the game on GOG as well. I found the values for bg3_dx11.exe on 5C5F5E5D5BC3CCCC48895C241848896C24205648 and changed them to the given values. The load time went from almost 5 minutes to less than a minute. Thanks a lot.

SkebbZ commented 1 month ago

Patch just arrived and changed some localization stuff, as well as:

Patchnotes

Improved loading times for players with many mods installed.

Upon testing, the issue appears resolved and the hex edit is no longer needed.

ADPhoenix commented 1 month ago

Upon testing, the issue appears resolved and the hex edit is no longer needed.

I can confirm this for Steam bg3.exe, and am inclined to assume that it's also been fixed for dx11 and for GOG versions.

Norbyte commented 1 month ago

This has been fixed in hotfix 28.

ADPhoenix commented 1 month ago

This has been fixed in hotfix 28.

I don't suppose there's a way for you to "pin" that comment so it shows up right at the top, is there? (I'd like to assume that you would have done so if you could, but just want to confirm :) ).