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).
User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 21 May 2017, 14:17

It happens if you specify HouseId parameter for which there is no text in trans.txt
I'll take a look at dragon rendering and such. BTW, his portrait is messed up for some reason, on the last picture.
[edit] Here you go:

Code: Select all

mem.nop2(0x43A43C, 0x43A444)
Last edited by GrayFace on 21 May 2017, 14:29, edited 2 times in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 21 May 2017, 16:56

GrayFace wrote:It happens if you specify HouseId parameter for which there is no text in trans.txt
But it is every time, and I haven't it not too long ago. :/ E.g. I used original scripts for original dungeons and they also doesn't work. MoveToMap works only without 'HouseId' and 'Icon' parameters.

For example, I have this in trans.txt:

Code: Select all

191	Kopalnię opanowały bestie, które wypełzły z podziemi wraz z pojawieniem się nieumarłych na powierzchni. Z głębi dochodzą dziwne dźwięki.	Abandoned Temple
...this in 2DEvents.txt:

Code: Select all

191	1	Dungeon Ent	1	102	Kopalnia	Placeholder		0	0	0	0	1.5						 	 	3	0	0	0
...and this script doesn't work:

Code: Select all

evt.MoveToMap{X = -3008, Y = -1696, Z = 2464, Direction = 512, LookAngle = 0, SpeedZ = 0, HouseId = 191, Icon = 1, Name = "D05.blv"}
GrayFace wrote:I'll take a look at dragon rendering and such. BTW, his portrait is messed up for some reason, on the last picture.
[edit] Here you go:

Code: Select all

mem.nop2(0x43A43C, 0x43A444)
Thanks! It works. Now I just need script for dragons for using all items.

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

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 21 May 2017, 17:20

Same thing happens in the game itself, right? Do you have Rodril' scripts extending limits?
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 21 May 2017, 17:23

GrayFace wrote:Same thing happens in the game itself, right? Do you have Rodril' scripts extending limits?
One second. I noticed that everything is ok when I removed everything mine from ...\Scripts\General. There must be some defect.

Edit: Very weird... this is because of my 'MonPortraits' script. LOL, I will be looking for the fault.
Last edited by J. M. Sower on 21 May 2017, 17:32, edited 1 time in total.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 21 May 2017, 18:18

I found the defect. It was change of reference to the first portrait name:

Code: Select all

mem.i4[0x47582C] = 0x4FB01C
Here is a new version of Monsters Portraits script:
http://www.mediafire.com/file/g1qitmmpd ... t+v1.1.zip
But I found some another defect about that script. I don't know why, but some monsters with assigned portraits will have showed placeholder instead of set portrait. For example, in my game monsters 298-300 have placeholder if I will set them some portrait, but monsters 394-396 will have showed properly set picture.
Last edited by J. M. Sower on 21 May 2017, 18:39, edited 2 times in total.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 22 May 2017, 13:28

Rodril wrote:First is limits removal of NPC-related tables (Data, Greet, News, Group, Text, Topic). This script seems to be finished, but tested briefly. I've noticed, that topics are straight-binded to global events, so i was curious about them. And to made additional topics anyhow functional, i had to remove limits of Global.EVT as well. It allow to add new NPC, topics and assign new events to them. New lines should be appended, because game using old by it's index.
Put it into "...\Structs\After" folder, here is link to current state of script: https://www.dropbox.com/s/3ih4gqf6melfo ... s.lua?dl=0
I have found a bug caused by RemoveNPCTablesLimits script. I can use Quest function to set greetings, but if I will set greeting from NPCGREET.txt the game will be showing nothing or some errors like this:

Code: Select all

...s\3DO\Might and Magic VIII moded/Scripts/Core/events.lua:342: memory at address 150014 (referenced by 4170EB4) cannot be read

stack traceback:
	[C]: in function 'error'
	Scripts/Core/RSMem.lua:529: in function '__index'
	...s\3DO\Might and Magic VIII moded/Scripts/Core/events.lua:342: in function 'NPCGreetingHook'
	...s\3DO\Might and Magic VIII moded/Scripts/Core/events.lua:370: in function <...s\3DO\Might and Magic VIII moded/Scripts/Core/events.lua:370>
	[C]: in function 'pcall'
	Scripts/Core/Common.lua:102: in function 'pcall2'
	Scripts/Core/RSMem.lua:1653: in function <Scripts/Core/RSMem.lua:1650>

arguments of 'NPCGreetingHook':
	eax = 242
	p = 68539808

local variables of 'NPCGreetingHook':
	(*temporary) = (table: 0x0faf2798)
	(*temporary) = (table: 0x003f9bd8)
	(*temporary) = 68619956
	(*temporary) = 968
	(*temporary) = 8.7156071915604e-287

upvalues of 'NPCGreetingHook':
	CurNPCGreet = "Hej, dobrze, że cię spotkałem! Reener, dowódca fortu chce się z tobą pilnie widzieć. Mówił, że chce ci powierzyć jakieś ważne zadanie. Powinien przebywać teraz w Siedzibie dowództwa."

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 22 May 2017, 22:21

