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
Assassin
Assassin
Posts: 259
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.
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.

Mareneusz002
Leprechaun
Leprechaun
Posts: 36
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
Assassin
Assassin
Posts: 259
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?
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.

Mareneusz002
Leprechaun
Leprechaun
Posts: 36
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
Marksman
Marksman
Posts: 429
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
Assassin
Assassin
Posts: 259
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
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.

Mareneusz002
Leprechaun
Leprechaun
Posts: 36
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
Assassin
Assassin
Posts: 259
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
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
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: 6
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
Golem
Golem
Posts: 618
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.

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

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

Unread postby GrayFace » 30 Nov 2022, 07:02

cthscr wrote: 20 Oct 2022, 13:25 Forget it. To add a skill you'll have to rewrite thousands of [asm] lines in mm8.exe.
Only the Skills tab actually. That can be done if it's ever needed.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

tinywhitecat
Leprechaun
Leprechaun
Posts: 12
Joined: 18 Dec 2017

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

Unread postby tinywhitecat » 27 Dec 2022, 05:14

In MMEditor, there doesn't appear to be any way to select portal surfaces (you just select through them) - this makes it impossible to make them part of a door without selecting the whole object.
It would be nice if maybe having the green outlines displayed around portals also let you select them.

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

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

Unread postby GrayFace » 30 Dec 2022, 10:08

tinywhitecat wrote: 27 Dec 2022, 05:14 In MMEditor, there doesn't appear to be any way to select portal surfaces (you just select through them) - this makes it impossible to make them part of a door without selecting the whole object.
It would be nice if maybe having the green outlines displayed around portals also let you select them.
A portal automatically becomes part of a door that has some of its vertices. If that's not enough in your case, send me the dungeon and description of the place for door.
Same thing as with portals happens if you set Multidoor property on a regular facet - then it becomes part of any door that has some of its vertices.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

SparrowJacek
Leprechaun
Leprechaun
Posts: 4
Joined: 11 Mar 2017

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

Unread postby SparrowJacek » 07 Feb 2023, 13:33

Hello!

I see that MMExtension allows for many awesome things, we can modify artifacts, classes, enemies, houses, quests and many other aspects of the game! We can even modify some aspects of skills, at least adding some additional elements to them. But can we make any real changes to spells? Like:
a) making firebolt deal damage to multiple enemies, like fireball
b) making single party member spells target whole party (eg regeneration)
c) move spells between schools?

I'm not talking about creating entirely new effects, only about working with mechanics that are already present in the game.

Best regards!

Holloweye
Leprechaun
Leprechaun
Posts: 6
Joined: 17 Oct 2022

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

Unread postby Holloweye » 07 May 2023, 14:55

I have been looking around for quite a bit for this but not found anything. Is it possible to add a new tileset (a 4th tileset)? If I just copy-paste the Tile3.txt and name it Tile4.txt in the Data/Tables folder, it is not recognized in the MMEditor. I looked alittle in the lua code and it seems like there is hardcoded stuff related to it being 3 tilesets but I might be misstaken. Does anyone have any insight in this?

Tomsod
War Dancer
War Dancer
Posts: 352
Joined: 31 Jul 2020

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

Unread postby Tomsod » 11 May 2023, 17:23

For some reason whenever I run MM7 with the MMExt 2.3 (from git) in a debugger (winedbg/gdb), it always crashes early while loading. gdb complains about "Unknown exception code 0xe24c4a03" in kernelbase.dll, and if I detach it, MM7 then exits with MMExt error "return a//a". Without a debugger the game runs fine, but it's a bummer for me as I depend both on gdb and MMExt for my modmaking.
For now I can use MMExt 2.2, but I'd rather update if I could. Any idea which change causes this?

Rodril
Swordsman
Swordsman
Posts: 580
Joined: 18 Nov 2016

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

Unread postby Rodril » 29 May 2023, 00:04

@GrayFace
I've run into ominous issue, that i need help with.
CreateSprite(...) mmext function seem to affect save files in a terrible way:
video:
https://cdn.discordapp.com/attachments/ ... RzshIM.mp4

1. Do something on the map.
2. Use CreateSprite() via debug console
3. Save game and reload it: map will be refilled, but party state will be loaded properly.

I've recorded video using clean version of MM8 + latest MMPatch + MMExtension from link in this topic, but it is also reproducible with Merge version of mmextension. I have not tried latest mmext from repository.
Is it known? Were any steps taken to fix it in latest mmext? Or is it just unavoidable behaivor that needs to be aware of?

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

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

Unread postby GrayFace » 31 May 2023, 09:39

Rodril wrote: 29 May 2023, 00:04 Is it known? Were any steps taken to fix it in latest mmext? Or is it just unavoidable behaivor that needs to be aware of?
It's interesting that I have that function there, I guess I haven't though about sprite bits, I must've made it in the beginning of MMEditor's development. Gonna add a warning to its description.

New MMExt has LoadSavedMap event and in it you can add missing sprites to Map.Sprites until Map.Sprites.Count matches Map.SanitySpritesCount (Map.SanitySpritesCount can also be 0, in which case nothing should be done there). Before that also check that other sanity checks are met. You would also need to check whether the refill by time passing happened...

[edit] I guess it would be much easier to set Map.Sprites.Count to normal amount in BeforeSaveGame event and restore the right amount in AfterSaveGame. Thus, bits for extra sprites won't be saved.

P.S. It's a miracle I decided to visit this topic and saw your message.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

Rodril
Swordsman
Swordsman
Posts: 580
Joined: 18 Nov 2016

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

Unread postby Rodril » 31 May 2023, 13:48

GrayFace wrote: 31 May 2023, 09:39 [edit] I guess it would be much easier to set Map.Sprites.Count to normal amount in BeforeSaveGame event and restore the right amount in AfterSaveGame. Thus, bits for extra sprites won't be saved.
That's the workaround i've found and using at the moment, thanks.


Return to “Might and Magic”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest