I have written a few tools to help understand the contents of two data files from the venerable Might and Magic 2 RPG. A younger me got a lot of mileage as a player out of this grindcore slug-fest (particularly the Mac version).

The tools are simple Perl scripts written without much care. However, listRoster.pl will dump all the active characters in the Roster.dat file. You can use a binary editor, like emacs with hexl-mode, to poke various fields and what not to make the game less boring.

Each character record is 130 bytes long and is composed of mostly unsigned bytes, but there are a few 16 and 32 bit ints in there as well as one byte that stores different information in its high nibble versus its low.

The main binary for the game, MM2.exe, is only 76KB and could be easily disassembled by those more intrepid than I.

Although I could not intuit what all the bytes in the character record mean, I think I got a useful subset defined that would help anyone wishing to create a real slick character trainer.

Here’s what an example dumped record looks like:

17: Paladin      : Female Good Human Paladin
    Level: 7        HP: 305/315 Age: 18
    Might:          100 SP: 56 /56  XP: 80905
    Intelligence:   10 
    Personality:    25  AC: 29  SL: 1   Gold: 30659
    Endurance:      18          Gems: 8
    Speed:          50  Thievery: 0%    Food: 30
    Accuracy:       100 [no skill]  Sandsobar
    Luck:           18  [no skill]  Cond: Good

    Equipped 0: Plate Armor +1          Backpack 0: Small Shield+3  
    Equipped 1: Helm        +4          Backpack 1: Trident     +1  
    Equipped 2: Great Shield+1          Backpack 2: Naginata    +2  
    Equipped 3: Long Bow    +4          Backpack 3: Sickle      +2  
    Equipped 4: Long Sword  +4          Backpack 4: BLANK       -0  
    Equipped 5: BLANK       -0          Backpack 5: BLANK       -0  
    Spell Book

Note that the character name appears in the top left corner. Here, the character’s name really is “Paladin”. I stopped giving the PCs in party-oriented RPGs useless names a while ago.