[1.10] Expanding Character Armor Codes

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
Hosted Forum Moderator
Champion of the Light
Posts: 363
Joined: Thu Mar 10, 2016 8:31 am


[1.10] Expanding Character Armor Codes

Post by Ogodei » Fri Apr 06, 2018 2:23 pm


Today I'm sharing with you a small code edit I made. This edit revolves around extending ArmTypes.txt so that new player token creators will be able to show more armors on their characters instead of being limited to "lit, med, hvy"

As many of you probably know, especially if you are on Discord, I'm going to make a full implementation of Diablo 1 inside Diablo 2, so the sample screenshots you will find below are taken from my mod.

Now, let's move to the tutorial!

We need to analyze this line, inside D2Client.dll

Code: Select all

 6FB5E740      8B0485 5030BC MOV EAX,DWORD PTR DS:[EAX*4+6FBC3050]    ; ASCII "lit med hvy " 
if we go, with Olly, to 6FBC3050, and use CTRL + E on a few rows, we note this:


After some tests, I noticed that changing the 3 letter strings there also affects how the datas must be written in and read by the game from ArmType.txt . So, for instance, if you change "Lit" to "Cus" inside the code, you will also have to edit ArmType's "lit" row in order to rename it to "Cus".
But, why limit ourselves to uselessly renamed armor codes? I'm going to show you how to add new strings to the table, basically expanding ArmTypes.txt

First of all, it's better not to touch vanilla tables, as if we go on decyphering the hex stuffs in the image I posted above we find other tables that we really don't want to mess up with (like character modes and such).
So, what to do now? Simple, let's move the table elsewhere!

change the [EAX*4+6FBC3050] to [EAX*4+ (custom address)]

in your custom address, you need to first replicate the lit med hvy order, so that vanilla armors don't get screwed.

The correct form to write this is:

code | 20 | code | 20 | code | 20 code | 20 code | 20 | code | 20 | (as shown by the image above, in the hex window)

In order to translate letters to hex, you can use CTRL+E in olly or another text - to - hex tool you can find online.

Once you've done, save your D2Client.dll and proceed to edit ArmTypes.txt by adding new rows containing your custom codes. It would be wise to make the order of your code match the order of ArmTypes.txt.
In the end, you have to create or edit armors in order to show your custom graphics. Keep in mind that Armors.txt use hcIdx instead of names. You can notice it even in vanilla, as ArmType is made up by "lit" , "med", "hvy", which translate to 0 , 1 and 2 in Armors

Here are some examples:






User avatar
Forum Legend
Posts: 1032
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines

Re: [1.10] Expanding Character Armor Codes

Post by weapon-x » Thu Apr 12, 2018 6:18 am

cool, i'll add this on my code-messing list :) thanks for sharin' bro
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

Post Reply

Return to “Code Editing”