Diablo 2 Level 99 Character Codes

for Diablo II v1.09 and the Diablo II ExpansionSet: Lord of Destruction

  • Hit 99 in 1.09 on a glasscannon multishot zon., switched over to hc and got a sorceress up to 97 before getting bored and quitting in early 1.10. I was about pvp in sc, moved to hc right when the ith bugged rune weapons came out and level 9's could kill me with ease. I started playing in 1.04 i think.
  • Diablo 2 Character Planner. Choose class, stats, items and skills and then save your character so you can link to it.

Updated April 2, 2004
visitors since

Introduction

Level: Your character's level. This value must be in the range 1-99 (and is therefore always present, even on a new character) and should be the same as byte 43 in the file header. Experience (missing on a new character) The amount of experience your character has.

I started out with just a page on the item format. However,after starting a new GUI-basedsaved game editor, and doing even more research on the 'unknown'fields in the .d2s file, I discovered much more informationon the rest of the file that isn't available anywhere else. SoI'm publishing my findings.

File Header

(Note: all values larger than a byte are stored in x86little-endian order -- i.e., least significant byte first. A'short' is 2 bytes long, and a 'long' is 4 byteslong. Values starting with '0x' are given in hexadecimalnotation; otherwise they are decimal.)

Byte PositionSizeContents
0longFile header. This must be the value 0xaa55aa55.
4longFile version. The following values are known:
71 v1.00 through v1.06
87 v1.07 or Expansion Set v1.08
89 standard game v1.08
92 v1.09 (both the standard game and theExpansion Set.)
This document only covers version 92 of the file format.
8longFile size.
12longChecksum. If you attempt to hack the file without storingthe correct checksum afterwards, your game will fail toload! Fortunately, the checksum algorithm is a relativelysimple one. After clearing the checksum field, you add up thevalues of all the bytes in the file, rotating the running total onebit to the left before adding each byte. Then store the resultin this field. Thanks go to the Shadowmaster forpublishing the checksum code.
16longUnknown; the value can be either 0 or 1
2016 charsCharactername. The name may be up to 15 characters long;the rest of the field must be padded with null bytes. Remember the rules for Diablo II character names: 2-15 characters,containing only upper and lower case letters (A-Z), with the possibleaddition of one dash ( - ) or underscore ( _ ) as long as it is notthe first or last character of the name.
36byte
76543210
unknownExpansion
Character
unknownDiedHardcoreunknown
Note: the 'died' bit apparently indicates that your characterhas died at some point in the past. It is never cleared when youresume the game. To find out whether your character is currentlydead, I think you need to look in the itemlist below to see if there is some corpse data.
Thanks go to Guillaume Courtin of France for pointing out theHardcore bit while I was busy with other things.
37byte

Character progression. This number tells (sort of) howmany acts you have completed from all difficulty levels. Itappears to be incremented when you kill the final demon in an act --i.e., Andarial, Duriel, Mephisto, and Diablo / Baal. There's acatch to that last one: in an Expansion game, the value isnot incremented after killing Diablo, but is incremented by 2after killing Baal. (The reason is unknown.) So it skipsthe values 4, 9, and 14.

I believe this value is used in determining your character'stitle. The title is one of the following values (depending onthe character class' gender):

ValueStandardHardcoreValueExpansionHardcode Exp.
0-3(no title)0-3(no title)
4-7Sir / DameCount / Countess5-8SlayerDestroyer
8-11Lord / LadyDuke / Duchess10-13ChampionConqueror
12Baron / BaronessKing / Queen15Patriarch / MatriarchGuardian