J. M. Sower wrote: I have found a bug caused by RemoveNPCTablesLimits script. I can use Quest function to set greetings, but if I will set greeting from NPCGREET.txt the game will be showing nothing or some errors like this:
Hello, i've fixed it. Somehow i gave twice lower space then needed to NPCGreet, now should work:
https://www.dropbox.com/s/3ih4gqf6melfo ... s.lua?dl=0
J. M. Sower wrote: Rodril I used yours script "HardcoreTopicFunctions" and I have made a small script, "PartyQueueKeys". It is for moving characters in party queue by clicking choosen keys. Also I placed in this script posibility to change/turn off sound of hiring character, because it can be loud when you click to move character. ;)
http://www.mediafire.com/file/kcmzjljkk ... ueKeys.lua
Great, i like all thing related to party managment, in my opinion making party composition flexible in MM8 was a big step forward in terms of roleplay (i dream about button "speak" near "dismiss" in inventory screen).
And i should have thought about sound, i've added second param to HireCharacter() function, when it is true, function jumping over of sound playbak (like, HireCharacter(5, true) - hire Arius without sound).
Here is updated version:
https://www.dropbox.com/s/noh6cn5l4s1xw ... s.lua?dl=0
Also RefreshHouseScreen() improved a lot.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 23 May 2017, 13:23

Rodril wrote:Great, i like all thing related to party managment, in my opinion making party composition flexible in MM8 was a big step forward in terms of roleplay (i dream about button "speak" near "dismiss" in inventory screen).
And i should have thought about sound, i've added second param to HireCharacter() function, when it is true, function jumping over of sound playbak (like, HireCharacter(5, true) - hire Arius without sound).
Here is updated version:
https://www.dropbox.com/s/noh6cn5l4s1xw ... s.lua?dl=0
Also RefreshHouseScreen() improved a lot.
That's nice!

I have a new version of PartyQueueKeys, but it requires to delete "local" word from HardcodedTopicFunctions at line 480. I had a problem with disappearing party spell buffs during using characters moving, so I have added two functions, SaveBuffs() and LoadBuffs().
http://www.mediafire.com/file/mbf6echfz ... ueKeys.lua
Last edited by J. M. Sower on 23 May 2017, 13:42, edited 2 times in total.

SirGallant
Leprechaun
Leprechaun
Posts: 5
Joined: 19 Jun 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby SirGallant » 26 Jun 2017, 21:58

I installed MMExtension in MM7, and when I run the game there's a messagebox that says something about extracting .txt files into DataFiles folder, but the game window just stays black forever. Anyone know why this might be? I have MM7 patch v2.0 installed. Thanks. :)

Edit: Same thing happens with MM8. It worked for MM6 though.
Last edited by SirGallant on 27 Jun 2017, 06:06, edited 1 time in total.

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

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 28 Jun 2017, 15:20

It says: wait a few minutes.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

SirGallant
Leprechaun
Leprechaun
Posts: 5
Joined: 19 Jun 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby SirGallant » 28 Jun 2017, 19:53

MM6 finished in a few minutes and works just fine, but I left MM7 on overnight and still nothing. MM7 did create 5 files in DATA\Tables (Class HP SP.txt, Class Skills.txt, Class Starting Skills.txt, Class Starting Stats.txt, House Movies.txt), but the screen just stays black.

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

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 29 Jun 2017, 01:44

Ouch. Could you send me your MM7 or MM8 folder?
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

SirGallant
Leprechaun
Leprechaun
Posts: 5
Joined: 19 Jun 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby SirGallant » 29 Jun 2017, 05:27

I have a very bad internet connection so I'd rather not upload 500MB, can I send it without the Anims/DATA/SOUNDS folders? Or just some of the files in DATA?

Do you have an email address I can send it to?

And thanks for taking the time to help, I really appreciate it. :)

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

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 29 Jun 2017, 17:31

events.lod for MM7 or EnglishT.lod for MM8 should be enough. If there's DataFiles folder, send it as well. It's sergroj at mail ru. Thanks for helping me find the bug :)
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
theorclair
Peasant
Peasant
Posts: 66
Joined: 18 Jun 2013

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby theorclair » 29 Jun 2017, 23:28

I'm trying to modify the bookcases in 7 so there's a better chance to get scrolls from them, as well as random spell books rather than the given ones. I did this in the School of Sorcery, but it says that it's missing an end somewhere.

edit: Got it to partially work, but this line doesn't give random books but rather a weird series of items:

evt.GiveItem{Strength = 3, Type = const.ItemType.Book_, Id = 0}
Last edited by theorclair on 01 Jul 2017, 01:38, edited 1 time in total.

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 01 Jul 2017, 18:01

