Getting Started with Diablo 2 Modding

In this tutorial I will teach you how to make a simple item that can be found on a vendor’s “Misc” tab.

What you will need:

Getting Started:

Before you can get started, you need to open the listfile with MPQ View. Here’s how you do this:

  1. Open MPQView.exe
  2. Go to File > Open Data File
  3. Navigate to your listfile, the one that you downloaded (The .txt file)

Next, we need to make a few folders:

  1. Navigate to your installation of Diablo 2. If you used the default path, it should be under
    C:\Program Files\Diablo II.
  2. Create a folder in here called ‘data‘.
  3. Then create two folders inside ‘data‘, one called ‘local‘ and the other called ‘global‘.
  4. Go into the ‘Local‘ folder, and create a folder called ‘LNG
  5. Go into ‘Local‘ and create a folder called ‘ENG
  6. Go back to ‘data‘, and open ‘global‘.
  7. Create a folder in ‘global‘, called ‘excel‘.

Now, lets open up the game’s MPQ files to get the files we need:

  1. Open MPQView.exe
  2. Click the ‘Open Archive‘ button.
  3. Navigate to your Diablo 2 directory, and select ‘patch_d2.mpq
  4. If you followed the first part of the tutorial correctly, then you should have a long list. If not, try again.
  5. Find this file in the list: ‘data\global\excel\ItemTypes.txt‘.
  6. Select the file, and click on the Save button.
  7. Navigate to your Diablo 2 directory, and open ‘data‘, then ‘global‘, then ‘excel‘. Save the file in here.
  8. Repeat steps 6-7 on ‘data\global\excel\misc.txt
  9. Find ‘data\local\lng\eng\patchstring.tbl‘. Click save, navigate to your Diablo 2 directory, then go to ‘data‘, then ‘local‘, then ‘lng‘, then ‘eng‘, and save it here.

Now, lets make the item:

  1. Open AFJ’s Sheet Edit.
  2. Click File > Open
  3. Navigate to your Diablo 2 directory, then to your data\global\excel folders that you made earlier
  4. Open misc.txt.
  5. This will probably confuse you. So pay attention. On the upper toolbar, click both of the buttons to the right of the yellow question mark. When you hover over them, they should say ‘Fix First Column‘ and ‘Fix First Row‘. Now if you move your spreadsheet around, the first row and first column will follow you.
  6. Right click (anywhere), and go to Row Operations > Add Row. This should bring up a text box. Just click OK for now, because we only want to make one item.
  7. Click on ‘Fix first column‘ to unfix the first column.
  8. Scroll down to the last row.
  9. On the very first box of the last row, type ‘Test Item‘ and click on ‘Fix First Column‘ again.
  10. Now fill in these fields on your row:

*name: Test Item
compactsave: 1
version: 100
level: 1
levelreq: 1
rarity: 1
spawnable: 1
speed: 0
nodurability: 1
cost: (Insert any amount, this is how much the item sells for)
code: stw0
alternategfx: brz
namestr: stw0
component: 16
invwidth: 1
invheight: 1
hasinv: 0
gemsockets: 0
gemapplytype: 0
flippyfile: flphrb
invfile: invhrb
transmogrify: 0
tmogtype: xxx
useable: 0
throwable: 0
type: junk
dropsound: item_herb
dropsfxframe: 14
usesound: item_herb
unique: 0
transparent: 0
transtbl: 5
lightradius: 0
belt: 0
autobelt: 0
stackable: 0
minstack: 0
maxstack: 0
spawnstack: 0
missiletype: 0
spellicon: -1
durwarning: 0
qntwarning: 0
gemoffset: 0
bettergem: non
bitfield1: 0
CharsiMagicLvl, GheedMagicLvl, AkaraMagicLvl, FaraMagicLvl, LysanderMagicLvl, DrognanMagicLvl, HraltiMagicLvl, AlkorMagicLvl, OrmusMagicLvl, ElzixMagicLvl, AshearaMagicLvl, CainMagicLvl, HalbuMagicLvl, MalahMagicLvl, LarzukMagicLvl, DrehyaMagicLvl and JamellaMagicLvl: 255
AkaraMin: 1
Akaramax: 1
Transform: 0
Invtrans: 0
Skipname: 0
NightmareUpgrade: xxx
Hellupgrade: xxx
*eol: 1

Leave all the other columns blank.
Heres an explanation for each of the fields:

  • Name: This field isn’t loaded, its just used in reference by the user.
  • *name: This field isn’t loaded either.
  • compactsave: When 1, the item cannot be magic, rare, set, unique, crafted, or socketed.
  • version: When 0, this item only loads in classic d2. When 1, it loads in both classic and the expansion set. When it is 100, it only loads in the expansion.
  • level: Each item has its own, undisplayed ‘Item Level’. Its used by the monster drop schematics, I won’t go much into it. This is NOT the item’s level requirement, levelreq is.
  • levelreq: The item’s level reqirement to be used, as in armor and potions
  • rarity: The higher this is, the more likely it is to drop.
  • spawnable: If you want your item to show up ingame, put a 1 here.
  • nodurability: If 1, the item has no durability.
  • cost: Vender cost.
  • code: Each item has its own unique code. Every single item must have its own code or else it won’t work properly. Codes can be 3 or 4 characters long, and can use numbers, letters, and they are case sensitive.
  • alternategfx: This column is useless in misc.txt. Its only used for armor and weapons. Put something here to avoid issues though.
  • namestr: This is the string that is loaded for the name. Use the same thing you put in your code column to avoid conflicts.
  • component: What part of the body the item equips to, put 16 for an unequipable item.
  • invwidth: The width of the item, in inventory squares.
  • invheight: The height of the item, in inventory squares. Note, invheight and invwidth must follow the picture correctly, or else it’ll look weird in your inventory.
  • hasinv: If 1, this item can have sockets. Other than that, this column appears to do nothing.
  • gemsockets: The maximum number of sockets this item can spawn with.
  • gemapplytype: Determines what category this item falls into when socketing.
    0: Weapons
    1: Armor
    2: Shields
  • flippyfile: The animation file that is used when the item is flipping around in the air, before you pick it up.
  • invfile: The image file that is used on the inventory screen.
  • transmogrify: This is an unused feature from Diablo 2 alpha that still works. If this is 1, and TMogType is set to an item code, you can right click on this item and it will turn into the item that uses TMogType’s itemcode.
  • TMogType: See ‘transmogrify’.
  • useable: Whether this item can be used with Right Click. Turn this on for Transmogrify Items.
  • throwable: Whether this item can be thrown.
  • type: Each item belongs to an ‘itemtype’, or a classification. Itemtypes are used to set properties to items belonging to a category.
  • dropsound: The sound file that the item uses when dropped or fooled around with in the inventory.
  • dropsfxframe: What frame of the flippyfile animation to play the sound.
  • usesound: The sound used when used via right click.
  • unique: Whether this item is unique. Example: The Jade Figurine in Act 3.
  • transparent: Unknown. All have 0 (except Torch)
  • transtbl: When set to 5, gems tocketed in this item will turn the item the appropriate color.
  • lightradius: The light radius that this item gives off when equipped.
  • belt: Whether this item can be placed in a belt slot.
  • autobelt: Whether this item automatically appears in your belt when you pick it up off the ground.
  • stackable: Whether this item can stack.
  • minstack: Minimum stack sold from vendors
  • maxstack: The highest this item can stack up to.
  • spawnstack: How high the stack will be when the character picks this off a monster drop ~ approximate.
  • missiletype: What missile this item will spawn when thrown.
  • SpellIcon: Im not sure. Probably has to do with throwing items.
  • durwarning: What icon is used when you are low on durability.
  • qntwarning: How low the durability can go before you are warned.
  • gemoffset: Unknown, believed to be involved with the way the gem is positioned or how the sockets are alligned.
  • bettergem: What gem to upgrade to when used by a gem shrine.
  • bitfield1: Related to Iron Golem in some way.
  • {Vendor}MagicLvl: How strong the magic prefixes can be from magic items this vendor sells.
  • {Vendor}Min/Max: How many items of this type (minimum/maximum) that this vendor can sell.
  • {Vendor}MagicMin/MagicMax: How many magic items of this type (minimum/maximum) that this vendor can sell.
  • Transform: Unknown.
  • InvTrans: Unknown.
  • Skipname: Unknown.
  • NightmareUpgrade: The Exceptional variant of this item
  • HellUpgrade: The Elite variant of this item
  • *eol: End of Line. Always put a 0 here to avoid errors.

Here’s a fileguide, just in case you want info on the other stuff (by the way, it was written for 1.09x, so some columns may be missing).

11. Now save misc.txt

Making the ItemType:

  1. Open ItemTypes.txt in your excel folder.
  2. Add a new row to the end of the file.
  3. In the first column of the last row, put ‘Junk’.
  4. Fix the columns and rows.
  5. Put these fields in:

Code: Junk
Equiv1: misc
Repair: 0
Body: 0
Throwable: 0
Reload: 0
Reequip: 0
Autostack: 0
Normal: 0
Charm: 0
Beltable:
0
MaxSock1: 0
MaxSock25: 0
MaxSock40: 0
TreasureClass: 0
Rarity: 3
Costformula: 0
VarInvGFX: 0
StorePage: 0
*eol: 0

Leave all other columns blank.

Heres a file guide, in case you need it.

Now lets take a look at what these rows do:

  • Code: What code this goes by, uses the same rules as misc.txt codes
  • Equiv1: What item type is the same as this.
  • Repair: Whether items in this category can be repaired.
  • Body: Whether items in this category can be equipped.
  • Throwable: Whether items in this category are throwable.
  • Reequip: Whether items can replenish their quantity by dragging another item of the same code over them. Like Javelins, arrows, etc.
  • AutoStack: Whether items automatically stack when picked up in this category.
  • Normal: Whether these items always spawn as normal.
  • Charm: Whether these items are a charm (Used for the <Keep in inventory to gain bonus> stub)
  • Gem: Whether these items are gems.
  • Beltable: Whether items in this category can be belted
  • MaxSock1: Maximum Sockets at Item Level 1
  • MaxSock25: Maximum Sockets at Item Level 25
  • MaxSock40: Maximum sockets at Item Level 40
  • TreasureClass: Whether these items use an auto-generated Treasure Class (I will be discussing Treasure Classes in a next lesson, they deal with how items are dropped.)
  • Rarity: How rare items from this category are dropped.
  • VarInvGfx: This is used for charms. When true, items in this category use multiple different graphics. I will be discussing this in another lesson.
  • Storepage: What page of the vendor’s store these items go into.
  • *Eol: Put a 0 here, always.

6: Save Itemtypes.txt and close AFJ Sheet

Making a new string:
Since you have made a new item, you need a new string to go with it as well. Not making a string for your item will cause the name of your item to be ‘An Evil Force’

Lets hop to it then! This is fast.

  1. Open Darkstorm’s TBL Editor.
  2. Go to File > Open
  3. Navigate to your Diablo 2 directory, then to ‘data/local/lng/eng’.
  4. Open ‘patchstring.tbl’.
  5. Lets take a minute to examine what we see. On the left pane, you can see the strings, in String ID form. On the right, you can see the actual ingame string.

If you go down to a string which uses multiple lines for its ingame version, you may notice something odd. The strings are read backwards sort of. Thats the way the game reads them, it

reads the bottom row and then the top row.
So this in the TBL editor…

to see a brighter future
We must push on if we hope

Will look like this ingame…

We must push on if we hope
to see a brighter future

5. Now lets make a new string. Click on the plus sign, and you will be prompted to type in the String Id. Type in stw0.
6. On the right pane (the ingame one), type in ‘Test Item’.
7. Save patchstring.tbl.

Setting the game up to suit your mod
Now that we have made the item, we need to set the game up in order to read our mod correctly:

  1. Create a new shortcut to Diablo 2.
  2. Right click on it, and select Properties from the box.
  3. In the “Target:” text input, add “-direct -txt” (without quotes) after everything. So like this:TARGET: “C:\Program Files\Diablo II\Diablo II.exe” -direct -txt

Congratulations!
You have made your first mod. You can now run the game, and see your item in Akara’s Misc. tab.