382 bytesunknown
40byteCharacter class. The defined classes are:
0 Amazon
1 Sorceress
2 Necromancer
3 Paladin
4 Barbarian
5 Druid (Expansion character only)
6 Assassin (Expansion characteronly)
412 bytesunknown; I've only seen the values { 16, 30 }here.
43byteCharacter's level. This is the level shown on the characterselection screen, but it should equal the level given in the character statistics section.
44longunknown
48longTime stamp. This is in the standard time() formatof the number of seconds which have elapsed since midnight, January 1,1970 (UTC).
52longunknown
5616 longs
Thanks go to Ronnie Brohn for pointing out thissection.
These are the skillID's assigned to the hotkeys for Skill 1 throughSkill 16. (Note that Skills 8 and above is onlyavailable in the Expansion Set.) If a skill hotkey is notassigned to a skill, the value is 0xffff.

Hotkey definitions are stored in the character.keyfile. The structure of that file is not covered by this document(and I see no need to modify it outside of the game.)

120longThe action assigned to the left mouse button. The value ofthis field is a skillID.
124longThe action assigned to the right mouse button.
128longIn an Expansion character, the action assigned to the alternateleft mouse button. (The button assignments are swapped when youswap weapons.)
132longIn an Expansion character, the action assigned to the alternateright mouse button.
13632 bytesunknown
1683 bytes
These bytes indicate which difficulty the character isplaying. The first byte corresponds to Normal, the secondNightmare, and the third Hell. If the value is zero, thecharacter is not playing at that level. Otherwise, the valuelooks like this:
76543210
ActiveunknownWhich Act the
character is in (0-4)
171longMap ID. This value looks like a random number, but itcorresponds with one of the longwords found in thecharacter.map file, according to the difficulty beingplayed.
175shortunknown
177shortuncertain; it looks like this is set on an Expansioncharacter whose mercenary has died.
1794 bytesThis looks like a random ID for your mercenary. It is 0 ifyou have never had a mercenary. If your mercenary has died or(in the standard game) been left behind when you move on to the nextact, this field is still set to the last mercenary you had.
1832 bytesThis is a numerical index into the game's language-dependentstring table for mercenary names. There is a separate list foreach type of mercenary (Rogue Scout, Desert Mercenary, EasternSorceror, and Barbarian). I've written up a list of mercenary names forthe English 1.09 patch.
185shortThis code determines the difficulty level and act where yourmercenary is found, as well as the attribute of your mercenary(i.e., Cold, Fire, Lightning). I have a list of the mercenarycodes appended to the end of the mercenary name list.
187longYour mercenary's experience points.
191144 bytesunknown

Quest Completion Data

The quest data begins with the following header:

Byte PositionSizeContents
3354 charsThe string identifier 'Woo!'. (I guess somebodyat Blizzard had a sense of humor. :)
3396 bytesunknown; I always see the bytes { 6, 0, 0, 0, 42, 1 }here.

The header is followed by three structures, one for each difficultylevel. Remember, the byte offsets given here are offsetsinto the structure; the first structure is at offset 345 in thefile.

Although there is some variation in the meaning of the bits perquest, some of the bits appear to have constant meaning.

Bit 0 indicates the quest is complete. If bit 0 is clear butthe rest of the field is non-zero, then the quest has been started,but not finished.

Bit 1 generally means you have completed the requirements for thequest (i.e., killed the boss demon), and all that's left is to collectthe reward -- for example, 'Charsi will imbue an item with magicalpower.' Not all quests have this option. If this bit isset, bit 0 must be clear.

Bit 2 is often set when an NPC gives you a quest.

Bit 12 is set when you have seen the swirling fire animation thatcloses a quest icon.

Bit 13 indicates the quest was completed in the current game; whenyou save the game and then reload it, all bit 13's are cleared.

