Ok, this is one of my own tutorials I made, read it, READ IT, READDD ITTT!!!!
This is basically the tutorial I made in diabloii.net which is quite similar to phrozenkeep's tutorial, just more upto date and clearer.I wrote up a simple guide for everyone on how to create a simple mod since a few people have asked about it. Here goes, I will make it as simple as possible. First we must know, what is a mod? A mod is a modification to the game which only works in single, open or tcp/ip(some work on closed but those are only mods that alter graphics of items and such). When you make a mod, you have the ability to change anything you want in the game from monster statistics to character skill improvements to making your own uniques/sets/itemtypes to moving monsters to other levels, etc. Almost anything can be achieved by modding except for making whole new character classes, whole new acts/levels, etc which is quite extreme and too hardcoded to be done. When you create a mod for single, your game is no longer Diablo 2 but rather it is now a totally different game. You are now the designer of the game when you choose to mod and you can basically do whatever you want in a mod like I listed previously. If you want to view/play some extremely good mods, visit www.planetdiablo.com/phrozenkeep and look at some of the mods. The really nice ones are the Ancestral Recall or Descendent of the Dragon mod created by the very talented Teknokyo. It is quite difficult and different too and will make you feel like you are playing a different game that you just bought from a store but similar in other ways to Diablo 2 or LOD. So, to familiarize ourselves with mods and how they work, I have decided to make a long list of tutorials with simple examples as guidelines and you can use the new concepts learned in each tutorial to make whatever you want.
I’m going to start by providing a tutorial on a very simple mod which involves changing the maximum number of bolts a quiver of bolts can hold from 250 to 500. This is a very simple mod so that’s why I think it’s ideal to learn from this first.
Before you start, go to www.planetdiablo.com/phrozenkeep and download:
-MPQ View which comes with a txt file called d2dataexp
-mpq2k which comes with StarEdit, Storm.dll and impqapi.dll
This is basically all you will need for this mod though it is advisable to download the following for future projects:
-Baron Darkstorm’s Table Editor
-d2 Excel Editor
-isilweo’s level editor
-dc6con
-Cv5
Tool Descriptions
Here is a brief description of what each tool does:
MPQ View- this is a program that allows you to extract many different types of files from your .mpq files. You will need a data list to load up first, then when you open up an mpq file, a list of files should open. These files have to be saved on your hardrive and then viewed with some sort of spreadsheet format for easy editing
Cv5- this is a program that also extracts mpq files but also has many other functions like viewing animations, etc. This is more of a multipurpose extracting tool however, it is very prone to crashes when viewing animations. So, either MPQ View or Cv5 can be used but I personally use MPQ View and will use it in my tutorials.
Mpq2k- this is a tool used to reinsert files back into an mpq. It can also be used for extraction but I don’t bother since I never tried to extract with mpq2k. You do not have to actually use the utility though, but to make mpq2k work, you will need StarEdit, Storm.dll and Impqapi.dll in the same folder as mpq2k. Then when you run your batch file, mpq2k begins to work and reinsert the files back into the mpq.
Baron Darkstorm’s Table Editor- this is a very important editor and allows you to change strings in the game. That means certain sentences, writing, etc that appears in the game. You can change names of uniques, other items, mercenaries, skills, monsters, etc with this editor.
D2Excel- this is a program that works much like Excel and is used for Diablo 2. I suggest using this instead of the normal Excel. And don’t use Corel Quattro Pro for editing, it doesn’t save properly and causes your mod to crash because it doesn’t save the information of the txt file you edit properly.(Even if you save as a tab delimited file)
Dc6con- this is a tool that is used to convert pcx/bmp into .dc6 graphics. This is mostly used for converting graphics of inventory items or flippyfiles(flippyfiles basically are the animations of when an item drops from a monster and falls to the ground).
Isilweo’s level editor- this is a map editor that allows you to change the structures of maps, add in certain objects/superuniques that you want to always spawn on a certain spot, edit locations of doors, stairs, some monsters, level dimensions, etc. This can be quite a confusing editor so I will make a separate tutorial on it sometime on how to use it.
Getting started:
Before we start mod making, make sure your Diablo 2 directory is as follows:
C:\Program Files\Diablo II. It doesn’t have to be but it will make it easier to follow since this is the way my directory is set up. In your Diablo II directory, you should have all mpq files there as well as your game.exe file and your save and other file folders. Now, make a folder in your directory called “data.” Inside that folder, make another folder entitled “global.” Inside the global folder, make a folder entitled “excel.” The final resultant directory for that folder should be
C:\Program Files\Diablo II\data\global\excel. Now, make another folder in your Diablo 2 directory entitled “Mod Workplace.” In here, make a folder for all txt files maybe called “d2 Mod Files” for your txt files that you are altering and a folder entitled “Mods.” In the “Mods” you will do all your mod making procedures. In this folder, make sure you have Mpq2k, StarEdit, Impqapi.dll and Storm.dll. Now, since you will be altering your patch_d2.mpq file which hopefully you should have, I suggest you copy it and paste it in another directory that’s not related to Diablo 2 at all. This is just in case something goes wrong with your mod and changes your mpq file making your game unplayable. If this happens, just copy your old patch_d2.mpq file and replace the screwed up one. Now, I also suggest copying patch_d2.mpq in your “Mods” folder as well. Now you should have three patch_d2.mpq files; one in your original Diablo 2 directory, one in your “Mods” folder and one in a random directory for backup. Lastly, make another folder in your directory that has all your tools in it. This should include MPQ View, your table editor, etc.
Extracting your txt files...the file needed to change the amount of bolts in your quiver is misc.txt. First off, open up MPQ View and select “open data file.” Search for your d2dataexp.txt file that was supposed to come with MPQ View and open it. Now, go to open archive and select your patch_d2.mpq(the one from your D2 directory). Open it and a list of txt files, as well as some others should appear hopefully. Select misc.txt and go to save and save it to your “Mods” folder as well as your “d2 mod files” folder. I suggest extracting all the txt files into that folder so you don’t have to go back and extract the others when working on other mods that involve the use of other txt files. Now that misc.txt is saved there, open it with d2 Excel program that you downloaded. This would open it in a spreadsheet format. Now here is where you can change stuff around. Go to load txt and the file should open. To change the maximum amount of bolts a bolt quiver can hold, go to the row entitled “bolts.” Then follow that row to a column that says “maxstack and change the number 250 to 500.” Save the file and close excel. Copy this modified misc.txt and paste it in your “excel” folder which is in Program Files\Diablo II\data\global\excel. Now, you will need to go in your “Mods” folder which should have StarEdit, Storm.dll, Impqapi.dll, mpq2k, patch_d2.mpq, your modified misc.txt. Open up Notepad program and type the following:
O patch_d2.mpq
A misc.txt data\global\excel\misc.txt
A misc.bin data\global\excel\misc.bin
C patch_d2.mpq
This might be hard to explain but the first line tells the program what file your modified txt file came from and in this case it came from patch_d2.mpq. Make sure there is an “O” in the beginning indicating this command, then make one space and type the mpq name. The second line tells what file you actually modified. These modification lines all start with an “A.” You always write the file beside beside the “A,” then write the directory that you want it to change in (now you know why you made the data folder with a global folder in it and an excel folder inside the global folder). The third line indicates that you must make a bin file. A bin file is required to make a mod work and to do it, just retype the file you modified but put .bin instead of .txt at the end as you see. Only txt files need bin files, if you originally changed a dc6 image(graphic), you will not require bin files for those. The final line states that the command is finished and also tells the program to reinsert the changed txt file back into the mpq file. Save this notepad file as “mymod” and put it into your “Mods” folder. Now open a new notepad document and type this:
mpq2k s mymod.txt
That’s all you need to write. Make sure you write it exactly the same in terms of spacing between the “s” and the other words. The “s” is not a typo. After the “s,” you have to put the file name of the other file that you made in notepad above. Save this as “mymod.bat.” This will be your batch file which is a command based MS-DOS program. Also put this in your “Mods” folder. Hopefully, your “Mods folder should now have the following:
mpq2k
impqapi.dll
StarEdit
patch_d2.mpq
mymod.txt
mymod.bat
misc.txt
Your directory C:\Program Files\Diablo II\data\global\excel should have another misc.txt file in the “excel” folder as I stated before. Now, to run your program, first double click on your batch file. It should give you something like this:
Line 1: Opening data archive(I think)
Line 2: Adding uncompressed file data\global\excel\misc.txt... Done
Line 3: Error: Attempt to add nonexistent file misc.bin to archive
Line 4: Closing write archive
Don’t worry about the error message for line 3, the bin file isn’t even created yet. Now that you ran your batch file, go to Start and go to Run. Type the following in QUOTES.
“C:\Program Files\Diablo II\Game.exe” -txt
This is important. Make sure the quotes end after exe, there is one space after that, then -txt is typed. Press enter and Diablo 2 will run. This is not the mod but is the process to make the mod work. Choose a character, any character and make sure you load a game in town(single player). Once the game is on, exit the game. Now, go back to your “excel” folder which is located in “global” folder which is located in “data” folder. Hopefully, you will see a large abundance of bin files have generated. Copy ALL of them at once and paste them ALL in your “Mods” folder and replace all txt files if it asks you when pasting. Now, run your batch file again with everything in it. It should now look like this:
Line 1: Opening data archive(I think)
Line 2: Adding uncompressed data\global\excel\misc.txt... Done
Line 3: Adding uncompressed data\global\excel\misc.bin... Done
Line 4: Closing write archive
Now, your patch_d2 has been modified. Now, copy that patch_d2.mpq and past it into your D2 directory. Make sure you have a backup of the original somewhere. When pasting, it will ask you to replace the existing patch_d2.mpq with the newer modifyed one. Click yes. Now, go back to start and click run again. Now type the following:
“C:\Program Files\Diablo II\Game.exe” -direct -txt
This will run your modded game. Hopefully, it won’t give you an error or freeze. If it does, you did something wrong. Anyways, choose a character and go to Charsi or whoever sells bolts. The bolts should now have a max of 500! If you ever need to change back to your original game, just click play the one on your desktop or replace your modded patch_d2.mpq file with your back up you made.
Now that you know this, you can fiddle around with other stuff in misc.txt like the max stack for TP Tomes or ID Tomes or whatever.
------------------
God gave me a brain to use but I miserably failed to use it to my advantage