MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
Eksekk
Scout
Scout
Posts: 183
Joined: 19 Jul 2016

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Eksekk » 22 Sep 2022, 21:13

So here's the patch (for MM6):

Code: Select all

mem.asmpatch(0x431A7D, [[
	mov ecx, dword [esi + 0x64] ; ecx - total experience award, esi - monster pointer, 0x64 - experience field offset
	jmp short ]] .. (0x431A8C - 0x431A7D)
, 0xF)

mem.asmpatch(0x431299, [[
	mov ecx, dword [esi + 0x64]
	jmp short ]] .. (0x4312A8 - 0x431299)
, 0xF)

mem.asmpatch(0x401937, [[
	mov ecx, dword [esi - 0x3C]
	jmp short ]] .. (0x401946 - 0x401937)
, 0xF)
Put it in any script in General folder.

Mareneusz002
Leprechaun
Leprechaun
Posts: 30
Joined: 29 Mar 2019

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Mareneusz002 » 22 Sep 2022, 23:20

Eksekk wrote: 19 Sep 2022, 21:39 I meant requirements for learning specific spells. I made a script which implements last two points, download here (put it into Scripts/Global). Note: previous script still needs to be in Scripts/General.

Yeah, if you want to change the requirements occasionally it'd be best to learn at least basic scripting.

The script works awesome!!
Thank you!

its really enough because i dont need requirements so much

i have tried to learn a bit of scripting but its really not for me ;l changing some simple things in script is ok, but making new script from scratch is really not easy


i just need one last thing please :) its probably ultra easy... but i cant find anything about it at Grayface site:

the letter with some text
and i will be able to edit the text

would be great to have that letter in MM6,7,8 in inventory at start of the game

thanks!!

Eksekk
Scout
Scout
Posts: 183
Joined: 19 Jul 2016

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Eksekk » 24 Sep 2022, 18:31

Mareneusz002 wrote: 22 Sep 2022, 23:20 i have tried to learn a bit of scripting but its really not for me ;l changing some simple things in script is ok, but making new script from scratch is really not easy
I won't push you, but keep in mind that I personally, before getting generally able to do programming, had utterly basic syntax errors in C++ that I couldn't fix and have given up on programming for few years. Unfortunately it's normal to suck until you have been doing given thing for at least several weeks.

You weren't able to find that info, because there isn't a tutorial for general MM modding. I might make one in the future, but for now only simple explanation. Can you clarify if you want to use it in Merge or simply want tutorial for each MM game from 6 to 8?

Mareneusz002
Leprechaun
Leprechaun
Posts: 30
Joined: 29 Mar 2019

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Mareneusz002 » 25 Sep 2022, 01:57

Eksekk wrote: 24 Sep 2022, 18:31
Mareneusz002 wrote: 22 Sep 2022, 23:20 i have tried to learn a bit of scripting but its really not for me ;l changing some simple things in script is ok, but making new script from scratch is really not easy
I won't push you, but keep in mind that I personally, before getting generally able to do programming, had utterly basic syntax errors in C++ that I couldn't fix and have given up on programming for few years. Unfortunately it's normal to suck until you have been doing given thing for at least several weeks.

i have already tried some in past, but only for a bit. i will maybe try again in some time, because asking for help with some basic stuff is a bit problematic for both sides... sorry for that and really thank you for helping and being so kind!!


Eksekk wrote: 24 Sep 2022, 18:31 You weren't able to find that info, because there isn't a tutorial for general MM modding. I might make one in the future, but for now only simple explanation. Can you clarify if you want to use it in Merge or simply want tutorial for each MM game from 6 to 8?

umm i havnt played the Merge mod yet, so best would be for all 3 games = from MM6 to 8, but also in Merge too, because i plan to play it in future

but does that require creating a different script for each MM game?

i thought it works like 1 script for all 3 games, but i would just need to put .lua in 3 game folders

for example to learn all spells:

"-- learn all spells
for _, pl in Party do
for i in pl.Spells do
pl.Spells = true
end
end"

it works in MM7 and 8. havnt checked MM6 yet




Eksekk wrote: 24 Sep 2022, 18:31 You weren't able to find that info, because there isn't a tutorial for general MM modding. I might make one in the future


luckily, the letter in inventory at start, is all i need for now. but yea, in future i might need something more, so if there are some people like me (total noob), so yea, some tutorial might be really helpful!

thanks!!

User avatar
raekuul
Demon
Demon
Posts: 348
Joined: 05 Jul 2019

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby raekuul » 25 Sep 2022, 13:35

