Here are scripts for launching a mod and keeping mod characters separated from unmodded characters or characters created in another mod. The original script was written by Bonescythe and Foxbat, and I expanded it to include error checking and alternate modes. Using these scripts, you do NOT need to swap files in and out of your Diablo II directory, so the files in the default directory should be Blizzard's files. This allows you to run unmodded games (including logging into Realms) and mod games with a minimum of fuss. LaunchModGame.vbs Run a mod from its own directory in any of the usual modes. RecoverFromCrash.vbs Crashes happen. This file restores your Registry and DLLs from a mod crash. Instructions: ============= Make a subdirectory in your default Diablo II directory. If you already have C:\Program Files\Diablo II then you would make C:\Program Files\Diablo II\MyMod Now install the mod, and these two scripts, in the MyMod directory. If the mod is released in -direct -txt format, you also need to create all of the subdirectories required by the mod. At the minimum, you should have subdirectories like this: C:\Program Files\Diablo II\MyMod\data\global\excel C:\Program Files\Diablo II\MyMod\data\local\lng\eng <--- or other 'lng' subdirectory for non-English mods C:\Program Files\Diablo II\MyMod\save To run either script, double-click on the file from Windows Explorer. Or you can create a shortcut to put anywhere, similar to the following examples: Target: "C:\Program Files\Diablo II\MyMod\LaunchModGame.vbs" Start in: "C:\Program Files\Diablo II\MyMod" If you need to run a second instance of a mod, do not run the script again. Use another shortcut with the following structure: Target: "C:\Program Files\Diablo II\game.exe" -direct -w Start in: "C:\Program Files\Diablo II\MyMod" You should only need to run RecoverFromCrash.vbs if you get an error message from LaunchModGame.vbs after crashing in a mod game. Address any questions and bug reports to Myhrginoc at the Phrozen Keep. Technical Stuff: ================ This script was written in VBScript and requires Windows Scripting Host version 5.6 or later. It has not been tested against earlier versions of Windows Scripting Host. If you cannot run the script, look for the file C:\Windows\System\wshext.dll, and check Properties|Version. If you are using these scripts within other scripts, exit codes are implemented. Successful script execution returns a 0. Several checks are made by each script before starting up Diablo II. If the script terminates on error, one of five non-zero return values will appear. The first check verifies you have Game.exe that can be located from the Windows Registry. If it cannot be found in either Current_User or Local_Machine, then the script exits with error code 1. (** Bug fix 1/20/2004 **) The second check is for a complete Diablo II install in the default directory. There are 19 DLLs that were released with the last patch (1.09d). For any number of reasons, a mod may come with one or more replacement DLLs. The mod DLLs go in the mod directory. The DLLs that are checked are: Bnclient.dll D2Game.dll D2Multi.dll D2Client.dll D2Gdi.dll D2Net.dll D2CMP.dll D2Gfx.dll D2Sound.dll D2Common.dll D2Glide.dll D2Win.dll D2Direct3D.dll D2Lang.dll Fog.dll D2DDraw.dll D2Launch.dll Storm.dll D2MCPClient.dll Many of these DLLs probably will never be modded, but the checks are there anyway. If the complete set isn't present, the script exits with error code 2. The third check is for a local \save directory. If one does not exist, the script will attempt to create it. If the \save directory cannot be created, you will exit with error code 3. The fourth check is for -txt mode only. The script assumes -direct mode for all launches, if no external files are present the files in the MPQs are automatically loaded. If -txt mode is desired to generate new bin files, the script will check for the existence of a \data\global\excel subdirectory in your mod directory. If you do not have a \data\global\excel subdirectory in your mod directory, the script will attempt to make one. Failure to create the necessary subdirectories will cause the script to exit with error code 4. *** 5/20/03 Update: Existing .bin files will be deleted in data\global\excel before Diablo II is launched. This will force a refresh of all files without worrying about whether an overwrite actually occurs. *** Finally, if you run the script from the Diablo II default install directory, nothing will change and the script will exit with error code 5. After all checks are successful, DLL extensions are renamed to BAQ in the default directory if and ONLY if you have a DLL of the same name in the mod directory. *** 5/20/03 Update: I have added the rest of the DLLs to the renaming sequences, so the generic script should handle any DLL change, no matter how unlikely. *** The RecoverFromCrash script is similar except it doesn't prepare a game launch. It too has exit codes, with 0 being a successful or superfluous restore. Error code 1 is if the install path in the Windows Registry is corrupted. Error code 2 is if one or more of the game DLLs are not found as .dll or .baq. In either case, the installation must be manually verified and corrected.