Saved Game Format

Details about file formats, structure and contents in the original Master of Magic
Post Reply
saxxonpike
Posts: 13
Joined: Thu Oct 19, 2006 4:35 pm

Saved Game Format

Post by saxxonpike »

I can't seem to find the saved game format anywhere online. I've seen it before (in a really nice HTML format at that) But it seems to have disappeared.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Post by Implode »

I actually don't have it either, I've got format info on a couple of the original LBX files and the locations in WIZARDS.EXE where a few data items are held, but nothing on the saved game format.
saxxonpike
Posts: 13
Joined: Thu Oct 19, 2006 4:35 pm

Post by saxxonpike »

Okay, I'll probably just have to find it out again. I've found that the saved game format is really just a snapshot of the game's RAM at that point (minus the actual program/media data) and understanding the saved game format might help to understand why MoM does some things the way it does.
Xaekai
Posts: 2
Joined: Mon Oct 26, 2009 2:30 am

Re: Saved Game Format

Post by Xaekai »

http://www.dragonsword.com/magic/eljay/SaveGam.html

Note that the fog of war offset for myrror is wrong in the above file, a number is transposed. it's 15174
Xaekai
Posts: 2
Joined: Mon Oct 26, 2009 2:30 am

Re: Saved Game Format

Post by Xaekai »

I've experimented and researched some new data.

As far as location types (Offset 04: nodes/lairs/towers)
00 Tower
01 Chaos node
02 Nature node
03 Sorcery node
04 Mysterious cave
05 Dungeon
06 Ancient temple
07 Abandoned keep
08 Monster lair
09 Ruins
0a Fallen temple

Other newly determined offsets:
0A-0B Amount of Gold found
0C-0D Amount of Mana found
0E Spells, Spell books and Retorts. 1-4 indicates random spells, weakest to strongest. 5-6 are 1 or 2 spellbooks or retorts.
Also at the 0F (exploration bitmask) offset, the 01 flag means there is a prisoner
10 Number of Items to be found


The region starting at 6058h is node ownership and power details. 31 records of 48 bytes each.
00 X coordinate
01 Y coordinate
02 Plane
03 Owner
04 Node base strength
2C Node type. 00 sorcery/01 nature/02 chaos
2D byte the tells whether there is guardian spirit (02) or if its warped (03)

05-2B Are the sparkles bytes, but I'll be damned if I can figure out their format


that's all for now
kyrub
Posts: 33
Joined: Fri May 15, 2009 5:11 pm

Re: Saved Game Format

Post by kyrub »

Excellent stuff. Very useful info. Nice to spot that myrror thing as well.
Thanks a lot.

I have some new info on the wizard part of the savefile as well, will post it once I get some time to gather everything.
Asfex
Posts: 25
Joined: Thu Jan 21, 2010 5:43 am

Re: Saved Game Format

Post by Asfex »

2C Node type. 00 sorcery/01 nature/02 chaos
2D byte the tells whether there is guardian spirit (02) or if its warped (03)
05-2B Are the sparkles bytes, but I'll be damned if I can figure out their format
05-17 x -coordinates of node illumination
18-2b y-coordinates of node illumination
Post Reply