MAPS LAYOUT

This data is the random seed you get when you start a new game. You can see it when you open your debug text files (in your "Diablo II" directory, something like "D2010528.txt") at the line where appear "Seed:", followed by a decimal number.

We can consider it's a map ID because it determines all the maps layout that you'll have in the acts of your present difficulty level. If you take this value from another player, you will play on the exact maps as him. The value really don't seem to be an array (with 1 byte for each act) because whatever byte you change, the act 1 is not the same.

The file with the MAP extension is always 24 bytes. It is composed of 6 datas of 4 bytes each :

  • Signature header (0000000Bh)
  • Next slot to use (from 0 to 3)
  • Slot 0 map ID
  • Slot 1 map ID
  • Slot 2 map ID
  • Slot 3 map ID
Slot n correspond to the file with the extension MAn. This files are growing in size each time you revealed new portions of the map. When you start a new game, a random map ID is given to you. It is write in your D2S file at the offset 07Eh. The MAP file then looks like this :
  • 0000000Bh
  • 00000001h
  • your map ID
  • 00000000h
  • 00000000h
  • 00000000h
When you'll start a new game in Nightmare difficulty (by killing Diablo), you'll get another random map ID, wich will overwrite your precedent map ID in your D2S file. The Next slot to use data will be incremented by 1, and the Slot 1 will be equal to your new map ID.

Note about the increment : the value of next slot to use can only be between 0 and 3. So, if the increment give 4, then it switch back to 0. So you can only have a maximum of 4 files with the MAn entension : from MA0 to MA3.

At this point you might think that by playing again in Normal difficulty you'll keep your old maps. It's wrong : EACH time you play in another difficulty level than in your precedent savegame, you have a new map.

The MA0 file is here, the corresponding map ID is write in the MAP file, but it is another map ID that you'll have, and so you'll use the Slot 2, with the MA2 file. If you then try to play again in Nightmare difficulty, it is again (for the 4th time) another map ID that you'll have. So, you can wonder what are the use of keeping your old maps in 3 slots, because they can't be re-used by the game. All necessary materials are here, but the mechanism is not implemented. For the fun of playing maybe ?

You can in fact re-use your old maps, but you have to do it manually. Just put, in the map layout data (at the offset 07Eh), one of the map ID you have in the MAP file. That's all. You can even get the maps of someone else. An example :

You want to play in the same maps of a friend. You also want the same reaveled portions of the map that he have done. Here is the methode :

Get his map ID

  • Open the D2S file of your friend
  • Check the 4 bytes starting from the offset 07Eh (maps layout data)
Get his MAn file
  • Open his MAP file
  • Check in which slot the precedent map ID is present
  • Copy the corresponding MAn file to be your MA0 file
Modify your map ID
  • Open your MAP file
  • Put in slot 0 the new map ID
  • Open your D2S file
  • Put in the maps layout data the new map ID
That's done. Now, you have the same maps of your friend, and all the portions of the maps that he had revealed.


Back to Part 1