L4D2Fix
L4D2Fix copied to clipboard
Questions regarding L4D2Fix
Thank you for replying to my email! Just following up on that through Github Issues and without the barrier of translation. (Repeating some things to help other English readers)
- In my original question, I meant to ask if this patch made the game "4GB Aware", which machine translated to "4GB 内存支持" in Chinese. From your response, it seems that yes, L4D2Fix make the game "4GB Aware", the same as for example the FNV 4GB Patcher by setting a large address-aware flag to True, which allows 32-bit applications like L4D2 to use 4 GB of RAM.
In addition, L4D2Fix comes with fixes that allows the game to bypass some hard-coded array limits (e.g., 32,765 for the index buffer and 65,536 for the dynamic vertex buffer), which occur when running lots of HD models/texture mods. This is separate from setting the flag to allow 4 GB of RAM to be used.
- For the newest version, if users can want to play online without being at risk for VAC ban, they can launch the game normally through Steam (or through the original
l4d2.exe), which will run without L4D2Fix. For running with L4D2Fix and the new dlls, just put-insecureon the l4d2_fix.exe launch options and make sure not to connect to VAC servers.
I guess another question if you have time (feel free not to answer): would a 64-bit patch like the ones that came out for DoD and TF2 render this obsolete?
Let me know if I got anything wrong, I would like to make a video on this for the English speaking L4D2 community. Thanks for reading!
- L4D2Fix will not set the "4GB aware" flag; you should use the
4gb_patch.exeto achieve this. I think I have bundled the exe inside the release archive. If not, you can download it here https://ntcore.com/4gb-patch/
However, AFAIK, left4dead2.exe is already 4gb awarded, so there is no need to patch it.
- You are right. This is why I created the launcher (allowing people to choose from the original and modded versions).
Maybe I can enforce the
-insecureoption in the launcher in case someone forgets about it.
A tip for your video:
The hardcoded limits have been patched, but the 4GB memory constraint for 32-bit executables still remains. As a result, certain extreme mods may still cause the game to crash. To mitigate this, I recommend adjusting the -heapsize launch option from 512MiB (524288) to 2GiB (2097152), then fine-tuning it based on your specific mod configuration for optimal stability.
I use the map 广州增城 and darkwoods to test:
https://steamcommunity.com/sharedfiles/filedetails/?id=2396847377
https://steamcommunity.com/sharedfiles/filedetails/?id=575658578
As for DoD and TF2.
If I understand correctly, both Team Fortress 2 (TF2) and Day of Defeat (DoD) are online games. In that case, VAC (Valve Anti-Cheat) might not approve of this kind of patch.
From a technical standpoint, the patch works by scanning for specific memory patterns to locate and modify the target memory. Since both games run on the Source engine, I guess the same pattern-matching approach should theoretically apply to them as well.
I'm curious though — why would DoD and TF2 need this kind of patch? (I'm not very familiar with these two games). The 64-bit versions of these games shouldn't have had problems in the first place.
Thanks for explaining!
- I see, I had a misunderstanding and thought that
4gb_patch.exewas part of L4D2Fix when in reality it's just bundled with it. If I understand what you said correctly: there shouldn't even be a need to run4gb_patch.exesince Steam's L4D2 is already 4GB Aware. L4D2Fix (by itself) just increases the hard-coded array limits. - That's a good idea imo. I guess the consensus is that these game patches are in a grey area. Apparently a lot of people use custom .dlls for Vulkan, which you already know about, and have no trouble with VAC so far.
(Tsuey worked on TLS Update) If VAC doesn't monitor that dll I doubt it can catch this one. Not sure though, like you said modified memory is always a little bit dangerous for VAC. So I think
-insecureby default would be great if possible. Thanks for the tip on heapsize.
For DoD and TF2, I wrote an unclear message. I meant that Valve patched the games to be 64-bit in the recent update, so L4D2Fix would not be needed. If L4D2 got a similar update from Valve, I think that should solve the problems that L4D2Fix is trying to fix.
Yes. If valve updates the L4D2 to 64bits, there is no need to use L4D2Fix like patches.
Hey sorry to bother again, just wanted to ask some more questions regarding Vulkan and L4D2Fix.
So I'm using dxvk by directly putting d3d9.dll and dxgi.dll in to the folder with left4dead2_fix.exe, as recommended. I know dxvk is working properly since I can make the fps hud come up and it is making a left4dead2_d3d9.log. However, I see this in L4D2Fix.log:
[2025-04-14 02:24:18.261] [L4D2Fix] [info] Detected DirectX9: using shaderapidx9.dll
- Is L4D2Fix working properly?
- Why don't you recommend using the
-vulkanlaunch parameter?
Hey sorry to bother again, just wanted to ask some more questions regarding Vulkan and L4D2Fix.
So I'm using dxvk by directly putting
d3d9.dllanddxgi.dllin to the folder withleft4dead2_fix.exe, as recommended. I know dxvk is working properly since I can make the fps hud come up and it is making aleft4dead2_d3d9.log. However, I see this inL4D2Fix.log:
[2025-04-14 02:24:18.261] [L4D2Fix] [info] Detected DirectX9: using shaderapidx9.dll
- Is L4D2Fix working properly?
- Why don't you recommend using the
-vulkanlaunch parameter?
Yes, it works as designs, I have made a special if-else in the code to load dxvk related dlls, so the L4D2fix is compatible with the dxvk.
Some details:
dxvk uses a method called dll proxy to hijack the dx9 calls to the vulkan ones.
The whole procedure works like this:
- The game uses the
shaderapidx9.dllto call directx9 apis, which are located in thed3d9.dll. This is the normal behavior of a dx9 game. - However, if a
dxvk d3d9.dllis placed beside the main exe, rather than thesystem d3d9.dll, thedxvk d3d9.dllwill be used by the application. This is thedll proxymethod. - Then, dxvk gets the chance, using the
dxvk d3d9.dllto hijack the dx9 calls from the game, and translate them into vulkan calls. - So the game still uses the dx9 apis, but actually it is served by the vulkan.
To check this, you can use afterburner to show the currently used graphics api on hud, which I think you have already done.
So the answers are:
- Yes, this is desiged. game still uses dx9 and dxvk translates the dx9 to vulkan.
-vulkanmakes the game using the official vulkan implementations, which is actually a very old version dxvk. This time, dxvk dlls won't work since the game is no longer using the d3d9.dll. (Actually it is using thedxvk_d3d9.dllinside the bin folder, which is a renamed old version dxvk).
Also, Gamers from China report that the latest dxvk is much more better than the old one.
You can see in the pic, the shaderapivk.dll uses the dxvk_d3d9.dll. So, why not use the latest dvxk if you are already using the dxvk, XD.
Hi, I want to ask since this fix cannot be launched from steam, does that meant this is only meant for singleplayer and cannot play local host with friends
Hi, I want to ask since this fix cannot be launched from steam, does that meant this is only meant for singleplayer and cannot play local host with friends
I think it's possible. Let me find a new way to do dll hijack more stably.
Hi, I want to ask since this fix cannot be launched from steam, does that meant this is only meant for singleplayer and cannot play local host with friends
Hi, could you test if this patch works?
@kurikomoe hello, apologize for the late response. Currently, I encountered some error of shaderdx9.dll with the v1.4.0, re-rolling back to v1.3.0 works as normal
I'm sorry, but what is the "some error of shaderdx9.dll". Is there anything I can do to fix that?
My apologies for not responding for nearly a month , got busy with life. btw , its the shaderapidx9.dll . Unfortunately , I regret to say that I have no idea on the things that can be done to resolve this issue
My apologies for not responding for nearly a month , got busy with life. btw , its the shaderapidx9.dll . Unfortunately , I regret to say that I have no idea on the things that can be done to resolve this issue
You can set the kpatch.ini with
[System]
debug = true
to start the debug output, then there will be a console showing the reason why shaderapidx9.dll is not loaded.