Guides on basic modding?

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).

Moderator: Moderators

Gay Lord
Leprechaun
Leprechaun
Posts: 21
Joined: 28 Nov 2006

Guides on basic modding?

Postby Gay Lord » Jan 8 2022, 0:03

I think I might be in the mood for another MM6 playthrough, but there are a few things I'd really like to change.

1) I'd like to change the base hp/sp each class gets on levelup. Changing a few numbers shouldn't be hard, right? I want casters to have lower numbers with knights having more, to better balance them.

2) I'd really like to edit the properties of staves. I'd like to give them mana regen and a mana or meditation boost, as default properties, so they apply to all staves.

3 (optional)) I'd like to change the spell cost and damage of many of the spells, to make them more useful (such as the utterly weak sunray), but I'm guessing doing this would be much harder than #1 and #2.

Does anyone know of guides to do these things, or even mods already made do these things?

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 8 2022, 1:49

You'll want to install MMExtension. After running the game with it twice, a subdirectory Data\Tables will appear, and the files there can be edited to tweak a bunch of game constants. In particular, "Class HP SP" corresponds to (1), and "Spells2" to (3). (2) is a bit harder -- you can add the SP bonus if you write your own CalcStatBonusByItems event handler, but SP regen is even trickier -- I don't think the regen function is hooked, although you could make your own timer? Either way, (2) requires Actual Programming Skills, or at least someone to write it for you.

Gay Lord
Leprechaun
Leprechaun
Posts: 21
Joined: 28 Nov 2006

Re: Guides on basic modding?

Postby Gay Lord » Jan 8 2022, 3:07

Thank you very much for your help!

For 2, are you suggesting some kind of scripting? Wouldn't it be easier to add enchantment properties to a base item? Like, add the mana regen enchantment and a skill bonus enchantment? I don't know if it would affect the price or not, but at least in my head it seems like it would be easy.

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 8 2022, 4:12

An ordinary item can have one enchantment, which in your case can be an arbitrary SP bonus, or a fixed bonus to SP regeneration, or + 10 SP and + SP regen ("of Eclipse" enchantment). There are no "native" enchantments that boost non-magic-school skills (like Meditation) in MM6. I suppose you could make all staves have, say, the "of Eclipse" enchantment, but then they will never be able to have any other special property, including, e.g., elemental damage. I assumed that's not what you want. Also, it still wouldn't be easy -- even though defining items with fixed enchantments is trivial in MM7-8, MM6 doesn't support this and you would still have to resort to complicated scripting.

Gay Lord
Leprechaun
Leprechaun
Posts: 21
Joined: 28 Nov 2006

Re: Guides on basic modding?

Postby Gay Lord » Jan 8 2022, 5:12

Again, thanks for your help.

I suppose then the only thing left I can think of, since you say it's easy in 7/8, is... what about using the 6-8 merge mod and THEN editing a game file to give staves the Eclipse property? Yes, it would be nice if they could get other enchantments as well, but if options are limited, do you suppose that might work? I was planning on trying the Skill Emphasis mod not the Merge mod, but who knows.

In that case, maybe just alter the starting +0 staves, and leave the other staves open to whatever. Hmmmm, but the Skill mod appears to have zero cost starting attack spells, which I also really want. Maybe I'll have to settle for not altering staves. I'll think on it.

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 8 2022, 5:43

Merge uses MM8 engine, so MM6-specific spells, skill effects etc. are not preserved. Only locations and monsters are used. If you aim to play MM6 relatively close to vanilla, Merge is probably not an option.

Gay Lord
Leprechaun
Leprechaun
Posts: 21
Joined: 28 Nov 2006

Re: Guides on basic modding?

Postby Gay Lord » Jan 8 2022, 6:23

The spells2 file only lists spell delay, nothing on crunchy numbers. The class hp sp file does have exactly what I want though.

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 8 2022, 8:12

