While there are already threads for troubleshooting MXL errors [
1], this will be focused on programs/utilities/code to help diagnose issues at various levels of the computing stack. The files are hosted on Github, viewing the scripts source code is encouraged.
Table of ContentsUsage Instructions1. Diablo Installation2. NetworkingUsage Instructions
Section ContentsBatch FilesBatch Files
Batch files are just plain text files with the
.bat
file extension. These contain a list of Windows Command Line instructions. The easiest way to "install" the linked batch file is to download the link as a text file via '
Save Link As...'.
1. Diablo Installation
Section Contents1.1 - Configuration Report1.2 - DEP Reset1.1 - Configuration Report
d2mxl_sysreport.bat reports various D2 and OS settings. [
Github]
► Script Brainstorm
The following are potential scripting ideas
Check files
dD2SE vs Launcher (?)
patch_d2.mpq checksum (eb514785fc4666bd53d97ad69ff53d16: v1.13c)
Check PlugY.ini config
ActiveLaunchAnyNumberOfLOD (0)
ActivePlugin
DisableBattleNet
DllToLoad
DllToLoad2
Check overlays (?)
Steam overlay
Geforce/Radeon
Discord
Check Registry values
D2 Install Path
D2\BNETIP
D2\Preferred Realm
D2\VideoConfig (d2vidtst.exe)
Sys\DEP (game.exe/diablo II.exe)
Sys\Desktop Composition
Glide (HKCU\Software\GLIDE3toOpenGL\keepcomposition)
► Usage Info
Run the script and it will produce Diablo II related config information into Notepad
The following logic has been implemented:
Install Path
Patch Version Checksum
DEP Settings
Video Mode
Running Overlay Processes
PlugY Settings
File List
Note: If the script fails to produce "[User DEP Settings]" and "[System DEP Settings]" (even if no registry entries exist), it is has been flagged by BitDefender/AV during the the browser download process. To get around this: Edit the script file, copy the entire contents, and paste it into a new text file. Change its extension to ".bat" and give it a run. This new file should perform as expected. #ThanksChrome.
1.2 - DEP Reset
d2mxl_dep_reset.bat will remove any DEP settings for the
current Diablo II install path.
[Github]► DEP Explanation
"Data Execution Prevention (DEP) is a set of hardware and software technologies that perform additional checks on memory to help prevent malicious code from running on a system."
See
https://support.microsoft.com/en-us/hel ... feature-inThis is relevant for MXL since it uses a memory "hacking" technique to hijack/hook into the regular Diablo II process. This enables MXL to load new data/content.
Windows doesn't like hijacking of any kind, so DEP is utilized to block all instances of this technique.
Adding Diablo IIs hijacked executables to the DEP white-list allows the MXL code to execute through Diablo II's process properly. Sneaky.
Changing the DEP Policy Mode requires a reboot because the technology operates at a very deep level and requires definition during OS bootstrapping. However, changing process white-list entries is more dynamic and can occur any time during OS operation without restart. This is because the process is checked against the white-list at the moment of execution.
► Error Explanation
DEP errors are a result from either the Launcher or Windows incorrectly manipulating Registry settings. This manifests as a missing space character between string tokens.
It can occur in either of the two common Registry sections, HKEY_CURRENT_USER
or HKEY_LOCAL_MACHINE
, usually the latter since the process is started with Administrative privilege rights (which looks at HKEY_LOCAL_MACHINE
entries).
Settings Example
Registry Path: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
Entry Item: "C:\Program Files (x86)\Diablo II\Game.exe" (Install path may differ on your machine)
Correctly Formatted Value: "$ DWM8And16BitMitigation DisableNXShowUI"
Incorrectly Formatted Value: "$ DWM8And16BitMitigationDisableNXShowUI"
► Usage Info
Run the script
as administrator and it will delete any DEP registry entries based on the current Diablo II
installPath
registry entry.
The following logic has been implemented:
Scan Current installPath
Delete 'HLEY_CURRENT_USER\..\AppCompatFlag\layer' D2 Entries
Delete 'HKEY_LOCAL_MACHINE\..\AppCompatFlag\layer' D2 Entries
Note: This script looks up the last known install path which may mismatch if the game folder has been moved from the original install location, or there are multiple independant installs (Starting Game.exe/Diablo II.exe will re-write the installPath
setting).Running the
Configuration Report script will let you know where your system thinks it's installed.
2. Networking
Section Contents2.1 - Latency Diagnostics2.1 - Latency Diagnostics
ps_ping.bat offers a textual menu interface for pinging network connections associated with running programs. [
Github]
► Usage Info
Run the script and it will ask for the process name ← game.exe
Ports
Multiplayer lobby runs on port 6112/6113
D2 game instances run on port 4000 ← choose this IP Address
Latency Timing
Reply from x.x.x.x: bytes=32 time=21ms TTL=52 [0-50ms is great]
Reply from x.x.x.x: bytes=32 time=64ms TTL=52 [50-100ms is decent] ← ideal rate from a nearby GS
Reply from x.x.x.x: bytes=32 time=184ms TTL=52 [100-300ms is laggy]
Reply from x.x.x.x: bytes=32 time=441ms TTL=52 [300+ms is choppy]
Request timed out. [No response after 1 second]
An effort towards pragmatic tech support by ryunp & Gavin_K88.