Byte PositionSizeContents
0shortThis field contains a 1 if you have been introduced (by Warriv) toAct I.
26 shorts
These fields contain quest completion data for each quest inAct I.
short #QuestNotes
0Den of EvilBit 4 is set when you enter the Den.
1Sisters' Burial GroundsBit 4 is set when you enter the Burial Grounds.
2Tools of the TradeBit 6 is set when you pick up the Horadric Malus.
3The Search for CainBit 4 is set when you enter Tristram.
Bit 10 indicates whether you have completed the secret Cow Level('Moo'). If you want to fight the Cow King again, just clearthis bit!
If you enter Act II without rescuing Deckard Cain, bit 14 will getset. You will not be able to rescue Cain yourself; the Rogueswill have done it instead, and as a consequence, you will be charged afee if you want Cain to identify items for you.
4The Forgotten TowerBit 2 is set when you read the Moldy Tome.
Bit 6 is set when you enter the Forgotten Tower.
5Sisters to the Slaughter
14shortuncertain; I think this gets set to a non-zero value after youtravel from Act I to Act II.
16shortThis field contains a 1 if you have been introduced (by Jerhyn) toAct II.
186 shorts
These fields contain quest completion data for each quest inAct II.
short #QuestNotes
0Radament's LairBit 4 is set when you find Radament.
1The Horadric StaffBit 4 is set when Cain tells you about the Viper Amulet.
Bit 5 is set when Cain tells you about the Staff of Kings.
Bit 10 is set when Cain tells you about the Horadric Staff.
Bit 11 is set when you make the Horadric Staff.
2Tainted SunBit 2 is set when the sun goes out.
Bit 3 is set when Drognan tells you why.
3Arcane Sanctuary
4The Summoner
5The Seven TombsBit 3 is set when you talk to Tyrael.
Bit 4 is set when you talk to Jerhyn (after killing Duriel).
Bit 5 is set when you kill Duriel.
Bit 6 is set when Atma congratulates you.
Bit 7 is set when Warriv ' ' .
Bit 8 is set by Drognan.
Bit 9 is set by Lysander.
Bit 10 is set by Cain.
Bit 11 is set by Fara.
30shortuncertain; I think this gets set to a non-zero value after youtravel from Act II to Act III.
32shortThis field contains a 1 if you have been introduced (by Hratli) toAct III.
346 shorts
These fields contain quest completion data for each quest inAct III.
short #QuestNotes
0Lam Esen's Tome
1Khalim's Will
2Blade of the Old ReligionBit 2 is set when you pick up the Gidbinn.
Bit 3 is set when Hratli asks you to find the Gidbinn.
3The Golden BirdBit 2 is set when Cain tells you about the Jade Figurine.
Bit 4 is set when Cain tells you about the Golden Bird.
Bit 5 is set when you are given the Potion of Life, and cleared againwhen you drink the Potion. (This prevents you from drinking morethan one in a game.)
Bit 6 is set when you find the Jade Figurine.
4The Blackened Temple
5The Guardian
46shortuncertain; I think this gets set to a non-zero value after youtravel from Act III to Act IV.
48shortThis field contains a 1 if you have been introduced to ActIV.
503 shorts
These fields contain quest completion data for each quest inAct IV. Note that there are only three quests here, as opposedto 6 for the first three Acts.
short #QuestNotes
0The Fallen Angel
1Terror's End
2Hell's Forge
56shortuncertain; I think this gets set to a non-zero value after youtravel from Act IV to Act V in an Expansion game, but I havenot yet verified this assumption. It appears tobe zero after completing a standard game.
583 shortsunknown; maybe act IV has 6 fields for quests after all, eventhough only 3 are used?
64shortunknown; in an Expansion character, this was set to 1 aftercompleting Terror's End and talking to Cain in act IV
662 shortsunknown
706 shorts
These fields contain quest completion data for each quest inAct V.
short #QuestNotes
0Siege on HarrogathBit 3 is set when you find Shenk.
Bit 5 is set when Larzuk offers to socket an item for you.
1Rescue on Mount Arreat
2Prison of IceBit 7 is set when you read the Scroll of Resistance.
Bit 8 is set after you rescue Anya and talk to Malah.
3Betrayal of HarrogathBit 4 is set when Anya offers to personalize an item foryou.
4Rite of Passage
5Eve of DestructionBit 4 is set when Larzuk congratulates you.
Bit 5 is set when Cain congratulates you.
Bit 6 is set when Malah ' ' .
Bit 7 is set by Tyrael.
Bit 8 is set by Qual-Kehk.
Bit 9 is set by Anya.
827 shortsunknown

