Guide: Mod limit fix

+
tl;dr

Go to hexed.it, drag&drop your witcher3.exe into it, jump to 0xB95CF6, 0xB96366, 0xB967A6 or 0xB95E56 until at that address the bytes are "C0 00 00 00". In the left panel under 32-bit integer, change the number 192 to 500, press enter, export from the top menu, move the modified executable it downloaded to your bin/x64 directory and start it (keep the original just in case). Image to illustrate:

edit.png


(will replace with a link to mod once I have made one which automatically applies the fix)

LONG VERSION:

I have found a proper fix for the mod limit issue.

The fix involves changing a hardcoded limit (just a single number) in the executable itself. The actual thing limited by that number seems to be the number of file handles, one of which was used by each bundle, thus causing bundles from mods and DLCs to both cause that limit to be reached, and eventually fail to properly load after the limit was reached. It was limited to 192, which apparently was just about enough for the vanilla game, but will be hit very quickly once you start adding mods.

Fixing it involves just increasing that limit in the executable itself. The position in the executable to modify depends on the specific game version you have (there are around 5 different executables among 1.31-1.32 versions). See the tl;dr above to find the position it is at in your executable. In case none of the addresses apply, you can search for the "BA C0 00 00 00 48 8D 4B" pattern in the hex editor, which should presumably be somewhere between B94000 and B98000.

In the coming week, I will create a DLL that will automatically patch this limit during runtime for various different executables without having to modify the executable itself, but if you want to fix it right away (also I'm not entirely sure when I'll get to it), you can just follow the above guide. Or you can just share patched executables to your pals.

The fix has been tested by a dozen or so people already and it appears that it solves most cases where the game hangs during loading when many mods/DLCs had been installed. Some have reported that it has resolved some delays occurring during gameplay itself too.

I have been asked how I stumbled on this fix (and also how exactly it broke the game), so I quote myself from before:

attached a debugger. started out by checking what the game is doing when it is "stuck". it was waiting for all previously started decompression operations to finish successfully. tried to detect which of the decompression operations did not finish successfully, found one which seemed to fail consistently for me. then, compared what happens during its loading when mod limit is not reached, vs when it is. backtracked (started from when it ended in failure) in the loading process until the point at which there was the first difference between the two - that was the point where it was about to scan a bundle to determine its decompressed size. at that location, it checked whether it can even do that by comparing a number that was incrementing with every next bundle to a constant value 192. in case of no mod limit reached, it never reached 192 so the failure was never triggered, in case of mod limit reached, it went above that, so after that was reached, bundles were no longer scanned. if the decompressed size of the bundle was unknown, the decompression task was automatically marked as failure because it didn't know how big of a buffer to allocate.

~5-6 hours of debugging and perhaps like 200-300 times relaunching the game in a debugger

Note that much of the description above of what the game is doing is just guesses. As I simply followed the trail of explosions, I did not stop to verify exactly what the intermediate parts were doing, so some of the description of what the game was doing might not be technically correct, but it did lead to the correct solution.

Some have also been wondering why this limit was set so low. I guess we might never really know, but my personal guesses are that it might either be related to limits on consoles, or it may have been set arbitrarily during development, to be changed only once it becomes a problem (as it never did for vanilla game, might have been left as initially set).

Enjoy spamming your mod directories now! :beer:
 
Last edited:
Mindblowing @Marcin Momot
It really works!!!!
Im at over 180 blob0 mods and DLC files
IT LOADS PERFECT! Tested on 1.31 and 1.32 exe.
NO loading issues or Talking to NPC trouble. It seems faster even!
I set my Number to 512 as a binary common number as 192 is. Although I didn't notice any difference at 720.

PRAISE sedmelluq

CDRP PLEASE PUT THIS FIX IN CP2077
The dev team needs to take note on this find!

THE DREAMS of UNLIMITED MODDING IS REAL like the Cuffs are coming off :cry::beer:
 
Last edited:
I can't believe it, I haven't checked this forum in six months or more and I randomly open it today.
Does it really work?
All the time I have wasted merging, testing, being frustrated by the cursed limit...

This is huge news, thank you sedmelluq, a thousand times thank you.
 
Last edited:
I can't believe it, I haven't checked this forum in six months or more and I randomly open it today.
Does it really work?
All the time I have wasted merging, testing, being frustrated by the cursed limit...

This is huge news, thank you sedmelluq, a thousand times thank you.