32 Responses to “Getting Started with Diablo 2 Modding”

  1. David says:

    Wow :o

    Huge, great, first tutorial Nick :)

  2. Clay says:

    I don’t know if this is still supported or whatever but when I try to start a game, it freezes at the loading screen and when I go to the desktop it says “Unrecoverable Error” or something like that. I think I did everything you said, I even double checked.

  3. Clay says:

    I think it has something to do with the shortcut.

  4. Clay says:

    Does this work with LOD 1.12?

  5. Nick says:

    Yes it does work with LOD. It works with 1.10, 1.11 and 1.12. Still need confirmation on 1.13 as soon as it is released.

    You probably got an issue regarding where your files are.
    Make sure you saved to data/global/excel and there are files in data/global/excel. If not, put the .txt in there.

  6. Clay says:

    No, it is data/global/excel. Is there some way to compile the stuff that I missed?

  7. Nick says:

    Put them in the folder, and run a shortcut using a -direct -txt method, that will compile them all at once.

    Just to double check, your dile directory should be like this, or similar:

    C:\Program Files\Diablo II\data\global\excel\…

  8. Den says:

    Can you not use this method to add already existing items onto the vendors? I’ve tried editing Full rejuv to be sold by Akara, but it never appears in her misc tab. Yet I can remove say, stamina potion, from her misc tab with no problems.

  9. Den says:

    Nevermind. Sorry for the post. I figured out that it was the min/max stack that was making it not appear on the vendor.

  10. Nick says:

    Not a problem at all

  11. grant says:

    followed your instructions word by word twice and carnt get it to work what could b the prob?

  12. grant says:

    none it just dosent come up in akara’s misc section and nothing differnt it just like norm without mod

  13. luc says:

    Same happened to me, i tried changing the Akara min and max but nothing happened.

  14. Nick says:

    Try running it in -direct -txt mode as shown above. That is most likely the problem

  15. Nec says:

    I dont see an item in akara’s misc tab. I am running -direct -txt and i have verified the data I entered to be correct. In this guide it does say to use ‘junk’ (lowercase j) and then use ‘Junk’ (uppercase J) in other file. could this be the cause? i tried changing both to uppercase J but it didnt fix it. also in the guide it shows a couple fields for misc.txt to be ’stwo’ (which im uncertain if its zero or letter o). but in the patchstring.tbl you have ’stw0′ which appears to be zero. so i have tried editing all three locations to use letter and also zero but no success still. i dont know what else i can try to make this work. any feedback is appreciated, thank you.

  16. TEZ says:

    I followed this tut step by step and it did not work for me… then i found the mistake on storepage in the item types txt you put a 0 it should be set to misc.
    other than that thx for the tutorial
    - Pankey

  17. Varkarrus says:

    The game crashes when I try to trade with Akara.

  18. Varkarrus says:

    Nevermind. Sorry. Finally figure out what I thought was bad grammar on Tez’s part.

  19. Dave says:

    Dont work for me ive gone over everthing ive tried everything people have tried in previous post ive done literally everything it just wont work….it wontappea in the misc tab…

  20. Kyle says:

    I already had a mod in my directory, so there was already a “data” file. Instead of labeling the folder for this mod “data” I called it “data1″. All of the instructions outside of that one were followed, and I’ve erased the other mod since then. However, it still refuses to show up in the misc tab. Would the name difference have any impact?

  21. Our teenage daughter is thirteen going on thirty. She is mad now that we censor everything she watches. There is extremely little on Tv today that we discover appropriate to get a teenager. A few months ago, we discovered that you can Get Free Diablo 2 Items Online. along with quite a few other shows. This is great as we can watch a present and determine whether or not it can be suitable for the child of her age. She is quite mature to get a thirteen year old, but there are items we nevertheless do not feel she needs to know about. It’s a fine line we continuously walk, but it is part of our work as parents.

  22. Our teenage daughter is thirteen heading on thirty. She is mad now that we censor everything she watches. There is incredibly little on Tv today that we discover appropriate for a teenager. A few months ago, we discovered that you just can Get Free Diablo 2 Items Online. along with a lot of other shows. This is great as we can watch a display and determine whether or not it’s suitable for any child of her age. She is incredibly mature for the thirteen year old, but there are points we even now do not consider she needs to know about. It’s a fine line we continuously walk, but it is part of our employment as parents.

  23. Get D2 Items says:

    My husband travels for any living. Extra times than he would care to count, his company has booked him into a hotel which doesn’t offer cable Tv. Last year, whilst surfing the web, he came across a site the allows him to Get Free Diablo 2 Items Online. Now he has a thing to accomplish on those nights when he is bored. This makes me extremely happy as there were nights when he would go out looking for anything to do. He would usually spend much more out for the town than he had made that day. His work is to bring funds in, not spend more than he makes.

  24. My husband travels to get a living. Extra times than he would care to count, his organization has booked him into a hotel which does not provide cable Tv. Last year, whilst surfing the web, he came across a site the allows him to Get Free Diablo 2 Items Online. Now he has anything to complete on those nights when he is bored. This makes me extremely happy as there have been nights when he would go out looking for one thing to complete. He would generally spend much more out within the town than he had made that day. His job is to bring capital in, not spend more than he makes.

  25. My husband travels for any living. Additional times than he would care to count, his company has booked him into a hotel which doesn’t provide cable Television. Last year, although surfing the web, he came across a site the allows him to Get Free Diablo 2 Items Online. Now he has anything to try and do on those nights when he is bored. This makes me really happy as there have been nights when he would go out searching for something to complete. He would generally spend extra out within the town than he had made that day. His employment is to bring capital in, not spend additional than he makes.

  26. My husband travels for just a living. A lot more times than he would care to count, his organization has booked him into a hotel which does not provide cable Television. Last year, whilst surfing the web, he came across a site the allows him to Get Free Diablo 2 Items Online. Now he has anything to perform on those nights when he is bored. This makes me quite happy as there have been nights when he would go out searching for a thing to try and do. He would often spend much more out about the town than he had made that day. His job is to bring funds in, not spend additional than he makes.

  27. My brother-in-law is originally from Mexico and even now struggles to speak clear English. His ESL teacher suggested that he watch American television shows to pick up on idioms that are commonly utilized. He loves to Get Free Diablo 2 Items Online. so, every chance he gets, he borrows our laptop to accomplish just that. My husband and I want to see him succeed in this goal so we are considering purchasing him a laptop for his birthday. He would have to have to purchase Web access, but I imagine they can afford that on their monthly budget. I haven’t addressed this with my sister yet, but hope to this weekend.

  28. Frasier is my favorite Television display of all time. Now I can see reruns anytime I wish to thanks towards the World-wide-web. I Get Free Diablo 2 Items Online. about the way to function, about the way dwelling, although eating dinner and even whilst working. My household thinks I am crazy and really wants me to see someone. They believe I am addicted towards the World-wide-web and particularly this present. I don’t imagine it’s that significantly of a difficulty, but my wife certainly does. She got so mad the other night she threw some thing at my laptop. Maybe I do want assist as I do not prefer to lose my wife and kids. Tonight I’m likely to ask her to make an appointment with someone for the two of us.

  29. My brother-in-law is originally from Mexico and still struggles to speak clear English. His ESL teacher suggested that he watch American television shows to pick up on idioms which are commonly utilized. He loves to Get Free Diablo 2 Items Online. so, every chance he gets, he borrows our laptop to accomplish just that. My husband and I prefer to see him succeed in this goal so we’re considering purchasing him a laptop for his birthday. He would demand to purchase World-wide-web access, but I believe they can afford that on their monthly budget. I haven’t addressed this with my sister yet, but hope to this weekend.

  30. My brother-in-law is originally from Mexico and still struggles to speak clear English. His ESL teacher suggested that he watch American television exhibits to pick up on idioms which have been commonly utilized. He loves to Get Free Diablo 2 Items Online. so, every chance he gets, he borrows our laptop to perform just that. My husband and I prefer to see him succeed in this goal so we are considering purchasing him a laptop for his birthday. He would want to buy Web access, but I imagine they can afford that on their monthly budget. I haven’t addressed this with my sister yet, but hope to this weekend.

Leave a Reply