the Learn All Spells example works in all three games (since it iterates across both the entire party table and the entire table of spells).

There are certain quirks that are unique to each game (MM6 is the only game with "Poison" resistance, MM8 has five characters, etc). Scripts will need to be adjusted for each game in those odd cases, but keep in mind that which set of game-specific things you need depends on what executable you're running: if you're running MMMerge, then that's based on MM8 so you "only" need to account for MM8's quirks.

You should be able to make "one" master script and then modify it based on each game's quirks - that's what I'll having been done with my Monster Randomization scripts (though that project's on the back burner for now since I'm currently making a version of it specific to Skill Emphasis)

Eksekk
Scout
Scout
Posts: 183
Joined: 19 Jul 2016

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Eksekk » 07 Oct 2022, 22:25

Sorry for not creating the tutorial yet, I'm busy right now. It should be created soon. For now, look at files items.txt and scroll.txt in game archives (extract with mmarchive, edit with txtedit), editing them is the key to create the letter. To have item appear in inventory at the start of the game, use this script:

Code: Select all

function events.NewGameMap()
	evt.GiveItem{Id = id}
	Mouse:ReleaseItem()
end

Mareneusz002
Leprechaun
Leprechaun
Posts: 30
Joined: 29 Mar 2019

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Mareneusz002 » 10 Oct 2022, 00:38

Eksekk wrote: Sorry for not creating the tutorial yet, I'm busy right now. It should be created soon. For now, look at files items.txt and scroll.txt in game archives (extract with mmarchive, edit with txtedit), editing them is the key to create the letter. To have item appear in inventory at the start of the game, use this script:

Code: Select all

function events.NewGameMap()
	evt.GiveItem{Id = id}
	Mouse:ReleaseItem()
end

Thanks!!

the letter works awesome!

theres no rush with tutorial, because currently i dont plan to do some more things. but yea, in future it may be helpful! and hopefully there are some noobs like me so it might help other people also :tsup:

Thank you so so much for all help from your side!!



raekuul wrote: You should be able to make "one" master script and then modify it

Sadly im total newbie and its hard for me to make script from scratch.
editing/modify some easy things in script is ok
but anyway currently i dont really need anything more :-P
Thank you for trying to help!


thanks!!

Eksekk
Scout
Scout
Posts: 183
Joined: 19 Jul 2016

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Eksekk » 12 Oct 2022, 13:57

So you managed to create new item with text? Congrats!

Yeah, I plan to do this tutorial after all. It's just in the future right now, because I got pulled in by dungeon modelling and do less programming stuff rn.

Also, thank you for giving me interesting things to do! :-D

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1643
Joined: 29 Nov 2005

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby GrayFace » 13 Oct 2022, 11:33

Eksekk wrote: 22 Sep 2022, 21:13 So here's the patch (for MM6):
raekuul wrote: 21 Sep 2022, 17:34
I think I need to add such a patch for MMExt too, but for the task it would be better to change stats in MonstersTxt in addition to local monsters instead. This will make attributes of monsters that are summoned consistent.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

Holloweye
Leprechaun
Leprechaun
Posts: 1
Joined: 17 Oct 2022

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby Holloweye » 17 Oct 2022, 16:37

I have recently been trying to add a new Skill in the game. But without luck.

I added my skill in:
- ConstAndBits.lua
- evt.lua
- Class Skills.txt
- Class Starting Skills.txt
- Skilldes.txt (in EnglishT.lod)

Not sure what I am missing. But when I try to set it in-game with `Party[0].Skills[39] = 1`, it fails saying its out of bounds.

Anyone added a new skill to the game before and have some direction on what needs doing?

Thanks

cthscr
Blood Fury
Blood Fury
Posts: 456
Joined: 12 Jan 2020

Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby cthscr » 20 Oct 2022, 13:25

Holloweye wrote: 17 Oct 2022, 16:37 I have recently been trying to add a new Skill in the game. But without luck.

I added my skill in:
- ConstAndBits.lua
- evt.lua
- Class Skills.txt
- Class Starting Skills.txt
- Skilldes.txt (in EnglishT.lod)

Not sure what I am missing. But when I try to set it in-game with `Party[0].Skills[39] = 1`, it fails saying its out of bounds.

Anyone added a new skill to the game before and have some direction on what needs doing?
Forget it. To add a skill you'll have to rewrite thousands of [asm] lines in mm8.exe.
Stealing code was wiped from mm8, use its place instead.


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 7 guests