Waypoint Data

The waypoint data begins with the following header:

Byte PositionSizeContents
6332 charsThe string identifier 'WS'.
6356 bytesunknown

The header is followed by three structures, one for each difficultylevel. Remember, the byte offsets given here are offsetsinto the structure; the first structure is at offset 641 in thefile.

Byte PositionSizeContents
02 bytesunknown; I always see the values { 2, 1 } here.
25 bytesWaypoints. This is a bitfield, with one bit assigned to eachwaypoint in LSB order -- so bit 0 in the Rogue Encampment waypoint forAct I. The first waypoint in every Act is activated as soon asyou enter that Act. There are 9 waypoints (bits) in each of ActsI, II, and III, and 3 waypoints (bits) in Act IV, so the last waypointbefore Diablo (River of Flame) is bit 29 (since we start counting from0). The first waypoint for Act V follows at bit 30, andcontinues to the last (ninth) waypoint in Act V at bit 38.
717 bytesunknown

NPC Introductions

My data on the next section is very sketchy... help?

Byte PositionSizeContents
7142 charsThe string identifier 'w4'.
7161 byteunknown
7171 byte
76543210
WarrivCharsiKashyaAkaraGheed
7181 byte
76543210
GreizMeshifGeglashLysanderFaraDrognan
7191 byte
76543210
AlkorAshearaCainElzix
7201 byte
76543210
MalahAnyaNatalyaMeshifOrmus
7211 byte
76543210
CainQual-KehkNihlathak
7223 bytesunknown
7258 bytesIntroductions repeated for Nightmare difficulty.
7338 bytesIntroductions repeated for Hell difficulty.
7411 byte

It would appear that bits 1-6 of byte 741 get setafter you take the caravan to Act II in Normal difficulty. Bit 7of byte 741 through bit 1 of byte 743 get set after you sail to ActIII. On entering Act IV, bits 2, 5, 6, & 7 of byte 743 andbits 0, 3, & 4 of byte 744 get set.

When you return to a previous act and talk to the NPC's, these bitsare cleared.

You have yet to be welcomed back by:
76543210
Warriv?CharsiWarrivKashyaAkaraGheed
7421 byte
76543210
GreizJerhynMeshifGeglash?FaraDrognan?
7431 byte
76543210
AlkorHratliAsheara??Elzix
7441 byte
76543210
??Ormus
7454 bytesunknown
7498 bytesGreetings repeated for Nightmare difficulty.
7578 bytesGreetings repeated for Hell difficulty.

Character Statistics

The character statistics begin with the following header:

Byte PositionSizeContents
7652 charsThe string identifier 'gf'.
767short
This bit field indicates the presence or absence of eachparticular statistic. If the bit is 0, the correspondingstatistic is zero and not stored in the file. If the bit is 1,the statistic has a long value stored in the file. Notethat many of the statistics are never zero, so they will always bepresent; but there is a bit assigned to them nonetheless. Thebits are assigned as follows:
BitStatistic
0Strength
1Energy
2Dexterity
3Vitality
4Stat Points Remaining
5Skill Choices Remaining
6Life (current)
7Life (base)
8Mana (current)
9Mana (base)
10Stamina (current)
11Stamina (base)
12Level
13Experience
14Gold in Inventory
15Gold in Stash

From this point on, the contents of the file are (more or less)variable, because the contents of the statistics section areoptional.

