MMM Console Commands help

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
User avatar
Vaulth516
Leprechaun
Leprechaun
Posts: 33
Joined: 02 Nov 2020

MMM Console Commands help

Unread postby Vaulth516 » 02 Nov 2020, 01:29

Hi, I'm trying to use console commands to add a skill at a certain mastery and level to one character only.

The list of commands at "https://grayface.github.io/mm/ext/ref/" such as this one adds skills to all characters and I just need to add to one.
for _, pl in Party do
local skill, mastery = SplitSkill(pl.Skills[const.Skills.Perception])
pl.Skills[const.Skills.Perception] = JoinSkill(math.max(skill, 4), math.max(mastery, const.Expert))
end
Can someone help? thanks.

cthscr
Swordsman
Swordsman
Posts: 587
Joined: 12 Jan 2020

Re: MMM Console Commands help

Unread postby cthscr » 02 Nov 2020, 19:52

Party[0].Skills[const.Skills.Perception] = JoinSkill(4,2)

User avatar
Vaulth516
Leprechaun
Leprechaun
Posts: 33
Joined: 02 Nov 2020

Re: MMM Console Commands help

Unread postby Vaulth516 » 03 Nov 2020, 08:21

Thank you, that was helpful!

By the way, the Stealing skill does not seem that it can be added, does it have a different name or something?
Last edited by Vaulth516 on 03 Nov 2020, 09:21, edited 1 time in total.

cthscr
Swordsman
Swordsman
Posts: 587
Joined: 12 Jan 2020

Re: MMM Console Commands help

Unread postby cthscr » 03 Nov 2020, 14:35

It doesn't shown in MM8/Base Merge. Not supported either.

User avatar
Vaulth516
Leprechaun
Leprechaun
Posts: 33
Joined: 02 Nov 2020

Re: MMM Console Commands help

Unread postby Vaulth516 » 04 Nov 2020, 02:45

I see.
Reading the tracker now, hopefully it will be implemented soon.
The idea of a "righteous thief" was fairly popular in dark-middle ages times.
Last edited by Vaulth516 on 04 Nov 2020, 13:24, edited 2 times in total.

User avatar
Vaulth516
Leprechaun
Leprechaun
Posts: 33
Joined: 02 Nov 2020

Re: MMM Console Commands help

Unread postby Vaulth516 » 09 Nov 2020, 13:06

Btw, what's the code to add an individual spell to a character?

Eksekk
Assassin
Assassin
Posts: 259
Joined: 19 Jul 2016

Re: MMM Console Commands help

Unread postby Eksekk » 09 Nov 2020, 22:07

Code: Select all

party[0].Spells[i - 1] = true
0 means character index, 0 = first character from left, 1 - second etc.
i is spell index, taken from SPELLS.txt file from icons.lod (MM6), events.lod (MM7), EnglishT.lod (MM8).
change true to false to "forget" spell.
Last edited by Eksekk on 09 Nov 2020, 22:07, edited 1 time in total.
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.

User avatar
Vaulth516
Leprechaun
Leprechaun
Posts: 33
Joined: 02 Nov 2020

Re: MMM Console Commands help

Unread postby Vaulth516 » 12 Nov 2020, 12:39

Very nice, thank you. Is there a code to change the class of a character?

User avatar
Vaulth516
Leprechaun
Leprechaun
Posts: 33
Joined: 02 Nov 2020

Re: MMM Console Commands help

Unread postby Vaulth516 » 14 Nov 2020, 08:20

Hi, I don't get the spell adding code and where to really find the index, can you provide an example plz?

Ossie
Super Peasant
Super Peasant
Posts: 99
Joined: 24 Jan 2012
Location: Ossie

Re: MMM Console Commands help

Unread postby Ossie » 09 Dec 2023, 23:28

cthscr wrote: 02 Nov 2020, 19:52 Party[0].Skills[const.Skills.Perception] = JoinSkill(4,2)
What does the (4,2) mean? I'm looking to add Regen to a Troll Peasant in the first position. Would this be "Party[0].Skills[const.Skills.Regeneration] = JoinSkill(4,2)"? If not, what is the command or is there a link where I can work this out? Thanks

User avatar
raekuul
War Dancer
War Dancer
Posts: 398
Joined: 05 Jul 2019

Re: MMM Console Commands help

Unread postby raekuul » 10 Dec 2023, 04:22

4 is the rank (the number on the skill page) while 2 is the training (expert/master/grandmaster). If you want to do this with other skills then change out "Perception" for the name of the skill you want.

Ossie
Super Peasant
Super Peasant
Posts: 99
Joined: 24 Jan 2012
Location: Ossie

Re: MMM Console Commands help

Unread postby Ossie » 12 Dec 2023, 00:29

raekuul wrote: 10 Dec 2023, 04:22 4 is the rank (the number on the skill page) while 2 is the training (expert/master/grandmaster). If you want to do this with other skills then change out "Perception" for the name of the skill you want.
Makes sense, and worked, perfect, thanks


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 67 guests