Oh, sorry, I was wrong then. In MM7 (which I'm the most familiar with) you can definitely edit both damage and cost through Spells2, but MM6 is apparently different. If you want to change cost there, you'll need to extract spells.txt from the Data\icons.lod archive using MMArchive or a similar tool, place it into the DataFiles directory (you may need to create it in the game directory), and edit it there. But damage is hardcoded in MM6 (as it doesn't always follow the same XLdA+B logic), so you'll need to use the CalcSpellDamage event in a script, as suggested in the MMExtension help.

Gay Lord
Leprechaun
Leprechaun
Posts: 21
Joined: 28 Nov 2006

Re: Guides on basic modding?

Postby Gay Lord » Jan 8 2022, 23:52

So if neither spell damage or staves can easily be edited in 6, I guess I have to look at the merge mod and it's files.

Installing that, I see that the spells2 file does indeed have more options to change mana cost and damage. However, it seems the nature of spell damage is always a range of 1-N, where only N can be changed. So I could make a spell do 1-6 dmg per skill, or 1-9 or 1-20, but not a flat value of 4 per skill.

Also, how would one change the initial +0 staff to have an enchantment property?

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 9 2022, 0:44

Yes, the damage is always (skill)dA + B. At least it's only editable as such. (You could do differently with scripts.)

As for enchantments, in principle you'd need to edit items.txt that is contained in one of the Data\*.T.lod files -- the specific one depends on which version of the Merge you're playing. There, fields 13 and 14 can be used to set enchantment type and strength. But I'm not actually sure how well this would work for randomly generated items, as that feature was originally intended for pre-placed uniques. You'll have to ask someone who knows Merge code.

Gay Lord
Leprechaun
Leprechaun
Posts: 21
Joined: 28 Nov 2006

Re: Guides on basic modding?

Postby Gay Lord » Jan 9 2022, 2:34

Well, I'll keep puttering away. As always, thank you.

cthscr
War Dancer
War Dancer
Posts: 375
Joined: 12 Jan 2020

Re: Guides on basic modding?

Postby cthscr » Jan 9 2022, 6:41

Tomsod wrote: Jan 9 2022, 0:44 Yes, the damage is always (skill)dA + B. At least it's only editable as such. (You could do differently with scripts.)

As for enchantments, in principle you'd need to edit items.txt that is contained in one of the Data\*.T.lod files -- the specific one depends on which version of the Merge you're playing. There, fields 13 and 14 can be used to set enchantment type and strength. But I'm not actually sure how well this would work for randomly generated items, as that feature was originally intended for pre-placed uniques. You'll have to ask someone who knows Merge code.
Item should be of Special material. Grayface has fixed them to have their bonus from Items.txt when being got via evt.Add("Inventory", ...).

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 9 2022, 7:19

Really! Is that a v2.5 fix? I had to fix that myself for my 2.4-based mod. But I'm more worried about it not triggering when generated in shops or as random loot, because Special items never do.

cthscr
War Dancer
War Dancer
Posts: 375
Joined: 12 Jan 2020

Re: Guides on basic modding?

Postby cthscr » Jan 9 2022, 12:23

Tomsod wrote: Jan 9 2022, 7:19 Really! Is that a v2.5 fix? I had to fix that myself for my 2.4-based mod. But I'm more worried about it not triggering when generated in shops or as random loot, because Special items never do.
It's not in MMPatch but in MMExtension [git repo]. I've backported it to Merge: https://gitlab.com/cthscr/mmmerge/-/com ... bf083c7fe1

Tomsod
Peasant
Peasant
Posts: 78
Joined: 31 Jul 2020

Re: Guides on basic modding?

Postby Tomsod » Jan 9 2022, 18:03

Oh, I see, it's not even in the release yet. Either way, I try not to depend on MMExtension with my mod, so my fix stays. I guess it's not in the MMPatch itself because in vanilla, Special items are actually never added through gamescript.


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 17 guests