Compiling the Core

Acquiring the code

Using TortoiseSVN, check out the repository located at http://subversion.assembla.com/svn/d2bs/branches/patch-113 (right-click on an empty folder, select SVN Checkout, enter that URL for the repository location).

 

Steps to compile

Open D2BS.sln or D2BS.vcproj, then select Build --> Build Solution.

 

Steps to debug

The simplest way to debug D2BS is to use D2Loader in single player mode. To set up debugging, you'll select Project --> D2BS Properties, Configuration Properties, Debugging. Assuming your D2 directory is in "%ProgramFiles%\Diablo II", your Command should look like: "%ProgramFiles%\Diablo II\D2Loader.exe". Your Command Arguments parameter can look however you want, but you must include the -pdir option. Mine looks like this: -nocleanup -res800 -w -ns -sleepy -pdir "$(OutDir)" -title "Diablo II - Debugging"

Additionally, you should include some environment variables so that Windows will load js32.dll and libnspr4.dll from the output folder. Your Environment should look like: PATH=%PATH%;$(OutDir)

The -pdir "$(OutDir)" directive is the critical thing here -- this makes D2Loader look in the output folder (where your new D2BS.dll file will be located) for plugins. All scripts and whatnot will then be relative to that folder.

There are a few more things you can do to make your debugging experience easier (enabling the Microsoft Symbols Server comes to mind), but this is a good start. Eventually we will add another page describing advanced debugging techniques.