FieldDetails
StrengthThese fields are self-explanatory. They are alwayspresent. Remember, all values are stored aslongs.
Energy
Dexterity
Vitality
Stat Points
Remaining
(optional)
The number of Stat Points earned but not distributed.
Skill Choices
Remaining
(optional)
The number of Skill Choices earned but not distributed.
Life
(current)
These fieldsare (usually) always present. (There is an exception: if yourcharacter is dead, the current Life field will be gone!) Theyare also not plain integer values! Instead, eachfield is a fixed-point binary number, with a 24-bit integer part andan 8-bit fraction part. For example, if the life (current) fieldcontained the value 0x020ac0, then to get the amount of life remainingyou would take that value and divide by 256.0 to get 522.75 (roundingthe number to an integer for display ... although I'm not certain inwhich direction the number is rounded). Note that the currentamount of life (/mana /stamina) may be more than the base amount,because the base does not take into account any blessings bestowed bymagical items you are carrying.
Life
(base)
Mana
(current)
Mana
(base)
Stamina
(current)
Stamina
(base)
LevelYour character's level. This value must be in the range 1-99(and is therefore always present, even on a new character) and shouldbe the same as byte 43 in the fileheader.
Experience
(missing on a
newcharacter)
The amount of experience your character has. If you haven'tkilled a single monster in the game, your experience will be 0, andthis field is not stored. Otherwise, this field is alwayspresent.
Gold in
Inventory
(optional)
The amount of gold you are carrying. Just as a helpfulreminder, the maximum amount of gold you may carry is directlyproportional to your level, at 10,000 gold per level. Thus, a newcharacter can only carry 10,000 gold pieces (which is still a lot, ifyou think about it, even if each piece is smaller than a dime:), but a level 99 character (the limit) can carry nearly amillion in gold (990,000).
Gold in
Stash
(optional)
The amount of gold you have stowed away. Just as ahelpful reminder, the maximum amount of gold you may store in thestash is related to your level as follows:
LevelMax. Gold
1-30int(level ÷10 + 1)× 50,000
31-99int(level ÷2 + 1)× 50,000

Character Skills

The character skills section begins with the 2-characterheader, 'if'. This is followed by 30 bytes, each bytecorresponding to one of the character's special skills. To savespace, I'll list the skills in a separate table.

Item List

The next major section of the .d2s file is the itemlist. It begins with the following header:

Diablo 2 Level 99 Character Codes
SizeContents
2 charsThe string identifier 'JM'.
shortThe number of items your character has. This includes itemsequipped, tucked in your belt, stored in your inventory, stored inyour stash, and hidden in the Horadric Cube. It doesnot, however, include gems, runes, or jewels which have beeninserted into a socketed item. (Those are counted as part of theitem.)

This header is followed by a list of items. The format of theitems is way beyond the scope of this document; referto my Item Format pagefor a detailed description.

After the list of items, you will find another item list headersimilar to the one shown above; only this time the item count will be0. Usually. It looks like if your character has died,then the item count in this second header will be 1, and 12 bytes of(unknown) data will follow, after which there will be anotherheader and item list for items on your corpse. Sadly, I haven'tdied often enough to test this theory, much less figure out what thoseextra bytes mean.

Diablo 2 Level 99 Character Codes List

If you have an Expansion character, then the corpse item list willbe followed by the 2-character header 'jf'. Ifand only if you have a mercenary (alive or dead), thisheader is followed by an item list header and (possibly empty) itemlist containing items equipped on the mercenary. This item listis followed by the trailer characters 'kf'.

If you have a necromancer, it is possible for you to have an IronGolem that is preserved when your game is saved and restored. TheIron Golem is based on an item. Following the mercenary item list,there will be a single byte that is 0 if there is no golem, or 1 ifthere is. If there is a golem, this byte is followed by a singleitem. Note that this appears to be available only on Expansioncharacters.

Diablo 2 Level 99

The End

Diablo 2 Level 99 Character Codes 2020

Please send any additions or corrections to me using myweb-based mail form.