Hello.
Here is new script - "RemoveItemsLimits.lua" (only mm8).
https://www.dropbox.com/s/uiasg1cklxpxg ... s.lua?dl=0
Untested, but seems stable, put it into "...Scripts/Structs" folder.

It does following:
1. Limits of Items.txt removed - we can append any item of any type in this table now.

2. Handler of items with few sub-pictures (like armor, which looks diffrent on diffrent characters) improved, so we can add new armors, belts, cloaks etc. Column "Pic File" now used as template for these items. It is a bit complicated, so i've explained details in video below. Also script generates text table in "DataTables" folder with coordinates of these pictures, thanks to J.M.Sower for clue, where to dig for it.

3. Those "S2", "S38" etc in "Mod1" columns of wands, spell scrolls and books now actually working, we can define spells that way.

4. Limits of rnditems.txt, spcitems.txt and stditems.txt also removed, we can add new bonuses, they will spawn on items according to settings in these tables. They won't have any effects, but we can utilize "events.CalcStatBonusByItems" and "events.ItemAdditionalDamage" to script it.

5. Potions system improved and opened, "Potion.txt" and "Potnotes.txt" unlimited now, script generates two text tables: "Reagent settings.txt" and "Potion settings.txt", so we can add new reagents and potions, and script their effects through evt.PotionEffects[PotionID] array of functions. Details and example in video.

6. "Scrolls.txt" unlimited and it's index column actually defining index of message scroll now.

Here is video explanation for all things above, use it instead of readme, i'm afraid writting will take a lot of time and won't solve possible problems: https://www.dropbox.com/s/82s8qybipshy3 ... e.mp4?dl=0

Restrictions:
1. If you use "RemoveHouseRulesLimits", then you have to download updated version of it (these scripts are independent from each other, but needed few tweaks for compatibility). https://www.dropbox.com/s/ukhr1q9f9ria8 ... s.zip?dl=0
2. New items eventually will appear in shops of their kind, if you want to prevent it - set it's material as "relic" or "special" (in case of "special" also noone will buy this item).
3. Same problem with message scrolls, there is no any mechanism to define if current message scroll is quest item or not (.exe just checks if their global index is in some "allowed to sell" array - this system disabled). I did not met quest message scrolls in shops for now, but if you want to be sure - set their material as "special" manually.
4. Autonotes for new potions disabled, maybe i'll try to add them later.
5. Either i forgot something, or script just is not tested enough.

Also, "HardcodedTopicFunctions.lua" now have function "EnterShopScreen(Type, HouseID, NPC)" it works exactly as topics of shop npcs, we can call it from house and outdoor npc screens. https://www.dropbox.com/s/noh6cn5l4s1xw ... s.lua?dl=0
Type - string: "Standart", "Special", "Inventory", "Learn" (except outdoor npc) - for shops, "MFire", "MAir", "MWater", "MEarth", "MSpirit", "MMind", "MBody", "MLight", "MDark" - for guilds.
HouseID - index from 2DEvents, items table of this shop will be used.
NPC - NPC for preview data.

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

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 01 Jul 2017, 20:25

Cool!
Rodril wrote:2. New items eventually will appear in shops of their kind, if you want to prevent it - set it's material as "relic" or "special" (in case of "special" also noone will buy this item).
I've made new versions of my patches recognize 0 price items as unsellable. They can now be identified and repaired (for 1 gold though). I'll test your script with the new patch to see if tweaks are needed on my part.
[edit] Haven't tested the script yet, but modified patches to take items.txt address from MM code. In MM8 taking it from 0x41CE60.
Wathed the video. Very impressive! It would be easier to change item enchantments via Mouse.Item. Don't forget Ctrl+E repeats the previous command in the console.
Last edited by GrayFace on 01 Jul 2017, 21:34, edited 3 times in total.
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: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 04 Jul 2017, 17:07

GrayFace wrote:I've made new versions of my patches recognize 0 price items as unsellable. They can now be identified and repaired (for 1 gold though). I'll test your script with the new patch to see if tweaks are needed on my part.
I use hooks at 0x49003c, 0x49004c ("mouse under" event) and at 0x4bb632, 0x4bb642 ("mouse click" event) (lines 2267 - 2301 of script). There are same algorythms and both hooks are same. These parts checks if item's index is in interval of sellable items, and if true, then jump to one address, else - to another, no any special cases depends of item's type. I think, hook could be set at 0x490037, but i don't have good suggestions for 0x4bb630 section. In my hooks i make jumps depends on item's material, checking item's price seems more universal solution, so no need to save existing hooks if there won't be better spots.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 05 Jul 2017, 18:04

Wow! Lots of cool stuff. This is sad that now I don't have too much free time. :/

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 08 Jul 2017, 17:48

Forgot that some items can be used directly (apple, horseshoe etc.). Added handler for it. Details in video at 9:42, links are same.
Last edited by Rodril on 08 Jul 2017, 17:49, edited 1 time in total.


Return to “Might and Magic”

Who is online

Users browsing this forum: Google [Bot] and 44 guests