When you try it out can you let us know? I've got a # of tweaks to my W3 to allow me to run around ~30 mods at the same time (and a bunch are merged on top of that), but if the limit can be completely eliminated that would be freakin awesome.
 
When you try it out can you let us know? I've got a # of tweaks to my W3 to allow me to run around ~30 mods at the same time (and a bunch are merged on top of that), but if the limit can be completely eliminated that would be freakin awesome.
The fix has been around on discord for a few days now, it's been tested by a fair amount of people already.
 
Incredible, you are a hero!
Post automatically merged:

is it still advisable to merge mods if possible for performance reasons or something?
 
Astonishing, after so much time someone fixed this.

Thanks for your hard work even though I couldn't understand much the techinal part.
 
The fix has been around on discord for a few days now, it's been tested by a fair amount of people already.
Nice, you can add me to the list of people confirming that it works. 80+ mods, it just works!
(also, could you point me to said discord server? thanks)

And thanks again sedmelluq.
 
which version of witcher 3 is this for? GOG, Steam, Origin?
Post automatically merged:

nevermind, I downloaded the exe on nexus and it works
thanks and great job man!!!
queue the mod binge
Post automatically merged:

Incredible, you are a hero!
Post automatically merged:

is it still advisable to merge mods if possible for performance reasons or something?

I have not noticed any negative performance impact, in fact, it now runs much better
but your mileage may vary(?) depending on your specs
 
Last edited:
another person verifying it works...

0xB967A6 on mine (GOG GoTY 1.32)

and able to run 348 bundle mods, my Avallac'h playthrough has just become limitless to what I can do with it now, thank you!
 
which version of witcher 3 is this for? GOG, Steam, Origin?
Post automatically merged:

nevermind, I downloaded the exe on nexus and it works
thanks and great job man!!!
queue the mod binge
Post automatically merged:



I have not noticed any negative performance impact, in fact, it now runs much better
but your mileage may vary(?) depending on your specs
Any of them, I imagine. All you need is the Witcher 3 exe, which every version has.

Also verifying it works.

Didn't actually realize this was such a recent post. I got really lucky. Thanks, OP. Hope CDPR pays attention to this for 2077.

Wish the fix author had some way to donate.

EDIT: I take it back, it doesn't work. It seems to have improved things, but the issue still persists. Blurry loading during dialogue, etc.
 
Last edited:
I think the blurry thing is something entirely different from what people have been referring to as the "mod limit". What I can say for sure is that it fixes the most common cause for the game to hang during loading, but any other issue may be unrelated to this fix. Some people have reported that it fixes a few other things as well though, but do not expect this to be a fix for all possible mod compatibility issues.
 
I think the blurry thing is something entirely different from what people have been referring to as the "mod limit". What I can say for sure is that it fixes the most common cause for the game to hang during loading, but any other issue may be unrelated to this fix. Some people have reported that it fixes a few other things as well though, but do not expect this to be a fix for all possible mod compatibility issues.
I understand. I'm not pinning my problems on your fix (it hasn't made them worse, near as I can tell), but I am not having the same results others are having, one of which is the elimination of blurry dialogue.

Do you know if there's a texture limit in addition to a mod limit? Because I wouldn't be surprised if it's a texture limit that I'm having issues with. I don't have many texture mods, but several aren't merged (because merging them didn't seem to function properly).
 
Incredible detective work there fella. You know you might be a hacker when..."you solve the Witcher 3 mod limit" ;)
 
Are you freaking kidding me? This is awesome news! I had to take a time out from playing TW3 because I have 91 hours of game time on my PC version and I have proof of my XBox One playing time of 89 days 12h 10m. This will be great for when I go back to playing again. You get a RED point from me on every post you make on this page because that is a wonderful thing you did for all of us. Hopefully there is an explanation of why @Snowflakez is having the blurry stuff still going on by the time I go back to play TW3.

2019-05-06.png
I think that there should be an award of some kind for amount of playing time, I will wager that I will be the one that will have the most playing time, if not I will beat the time of the one who has more than me, lol.

Bad Wolf
 

Guest 3841499

Guest
Is there anything else interesting that you found? Perhaps some other limitations can be lifted via EXE HEX editing? What about WCC_LITE.EXE? I bet it has HEX entries that could fix OUT OF MEMORY errors when uncooking mods with tons of textures.
 
Last edited by a moderator:
Top Bottom