MM7: Various questions on modding and GrayFace's patch

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
Logscale
Leprechaun
Leprechaun
Posts: 10
Joined: 14 Sep 2014
Location: Curled up in the Frozen Cliffs sitting on pile of books

MM7: Various questions on modding and GrayFace's patch

Unread postby Logscale » 30 May 2015, 16:12

Modding with a Byte Editor

I would like to mod the class skill tables and spell damage/recovery/cost tables, does anyone have a list of offsets I could edit (with a byte editor) to do this?

There's a decent amount of stuff that can be modded with events.lod and Stormcat's MM6View, however it looks like spell data, skill tables, and stat bonus breakpoints are hardcoded into the exe (bad programming design!!!). Would be nice if I could edit these manually.
------------------------
Modding with GrayFace's tools

The other (and probably more popular) solution is GrayFace's patch and MMExtension. I've actually been testing MMExtension modding on a virtual machine and was able to change some of the damage values on various abilities - for example, increasing Inferno scaling damage to d3 per skillpoint and Ice Blast scaling damage to d8 per skillpoint.

For anyone who's curious on how to do this (with MMExtension): make a lua script in Scripts/General, have it contain a single "on game load" event function, and you can modify spell attributes with:

Game.Spells[number][attribute]= new value

If I remember properly, the scaling damage attribute is "DamageDiceNumber" and the base damage is "DamageAdd" (I could be slightly wrong).

GrayFace's MMExtension framework also includes a nice lua table dump function. Going into the console with Control+F1 and then running:

Message(dump(table,1))

is very useful.
-------------------------
Changing other spell characteristics with MMExtension?

Does anyone know how to modify spell characteristics in MMExtension? For example, is there a way to add AoE damage similar to Fireball or Dragon Breath?

Also, is there any way to increase damage/effects depending on mastery (basic/expert/master/grandmaster) level? I know you can change costs, but I wasn't able to find anything about changing actual effects based on mastery level.
-------------------------
Just how good (and widely used) is GrayFace's patch and MMExtension?

Byte editing would definitely be simpler for my originally planned mod. However, MMExtension results in a more maintainable mod. How many of you would recommend that I should implement this with MMExtension instead of a byte editor?

It looks like GrayFace's patch/MMExtension are very popular and I estimate from forum posts that perhaps 80-90% of people use it. All the reviews of the patch/extension I have seen so far have been positive (with one message board having links to the patch stickied at the top), and almost every mod other than BDJ or Chaos Conspiracy appears to require it.
------------------------
And an idea for GrayFace regarding his patch and MMExtension

If I remember properly, the main limitation on adding new content and quests is the save file format - there's a fixed amount of data for quest and adding new quests would have to reuse that data.

My suggestion - The quest data is probably loaded into an array or something. You could probably support an arbitrary number of additional quests (and anything else that doesn't fit into the save games) with these modifications:

-Each savegame would have a base MM7 save file (in original-compatible format) and an "extension edits" file.
-Extension edits file contains additional quest data.
-When the game is loaded: Concatenate the quest data in the base save file with the quest data in the extension edits file and use this to override the quest data array.
-The size of the standard quest data array is known from the save file format, so when you save your game, split the quest data - the standard data goes in the save file, everything else goes into the extension edits file.

A simple example:

Suppose:
-there are 8 quests in the standard save file
-each quest has a byte to represent its status.
-someone wants to add 2 more quests.

So the save file would load an array of 8 bytes normally (again, I'm certain that it's more than 8 bytes in practice). The extension edits file contains 2 bytes.
When you load the game:
-you have some QuestData array
-Read the size of the extension edits file quest data. Allocate space for the QuestData array equal to the standard quest data size + the additional quest data. In this example, that would be 10 bytes.
-On saving: split quest data into save file and extension edits file.

Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 17 guests